lxf преди 1 година
родител
ревизия
e9a97ea84c

+ 7 - 4
src/components/process/Contract.vue

@@ -140,7 +140,7 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <!-- :rules="rules.productModel" -->
-                  <el-form-item :prop="'contractProductList.' + $index + '.productModel'"  :inline-message="true">
+                  <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :inline-message="true">
                     <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
                 </div>
@@ -520,7 +520,7 @@ const formOption = reactive({
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
-  disabled: judgeStatus()
+  disabled: judgeStatus(),
 });
 const formConfig = computed(() => {
   return [
@@ -1089,11 +1089,14 @@ const handleSubmit = async () => {
       errorDiv[0].scrollIntoView();
     }, 0);
   }
-  return status;
+  return false;
+};
+const getFormData = () => {
+  return formData.data;
 };
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 const changeShroffAccount = (val) => {

+ 4 - 1
src/components/process/EHSD/Contract.vue

@@ -1045,9 +1045,12 @@ const clickCustomerProduct = () => {
   }
   openProductCustomer.value = true;
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 const changeShroffAccount = (val) => {

+ 4 - 1
src/components/process/EHSD/PriceSheet.vue

@@ -916,9 +916,12 @@ const clickCustomerProduct = () => {
   }
   openProductCustomer.value = true;
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 4 - 1
src/components/process/EHSD/Purchase.vue

@@ -935,9 +935,12 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 onMounted(() => {

+ 4 - 1
src/components/process/EHSD/Sample.vue

@@ -1055,9 +1055,12 @@ const clickCustomerProduct = () => {
   }
   openProductCustomer.value = true;
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 const changeShroffAccount = (val) => {

+ 4 - 1
src/components/process/PriceSheet.vue

@@ -838,9 +838,12 @@ onMounted(() => {
     });
   }
 });
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 5 - 3
src/components/process/PurchasePayment.vue

@@ -241,7 +241,7 @@ const rules = ref({
   supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
   invoiceType: [{ required: true, message: "请选择发票类型", trigger: "change" }],
   payType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  accountManagementId: [{ required: true, message: "请选择付款账户", trigger: "change" }],
+  // accountManagementId: [{ required: true, message: "请选择付款账户", trigger: "change" }],
   purchaseId: [{ required: true, message: "请选择采购合同", trigger: "change" }],
   money: [{ required: true, message: "请输入付款金额", trigger: "blur" }],
 });
@@ -280,7 +280,6 @@ const getDict = () => {
             value: item.dictKey,
           };
         });
-        console.log(fundsPaymentMethod.value);
       }
     });
   proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
@@ -438,9 +437,12 @@ onMounted(async () => {
     }
   }
 });
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 4 - 1
src/components/process/PurchaseRefund.vue

@@ -250,9 +250,12 @@ const handleSubmit = async () => {
   }
   return status;
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 // 接收父组件的传值

+ 4 - 1
src/components/process/ReturnGood.vue

@@ -272,9 +272,12 @@ const getDict = () => {
 };
 getDict();
 
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 4 - 1
src/components/process/SendFunds.vue

@@ -653,9 +653,12 @@ const handleSuccess = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 const judgeStatus = () => {

+ 4 - 1
src/components/process/SendPurchase.vue

@@ -385,9 +385,12 @@ const judgeStatus = () => {
   return false;
 };
 
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 4 - 2
src/components/process/SendSubscribe.vue

@@ -250,9 +250,11 @@ const getDict = () => {
   });
 };
 getDict();
-
+const getFormData = () => {
+  return formData.data;
+};
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 </script>

+ 30 - 3
src/components/process/ServiceContract.vue

@@ -119,7 +119,7 @@
           <div v-if="judgeStatus()">
             <div v-html="getStyle(formData.data.remark)"></div>
           </div>
-          <Editor v-else :value="formData.data.remark" @updateValue="updateContentSeller" />
+          <Editor v-else :value="formData.data.remark" @updateValue="updateContentSeller" ref="remarkEditor" />
         </div>
       </template>
       <template #commodity>
@@ -334,7 +334,9 @@ import SelectGoods from "@/components/product/SelectGoods";
 import { ElMessage } from "element-plus";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
+import { useRoute } from "vue-router";
 
+const route = useRoute();
 // 接收父组件的传值
 const props = defineProps({
   queryData: Object,
@@ -374,7 +376,7 @@ const formOption = reactive({
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
-  disabled: judgeStatus(),
+  disabled: false,
 });
 const formConfig = computed(() => {
   return [
@@ -731,6 +733,7 @@ const handleHandover = (row, index) => {
 const updateContent = (val) => {
   productRow.data.remark = val;
 };
+const remarkEditor = ref(null);
 const updateContentSeller = (val) => {
   formData.data.remark = val;
 };
@@ -857,9 +860,12 @@ const handleSubmit = async () => {
   }
   return status;
 };
+const getFormData = () => {
+  return formData.data;
+};
 // 向父组件暴露
 defineExpose({
-  submitData: formData.data,
+  getFormData,
   handleSubmit,
 });
 const getStyle = (text) => {
@@ -869,6 +875,27 @@ const getStyle = (text) => {
     return "";
   }
 };
+watch(
+  props.queryData,
+  () => {
+    formOption.disabled = judgeStatus();
+    if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
+      for (var text in props.queryData) {
+        formData.data[text] = props.queryData[text];
+      }
+      if (formData.data.countryId) {
+        getCityData(formData.data.countryId, "20");
+      }
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
+      remarkEditor.value.changeHtml(formData.data.remark);
+    }
+  },
+  {
+    deep: true,
+  }
+);
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/views/process/processApproval/index.vue

@@ -192,7 +192,7 @@ const handleSubmit = async (_type) => {
     if (flag) {
       flowFormDom.value.validate((valid) => {
         if (valid) {
-          const data = { ...makeDom.value.submitData };
+          const data = makeDom.value.getFormData();
           if (flowForm.flowKey == "subscribe_flow") {
             // data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
             //   bussinessId: x.bussinessId,