Quellcode durchsuchen

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

asd26269546 vor 1 Jahr
Ursprung
Commit
14feab3e0c

+ 24 - 2
src/components/process/PriceSheet.vue

@@ -140,7 +140,7 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <!-- :rules="rules.productModel" -->
-                  <el-form-item :prop="'quotationProductList.' + $index + '.productModel'"  :inline-message="true">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :inline-message="true">
                     <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
                 </div>
@@ -350,7 +350,9 @@ import byForm from "@/components/byForm/index";
 import SelectGoods from "@/components/product/SelectGoods";
 import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
+import { useRoute } from "vue-router";
 
+const route = useRoute();
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
 const fundsPaymentMethod = ref([]);
@@ -386,7 +388,7 @@ const formOption = reactive({
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
-  disabled: judgeStatus()
+  disabled: false,
 });
 const formConfig = computed(() => {
   return [
@@ -767,6 +769,26 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
+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");
+      }
+    }
+  },
+  {
+    deep: true,
+  }
+);
 onMounted(() => {
   if (props.queryData.priceSheetId) {
     proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {

+ 22 - 5
src/components/process/SendFunds.vue

@@ -489,13 +489,30 @@ const userInfo = useUserStore().user;
 // const tenantId = "@福建宏星!#¥%……&*()";
 const tenantId = userInfo.tenantId;
 
-onMounted(() => {
-  formData.data.paymentTime = proxy.parseTime(new Date());
-  setTimeout(() => {
+watch(
+  props.queryData,
+  () => {
     if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
-      formData.data = props.queryData;
+      for (var text in props.queryData) {
+        formData.data[text] = props.queryData[text];
+      }
+      if (formData.data.fileList && formData.data.fileList.length > 0) {
+        fileList.value = formData.data.fileList.map((item) => {
+          return {
+            raw: item,
+            name: item.fileName,
+            url: item.fileUrl,
+          };
+        });
+      }
     }
-  }, 500);
+  },
+  {
+    deep: true,
+  }
+);
+onMounted(() => {
+  formData.data.paymentTime = proxy.parseTime(new Date());
 });
 const companyData = ref([]);
 const accountData = ref([]);

+ 1 - 0
src/store/modules/mail.js

@@ -1,6 +1,7 @@
 const useMailStore = defineStore(
   'mail', {
     state: () => ({
+      userMailList: [],
       selectMail: {}, //当前选中的邮箱
       currentMenu: {}, //当前选中的邮箱菜单数据
       currentId: "", //当前选中的邮箱菜单id

+ 3 - 2
src/views/connect/E-mail/mail/com/left.vue

@@ -37,7 +37,7 @@
             </div>
           </template>
         </el-tab-pane>
-        <el-tab-pane label="联系人" name="second">
+        <!-- <el-tab-pane label="联系人" name="second">
           <template #label>
             <div>
               <i
@@ -55,7 +55,7 @@
               <span>客户</span>
             </div>
           </template>
-        </el-tab-pane>
+        </el-tab-pane> -->
       </el-tabs>
       <div>
         <el-button
@@ -598,6 +598,7 @@ const getMialList = () => {
   proxy.get("/mailService/getUserEmailList").then((res) => {
     const arr = handleMapMailListData(res.data);
     mailList.value = arr;
+    mailStore.userMailList = arr;
     if (mailList.value.length) {
       // 默认赋值第一邮箱
       selectMail.value = mailList.value[0];

+ 44 - 11
src/views/connect/E-mail/mail/com/mailWrite.vue

@@ -208,12 +208,28 @@
             />
           </div>
         </el-form-item>
-        <el-form-item label="发件人" prop="replyTo">
+        <!-- <el-form-item label="发件人" prop="replyTo">
           <el-input
             v-model="formData.data.replyTo"
             placeholder="请输入"
             style="width: 50%"
           />
+        </el-form-item> -->
+        <el-form-item label="发件人" prop="replyTo">
+          <el-select
+            v-model="formData.data.replyTo"
+            filterable
+            placeholder="请选择"
+            style="width: 50%"
+            @change="handleChangeReply"
+          >
+            <el-option
+              v-for="item in userMailList"
+              :key="item.mailUser"
+              :label="item.mailUser"
+              :value="item.mailUser"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="handleSend()"> 发 送 </el-button>
@@ -231,9 +247,11 @@ import TinymceEditor from "@/components/Editor/TinymceEditor.vue";
 
 import { validEmail } from "@/utils/validate.js";
 import useMailStore from "@/store/modules/mail";
-import { nextTick } from "vue";
+import { computed, nextTick } from "vue";
 const mailStore = useMailStore();
 const { proxy } = getCurrentInstance();
+const userMailList = computed(() => mailStore.userMailList);
+let currentMail = ref({});
 const loading = ref(false);
 let uploadData = ref({});
 const fileList = ref([]);
@@ -300,7 +318,8 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   subject: [{ required: true, message: "请输入主题", trigger: "blur" }],
-  replyTo: [{ required: true, message: "请输入发件人", trigger: "blur" }],
+  // replyTo: [{ required: true, message: "请输入发件人", trigger: "blur" }],
+  replyTo: [{ required: true, message: "请输入发件人", trigger: "change" }],
 });
 const formData = reactive({
   data: {
@@ -313,6 +332,11 @@ const bcc = ref([]);
 const replyTo = ref([]);
 const submit = ref(null);
 const contentEditor = ref(null);
+
+const handleChangeReply = (val) => {
+  currentMail.value = userMailList.value.find((x) => x.mailUser === val);
+};
+
 const handleReset = () => {
   formData.data = {
     to: "",
@@ -329,6 +353,7 @@ const handleReset = () => {
   fileListCopy.value = [];
   // contentEditor.value.changeHtml("");
 };
+
 const handleSend = () => {
   submit.value.validate((valid) => {
     if (valid) {
@@ -339,12 +364,12 @@ const handleSend = () => {
           type: "info",
         });
       }
-      if (!validEmail(formData.data.replyTo)) {
-        return ElMessage({
-          message: "发件人邮箱格式不正确",
-          type: "info",
-        });
-      }
+      // if (!validEmail(formData.data.replyTo)) {
+      //   return ElMessage({
+      //     message: "发件人邮箱格式不正确",
+      //     type: "info",
+      //   });
+      // }
       if (data.content) {
         loading.value = true;
         let replyTo = [
@@ -354,8 +379,8 @@ const handleSend = () => {
           },
         ];
         const submitData = {
-          type: mailStore.selectMail.type,
-          mailboxId: mailStore.selectMail.id,
+          type: currentMail.value.type,
+          mailboxId: currentMail.value.id,
           subject: data.subject,
           content: data.content,
           to: to.value,
@@ -384,9 +409,11 @@ const handleSend = () => {
     }
   });
 };
+
 const updateContent = (val) => {
   formData.data.content = val;
 };
+
 const handleBeforeUpload = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
@@ -398,6 +425,7 @@ const handleBeforeUpload = async (file) => {
     uid: file.uid,
   });
 };
+
 const handleClose = (index, val) => {
   switch (val) {
     case 10:
@@ -548,12 +576,15 @@ const handleReplyInit = (allData, pageType) => {
     //   contentEditor.value.getFocus();
     // });
     formData.data.replyTo = mailStore.selectMail.mailUser;
+    handleChangeReply(formData.data.replyTo);
   }
 };
 // pageType 10为回复  20为转发 30为全部回复 40为再次编辑  0为写信 50为只回填收件人
 const init = () => {
   if (mailStore.currentMenu.pageType === "0") {
     handleReset();
+    formData.data.replyTo = mailStore.selectMail.mailUser;
+    handleChangeReply(formData.data.replyTo);
   } else if (mailStore.currentMenu.pageType === "10") {
     handleReplyInit(mailStore.currentMenu, "10");
   } else if (mailStore.currentMenu.pageType === "20") {
@@ -572,6 +603,8 @@ watch(
   (val) => {
     if (val === "0") {
       handleReset();
+      formData.data.replyTo = mailStore.selectMail.mailUser;
+      handleChangeReply(formData.data.replyTo);
     } else if (val === "10") {
       handleReplyInit(mailStore.currentMenu, "10");
     } else if (val === "20") {

+ 55 - 132
src/views/process/processApproval/index.vue

@@ -5,108 +5,41 @@
         <div class="commons-title title">
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
-        <SendSubscribe
-          ref="makeDom"
-          v-if="flowForm.flowKey == 'subscribe_flow'"
-        ></SendSubscribe>
-        <SendPurchase
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'purchase_flow'"
-          :queryData="queryData.data"
-        ></SendPurchase>
-        <SendFunds
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
-          :queryData="queryData.data"
-        ></SendFunds>
-        <ReturnGood
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'sales_return_flow'"
-          :queryData="queryData.data"
-        ></ReturnGood>
-        <PurchaseRefund
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'refund_flow'"
-          :queryData="queryData.data"
-        ></PurchaseRefund>
-        <PurchasePayment
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'pay_flow'"
-          :queryData="queryData.data"
-        ></PurchasePayment>
+        <SendSubscribe ref="makeDom" v-if="flowForm.flowKey == 'subscribe_flow'"></SendSubscribe>
+        <SendPurchase ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_flow'" :queryData="queryData.data"></SendPurchase>
+        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
+        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'sales_return_flow'" :queryData="queryData.data"></ReturnGood>
+        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
+        <PurchasePayment ref="makeDom" v-else-if="flowForm.flowKey == 'pay_flow'" :queryData="queryData.data"></PurchasePayment>
         <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD
-            ref="makeDom"
-            v-if="flowForm.tenantType === 'EHSD'"
-            :queryData="queryData.data"
-          ></PriceSheetEHSD>
-          <PriceSheet
-            ref="makeDom"
-            v-else
-            :queryData="queryData.data"
-          ></PriceSheet>
+          <PriceSheetEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></PriceSheetEHSD>
+          <PriceSheet ref="makeDom" v-else :queryData="queryData.data"></PriceSheet>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
-          <ContractEHSD
-            ref="makeDom"
-            v-if="flowForm.tenantType === 'EHSD'"
-            :queryData="queryData.data"
-          ></ContractEHSD>
+          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
           <Contract ref="makeDom" v-else :queryData="queryData.data"></Contract>
         </template>
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
-          <PurchaseEHSD
-            ref="makeDom"
-            :queryData="queryData.data"
-          ></PurchaseEHSD>
+          <PurchaseEHSD ref="makeDom" :queryData="queryData.data"></PurchaseEHSD>
         </template>
 
-        <ServiceContract
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'service_contract_flow'"
-          :queryData="queryData.data"
-        ></ServiceContract>
+        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
         <!-- 维多利亚 -->
-        <SendSubscribeWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"
-          :queryData="queryData.data"
-        ></SendSubscribeWDLY>
-        <SendPurchaseWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_purchase'"
-          :queryData="queryData.data"
-        ></SendPurchaseWDLY>
+        <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'" :queryData="queryData.data"></SendSubscribeWDLY>
+        <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input
-              type="textarea"
-              placeholder="请输入"
-              v-model="flowForm.remark"
-            >
-            </el-input>
+            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button
-              type="primary"
-              v-if="approvalRecordData.buttonInfoList.length == 0"
-              @click="handleSubmit"
-              >提交</el-button
-            >
-            <el-button
-              type="primary"
-              v-else
-              v-for="i in approvalRecordData.buttonInfoList"
-              :key="i.type"
-              @click="handleSubmit(i.type)"
-              >{{ i.name }}</el-button
-            >
+            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit">提交</el-button>
+            <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" @click="handleSubmit(i.type)">{{ i.name }}</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -118,8 +51,16 @@
             <li
               v-for="item in recordList"
               :key="item.id"
-              :class="!route.query.id ? '' : 
-                item.status == 2 ? 'flow-orange' : item.status == 3 && !route.query.id ? 'flow-orange' : item.status == 3 && route.query.id ? 'flow-grey' : ''
+              :class="
+                !route.query.id
+                  ? ''
+                  : item.status == 2
+                  ? 'flow-orange'
+                  : item.status == 3 && !route.query.id
+                  ? 'flow-orange'
+                  : item.status == 3 && route.query.id
+                  ? 'flow-grey'
+                  : ''
               ">
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
@@ -129,9 +70,7 @@
                 <div class="name">{{ item.nodeName }}</div>
                 <div class="remark">
                   <div class="label">
-                    <span v-if="item.status != 3">办理人:</span
-                    >{{ item.processedUser
-                    }}<span class="time">{{ item.processedDate }}</span>
+                    <span v-if="item.status != 3">办理人:</span>{{ item.processedUser }}<span class="time">{{ item.processedDate }}</span>
                   </div>
                   {{ item.remark }}
                 </div>
@@ -150,18 +89,8 @@
     <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
-          <el-select
-            v-model="flowForm.handleUserId"
-            placeholder="请选择"
-            filterable
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in nextHandleUser"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
+          <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
+            <el-option v-for="item in nextHandleUser" :label="item.name" :value="item.id"> </el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -313,18 +242,16 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.quotationProductList = data.quotationProductList.map(
-                (item) => {
-                  let ehsdJson = JSON.stringify({
-                    packMethod: item.packMethod,
-                    tradeMethods: item.tradeMethods,
-                  });
-                  return {
-                    ...item,
-                    ehsdJson: ehsdJson,
-                  };
-                }
-              );
+              data.quotationProductList = data.quotationProductList.map((item) => {
+                let ehsdJson = JSON.stringify({
+                  packMethod: item.packMethod,
+                  tradeMethods: item.tradeMethods,
+                });
+                return {
+                  ...item,
+                  ehsdJson: ehsdJson,
+                };
+              });
             }
           } else if (flowForm.flowKey == "contract_flow") {
             if (flowForm.tenantType === "EHSD") {
@@ -353,18 +280,16 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.contractProductList = data.contractProductList.map(
-                (item) => {
-                  let ehsdJson = JSON.stringify({
-                    packMethod: item.packMethod,
-                    tradeMethods: item.tradeMethods,
-                  });
-                  return {
-                    ...item,
-                    ehsdJson: ehsdJson,
-                  };
-                }
-              );
+              data.contractProductList = data.contractProductList.map((item) => {
+                let ehsdJson = JSON.stringify({
+                  packMethod: item.packMethod,
+                  tradeMethods: item.tradeMethods,
+                });
+                return {
+                  ...item,
+                  ehsdJson: ehsdJson,
+                };
+              });
             }
           } else if (flowForm.flowKey == "sample_flow") {
             if (data.fileList && data.fileList.length > 0) {
@@ -531,7 +456,7 @@ const getRecords = (_id) => {
       .then((res) => {
         console.log(res, "ass");
         recordList.value = res.recordList;
-        queryData.data.recordList = res.recordList
+        queryData.data.recordList = res.recordList;
         approvalRecordData.value = res;
       });
   } else {
@@ -544,19 +469,17 @@ const getRecords = (_id) => {
         recordList.value = res;
       });
   }
+  console.log(queryData.data, "222");
 };
-onMounted(() => {
+onMounted(async () => {
   //processType 10 为修改 20为查看
   if (route.query.processType == 10 || route.query.processType == 20) {
-    proxy
-      .post("/flowProcess/getStartData", { flowId: route.query.id })
-      .then((res) => {
-        queryData.data = { ...res };
-      });
+    await proxy.post("/flowProcess/getStartData", { flowId: route.query.id }).then((res) => {
+      queryData.data = { ...res };
+    });
   } else {
     queryData.data = { ...route.query };
   }
-
   flowForm.flowKey = route.query.flowKey;
   flowForm.tenantType = route.query.tenantType;
   getRecords(route.query.id);

+ 67 - 43
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -146,60 +146,71 @@ let rules = ref({
   count: [{ required: true, message: "请输入本次到货", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
+const statusData = ref([
+  {
+    label: "审批中",
+    value: "10",
+  },
+  {
+    label: "驳回",
+    value: "20",
+  },
+  {
+    label: "已采购",
+    value: "30",
+  },
+  {
+    label: "终止",
+    value: "99",
+  },
+  {
+    label: "已作废",
+    value: "88",
+  },
+]);
+const arrivalStatus = ref([
+  {
+    label: "未到货",
+    value: "0",
+  },
+  {
+    label: "部分到货",
+    value: "10",
+  },
+  {
+    label: "已到货",
+    value: "20",
+  },
+]);
+const paymentStatus = ref([
+  {
+    label: "未付款",
+    value: "0",
+  },
+  {
+    label: "部分付款",
+    value: "10",
+  },
+  {
+    label: "已付款",
+    value: "20",
+  },
+]);
 const selectConfig = reactive([
   {
     label: "采购状态",
     prop: "purchaseStatus",
-    data: [
-      {
-        label: "审批中",
-        value: "10",
-      },
-      {
-        label: "已驳回",
-        value: "20",
-      },
-      {
-        label: "已采购",
-        value: "30",
-      },
-    ],
+    data: statusData.value,
   },
   {
     label: "到货状态",
     prop: "arrivalStatus",
-    data: [
-      {
-        label: "未到货",
-        value: "0",
-      },
-      {
-        label: "部分到货",
-        value: "10",
-      },
-      {
-        label: "已到货",
-        value: "20",
-      },
-    ],
+    data: arrivalStatus.value,
   },
   {
     label: "付款状态",
     prop: "payStatus",
-    data: [
-      {
-        label: "未付款",
-        value: "1",
-      },
-      {
-        label: "部分付款",
-        value: "2",
-      },
-      {
-        label: "已付款",
-        value: "3",
-      },
-    ],
+    data: paymentStatus.value,
   },
 ]);
 const config = computed(() => {
@@ -220,7 +231,10 @@ const config = computed(() => {
     {
       attrs: {
         label: "采购金额",
-        prop: "remarks",
+        prop: "amount",
+      },
+      render(amount) {
+        return proxy.moneyFormat(amount, 2);
       },
     },
     {
@@ -240,18 +254,28 @@ const config = computed(() => {
         label: "采购状态",
         prop: "purchaseStatus",
       },
+      render(status) {
+        return proxy.dictValueLabel(status, statusData.value);
+      },
     },
+
     {
       attrs: {
         label: "到货状态",
         prop: "arrivalStatus",
       },
+      render(status) {
+        return proxy.dictValueLabel(status, arrivalStatus.value);
+      },
     },
     {
       attrs: {
         label: "付款状态",
         prop: "payStatus",
       },
+      render(status) {
+        return proxy.dictValueLabel(status, paymentStatus.value);
+      },
     },
 
     {

+ 1 - 1
src/views/salesMange/shipmentMange/packing/index.vue

@@ -565,7 +565,7 @@ const config = computed(() => {
         width: 90,
       },
       render(status) {
-        return status == 1 ? "出货" : status == 0 ? "未出货" : "";
+        return status == 1 ? "出货" : status == 0 ? "未出货" : "";
       },
     },
     {