zhangjie 1 سال پیش
والد
کامیت
4eeb18a506

+ 1 - 6
src/components/common/select-type-user/index.vue

@@ -60,12 +60,7 @@ onMounted(() => {
 watch(
   () => props.modelValue,
   (val) => {
-    if(optionList.value.filter((item) => val === item.id).length!==0){
-      selected.value = val;
-    }else{
-      selected.value = null;
-    }
-
+    selected.value = val;
   },
   {
     immediate: true,

+ 4 - 4
src/views/service-unit/dispatch/dispatch-manage/index.vue

@@ -395,15 +395,15 @@ const handleDelineation = (row) => {
       onConfirm: () => {
         confirmDia.hide();
         curRow.value = row;
-        curCrmIds.value = [curRow.value.id];
-        curCrmCustomType.value = curRow.customType;
+        curCrmIds.value = [row.id];
+        curCrmCustomType.value = row.customType;
         showMultDelineationDialog.value = true;
       },
     });
   } else {
     curRow.value = row;
-    curCrmIds.value = [curRow.value.id];
-    curCrmCustomType.value = curRow.customType;
+    curCrmIds.value = [row.id];
+    curCrmCustomType.value = row.customType;
     showMultDelineationDialog.value = true;
   }
 };

+ 8 - 1
src/views/service-unit/service-unit-manage/range-manage/add-range-dialog.vue

@@ -179,8 +179,10 @@ const computedParams = computed(() => {
 });
 
 const selectedRowKeys = ref([]);
-const selectChange = (value) => {
+const selectedRows = ref([]);
+const selectChange = (value, { selectedRowData }) => {
   selectedRowKeys.value = value;
+  selectedRows.value = selectedRowData;
 };
 const columns = [
   {
@@ -229,6 +231,11 @@ const handlerBatchBind = () => {
     MessagePlugin.error('您还没有选择任何派单!');
     return;
   }
+  const productType = selectedRows.value[0].productType;
+  if (selectedRows.value.some((item) => item.productType !== productType)) {
+    MessagePlugin.error('只能操作统一客户类型的数据');
+    return;
+  }
   showMultDelineationDialog.value = true;
 };
 

+ 11 - 1
src/views/service-unit/service-unit-manage/regional-planning/add-region-dialog.vue

@@ -25,6 +25,7 @@
       <t-form-item label="区域" name="targetValue" requiredMark>
         <div style="height: 400px">
           <t-transfer
+            v-if="visible"
             v-model="targetValue"
             v-model:checked="checkedRef"
             :data="areaData"
@@ -48,7 +49,7 @@
 </template>
 
 <script setup name="AddRegionDialog">
-import { ref, computed } from 'vue';
+import { ref, computed, watch } from 'vue';
 import { MessagePlugin } from 'tdesign-vue-next';
 import useClearDialog from '@/hooks/useClearDialog';
 import { serviceRegionEditApi } from '@/api/service-unit';
@@ -151,6 +152,15 @@ const save = async () => {
   emit('update:visible', false);
   emit('success');
 };
+
+watch(
+  () => props.visible,
+  (val) => {
+    if (!val) {
+      targetValue.value = [];
+    }
+  }
+);
 </script>
 
 <style lang="less" scoped>

+ 3 - 1
src/views/sop/components/dynamic-form-item/SIGN.vue

@@ -23,7 +23,6 @@ const disabled = computed(() => {
 });
 
 const emitChange = () => {
-  valueData.value = canvasRef.value.toDataURL();
   emit('update:modelValue', valueData.value);
   emit('change', valueData.value);
 };
@@ -46,6 +45,7 @@ const initCanvas = () => {
   canvasRef.value.addEventListener('mouseup', (e) => {
     isDrawing = false;
 
+    valueData.value = canvasRef.value.toDataURL();
     emitChange();
   });
 };
@@ -53,6 +53,8 @@ const initCanvas = () => {
 const clear = () => {
   canvasRef.value.width = canvasRef.value.width;
   canvasRef.value.height = canvasRef.value.height;
+  valueData.value = '';
+  emitChange();
 };
 
 const drawImg = () => {