소스 검색

测试合并正式

asd26269546 1 년 전
부모
커밋
eeebedb75d
49개의 변경된 파일2741개의 추가작업 그리고 1161개의 파일을 삭제
  1. 1 0
      package.json
  2. 14 0
      src/assets/styles/element-ui.scss
  3. 1 1
      src/assets/styles/index.scss
  4. 2 2
      src/components/headerBar/header-bar.vue
  5. 193 13
      src/components/process/Contract.vue
  6. 36 11
      src/components/process/PriceSheet.vue
  7. 57 79
      src/components/process/ReturnGood.vue
  8. 4 2
      src/components/process/SendFunds.vue
  9. 289 75
      src/components/process/SendPurchase.vue
  10. 124 109
      src/components/process/SendSubscribe.vue
  11. 42 9
      src/components/process/ServiceContract.vue
  12. 39 202
      src/components/product/SelectGoods.vue
  13. 1 1
      src/layout/components/TagsView/index.vue
  14. 23 14
      src/store/modules/tagsView.js
  15. 1 1
      src/views/connect/E-mail/mail/com/mailDetail.vue
  16. 133 12
      src/views/connect/E-mail/mail/com/mailList.vue
  17. 28 2
      src/views/connect/E-mail/mail/com/right/contract/pi.vue
  18. 26 2
      src/views/connect/E-mail/mail/com/right/contract/quotation.vue
  19. 8 1
      src/views/connect/E-mail/mail/com/right/documents/index.vue
  20. 8 1
      src/views/connect/E-mail/mail/com/right/netdisk/enterprise.vue
  21. 8 1
      src/views/connect/E-mail/mail/com/right/purchase/index.vue
  22. 1 1
      src/views/connect/E-mail/mail/index.vue
  23. 511 0
      src/views/finance/fundManage/accountStatement/index.vue
  24. 12 12
      src/views/finance/fundManage/flow/index.vue
  25. 1 0
      src/views/finance/fundManage/funds/index.vue
  26. 191 5
      src/views/index.vue
  27. 26 78
      src/views/process/processApproval/auxiliary.vue
  28. 61 140
      src/views/process/processApproval/index.vue
  29. 21 25
      src/views/process/processConfig/vueFlow.vue
  30. 1 0
      src/views/product/product/index.vue
  31. 1 0
      src/views/production/project/bom/index.vue
  32. 32 0
      src/views/publicModule/companyConfig/index.vue
  33. 1 0
      src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue
  34. 244 46
      src/views/purchaseManage/purchaseManage/handoverSlip/index.vue
  35. 31 1
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  36. 1 0
      src/views/purchaseManage/purchaseManage/returnGoods/index.vue
  37. 1 0
      src/views/purchaseManage/purchaseManage/subscribe/index.vue
  38. 1 0
      src/views/purchaseManage/purchasePayment/payment/index.vue
  39. 1 0
      src/views/purchaseManage/purchasePayment/refund/index.vue
  40. 95 156
      src/views/purchaseManage/supplier/supplyPrice/index.vue
  41. 20 2
      src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue
  42. 131 24
      src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue
  43. 20 3
      src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue
  44. 55 18
      src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue
  45. 48 3
      src/views/purchaseSales/outAndInWarehouse/warehouseAdjustment/index.vue
  46. 75 35
      src/views/purchaseSales/stockManage/inventory/index.vue
  47. 1 1
      src/views/salesMange/saleContract/claim/index.vue
  48. 116 73
      src/views/salesMange/saleContract/contract/index.vue
  49. 4 0
      src/views/salesMange/saleContract/priceSheet/index.vue

+ 1 - 0
package.json

@@ -44,6 +44,7 @@
     "moment": "^2.29.4",
     "nprogress": "0.2.0",
     "pinia": "2.0.22",
+    "pubsub-js": "^1.9.4",
     "sortablejs": "^1.15.0",
     "typescript": "^5.0.4",
     "vue": "3.2.45",

+ 14 - 0
src/assets/styles/element-ui.scss

@@ -141,4 +141,18 @@
 
 .is-current{
   background-color: #EFF6FF!important;
+}
+
+.el-input.is-disabled .el-input__wrapper{
+  background: #fafafa!important;
+  
+}
+.el-input.is-disabled .el-input__inner{
+  -webkit-text-fill-color:#606266!important;
+  color:#606266!important;
+}
+.el-textarea.is-disabled .el-textarea__inner{
+  background: #fafafa!important;
+  -webkit-text-fill-color:#606266!important;
+  color:#606266!important;
 }

+ 1 - 1
src/assets/styles/index.scss

@@ -195,7 +195,7 @@ aside {
 
 .commons-title{
   font-size: 14px;
-  font-weight: 500;
+  font-weight: bold;
   margin-bottom: 20px;
   padding-left: 20px;
   position: relative;

+ 2 - 2
src/components/headerBar/header-bar.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="main" class="header-bar">
+  <div id="main" class="header-bar" @click="isChildMenu = false">
     <header>
       <ul class="nav">
         <!-- <div class="logo">ByteSailing</div> -->
@@ -8,7 +8,7 @@
           <el-image v-else style="width: 120px; height: 30px" :src="logoUrl" fit="scale-down" />
         </div>
         <li class="header-bar-hover-warp nav-li" :class="isChildMenu ? 'active' : ''">
-          <div @click="isChildMenu = !isChildMenu" class="menu-modal">
+          <div @click.stop="isChildMenu = !isChildMenu" class="menu-modal">
             <i class="iconfont icon-icomx_gongndh" style="margin: 0 5px 0 0"></i>
             {{$t('header.functionGuide')}}
             <i class="iconfont icon-iconm_xialan1" style="margin: 0 0 0 3px"></i>

+ 193 - 13
src/components/process/Contract.vue

@@ -127,11 +127,12 @@
               </template>
             </el-table-column>
             <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column label="商品名称" min-width="200">
+            <el-table-column prop="name" label="商品中文名" width="160" />
+            <el-table-column label="商品英文名" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品名" />
+                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
                   </el-form-item>
                 </div>
               </template>
@@ -139,7 +140,6 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <!-- :rules="rules.productModel" -->
                   <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :inline-message="true">
                     <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
@@ -147,7 +147,7 @@
               </template>
             </el-table-column>
             <el-table-column prop="unit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
-            <el-table-column label="数量" width="160">
+            <el-table-column label="数量" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
@@ -181,7 +181,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amount" label="金额" width="140" />
+            <el-table-column prop="amount" label="金额" width="100" />
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template #default="{ row, $index }">
                 <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
@@ -373,8 +373,16 @@
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
-              <el-form-item label="交货期限" prop="deliveryTime">
-                <el-date-picker v-model="formData.data.deliveryTime" type="date" placeholder="请选择交货期限" value-format="YYYY-MM-DD" />
+              <el-form-item label="交货期限 (天)" prop="deliveryTime">
+                <!-- <el-date-picker v-model="formData.data.deliveryTime" type="date" placeholder="请选择交货期限" value-format="YYYY-MM-DD" /> -->
+                <el-input-number
+                  onmousewheel="return false;"
+                  v-model="formData.data.deliveryTime"
+                  placeholder="请输入交货期限"
+                  style="width: 100%"
+                  :precision="0"
+                  :controls="false"
+                  :min="0" />
               </el-form-item>
             </el-col>
             <el-col :span="7">
@@ -434,8 +442,8 @@
       </template>
     </byForm>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
 
     <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
@@ -475,6 +483,7 @@ import { ElMessage } from "element-plus";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
+import Pubsub from "pubsub-js";
 
 const route = useRoute();
 // 接收父组件的传值
@@ -500,6 +509,7 @@ const openProduct = ref(false);
 const activeName = ref("");
 const formData = reactive({
   data: {
+    contractType: "1",
     amount: undefined,
     contractProductList: [],
     contractProjectList: [],
@@ -595,7 +605,7 @@ const rules = ref({
   buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
   buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品名", trigger: "blur" }],
+  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
   productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
@@ -603,7 +613,7 @@ const rules = ref({
   payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "change" }],
+  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "blur" }],
   paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
   advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
   shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
@@ -694,8 +704,65 @@ const changeTemplate = (val) => {
           if (detailCorporation.countryEnStr) {
             formData.data.sellCountryName = detailCorporation.countryEnStr;
           }
+          if (res.provinceEnStr) {
+            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
+          }
+          if (res.cityEnStr) {
+            formData.data.sellCityName = detailCorporation.cityEnStr;
+          }
+          if (detailCorporation.countryEnStr) {
+            formData.data.sellCountryName = detailCorporation.countryEnStr;
+          } else {
+            proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
+              let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
+              if (sellCountryData && sellCountryData.length > 0) {
+                formData.data.sellCountryName = sellCountryData[0].chineseName;
+              } else {
+                formData.data.sellCountryName = "";
+              }
+            });
+          }
           if (detailCorporation.provinceEnStr) {
             formData.data.sellProvinceName = detailCorporation.provinceEnStr;
+          } else if (detailCorporation.countryId) {
+            proxy
+              .post("/customizeArea/list", {
+                parentId: detailCorporation.countryId,
+              })
+              .then((resProvince) => {
+                let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
+                if (sellProvinceData && sellProvinceData.length > 0) {
+                  formData.data.sellProvinceName = sellProvinceData[0].name;
+                } else {
+                  formData.data.sellProvinceName = "";
+                }
+              });
+          } else {
+            formData.data.sellProvinceName = "";
+          }
+
+          if (detailCorporation.cityEnStr) {
+            formData.data.sellCityName = detailCorporation.cityEnStr;
+          } else if (detailCorporation.provinceId) {
+            proxy
+              .post("/customizeArea/list", {
+                parentId: detailCorporation.provinceId,
+              })
+              .then((resCity) => {
+                let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
+                if (sellCityData && sellCityData.length > 0) {
+                  formData.data.sellCityName = sellCityData[0].name;
+                } else {
+                  formData.data.sellCityName = "";
+                }
+              });
+          } else {
+            formData.data.sellCityName = "";
+          }
+          if (detailCorporation.addressEn) {
+            formData.data.sellAddress = detailCorporation.addressEn;
+          } else {
+            formData.data.sellAddress = detailCorporation.address;
           }
           if (detailCorporation.cityEnStr) {
             formData.data.sellCityName = detailCorporation.cityEnStr;
@@ -820,6 +887,92 @@ const changeCustomer = (val) => {
     formData.data.buyPostalCode = "";
     formData.data.buyAddress = "";
   }
+  getDecisionAids();
+};
+let auxiliaryData = ref([
+  {
+    label: "最近合同",
+    data: [],
+  },
+  {
+    label: "产品价格",
+    data: [],
+  },
+]);
+const emit = defineEmits(["auxiliaryChange"]);
+const getDecisionAids = () => {
+  let data = {
+    buyCorporationId: formData.data.buyCorporationId,
+    productIdList: [],
+  };
+  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+    data.productIdList = formData.data.contractProductList.map((item) => item.productId);
+  }
+  proxy.post("/contract/decisionAid", data).then((res) => {
+    if (res.lastContractList && res.lastContractList.length > 0) {
+      auxiliaryData.value[0].data = res.lastContractList.map((item) => {
+        return [
+          {
+            label: "合同编号",
+            value: item.code,
+            style: {
+              color: "#0084FF",
+            },
+            id: item.id,
+            num: 1,
+            // fn: () => {},
+          },
+          {
+            label: "下单日期",
+            value: item.createTime,
+            id: item.id,
+            num: 1,
+          },
+          {
+            label: "合同金额",
+            value: item.currency + item.amount,
+            id: item.id,
+            num: 1,
+          },
+        ];
+      });
+    } else {
+      auxiliaryData.value[0].data = [];
+    }
+    if (res.productPriceList && res.productPriceList.length > 0) {
+      auxiliaryData.value[1].data = res.productPriceList.map((item) => {
+        return [
+          {
+            label: "产品名称",
+            value: item.name,
+            id: item.id,
+            num: 1,
+          },
+          {
+            label: "最近价格",
+            value: item.lastPrice,
+            id: item.id,
+            num: 1,
+          },
+          {
+            label: "历史最高",
+            value: item.maxPrice,
+            id: item.id,
+            num: 1,
+          },
+          {
+            label: "历史最低",
+            value: item.minPrice,
+            id: item.id,
+            num: 1,
+          },
+        ];
+      });
+    } else {
+      auxiliaryData.value[1].data = [];
+    }
+    emit("auxiliaryChange", auxiliaryData.value);
+  });
 };
 const createFilter = (queryString) => {
   return (restaurant) => {
@@ -835,8 +988,20 @@ const handlePerson = (item) => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.contractProductList.filter((itemProduct) => itemProduct.productId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
     formData.data.contractProductList = formData.data.contractProductList.concat(
-      goods.map((item) => {
+      afterFiltering.map((item) => {
         let fileUrl = "";
         if (item.fileList && item.fileList.length > 0) {
           fileUrl = item.fileList[0].fileUrl;
@@ -852,6 +1017,7 @@ const pushGoods = (goods) => {
           fileUrl: fileUrl,
           code: item.code,
           productId: item.id,
+          name: item.name,
           productName: name,
           productModel: item.spec,
           unit: item.unit,
@@ -864,7 +1030,7 @@ const pushGoods = (goods) => {
       })
     );
     formData.data.contractShipmentList = formData.data.contractShipmentList.concat(
-      goods.map((item) => {
+      afterFiltering.map((item) => {
         let name = item.name;
         if (item.standardJson) {
           let standardJson = JSON.parse(item.standardJson);
@@ -886,6 +1052,7 @@ const pushGoods = (goods) => {
       type: "success",
     });
     openProduct.value = false;
+    getDecisionAids();
   } else {
     ElMessage("请选择至少一件商品");
   }
@@ -1009,6 +1176,7 @@ const handleRemove = async (index, row) => {
   formData.data.contractShipmentList = formData.data.contractShipmentList.filter((item) => item.productId !== row.productId);
   await formData.data.contractProductList.splice(index, 1);
   totalAmount();
+  getDecisionAids();
 };
 const calculationAmount = () => {
   nextTick(() => {
@@ -1159,6 +1327,18 @@ watch(
     deep: true,
   }
 );
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+    data = formData.data.contractProductList.map((item) => {
+      return {
+        id: item.productId,
+        name: item.name,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 36 - 11
src/components/process/PriceSheet.vue

@@ -127,11 +127,12 @@
               </template>
             </el-table-column>
             <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column label="商品名称" min-width="200">
+            <el-table-column prop="name" label="商品中文名" width="160" />
+            <el-table-column label="商品英文名" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'quotationProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品名" />
+                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
                   </el-form-item>
                 </div>
               </template>
@@ -139,7 +140,6 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <!-- :rules="rules.productModel" -->
                   <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :inline-message="true">
                     <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
@@ -147,7 +147,7 @@
               </template>
             </el-table-column>
             <el-table-column prop="unit" label="单位" width="100" />
-            <el-table-column label="数量" width="160">
+            <el-table-column label="数量" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
@@ -181,9 +181,9 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amount" label="金额" width="140" />
-            <el-table-column label="操作" width="80" fixed="right">
-              <template #default="{ row, $index }">
+            <el-table-column prop="amount" label="金额" width="100" />
+            <el-table-column align="center" label="操作" width="80" fixed="right">
+              <template #default="{ $index }">
                 <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
@@ -339,8 +339,8 @@
       </template>
     </byForm>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>
@@ -448,7 +448,7 @@ const rules = ref({
   buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
   buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品名", trigger: "blur" }],
+  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
   productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
@@ -661,8 +661,20 @@ const handlePerson = (item) => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.quotationProductList.filter((itemProduct) => itemProduct.productId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
     formData.data.quotationProductList = formData.data.quotationProductList.concat(
-      goods.map((item) => {
+      afterFiltering.map((item) => {
         let fileUrl = "";
         if (item.fileList && item.fileList.length > 0) {
           fileUrl = item.fileList[0].fileUrl;
@@ -671,6 +683,7 @@ const pushGoods = (goods) => {
           fileUrl: fileUrl,
           code: item.code,
           productId: item.id,
+          name: item.name,
           productName: item.name,
           productModel: item.spec,
           unit: item.unit,
@@ -858,6 +871,18 @@ defineExpose({
   getFormData,
   handleSubmit,
 });
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+    data = formData.data.quotationProductList.map((item) => {
+      return {
+        id: item.productId,
+        name: item.name,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 57 - 79
src/components/process/ReturnGood.vue

@@ -1,90 +1,46 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm
-      :formConfig="formConfig"
-      :formOption="formOption"
-      v-model="formData.data"
-      :rules="rules"
-      ref="formDom"
-    >
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
       <template #details>
         <div style="width: 100%">
-          <el-button
-            type="primary"
-            @click="openProduct = true"
-            style="margin-bottom: 10px"
-          >
-            添加物品
-          </el-button>
+          <el-button type="primary" @click="openProduct = true" style="margin-bottom: 10px"> 添加物品 </el-button>
           <el-table :data="formData.data.salesReturnDetailList">
             <el-table-column prop="productCode" label="货品编码" />
             <el-table-column prop="productName" label="货品名称" />
             <el-table-column prop="productSpec" label="规格型号" />
-            <el-table-column
-              prop="productUnit"
-              label="单位"
-              :formatter="(row) => dictValueLabel(row.productUnit, productUnit)"
-            />
+            <el-table-column prop="productUnit" label="单位" :formatter="(row) => dictValueLabel(row.productUnit, productUnit)" />
             <el-table-column prop="count" label="退货数量" min-width="150">
               <template #default="{ row, $index }">
-                <el-form-item
-                  :prop="'salesReturnDetailList.' + $index + '.count'"
-                  :rules="rules.count"
-                  :inline-message="true"
-                >
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="row.count"
-                    :precision="4"
-                    :controls="false"
-                    :min="0"
-                  />
+                <el-form-item :prop="'salesReturnDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true">
+                  <el-input-number onmousewheel="return false;" v-model="row.count" :precision="4" :controls="false" :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
             <el-table-column prop="remark" label="退货原因" min-width="150">
               <template #default="{ row, $index }">
-                <el-form-item
-                  :prop="'salesReturnDetailList.' + $index + '.remark'"
-                  :rules="rules.remark"
-                  :inline-message="true"
-                >
-                  <el-input
-                    v-model="row.remark"
-                    placeholder="请输入"
-                    type="textarea"
-                  />
+                <el-form-item :prop="'salesReturnDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
+                  <el-input v-model="row.remark" placeholder="请输入" type="textarea" />
                 </el-form-item>
               </template>
             </el-table-column>
             <el-table-column prop="zip" label="操作" width="100">
               <template #default="{ $index }">
-                <el-button type="primary" link @click="handleRemove($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
         </div>
       </template>
     </byForm>
-    <el-dialog
-      v-model="openProduct"
-      title="选择货品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>
 
 <script setup>
 import byForm from "@/components/byForm/index";
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage } from "element-plus";
 import SelectGoods from "@/components/product/SelectGoods";
 import useUserStore from "@/store/modules/user";
 const { proxy } = getCurrentInstance();
@@ -197,23 +153,38 @@ const handleRemove = (index) => {
   });
 };
 const pushGoods = (goods) => {
-  const arr = goods.map((x) => ({
-    goodType: x.goodType,
-    productCode: x.code,
-    productName: x.name,
-    productSpec: x.spec,
-    productUnit: x.unit,
-    count: 0,
-    bussinessId: x.id,
-    remark: "",
-  }));
-  formData.data.salesReturnDetailList =
-    formData.data.salesReturnDetailList.concat(arr);
-  openProduct.value = false;
-  return ElMessage({
-    message: "添加成功!",
-    type: "success",
-  });
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.salesReturnDetailList && formData.data.salesReturnDetailList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.salesReturnDetailList.filter((itemProduct) => itemProduct.bussinessId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
+    const arr = afterFiltering.map((x) => ({
+      goodType: x.goodType,
+      productCode: x.code,
+      productName: x.name,
+      productSpec: x.spec,
+      productUnit: x.unit,
+      count: 0,
+      bussinessId: x.id,
+      remark: "",
+    }));
+    formData.data.salesReturnDetailList = formData.data.salesReturnDetailList.concat(arr);
+    openProduct.value = false;
+    return ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    ElMessage("请选择至少一件物品");
+  }
 };
 
 // 接收父组件的传值
@@ -233,9 +204,7 @@ onMounted(() => {
 
 const judgeStatus = () => {
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter(
-      (item) => item.status === 2 && item.nodeType !== 1
-    );
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
     if (data && data.length > 0) {
       return true;
     }
@@ -247,10 +216,7 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
-    if (
-      props.queryData &&
-      (route.query.processType == 10 || route.query.processType == 20)
-    ) {
+    if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
       for (const key in props.queryData) {
         formData.data[key] = props.queryData[key];
       }
@@ -280,6 +246,18 @@ defineExpose({
   getFormData,
   handleSubmit,
 });
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.salesReturnDetailList && formData.data.salesReturnDetailList.length > 0) {
+    data = formData.data.salesReturnDetailList.map((item) => {
+      return {
+        id: item.bussinessId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped></style>

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

@@ -111,7 +111,7 @@
                 <el-input-number
                   onmousewheel="return false;"
                   v-model="row.amount"
-                  :precision="4"
+                  :precision="2"
                   :controls="false"
                   :min="0"
                   style="width: 100%"
@@ -650,7 +650,9 @@ const handleChangeAmount = () => {
   let sum = 0;
   for (let i = 0; i < formData.data.accountRequestFundsDetailList.length; i++) {
     const e = formData.data.accountRequestFundsDetailList[i];
-    sum += e.amount;
+    if (e.amount) {
+      sum = Number(parseFloat(Number(sum) + Number(e.amount)).toFixed(2))
+    }
   }
   formData.data.total = sum;
 };

+ 289 - 75
src/components/process/SendPurchase.vue

@@ -103,7 +103,7 @@
                 <el-input-number
                   onmousewheel="return false;"
                   v-model="row.count"
-                  :precision="4"
+                  :precision="2"
                   :controls="false"
                   :min="0"
                   @change="handleChangeAmount"
@@ -121,7 +121,7 @@
                 <el-input-number
                   onmousewheel="return false;"
                   v-model="row.price"
-                  :precision="4"
+                  :precision="2"
                   :controls="false"
                   :min="0"
                   @change="handleChangeAmount"
@@ -188,7 +188,7 @@
               >
                 <el-input-number
                   v-model="row.price"
-                  :precision="4"
+                  :precision="2"
                   :controls="false"
                   @change="handleChangeAmount"
                 />
@@ -240,12 +240,14 @@
       </el-row>
     </el-form>
     <el-dialog
+      v-if="openProduct"
       v-model="openProduct"
       title="选择货品"
       width="70%"
       append-to-body
     >
       <SelectGoods
+        :selectList="acquireSelectList()"
         @cancel="openProduct = false"
         @pushGoods="pushGoods"
       ></SelectGoods>
@@ -315,24 +317,49 @@ const handleAdd = () => {
 };
 
 const pushGoods = (goods) => {
-  const arr = goods.map((x) => ({
-    goodType: x.goodType,
-    productCode: x.code,
-    productName: x.name,
-    productSpec: x.spec,
-    productUnit: x.unit,
-    count: 0,
-    price: 0,
-    bussinessId: x.id,
-    amount: 0,
-  }));
-  formData.data.purchaseDetailList =
-    formData.data.purchaseDetailList.concat(arr);
-  openProduct.value = false;
-  return ElMessage({
-    message: "添加成功!",
-    type: "success",
-  });
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (
+      formData.data.purchaseDetailList &&
+      formData.data.purchaseDetailList.length > 0
+    ) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.purchaseDetailList.filter(
+          (itemProduct) => itemProduct.bussinessId === item.id
+        );
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
+    const arr = afterFiltering.map((x) => ({
+      goodType: x.goodType,
+      productCode: x.code,
+      productName: x.name,
+      productSpec: x.spec,
+      productUnit: x.unit,
+      count: 0,
+      price: 0,
+      bussinessId: x.id,
+      amount: 0,
+    }));
+    formData.data.purchaseDetailList =
+      formData.data.purchaseDetailList.concat(arr);
+    openProduct.value = false;
+    const ids = formData.data.purchaseDetailList.map((x) => x.bussinessId);
+    if (formData.data.supplyId && ids.length > 0) {
+      handleChangeSupplier(formData.data.supplyId);
+    }
+    return ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    ElMessage("请选择至少一件物品");
+  }
 };
 // 提交方法
 const formDom = ref(null);
@@ -388,35 +415,6 @@ const handleSubmit = async () => {
 
   return false;
 };
-// 获取用户信息并赋默认值
-const userInfo = useUserStore().user;
-onMounted(() => {
-  formData.data.purchaseTime = proxy.parseTime(new Date());
-  formData.data.deptName = userInfo.dept.deptName;
-  formData.data.purchaseName = userInfo.nickName;
-  getSupplierList();
-  if (props.queryData.ids) {
-    ids.value = props.queryData.ids.split(",") || [];
-    getDetails();
-  }
-});
-
-// onActivated(() => {
-//   formData.data = {
-//     purchaseTime: "",
-//     purchaseDetailList: [],
-//     otherFeeList: [],
-//   };
-//   formData.data.purchaseTime = proxy.parseTime(new Date());
-//   formData.data.deptName = userInfo.dept.deptName;
-//   formData.data.purchaseName = userInfo.nickName;
-//   getSupplierList();
-//   if (props.queryData.ids) {
-//     ids.value = props.queryData.ids.split(",") || [];
-//     getDetails();
-//   }
-// });
-
 const ids = ref([]);
 const getDetails = () => {
   if (props.queryData.type && props.queryData.type === "handoverSlip") {
@@ -462,41 +460,221 @@ const getSupplierList = async (req) => {
       supplierData.value = res.rows;
     });
 };
+const emit = defineEmits(["auxiliaryChange"]);
+let auxiliaryData = ref([
+  {
+    label: "供应商最近采购",
+    data: [
+      [
+        {
+          label: "合同编号",
+          value: "",
+          fn: () => {},
+          num: 1,
+        },
+        {
+          label: "下单日期",
+          value: "",
+          num: 1,
+        },
+        {
+          label: "合同金额",
+          value: "",
+          num: 1,
+        },
+      ],
+      [
+        {
+          label: "合同编号",
+          value: "",
+          fn: () => {},
+          num: 1,
+        },
+        {
+          label: "下单日期",
+          value: "",
+          num: 1,
+        },
+        {
+          label: "合同金额",
+          value: "",
+          num: 1,
+        },
+      ],
+      [
+        {
+          label: "合同编号",
+          value: "",
+          fn: () => {},
+          num: 1,
+        },
+        {
+          label: "下单日期",
+          value: "",
+          num: 1,
+        },
+        {
+          label: "合同金额",
+          value: "",
+          num: 1,
+        },
+      ],
+    ],
+  },
+  {
+    label: "产品价格",
+    data: [],
+  },
+]);
+const auxiliaryChange = (data) => {
+  emit("auxiliaryChange", data);
+};
+
+const getAuxiliaryData = (supplyId, productIdList) => {
+  if (supplyId && productIdList.length > 0) {
+    proxy
+      .post("/subscribe/decisionAid", {
+        supplyId: supplyId,
+        productIdList: productIdList,
+      })
+      .then((res) => {
+        // 获取数组长度
+        let dataLength = auxiliaryData.value.length;
+        // 供应商最近采购
+        auxiliaryData.value[dataLength - 2].data = auxiliaryData.value[
+          dataLength - 2
+        ].data.map((x, index) => {
+          return x.map((y, sonIndex) => {
+            let obj = { ...y };
+            let value = "";
+            if (sonIndex === 0) {
+              value = res.purchaseList[index].code;
+            } else if (sonIndex === 1) {
+              value = res.purchaseList[index].createTime;
+            } else {
+              value =
+                res.purchaseList[index].currency +
+                " " +
+                proxy.moneyFormat(res.purchaseList[index].amount, 2);
+            }
+            obj.value = value;
+            return obj;
+          });
+        });
+        // 产品价格
+        const arrConfig = [
+          {
+            label: "产品名称",
+            value: "",
+            num: 1,
+          },
+          {
+            label: "最近价格",
+            value: "",
+            num: 1,
+          },
+          {
+            label: "历史最高",
+            value: "",
+            num: 1,
+          },
+          {
+            label: "历史最低",
+            value: "",
+            num: 1,
+          },
+        ];
+        auxiliaryData.value[dataLength - 1].data = res.productPriceList.map(
+          (x, index) => {
+            return arrConfig.map((y, sonIndex) => {
+              let obj = { ...y };
+              let value = "";
+              if (sonIndex === 0) {
+                value = x.name;
+              } else if (sonIndex === 1) {
+                value = x.lastPrice;
+              } else if (sonIndex === 2) {
+                value = x.maxPrice;
+              } else {
+                value = x.minPrice;
+              }
+              obj.value = value;
+              return obj;
+            });
+          }
+        );
+        auxiliaryChange(auxiliaryData.value);
+      });
+  } else {
+    if (props.queryData.type === "handoverSlip" && props.queryData.arr) {
+      let arrConfig = [
+        {
+          label: "合同编号",
+          value: "",
+          fn: () => {},
+          num: 1,
+        },
+        {
+          label: "下单日期",
+          value: "",
+          num: 1,
+        },
+      ];
+      auxiliaryData.value[0].data = contractData.value.map((x, index) => {
+        return arrConfig.map((y, sonIndex) => {
+          let obj = { ...y };
+          let value = "";
+          if (sonIndex === 0) {
+            value = contractData.value[index].contractCode;
+          } else if (sonIndex === 1) {
+            value = contractData.value[index].claimTime;
+          }
+          obj.value = value;
+          return obj;
+        });
+      });
+      auxiliaryChange(auxiliaryData.value);
+    }
+  }
+};
 // 供应商改变逻辑
 const handleChangeSupplier = (val) => {
   const ids = formData.data.purchaseDetailList.map((x) => x.bussinessId);
-  proxy
-    .post("/supplierPrice/getSupplierPriceByProductIds", {
-      supplierInfoId: val,
-      productIdList: ids,
-    })
-    .then((res) => {
-      if (res && Object.keys(res).length > 0) {
-        for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
-          const e = formData.data.purchaseDetailList[i];
-          for (const key in res) {
-            if (e.bussinessId === key) {
-              e.price = Number(res[key]);
+  if (val && ids.length > 0) {
+    getAuxiliaryData(val, ids);
+    proxy
+      .post("/supplierPrice/getSupplierPriceByProductIds", {
+        supplierInfoId: val,
+        productIdList: ids,
+      })
+      .then((res) => {
+        if (res && Object.keys(res).length > 0) {
+          for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
+            const e = formData.data.purchaseDetailList[i];
+            for (const key in res) {
+              if (e.bussinessId === key) {
+                e.price = Number(res[key]);
+              }
             }
           }
+        } else {
+          for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
+            const e = formData.data.purchaseDetailList[i];
+            e.price = 0;
+          }
         }
-      } else {
-        for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
-          const e = formData.data.purchaseDetailList[i];
-          e.price = 0;
-        }
-      }
-      handleChangeAmount();
-    });
+        handleChangeAmount();
+      });
+  }
 };
 const handleChangeProductAmount = () => {
   let sum = 0;
   for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
     const e = formData.data.purchaseDetailList[i];
-    e.amount = parseFloat(e.count * e.price).toFixed(4);
+    e.amount = parseFloat(e.count * e.price).toFixed(2);
     sum += Number(e.amount);
   }
-  formData.data.productAmount = parseFloat(sum).toFixed(4);
+  formData.data.productAmount = parseFloat(sum).toFixed(2);
 };
 
 const handleChangeOtherAmount = () => {
@@ -505,7 +683,7 @@ const handleChangeOtherAmount = () => {
     const e = formData.data.otherFeeList[i];
     sum += Number(e.price);
   }
-  formData.data.otherAmount = parseFloat(sum).toFixed(4);
+  formData.data.otherAmount = parseFloat(sum).toFixed(2);
 };
 
 // 计算采购总金额
@@ -515,14 +693,14 @@ const handleChangeAmount = () => {
   let sum = 0;
   for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
     const e = formData.data.purchaseDetailList[i];
-    e.amount = parseFloat(e.count * e.price).toFixed(4);
+    e.amount = parseFloat(e.count * e.price).toFixed(2);
     sum += Number(e.amount);
   }
   for (let i = 0; i < formData.data.otherFeeList.length; i++) {
     const e = formData.data.otherFeeList[i];
     sum += Number(e.price);
   }
-  formData.data.amount = parseFloat(sum).toFixed(4);
+  formData.data.amount = parseFloat(sum).toFixed(2);
 };
 
 const productUnit = ref([]);
@@ -587,6 +765,27 @@ const judgeStatus = () => {
   }
   return false;
 };
+// 获取用户信息并赋默认值
+const userInfo = useUserStore().user;
+const contractData = ref([]);
+onMounted(() => {
+  formData.data.purchaseTime = proxy.parseTime(new Date());
+  formData.data.deptName = userInfo.dept.deptName;
+  formData.data.purchaseName = userInfo.nickName;
+  getSupplierList();
+  if (props.queryData.ids) {
+    ids.value = props.queryData.ids.split(",") || [];
+    getDetails();
+  }
+  if (props.queryData.type === "handoverSlip" && props.queryData.arr) {
+    contractData.value = JSON.parse(props.queryData.arr);
+    auxiliaryData.value.unshift({
+      label: "关联销售合同",
+      data: [],
+    });
+    getAuxiliaryData();
+  }
+});
 
 const getFormData = () => {
   return formData.data;
@@ -596,6 +795,21 @@ defineExpose({
   getFormData,
   handleSubmit,
 });
+const acquireSelectList = () => {
+  let data = [];
+  if (
+    formData.data.purchaseDetailList &&
+    formData.data.purchaseDetailList.length > 0
+  ) {
+    data = formData.data.purchaseDetailList.map((item) => {
+      return {
+        id: item.bussinessId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 124 - 109
src/components/process/SendSubscribe.vue

@@ -1,131 +1,86 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <el-form
-      :model="formData.data"
-      :rules="rules"
-      ref="formDom"
-      label-position="top"
-      :disabled="judgeStatus()"
-    >
+    <el-form :model="formData.data" :rules="rules" ref="formDom" label-position="top" :disabled="judgeStatus()">
       <div class="_t">申购信息</div>
       <el-row :gutter="10">
         <el-col :span="6">
-          <el-form-item label="申购部门" prop="deptName">
-            <el-input
-              v-model="formData.data.deptName"
-              placeholder="请输入"
-              disabled
+          <el-form-item label="归属公司" prop="corporationId">
+            <el-select
+              v-model="formData.data.corporationId"
+              placeholder="请选择"
+              filterable
+              style="width: 100%"
             >
-            </el-input>
+              <el-option
+                v-for="item in companyData"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="10">
+        <el-col :span="6">
+          <el-form-item label="申购部门" prop="deptName">
+            <el-input v-model="formData.data.deptName" placeholder="请输入" disabled> </el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="申购人" prop="subcribeName">
-            <el-input
-              v-model="formData.data.subcribeName"
-              placeholder="请输入"
-              disabled
-            >
-            </el-input>
+            <el-input v-model="formData.data.subcribeName" placeholder="请输入" disabled> </el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="申购时间" prop="subcribeTime">
-            <el-date-picker
-              v-model="formData.data.subcribeTime"
-              type="datetime"
-              placeholder="请选择"
-              disabled
-            />
+            <el-date-picker v-model="formData.data.subcribeTime" type="datetime" placeholder="请选择" disabled />
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="申购说明" prop="subcribeContent">
-        <el-input
-          v-model="formData.data.subcribeContent"
-          placeholder="请输入"
-          type="textarea"
-        >
-        </el-input>
+        <el-input v-model="formData.data.subcribeContent" placeholder="请输入" type="textarea"> </el-input>
       </el-form-item>
       <div class="_t">申购明细</div>
       <el-form-item>
-        <el-button
-          type="primary"
-          @click="openProduct = true"
-          style="margin: 10px 0"
-        >
-          添加货品
-        </el-button>
+        <el-button type="primary" @click="openProduct = true" style="margin: 10px 0"> 添加货品 </el-button>
         <el-table :data="formData.data.subscribeDetailList">
-          <el-table-column
-            prop="goodType"
-            label="货品类型"
-            :formatter="(row) => (row.goodType == 1 ? '产品' : '物料')"
-          />
+          <el-table-column prop="goodType" label="货品类型" :formatter="(row) => (row.goodType == 1 ? '产品' : '物料')" />
           <el-table-column prop="code" label="货品编码" />
           <el-table-column prop="name" label="货品名称" min-width="150" />
           <el-table-column prop="spec" label="规格型号" />
-          <el-table-column
-            prop="unit"
-            label="单位"
-            :formatter="(row) => dictValueLabel(row.unit, productUnit)"
-          />
+          <el-table-column prop="unit" label="单位" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
           <el-table-column prop="count" label="申购数量" min-width="150">
             <template #default="{ row, $index }">
-              <el-form-item
-                :prop="'subscribeDetailList.' + $index + '.count'"
-                :rules="rules.count"
-                :inline-message="true"
-              >
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="row.count"
-                  :precision="4"
-                  :controls="false"
-                  :min="1"
-                />
+              <el-form-item :prop="'subscribeDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true">
+                <el-input-number onmousewheel="return false;" v-model="row.count" :precision="4" :controls="false" :min="1" />
               </el-form-item>
             </template>
           </el-table-column>
           <el-table-column prop="remark" label="备注" min-width="150">
             <template #default="{ row, $index }">
-              <el-form-item
-                :prop="'subscribeDetailList.' + $index + '.remark'"
-                :rules="rules.remark"
-                :inline-message="true"
-              >
+              <el-form-item :prop="'subscribeDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
                 <el-input v-model="row.remark" placeholder="请输入" />
               </el-form-item>
             </template>
           </el-table-column>
           <el-table-column prop="zip" label="操作" width="100">
             <template #default="{ $index }">
-              <el-button type="primary" link @click="handleRemove($index)"
-                >删除</el-button
-              >
+              <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
       </el-form-item>
     </el-form>
-    <el-dialog
-      v-model="openProduct"
-      title="选择货品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>
 
 <script setup>
 import SelectGoods from "@/components/product/SelectGoods";
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -141,13 +96,10 @@ let formData = reactive({
   },
 });
 let rules = ref({
+  corporationId: [{ required: true, message: "请选择归属公司", trigger: "change" }],
   deptName: [{ required: true, message: "请输入申购部门", trigger: "blur" }],
-  subcribeName: [
-    { required: true, message: "请输入申购人名称", trigger: "blur" },
-  ],
-  subcribeTime: [
-    { required: true, message: "请选择申购时间", trigger: "change" },
-  ],
+  subcribeName: [{ required: true, message: "请输入申购人名称", trigger: "blur" }],
+  subcribeTime: [{ required: true, message: "请选择申购时间", trigger: "change" }],
   // subcribeContent: [
   //   { required: true, message: "请输入申购事由", trigger: "blur" },
   // ],
@@ -166,23 +118,38 @@ const handleRemove = (index) => {
 };
 
 const pushGoods = (goods) => {
-  const arr = goods.map((x) => ({
-    goodType: x.goodType,
-    code: x.code,
-    name: x.name,
-    spec: x.spec,
-    unit: x.unit,
-    bussinessId: x.id,
-    count: "",
-    remark: "",
-  }));
-  formData.data.subscribeDetailList =
-    formData.data.subscribeDetailList.concat(arr);
-  openProduct.value = false;
-  return ElMessage({
-    message: "添加成功!",
-    type: "success",
-  });
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.subscribeDetailList && formData.data.subscribeDetailList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.subscribeDetailList.filter((itemProduct) => itemProduct.bussinessId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
+    const arr = afterFiltering.map((x) => ({
+      goodType: x.goodType,
+      code: x.code,
+      name: x.name,
+      spec: x.spec,
+      unit: x.unit,
+      bussinessId: x.id,
+      count: "",
+      remark: "",
+    }));
+    formData.data.subscribeDetailList = formData.data.subscribeDetailList.concat(arr);
+    openProduct.value = false;
+    return ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    ElMessage("请选择至少一件物品");
+  }
 };
 
 const formDom = ref(null);
@@ -214,9 +181,7 @@ onMounted(() => {
 
 const judgeStatus = () => {
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter(
-      (item) => item.status === 2 && item.nodeType !== 1
-    );
+    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
     if (data && data.length > 0) {
       return true;
     }
@@ -227,10 +192,7 @@ const judgeStatus = () => {
 watch(
   props.queryData,
   () => {
-    if (
-      props.queryData &&
-      (route.query.processType == 10 || route.query.processType == 20)
-    ) {
+    if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
       for (const key in props.queryData) {
         formData.data[key] = props.queryData[key];
       }
@@ -241,6 +203,8 @@ watch(
   }
 );
 const productUnit = ref([]);
+const companyData = ref([]);
+
 const getDict = () => {
   proxy.getDictOne(["unit"]).then((res) => {
     productUnit.value = res["unit"].map((x) => ({
@@ -248,6 +212,12 @@ const getDict = () => {
       value: x.dictKey,
     }));
   });
+
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      companyData.value = res.rows;
+    });
 };
 getDict();
 const getFormData = () => {
@@ -257,6 +227,51 @@ defineExpose({
   getFormData,
   handleSubmit,
 });
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.subscribeDetailList && formData.data.subscribeDetailList.length > 0) {
+    data = formData.data.subscribeDetailList.map((item) => {
+      return {
+        id: item.bussinessId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
+const emit = defineEmits(["auxiliaryChange"]);
+let auxiliaryData = ref([
+  {
+    label: "最近合同",
+    data:[
+      [
+        {
+          label:"合同编号",
+          value:'12312312312456',
+          fn:()=>{
+            console.log(formData.data)
+          },
+          style:{
+            color:'red'
+          },
+          num:1,
+        },
+        {
+          label:"合同编号",
+          value:'123456',
+          fn:()=>{
+            alert('点击事件')
+          }
+        }
+      ],
+
+    ],
+  },
+]);
+const auxiliaryChange = (data) => {
+  emit("auxiliaryChange", data);
+};
+auxiliaryChange(auxiliaryData)
 </script>
 
 <style lang="scss" scoped>

+ 42 - 9
src/components/process/ServiceContract.vue

@@ -135,11 +135,12 @@
               </template>
             </el-table-column>
             <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column label="商品名称" min-width="200">
+            <el-table-column prop="name" label="商品中文名" width="160" />
+            <el-table-column label="商品英文名" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'serviceContractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品名" />
+                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
                   </el-form-item>
                 </div>
               </template>
@@ -154,7 +155,7 @@
               </template>
             </el-table-column>
             <el-table-column prop="unit" label="单位" width="100" />
-            <el-table-column label="数量" width="160">
+            <el-table-column label="数量" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'serviceContractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
@@ -188,7 +189,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amount" label="金额" width="140" />
+            <el-table-column prop="amount" label="金额" width="100" />
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template #default="{ row, $index }">
                 <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
@@ -294,8 +295,8 @@
       </template>
     </byForm>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
 
     <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
@@ -436,7 +437,7 @@ const rules = ref({
   buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
   buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品名", trigger: "blur" }],
+  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
   productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
@@ -644,17 +645,37 @@ const handlePerson = (item) => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.serviceContractProductList.filter((itemProduct) => itemProduct.productId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
     formData.data.serviceContractProductList = formData.data.serviceContractProductList.concat(
-      goods.map((item) => {
+      afterFiltering.map((item) => {
         let fileUrl = "";
         if (item.fileList && item.fileList.length > 0) {
           fileUrl = item.fileList[0].fileUrl;
         }
+        let name = item.name;
+        if (item.standardJson) {
+          let standardJson = JSON.parse(item.standardJson);
+          if (standardJson && standardJson.englishName) {
+            name = standardJson.englishName;
+          }
+        }
         return {
           fileUrl: fileUrl,
           code: item.code,
           productId: item.id,
-          productName: item.name,
+          name: item.name,
+          productName: name,
           productModel: item.spec,
           unit: item.unit,
           quantity: undefined,
@@ -908,6 +929,18 @@ watch(
     deep: true,
   }
 );
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
+    data = formData.data.serviceContractProductList.map((item) => {
+      return {
+        id: item.productId,
+        name: item.name,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 39 - 202
src/components/product/SelectGoods.vue

@@ -8,46 +8,30 @@
       :loading="loading"
       highlight-current-row
       :selectConfig="selectConfig"
-      :table-events="{
-        //element talbe事件都能传
-        select: select,
-      }"
       :action-list="[]"
-      @get-list="getList"
-    >
+      @get-list="getList">
     </byTable>
     <div>
       <div>已选择货品</div>
       <div style="margin: 10px 0px">
-        <el-tag
-          style="margin-right: 10px"
-          type="info"
-          closable
-          v-for="(good, index) in goodList"
-          :key="good.id"
-          @close="handleRemove(index)"
-          >{{ good.name }}</el-tag
-        >
+        <el-tag style="margin-right: 10px" type="info" closable v-for="(good, index) in goodList" :key="good.id" @close="handleRemove(index)">
+          {{ good.name }}
+        </el-tag>
       </div>
       <div style="text-align: center">
-        <el-button @click="handleCancel" size="large">取消</el-button>
-        <el-button type="primary" @click="handleSubmit" size="large">
-          确 定
-        </el-button>
+        <el-button @click="handleCancel" size="large">取 消</el-button>
+        <el-button type="primary" @click="handleSubmit" size="large">确 定</el-button>
       </div>
     </div>
   </div>
 </template>
-  
+
 <script setup>
-/* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage } from "element-plus";
 import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import treeList from "@/components/product/treeList";
-import { computed, defineComponent, ref, watch } from "vue";
+import { computed, ref } from "vue";
+
 const loading = ref(false);
-const submitLoading = ref(false);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -60,24 +44,12 @@ const sourceList = ref({
     definition: "1",
   },
 });
-let dialogVisible = ref(false);
-let openExcelDialog = ref(false);
-
-let modalType = ref("add");
-let rules = ref({
-  productClassifyId: [
-    { required: true, message: "请选择产品分类", trigger: "change" },
-  ],
-  type: [{ required: true, message: "请选择产品类型", trigger: "change" }],
-  name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
-  unit: [{ required: true, message: "请选择单位", trigger: "change" }],
-});
 const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
   {
     label: "物品类型",
     prop: "definition",
-    isShowAll: false, //不显示全部搜索
+    isShowAll: false,
     data: [
       {
         label: "产品",
@@ -89,11 +61,6 @@ const selectConfig = reactive([
       },
     ],
   },
-  {
-    label: "所属分类",
-    prop: "productClassifyId",
-    data: [],
-  },
 ]);
 const config = computed(() => {
   return [
@@ -147,7 +114,6 @@ const config = computed(() => {
         align: "center",
         fixed: "right",
       },
-      // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
           {
@@ -166,145 +132,40 @@ const config = computed(() => {
     },
   ];
 });
-
-let formData = reactive({
-  data: {},
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-const treeListData = ref([]);
-const formConfig = computed(() => {
-  return [
-    {
-      type: "treeSelect",
-      prop: "productClassifyId",
-      label: "产品分类",
-      data: [],
-    },
-    {
-      type: "select",
-      prop: "type",
-      label: "产品类型",
-      required: true,
-      data: [
-        {
-          label: "成品",
-          id: "1",
-        },
-        {
-          label: "半成品",
-          id: "2",
-        },
-      ],
-    },
-    {
-      type: "input",
-      prop: "name",
-      label: "产品名称",
-    },
-    {
-      type: "input",
-      prop: "spec",
-      label: "规格型号",
-    },
-    {
-      type: "select",
-      prop: "unit",
-      label: "单位",
-      required: true,
-      data: [
-        {
-          label: "个",
-          id: "个",
-        },
-        {
-          label: "双",
-          id: "双",
-        },
-      ],
-    },
-    {
-      type: "slot",
-      slotName: "productPic",
-      prop: "fileList",
-      label: "产品图片",
-    },
-    {
-      type: "input",
-      prop: "remark",
-      label: "备注",
-      itemType: "textarea",
-    },
-  ];
-});
-
-const lastDefinition = ref("");
+const table = ref(null);
+const productUnit = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict();
 const getList = async (req = {}) => {
-  for (const key in req) {
-    sourceList.value.pagination[key] = req[key];
-    if (key === "definition") {
-      if (lastDefinition.value !== req[key]) {
-        getTreeList();
-        lastDefinition.value = req[key];
-        // 如果选择的物品分类不一致,则分类默认选中全部
-        return table.value.searchItemSelct("all", selectConfig[1]);
-      }
-    }
-  }
   sourceList.value.pagination = {
     ...sourceList.value.pagination,
     ...req,
   };
   loading.value = true;
-  proxy
-    .post("/productInfo/page", sourceList.value.pagination)
-    .then((message) => {
-      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-
-      const productIdList = message.rows.map((x) => x.id);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy
-          .post("/fileInfo/getList", { businessIdList: productIdList })
-          .then((fileObj) => {
-            for (let i = 0; i < sourceList.value.data.length; i++) {
-              const e = sourceList.value.data[i];
-              for (const key in fileObj) {
-                if (e.id === key) {
-                  e.fileList = fileObj[key];
-                }
-              }
-            }
-          });
-      }
-    });
-};
-
-const getTreeList = () => {
-  proxy
-    .post("/productClassify/tree", {
-      parentId: "",
-      name: "",
-      definition: sourceList.value.pagination.definition,
-    })
-    .then((message) => {
-      selectConfig[1].data = message.map((x) => ({
-        label: x.label,
-        value: x.id,
-      }));
-    });
+  proxy.post("/productInfo/page", sourceList.value.pagination).then((message) => {
+    sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
-
+getList();
+// 接收父组件的传值
+const props = defineProps({
+  selectList: Array,
+});
 const goodList = ref([]);
+onMounted(() => {
+  goodList.value = proxy.deepClone(props.selectList);
+});
 const handleSelect = (row) => {
   const flag = goodList.value.some((x) => x.id === row.id);
   if (flag)
@@ -321,7 +182,6 @@ const handleSelect = (row) => {
     type: "success",
   });
 };
-
 const handleRemove = (index) => {
   goodList.value.splice(index, 1);
   return ElMessage({
@@ -329,7 +189,6 @@ const handleRemove = (index) => {
     type: "success",
   });
 };
-
 const handleSubmit = () => {
   if (!goodList.value.length > 0)
     return ElMessage({
@@ -339,34 +198,12 @@ const handleSubmit = () => {
   proxy.$emit("pushGoods", goodList.value);
   goodList.value = [];
 };
-
 const handleCancel = () => {
   goodList.value = [];
   proxy.$emit("cancel");
 };
-
-const table = ref(null);
-
-const searchItemSelct = () => {
-  // 默认选中的方法
-  table.value.searchItemSelct(selectConfig[0].data[0], selectConfig[0]);
-};
-const productUnit = ref([]);
-const getDict = () => {
-  proxy.getDictOne(["unit"]).then((res) => {
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getDict();
-
-onMounted(() => {
-  searchItemSelct();
-});
 </script>
-  
+
 <style lang="scss" scoped>
 .user {
   padding: 20px;
@@ -386,4 +223,4 @@ onMounted(() => {
   cursor: pointer;
   vertical-align: middle;
 }
-</style>
+</style>

+ 1 - 1
src/layout/components/TagsView/index.vue

@@ -82,7 +82,7 @@ onMounted(() => {
 })
 
 function isActive(r) {
-  return r.path === route.path
+  return r.fullPath === route.fullPath
 }
 function activeStyle(tag) {
   if (!isActive(tag)) return {};

+ 23 - 14
src/store/modules/tagsView.js

@@ -12,18 +12,27 @@ const useTagsViewStore = defineStore(
         this.addCachedView(view)
       },
       addIframeView(view) {
-        if (this.iframeViews.some(v => v.path === view.path)) return
+        console.log(view,123123)
+        if (this.iframeViews.some(v => v.fullPath === view.fullPath)) return
+        let title = view.meta.title || 'no-name'
+        if(view.path == '/platform_manage/process/processApproval') {
+          title = view.query.processType == 10 ? '审批' : view.query.processType == 20 ? '查看' : '发起'
+        }
         this.iframeViews.push(
           Object.assign({}, view, {
-            title: view.meta.title || 'no-name'
+            title: title
           })
         )
       },
       addVisitedView(view) {
-        if (this.visitedViews.some(v => v.path === view.path)) return
+        if (this.visitedViews.some(v => v.fullPath === view.fullPath)) return
+        let title = view.meta.title || 'no-name'
+        if(view.path == '/platform_manage/process/processApproval') {
+          title = view.query.processType == 10 ? '审批' : view.query.processType == 20 ? '查看' : '发起'
+        }
         this.visitedViews.push(
           Object.assign({}, view, {
-            title: view.meta.title || 'no-name'
+            title: title
           })
         )
       },
@@ -47,18 +56,18 @@ const useTagsViewStore = defineStore(
       delVisitedView(view) {
         return new Promise(resolve => {
           for (const [i, v] of this.visitedViews.entries()) {
-            if (v.path === view.path) {
+            if (v.fullPath === view.fullPath) {
               this.visitedViews.splice(i, 1)
               break
             }
           }
-          this.iframeViews = this.iframeViews.filter(item => item.path !== view.path)
+          this.iframeViews = this.iframeViews.filter(item => item.fullPath !== view.fullPath)
           resolve([...this.visitedViews])
         })
       },
       delIframeView(view) {
         return new Promise(resolve => {
-          this.iframeViews = this.iframeViews.filter(item => item.path !== view.path)
+          this.iframeViews = this.iframeViews.filter(item => item.fullPath !== view.fullPath)
           resolve([...this.iframeViews])
         })
       },
@@ -82,9 +91,9 @@ const useTagsViewStore = defineStore(
       delOthersVisitedViews(view) {
         return new Promise(resolve => {
           this.visitedViews = this.visitedViews.filter(v => {
-            return v.meta.affix || v.path === view.path
+            return v.meta.affix || v.fullPath === view.fullPath
           })
-          this.iframeViews = this.iframeViews.filter(item => item.path === view.path)
+          this.iframeViews = this.iframeViews.filter(item => item.fullPath === view.fullPath)
           resolve([...this.visitedViews])
         })
       },
@@ -125,7 +134,7 @@ const useTagsViewStore = defineStore(
       },
       updateVisitedView(view) {
         for (let v of this.visitedViews) {
-          if (v.path === view.path) {
+          if (v.fullPath === view.fullPath) {
             v = Object.assign(v, view)
             break
           }
@@ -133,7 +142,7 @@ const useTagsViewStore = defineStore(
       },
       delRightTags(view) {
         return new Promise(resolve => {
-          const index = this.visitedViews.findIndex(v => v.path === view.path)
+          const index = this.visitedViews.findIndex(v => v.fullPath === view.fullPath)
           if (index === -1) {
             return
           }
@@ -146,7 +155,7 @@ const useTagsViewStore = defineStore(
               this.cachedViews.splice(i, 1)
             }
             if(item.meta.link) {
-              const fi = this.iframeViews.findIndex(v => v.path === item.path)
+              const fi = this.iframeViews.findIndex(v => v.fullPath === item.fullPath)
               this.iframeViews.splice(fi, 1)
             }
             return false
@@ -156,7 +165,7 @@ const useTagsViewStore = defineStore(
       },
       delLeftTags(view) {
         return new Promise(resolve => {
-          const index = this.visitedViews.findIndex(v => v.path === view.path)
+          const index = this.visitedViews.findIndex(v => v.fullPath === view.fullPath)
           if (index === -1) {
             return
           }
@@ -169,7 +178,7 @@ const useTagsViewStore = defineStore(
               this.cachedViews.splice(i, 1)
             }
             if(item.meta.link) {
-              const fi = this.iframeViews.findIndex(v => v.path === item.path)
+              const fi = this.iframeViews.findIndex(v => v.fullPath === item.fullPath)
               this.iframeViews.splice(fi, 1)
             }
             return false

+ 1 - 1
src/views/connect/E-mail/mail/com/mailDetail.vue

@@ -288,7 +288,7 @@ const getMyFolderTree = (flag) => {
         .then((res) => {
           myFolderTreeData.value = res.map((x) => ({ ...x, value: x.id }));
         });
-    }, 1000);
+    }, 1500);
   } else {
     proxy
       .post("/myFolder/tree", { mailboxId: mailStore.selectMail.id })

+ 133 - 12
src/views/connect/E-mail/mail/com/mailList.vue

@@ -4,7 +4,52 @@
       <el-icon @click="handleRefresh" style="cursor: pointer">
         <Refresh />
       </el-icon>
-      <div class="vertical-line"></div>
+      <!-- <div class="vertical-line"></div>
+      <div>
+        <el-checkbox
+          v-model="isCheckAll"
+          label="全选"
+          size="default"
+          @change="handleChangeCheckAll"
+        />
+      </div>
+      <div style="color: #666666">
+        <span
+          >(共998封,其中<span style="color: #39c55a"> 未读邮件 </span
+          >6封)</span
+        >
+      </div>
+      <el-button
+        @click="handleMove"
+        :disabled="selectData.length === 0"
+        style="margin-left: 10px"
+        >全部标为已读</el-button
+      >
+      <el-select
+        v-model="selectTag"
+        placeholder="标记为"
+        style="margin: 0 10px; width: 120px"
+        :disabled="selectData.length === 0"
+      >
+        <el-option
+          v-for="item in tagData"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+      <el-tree-select
+        v-model="selectFolder"
+        :data="myFolderTreeData"
+        :disabled="selectData.length === 0"
+        placeholder="移动到"
+        style="margin-right: 10px; width: 120px"
+        check-strictly
+        :render-after-expand="false"
+      />
+      <el-button @click="handleMove" :disabled="selectData.length === 0"
+        >删除</el-button
+      > -->
     </div>
     <div style="padding: 10px 15px; width: 100%">
       <el-table
@@ -14,7 +59,18 @@
         @selection-change="handleSelectionChange"
         v-loading="loading"
       >
-        <!-- <el-table-column type="selection" width="40" /> -->
+        <!-- <el-table-column label=" " width="40" align="center">
+          <template #default="{ row, $index }">
+            <div>
+              <el-checkbox
+                v-model="row.isCheck"
+                label=""
+                size="default"
+                @change="handleChangeCheck"
+              />
+            </div>
+          </template>
+        </el-table-column> -->
         <el-table-column label="状态" width="70">
           <template #default="{ row, $index }">
             <div style="cursor: pointer" @click="handleRowClick(row, $index)">
@@ -120,11 +176,18 @@
 <script setup>
 import byTable from "@/components/byTable/index";
 import useMailStore from "@/store/modules/mail";
+import useUserStore from "@/store/modules/user";
 const { proxy } = getCurrentInstance();
 const mailStore = useMailStore();
 let loading = ref(false);
 const tableHeight = ref(0);
-tableHeight.value = window.innerHeight - 270;
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 280;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const tableData = reactive({
   data: [],
   pagination: {
@@ -178,8 +241,11 @@ const getList = () => {
         ...tableData.pagination,
       })
       .then((res) => {
-        tableData.data = res.rows;
-        mailStore.mailDataList = res.rows;
+        tableData.data = res.rows.map((x) => ({ ...x, isCheck: false }));
+        mailStore.mailDataList = res.rows.map((x) => ({
+          ...x,
+          isCheck: false,
+        }));
         tableData.pagination.total = res.total;
         loading.value = false;
       });
@@ -192,8 +258,14 @@ const getList = () => {
         ...tableData.pagination,
       })
       .then((res) => {
-        tableData.data = res.rows;
-        mailStore.mailDataList = res.rows;
+        tableData.data = res.rows.map((x) => ({
+          ...x,
+          isCheck: false,
+        }));
+        mailStore.mailDataList = res.rows.map((x) => ({
+          ...x,
+          isCheck: false,
+        }));
         tableData.pagination.total = res.total;
         loading.value = false;
       });
@@ -206,8 +278,14 @@ const getList = () => {
         ...tableData.pagination,
       })
       .then((res) => {
-        tableData.data = res.rows;
-        mailStore.mailDataList = res.rows;
+        tableData.data = res.rows.map((x) => ({
+          ...x,
+          isCheck: false,
+        }));
+        mailStore.mailDataList = res.rows.map((x) => ({
+          ...x,
+          isCheck: false,
+        }));
         tableData.pagination.total = res.total;
         loading.value = false;
       });
@@ -254,10 +332,50 @@ const handleSizeChange = (val) => {
   tableData.pagination.pageSize = val;
   getList();
 };
+const myFolderTreeData = ref([]);
+const tagData = ref([]);
+const getOtherData = () => {
+  setTimeout(() => {
+    proxy
+      .post("/myFolder/tree", { mailboxId: mailStore.selectMail.id })
+      .then((res) => {
+        myFolderTreeData.value = res.map((x) => ({ ...x, value: x.id }));
+      });
+  }, 1000);
+
+  setTimeout(() => {
+    proxy
+      .post("/myTag/page", {
+        pageNum: 1,
+        pageSize: 9999,
+        id: useUserStore().user.userId,
+      })
+      .then((res) => {
+        tagData.value = res.rows;
+      });
+  }, 1000);
+};
+// getOtherData();
+const isCheckAll = ref(false);
+const selectTag = ref("");
+const selectFolder = ref("");
 const selectData = ref([]);
-const handleSelectionChange = (val) => {
-  console.log(val, "ss");
-  selectData.value = val;
+const handleChangeCheck = () => {
+  selectData.value = tableData.data.filter((x) => x.isCheck === true);
+  if (selectData.value.length === tableData.data.length) {
+    isCheckAll.value = true;
+  }
+};
+
+const handleChangeCheckAll = () => {
+  tableData.data.forEach((x) => {
+    x.isCheck = isCheckAll.value;
+  });
+  if (isCheckAll.value) {
+    selectData.value = tableData.data;
+  } else {
+    selectData.value = [];
+  }
 };
 
 defineExpose({
@@ -266,6 +384,9 @@ defineExpose({
 </script>
 
 <style lang="scss" scoped>
+// * {
+//   font-size: 12px;
+// }
 .messageImg {
   width: 18px;
   height: 18px;

+ 28 - 2
src/views/connect/E-mail/mail/com/right/contract/pi.vue

@@ -36,7 +36,16 @@
       v-loading="loading"
       :height="tableHeight"
     >
-      <el-table-column prop="code" label="单号" width="115" fixed="left" />
+      <el-table-column prop="code" label="单号" width="130" fixed="left">
+        <template #default="{ row }">
+          <div
+            style="cursor: pointer; color: #409eff"
+            @click="handleClickContractCode(row)"
+          >
+            {{ row.code }}
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column prop="createTime" label="日期" width="140" />
       <el-table-column prop="buyContactName" label="客户" min-width="150" />
       <el-table-column prop="amount" label="报价" width="100">
@@ -72,7 +81,14 @@
 </template>
   
 <script setup>
-const tableHeight = window.innerHeight - 280;
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 280;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const sourceList = ref({
   data: [],
@@ -128,6 +144,7 @@ const handleCurrentChange = (val) => {
 
 getData();
 onMounted(() => {});
+
 const handleMakeNew = () => {
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
@@ -138,6 +155,15 @@ const handleMakeNew = () => {
     },
   });
 };
+
+const handleClickContractCode = (row) => {
+  proxy.$router.push({
+    path: "/ERP/saleContract/contract",
+    query: {
+      code: row.code,
+    },
+  });
+};
 </script>
   
 <style lang="scss" scoped>

+ 26 - 2
src/views/connect/E-mail/mail/com/right/contract/quotation.vue

@@ -36,7 +36,16 @@
       v-loading="loading"
       :height="tableHeight"
     >
-      <el-table-column prop="code" label="单号" width="115" fixed="left" />
+      <el-table-column prop="code" label="单号" width="130" fixed="left">
+        <template #default="{ row }">
+          <div
+            style="cursor: pointer; color: #409eff"
+            @click="handleClickContractCode(row)"
+          >
+            {{ row.code }}
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column prop="createTime" label="日期" width="140" />
       <el-table-column prop="buyContactName" label="客户" min-width="150" />
       <el-table-column prop="amount" label="报价" width="100">
@@ -72,7 +81,14 @@
 </template>
   
 <script setup>
-const tableHeight = window.innerHeight - 280;
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 280;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const sourceList = ref({
   data: [],
@@ -139,6 +155,14 @@ const handleMakeNew = () => {
     },
   });
 };
+const handleClickContractCode = (row) => {
+  proxy.$router.push({
+    path: "/ERP/saleContract/priceSheet",
+    query: {
+      code: row.code,
+    },
+  });
+};
 </script>
   
 <style lang="scss" scoped>

+ 8 - 1
src/views/connect/E-mail/mail/com/right/documents/index.vue

@@ -55,7 +55,14 @@
 </template>
   
 <script setup>
-const tableHeight = window.innerHeight - 209;
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 209;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const sourceList = ref({
   data: [],

+ 8 - 1
src/views/connect/E-mail/mail/com/right/netdisk/enterprise.vue

@@ -108,7 +108,14 @@ const sourceList = ref({
   },
 });
 const treeListData = ref([]);
-const tableHeight = window.innerHeight - 250;
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 250;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const statusData = ref([
   {
     label: "草稿",

+ 8 - 1
src/views/connect/E-mail/mail/com/right/purchase/index.vue

@@ -84,7 +84,14 @@
 </template>
   
 <script setup>
-const tableHeight = window.innerHeight - 209;
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 209;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const sourceList = ref({
   data: [],

+ 1 - 1
src/views/connect/E-mail/mail/index.vue

@@ -75,7 +75,7 @@ onMounted(() => {
     box-sizing: border-box;
   }
   .right {
-    flex: 1;
+    width: calc(100% - 300px);
   }
   .mail-right {
     position: absolute;

+ 511 - 0
src/views/finance/fundManage/accountStatement/index.vue

@@ -0,0 +1,511 @@
+<template>
+  <div class="tenant">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        :selectConfig="selectConfig"
+        highlight-current-row
+        :action-list="[
+          // {
+          //   text: '导出Excel',
+          //   action: () => deriveExcel(),
+          // },
+          {
+            text: '添加流水',
+            action: () => openModal('add'),
+          },
+        ]"
+        @get-list="getList">
+        <!-- <template #amount="{ item }">
+          <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
+            <span style="padding-right: 4px">{{ item.currency }}</span>
+            <span v-if="item.status === '20'">-</span>
+            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          </div>
+        </template> -->
+        <template #status10="{ item }">
+          <div>
+            <span v-if="item.status == 10">{{ item.amount }}</span>
+          </div>
+        </template>
+        <template #status20="{ item }">
+          <div>
+            <span v-if="item.status == 20">{{ item.amount }}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #transactionTime>
+          <div>
+            <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
+          </div>
+        </template>
+        <template #money>
+          <div style="width: 100%">
+            <el-row :gutter="10">
+              <el-col :span="6">
+                <el-form-item prop="status">
+                  <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
+                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item prop="currency">
+                  <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%">
+                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item prop="amount">
+                  <el-input-number
+                    onmousewheel="return false;"
+                    v-model="formData.data.amount"
+                    placeholder="请输入金额"
+                    style="width: 100%"
+                    :precision="2"
+                    :controls="false"
+                    :min="0" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #received>
+          <div>
+            <el-form-item prop="received">
+              <el-radio-group v-model="formData.data.received">
+                <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
+import moment from "moment";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const accountList = ref([]);
+const status = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const received = ref([
+  {
+    label: "是",
+    value: "10",
+  },
+  {
+    label: "否",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    accountManagementId: "",
+    currency: "",
+  },
+});
+const loading = ref(false);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "资金账户",
+      prop: "accountManagementId",
+      data: accountList.value,
+      isShowAll: false,
+    },
+    {
+      label: "币种",
+      prop: "currency",
+      data: accountCurrency.value,
+      isShowAll: false,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "corporationName",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "资金账户",
+        prop: "accountManagementName",
+        width: 200,
+      },
+    },
+    {
+      attrs: {
+        label: "交易时间",
+        prop: "transactionTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "币种",
+        prop: "currency",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "收入",
+        slot: "status10",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "支出",
+        slot: "status20",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "余额",
+        prop: "remainder",
+        width: 120,
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "交易金额",
+    //     slot: "amount",
+    //     width: 200,
+    //   },
+    // },
+    {
+      attrs: {
+        label: "对方账户",
+        prop: "name",
+        width: 200,
+      },
+    },
+    {
+      attrs: {
+        label: "对方银行",
+        prop: "openingBank",
+        width: 200,
+      },
+    },
+    {
+      attrs: {
+        label: "对方账号",
+        prop: "accountOpening",
+        width: 240,
+      },
+    },
+    {
+      attrs: {
+        label: "摘要",
+        prop: "remarks",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                proxy
+                  .post("/accountRunningWater/delete", {
+                    id: row.id,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getCurrency = () => {
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+        sourceList.value.pagination.currency = accountCurrency.value[0].value;
+      }
+    });
+};
+const getAccountList = () => {
+  return proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
+      sourceList.value.pagination.accountManagementId = accountList.value[0].value;
+    }
+  });
+};
+const getDict = () => {
+  Promise.all([getCurrency(), getAccountList()]).then(() => {
+    getList();
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/accountRunningWater/page1", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getDict();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formData = reactive({
+  data: {},
+});
+const formConfig = computed(() => {
+  return [
+    {
+      label: "账户信息",
+    },
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "选择账户",
+      data: accountList.value,
+    },
+    {
+      label: "交易信息",
+    },
+    {
+      type: "slot",
+      prop: "transactionTime",
+      slotName: "transactionTime",
+      label: "交易时间",
+    },
+    {
+      type: "slot",
+      prop: "money",
+      slotName: "money",
+      label: "交易金额",
+    },
+    formData.data.status == "10"
+      ? {
+          type: "slot",
+          prop: "received",
+          slotName: "received",
+          label: "合同到账",
+        }
+      : {},
+    {
+      label: "对方信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "账户名称",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户银行",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "银行账号",
+      itemType: "text",
+    },
+    {
+      label: "其他信息",
+    },
+    {
+      type: "input",
+      prop: "remarks",
+      label: "摘要",
+      itemType: "textarea",
+    },
+  ];
+});
+const rules = ref({
+  accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
+  transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
+  status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
+  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
+  received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
+  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  // name: [{ required: true, message: "请输入账户名称", trigger: "blur" }],
+  // openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
+  // accountOpening: [{ required: true, message: "请输入银行账号", trigger: "blur" }],
+});
+const openModal = (val) => {
+  modalType.value = val;
+  formData.data = {
+    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const changeStatus = () => {
+  formData.data.received = "";
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    if (!formData.data.amount || Number(formData.data.amount) == 0) {
+      return ElMessage("交易金额不能为0");
+    }
+    loadingDialog.value = true;
+    proxy.post("/accountRunningWater/" + modalType.value, formData.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
+const update = (row) => {
+  modalType.value = "edit";
+  loadingDialog.value = true;
+  proxy.post("/accountRunningWater/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    loadingDialog.value = false;
+  });
+  dialogVisible.value = true;
+};
+const deriveExcel = () => {
+  let queryParams = proxy.deepClone(sourceList.value.pagination);
+  queryParams.pageNum = 1;
+  queryParams.pageSize = 9999;
+  proxy.postTwo("/accountRunningWater/exportExcel", queryParams).then((res) => {
+    exportData(res, "资金流水.xlsx");
+  });
+};
+const exportData = (res, name) => {
+  const content = res;
+  const blob = new Blob([content], { type: "application/ms-excel" });
+  const fileName = name;
+  if ("download" in document.createElement("a")) {
+    // 非IE下载
+    const elink = document.createElement("a");
+    elink.download = fileName;
+    elink.style.display = "none";
+    elink.href = URL.createObjectURL(blob);
+    document.body.appendChild(elink);
+    elink.click();
+    URL.revokeObjectURL(elink.href); // 释放URL 对象
+    document.body.removeChild(elink);
+  } else {
+    navigator.msSaveBlob(blob, fileName);
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 12 - 12
src/views/finance/fundManage/flow/index.vue

@@ -10,13 +10,13 @@
         highlight-current-row
         :action-list="[
           {
-            text: '添加流水',
-            action: () => openModal('add'),
-          },
-          {
             text: '导出Excel',
             action: () => deriveExcel(),
           },
+          {
+            text: '添加流水',
+            action: () => openModal('add'),
+          },
         ]"
         @moreSearch="moreSearch"
         @get-list="getList">
@@ -42,14 +42,14 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select v-model="formData.data.status" placeholder="请选择收支类型" style="width: 100%" @change="changeStatus()">
+                  <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
                     <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
+                  <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%">
                     <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
@@ -209,16 +209,16 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "资金账户",
-        prop: "accountManagementName",
-        width: 200,
+        label: "归属公司",
+        prop: "corporationName",
+        width: 160,
       },
     },
     {
       attrs: {
-        label: "归属公司",
-        prop: "corporationName",
-        width: 160,
+        label: "资金账户",
+        prop: "accountManagementName",
+        width: 200,
       },
     },
     {

+ 1 - 0
src/views/finance/fundManage/funds/index.vue

@@ -404,6 +404,7 @@ const openModal = () => {
     path: "/platform_manage/process/processApproval",
     query: {
       flowKey: "account_request_funds_flow",
+      random: proxy.random(),
       flowName,
     },
   });

+ 191 - 5
src/views/index.vue

@@ -1,8 +1,47 @@
 <template>
 	<div class="app-container home">
+		
+		<div class="stat-warp">
+			<ul class="stat-warp" >
+				<li class="theme6">
+					<div class="label">我的待审批</div>
+					<div class="num">3</div>
+				</li>
+				<li class="theme5">
+					<div class="label">我的发起(未结束)</div>
+					<div class="num">3</div>
+				</li>
+				<li class="theme3">
+					<div class="label">未读消息</div>
+					<div class="num">3</div>
+				</li>
+			</ul>
+		</div>
+		<div class="table-warp">
+			<div class="card">
+				<div class="commons-title">
+					我的待审批
+				</div>
+			</div>
+			<div class="card">
+				<div class="commons-title">
+					业务提醒
+				</div>
+			</div>
+			<div class="card">
+				<div class="commons-title">
+					我的发起(未结束)
+				</div>
+			</div>
+			<div class="card">
+				<div class="commons-title">
+					系统公告
+				</div>
+			</div>
+		</div>
 		<!-- <byTableDemo></byTableDemo> -->
 		<!-- <el-input type="number" v-model='aaa' v-mousewheel></el-input> -->
-		
+		<!-- 111112132131211 -->
 	</div>
 </template>
 
@@ -17,14 +56,161 @@ function goTarget(url) {
 	window.open(url, '__blank')
 }
 // ​
-onMounted(() => {
-	
-})
+onMounted(() => {})
 </script>
 <style>
 </style>
 <style scoped lang="scss">
-.home {
+.app-container {
+	height: 100%;
+	.table-warp{
+		//页面全屏,占据剩下的位置
+		height: calc(100% - 157px);
+		border-radius: 5px;
+		display: none;
+		.card{
+			width: calc(50% - 10px);
+			height: calc(50% - 10px);
+			background: #fff;
+			float: left;
+			border-radius: 5px;
+			padding:20px;
+		}
+		.card:nth-child(2n + 1){
+			margin-right: 20px;
+		}
+		.card:nth-child(1){
+			margin-bottom: 20px;
+		}
+		.card:nth-child(2){
+			margin-bottom: 20px;
+		}
+	}
+	.stat-warp {
+		margin-bottom: 20px;
+		background: #fff;
+		padding: 20px;
+		overflow: hidden;
+		position: relative;
+		border-radius: 5px;
+		display: none;
+		.title {
+			height: 60px;
+			select {
+				height: 60px;
+				border: none;
+				outline: none;
+				-webkit-appearance: none;
+				appearance: none;
+				font-size: 14px;
+				font-weight: bold;
+				background: url('@/assets/images/sanjiao.png') no-repeat right
+					center;
+				padding-right: 20px;
+			}
+			div {
+				height: 60px;
+				font-size: 14px;
+				font-weight: bold;
+				line-height: 60px;
+			}
+		}
+		ul {
+			padding: 0;
+			overflow: hidden;
+			margin: 0;
+			li {
+				list-style: none;
+				min-width: 285px;
+				box-sizing: border-box;
+				margin-right: 20px;
+				background: #eff6ff;
+				float: left;
+				overflow: hidden;
+				padding: 20px;
+				color: #333333;
+				border-radius: 10px;
+				.label {
+					font-size: 14px;
+				}
+				.label::before {
+					width: 10px;
+					height: 10px;
+					content: '';
+					border-radius: 50%;
+					background: #0084ff;
+					display: inline-block;
+					margin-right: 10px;
+				}
+				.num {
+					margin-top: 10px;
+					font-size: 24px;
+					font-weight: bold;
+				}
+			}
+			//#F5F3FF #9E64ED
+			.theme2 {
+				background: #f5f3ff;
+				.label::before {
+					background: #9e64ed;
+				}
+			}
+			//#FFF1E1 #FF9315
+			.theme3 {
+				background: #fff1e1;
+				.label::before {
+					background: #ff9315;
+				}
+			}
+			//#E2FBE8 #39C55A
+			.theme4 {
+				background: #e2fbe8;
+				.label::before {
+					background: #39c55a;
+				}
+			}
+			.theme5 {
+				background: #ffebe9;
+				.label::before {
+					background: #f94539;
+				}
+			}
+			.theme6 {
+				background: #e4f9f9;
+				.label::before {
+					background: #53cbcb;
+				}
+			}
+			.multi-data {
+				.label::before {
+					display: none;
+				}
+				.label {
+					font-size: 14px;
+					font-weight: bold;
+					color: #333;
+					margin-bottom: 8px;
+				}
+				.num-warp {
+					overflow: hidden;
+					.num-box {
+						float: left;
+						min-width: 80px;
+						margin-right: 20px;
+						.num-small {
+							font-size: 16px;
+							font-weight: bold;
+							margin-bottom: 8px;
+						}
+						.label-small {
+							color: #666;
+							font-size: 14px;
+						}
+					}
+				}
+			}
+		}
+	}
 }
 </style>
 

+ 26 - 78
src/views/process/processApproval/auxiliary.vue

@@ -1,93 +1,36 @@
 <template>
 	<div class="auxiliary">
 		<el-collapse>
-			<el-collapse-item title="一致性 Consistency" name="1">
-			</el-collapse-item>
-			<el-collapse-item title="反馈 Feedback" name="2">
+			<el-collapse-item :title="i.label" v-for="(i,index) in data" :key='i.label' :name="index">
 				<ul>
-					<li>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">
-								产品123asdasd1231啊实打实大苏打阿三大熬是的
-							</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-					</li>
-					<li>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">
-								产品123asdasd1231啊实打实大苏打阿三大熬是的
+					<li v-for="(j,jindex) in i.data" :key="jindex">
+						<div class="list-box" v-for="n in j" :key='n.label' :style="n.num ? `width:${100/n.num}%` : ''">
+							<div class="label">{{n.label}}:</div>
+							<div 
+								class="value" 
+								:class="n.fn ? 'color-bl' : ''" 
+								@click="n.fn ? n.fn() : ''"
+								:style="n.style || ''">
+								{{n.value}}
 							</div>
 						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-					</li>
-					<li>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">
-								产品123asdasd1231啊实打实大苏打阿三大熬是的
-							</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
-						<div class="list-box">
-							<div class="label">货币类型:</div>
-							<div class="value">产品</div>
-						</div>
 					</li>
 				</ul>
 			</el-collapse-item>
-			<el-collapse-item title="效率 Efficiency" name="3">
-				<div>简化流程:设计简洁直观的操作流程;</div>
-				<div>
-					清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策;
-				</div>
-				<div>
-					帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。
-				</div>
-			</el-collapse-item>
-			<el-collapse-item title="可控 Controllability" name="4">
-				<div>
-					用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;
-				</div>
-				<div>
-					结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。
-				</div>
-			</el-collapse-item>
 		</el-collapse>
 	</div>
 </template>
-
+<script setup>
+import { defineProps } from 'vue'
+const { proxy } = getCurrentInstance()
+defineProps({
+	data: {
+		type: Array,
+		default: [],
+	},
+})
+console.log(proxy.data)
+</script>
 <style lang="scss">
 .auxiliary {
 	ul {
@@ -99,6 +42,7 @@
 			background: #f1f1f1;
 			overflow: hidden;
 			margin-bottom: 10px;
+			
 			.list-box {
 				float: left;
 				width: 50%;
@@ -120,6 +64,10 @@
 					color: #333;
 					width: calc(100% - 70px);
 				}
+				.color-bl{
+					color: #0084FF;
+					cursor: pointer;
+				}
 			}
 		}
 	}

+ 61 - 140
src/views/process/processApproval/index.vue

@@ -5,109 +5,42 @@
         <div class="commons-title title">
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
-        <SendSubscribe
-          ref="makeDom"
-          v-if="flowForm.flowKey == 'subscribe_flow'"
-          :queryData="queryData.data"
-        ></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>
+        <div class="line"></div>
+        <SendSubscribe ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' v-if="flowForm.flowKey == 'subscribe_flow'" :queryData="queryData.data"></SendSubscribe>
+        <SendPurchase ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' 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>
-          <Contract ref="makeDom" v-else :queryData="queryData.data"></Contract>
+          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
+          <Contract ref="makeDom" v-else :queryData="queryData.data" @auxiliaryChange='(e) => getAuxiliaryData(e)'></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>
@@ -129,8 +62,7 @@
                   : item.status == 3 && route.query.id
                   ? 'flow-grey'
                   : ''
-              "
-            >
+              ">
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
@@ -139,9 +71,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,35 +80,24 @@
             </li>
           </ul>
         </el-tab-pane>
-
-        <!-- <el-tab-pane
-          label="决策辅助"
-          name="second"
-          v-if="flowForm.flowKey == 'purchase_flow'"
-        >
-          <auxiliary></auxiliary>
+        <!-- v-if="flowForm.flowKey == 'contract_flow' && flowForm.tenantType !== 'EHSD'" -->
+        <el-tab-pane label="决策辅助" name="second" v-if="auxiliaryData.length > 0">
           <div style="overflow: auto; height: calc(100vh - 200px)">
-            <purchaseAuxiliary></purchaseAuxiliary>
+          <auxiliary :data="auxiliaryData"></auxiliary>
+
           </div>
-        </el-tab-pane> -->
+          <!-- <div style="overflow: auto; height: calc(100vh - 200px)">
+            <purchaseAuxiliary></purchaseAuxiliary>
+          </div> -->
+        </el-tab-pane>
       </el-tabs>
     </div>
 
     <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>
@@ -240,6 +159,10 @@ const activeName = ref("first");
 const handleClick = (tab, event) => {
   // console.log(tab, event);
 };
+let auxiliaryData = ref([]);
+const getAuxiliaryData = (data)=>{
+  auxiliaryData.value=data
+}
 // 意见表单
 const flowForm = reactive({
   flowKey: "",
@@ -332,18 +255,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") {
@@ -372,18 +293,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) {
@@ -576,11 +495,9 @@ const getRecords = (_id) => {
 onMounted(async () => {
   //processType 10 为修改 20为查看
   if (route.query.processType == 10 || route.query.processType == 20) {
-    await 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 };
   }
@@ -611,6 +528,10 @@ onMounted(async () => {
       overflow-y: auto;
       background: #fff;
       padding: 20px 20px 0px 20px;
+      .line{
+        border-bottom: 1px solid #ddd;
+        margin-bottom: 20px;
+      }
     }
     .bottom {
       margin-top: 10px;

+ 21 - 25
src/views/process/processConfig/vueFlow.vue

@@ -632,8 +632,10 @@ const antvInit = (data) => {
 			});
 			return
 		}
+		
 		if (flowDefinitionNodeObj.value[cell.id]) {
 			formData.data = flowDefinitionNodeObj.value[cell.id]
+			formData.data.cell = cell
 		} else {
 			formData.data = {
 				id: cell.id,
@@ -820,7 +822,6 @@ const antvInit = (data) => {
 		graph.fromJSON(
 			data
 		)
-		console.log(graph,123123)
 	}else{
 		graph.addNode({
 			shape: 'start-btn',
@@ -838,32 +839,27 @@ const antvInit = (data) => {
 }
 const getFlowInfo =	(()=>{
 	proxy.post('/flowDefinition/getDetails', {id:submitFormData.id}).then((res) => {
-		res.nodeObject = JSON.parse(res.nodeObject)
-		antvInit(res.nodeObject)
-		// console.log(graph.toJSON().cells)
-		// console.log(JSON.parse(res.lineObject))
-		// setTimeout(() => {
-		// 	for (const key in JSON.parse(res.lineObject)) {
-		// 		if(JSON.parse(res.lineObject)[key].cell) {
-		// 			console.log(JSON.parse(res.lineObject)[key].cell.setData)
-		// 		}
-				
-		// 		// JSON.parse(res.lineObject)[key].cell.setData({
-		// 		// 	title:"12312312"
-		// 		// })
-		// 	}
-		// }, 2000);
-		// for (let i = 0; i < res.flowDefinitionId.length; i++) {
-		// 	const element = res.flowDefinitionId[i];
-		// 	flowDefinitionNodeObj.value[element.id] = element
-		// 	formData.data.cell.setData({
-		// 		title: formData.data.nodeName,
-		// 	});
-		// }
-		
 		
+		if(res.lineObject) {
+			flowDefinitionNodeObj.value = JSON.parse(res.lineObject)
+		}
+		if(res.nodeObject) {
+			antvInit(JSON.parse(res.nodeObject))
+		}else{
+			antvInit()
+		}
+		console.log(flowDefinitionNodeObj.value)
+		for (const key in flowDefinitionNodeObj.value) {
+			//延迟等待dom渲染完成
+			setTimeout(() => {
+				if(flowDefinitionNodeObj.value[key].nodeName != '结束'){
+					let htmlNode = document.querySelector("g[data-cell-id='"+ key +"']")
+					//获取htmlNode节点下的title,修改title的内容
+					htmlNode.getElementsByClassName('title')[0].innerHTML = flowDefinitionNodeObj.value[key].nodeName
+				}
+			}, 100);
+		}
 		dialogVisible.value = false
-		
 	})
 })
 const router = useRouter()

+ 1 - 0
src/views/product/product/index.vue

@@ -545,6 +545,7 @@ const submitForm = () => {
         getList();
       },
       (err) => {
+        formData.data.standardJson = JSON.parse(formData.data.standardJson);
         submitLoading.value = false;
       }
     );

+ 1 - 0
src/views/production/project/bom/index.vue

@@ -36,6 +36,7 @@
       v-model="dialogVisible"
       width="800"
       v-loading="loading"
+      destroy-on-close
     >
       <byForm
         :formConfig="formConfig"

+ 32 - 0
src/views/publicModule/companyConfig/index.vue

@@ -114,6 +114,13 @@
                       class="avatar" />
                     <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
                   </el-upload>
+                  <el-button 
+                    class="delete-btn" 
+                    type="danger" 
+                    v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
+                    @click="formData.data.enterpriseLogoList = []">
+                    删除
+                  </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
@@ -132,6 +139,13 @@
                       class="avatar" />
                     <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
                   </el-upload>
+                  <el-button 
+                    class="delete-btn" 
+                    type="danger" 
+                    v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
+                    @click="formData.data.larSignList = []">
+                    删除
+                  </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
@@ -150,6 +164,13 @@
                       class="avatar" />
                     <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
                   </el-upload>
+                  <el-button 
+                    class="delete-btn" 
+                    type="danger" 
+                     v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
+                    @click="formData.data.officialSealList = []">
+                    删除
+                  </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
@@ -168,6 +189,13 @@
                       class="avatar" />
                     <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
                   </el-upload>
+                  <el-button 
+                    class="delete-btn" 
+                    type="danger" 
+                    v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0" 
+                    @click="formData.data.contractSealList = []">
+                    删除
+                  </el-button>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -610,6 +638,10 @@ const contractSealListSuccess = (response, uploadFile) => {
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
+  .delete-btn{
+    margin-top: 10px;
+    margin-left: 25px;
+  }
 }
 .avatar-uploader .avatar {
   width: 110px;

+ 1 - 0
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -497,6 +497,7 @@ const start = () => {
       flowKey: "purchase_flow",
       ids: "",
       flowName: "采购申请",
+      random: proxy.random(),
     },
   });
 };

+ 244 - 46
src/views/purchaseManage/purchaseManage/handoverSlip/index.vue

@@ -6,6 +6,7 @@
       :config="config"
       :loading="loading"
       highlight-current-row
+      :row-class-name="getRowClass"
       :table-events="{
         select: selectRow,
         'select-all': selectRow,
@@ -30,6 +31,42 @@
           <span v-else>未到账</span>
         </div>
       </template>
+      <template #details="{ item }">
+        <div>
+          <el-button type="primary" link v-if="item.expendQuantity > 0"
+            >查看</el-button
+          >
+          <el-button type="primary" link style="color: #f54a45" v-else
+            >查看</el-button
+          >
+        </div>
+      </template>
+      <template #btn="{ item }">
+        <div v-if="item.expendQuantity > 0">
+          <el-button type="primary" link @click="start(10, item)"
+            >采购</el-button
+          >
+          <el-button type="primary" link @click="transferToProduction(item)"
+            >转生产</el-button
+          >
+        </div>
+        <div v-else>
+          <el-button
+            type="primary"
+            link
+            style="color: #f54a45"
+            @click="handleFollow(item)"
+            >跟进</el-button
+          >
+          <el-button
+            type="primary"
+            link
+            style="color: #f54a45"
+            @click="lookRecords(item)"
+            >跟进记录</el-button
+          >
+        </div>
+      </template>
     </byTable>
 
     <el-dialog
@@ -136,6 +173,49 @@
         >
       </template>
     </el-dialog>
+    <el-dialog
+      title="填写跟进"
+      v-if="dialogVisibleOne"
+      v-model="dialogVisibleOne"
+      width="500"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfigOne"
+        :formOption="formOption"
+        v-model="formData.dataOne"
+        :rules="rulesOne"
+        ref="submitOne"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleOne = false" size="large"
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="submitFormOne()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
+
+    <el-dialog title="跟进记录" v-model="dialogVisibleTwo" width="500">
+      <div style="width: 100%">
+        <el-timeline :reverse="false">
+          <el-timeline-item
+            placement="top"
+            v-for="(activity, index) in activities"
+            :key="index"
+            :timestamp="activity.followUpTime"
+          >
+            <div>
+              跟进结果:
+              <span>{{ activity.resultType ? "已处理" : "处理中" }}</span>
+            </div>
+            <div style="margin-top: 5px">跟进记录: {{ activity.remark }}</div>
+          </el-timeline-item>
+        </el-timeline>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -160,17 +240,28 @@ const config = computed(() => {
   return [
     {
       type: "selection",
+      attrs: {
+        checkAtt: "isCheck",
+      },
+    },
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "corporationName",
+      },
     },
     {
       attrs: {
         label: "外销合同编号",
         prop: "contractCode",
+        width: "160",
       },
     },
     {
       attrs: {
         label: "合同到账时间",
         slot: "claimTime",
+        width: "155",
       },
     },
     {
@@ -204,6 +295,7 @@ const config = computed(() => {
       attrs: {
         label: "单位",
         prop: "productUnit",
+        width: "80",
       },
       render(unit) {
         return proxy.dictValueLabel(unit, productUnit.value);
@@ -213,46 +305,24 @@ const config = computed(() => {
       attrs: {
         label: "待处理数量",
         prop: "expendQuantity",
+        width: "110",
       },
     },
     {
       attrs: {
         label: "详情",
-        prop: "remark",
+        width: "100",
+        align: "center",
+        slot: "details",
       },
     },
     {
       attrs: {
         label: "操作",
+        slot: "btn",
         width: "140",
         align: "center",
-      },
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "采购",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              selectData.value = [row];
-              start();
-            },
-          },
-          {
-            attrs: {
-              label: "转生产",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              transferToProduction(row);
-            },
-          },
-        ];
+        fixed: "right",
       },
     },
   ];
@@ -263,8 +333,10 @@ const getList = async (req) => {
   proxy
     .post("/contractProduct/page", sourceList.value.pagination)
     .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
+      sourceList.value.data = message.rows.map((x) => ({
+        ...x,
+        isCheck: true,
+      }));
       sourceList.value.pagination.total = message.total;
       setTimeout(() => {
         loading.value = false;
@@ -286,15 +358,33 @@ const selectData = ref([]);
 const selectRow = (data) => {
   selectData.value = data;
 };
-const start = () => {
+const start = (type, row) => {
+  if (type === 10) {
+    selectData.value = [row];
+  }
   if (selectData.value.length > 0) {
     let ids = selectData.value.map((x) => x.id).join();
+    let arr = selectData.value.map((x) => ({
+      contractId: x.contractId,
+      contractCode: x.contractCode,
+      claimTime: x.claimTime,
+    }));
+    let newArr = [];
+    for (let i = 0; i < arr.length; i++) {
+      const e = arr[i];
+      let flag = newArr.some((x) => x.contractId === e.contractId);
+      if (!flag) {
+        newArr.push(e);
+      }
+    }
     proxy.$router.replace({
       path: "/platform_manage/process/processApproval",
       query: {
         flowKey: "purchase_flow",
         type: "handoverSlip",
+        random: proxy.random(),
         ids,
+        arr: JSON.stringify(newArr),
       },
     });
   } else {
@@ -305,8 +395,11 @@ const start = () => {
   }
 };
 const dialogVisible = ref(false);
+const dialogVisibleOne = ref(false);
+const dialogVisibleTwo = ref(false);
 const loadingDialog = ref(false);
 const submit = ref(null);
+const submitOne = ref(null);
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
@@ -317,24 +410,10 @@ const formData = reactive({
   data: {
     list: [],
   },
+  dataOne: {},
 });
 const formConfig = computed(() => {
   return [
-    // {
-    //   label: "基本信息",
-    // },
-    // {
-    //   type: "select",
-    //   prop: "warehouseId",
-    //   label: "工单类型",
-    //   data: [],
-    // },
-    // {
-    //   type: "input",
-    //   prop: "remark",
-    //   label: "备注",
-    //   itemType: "textarea",
-    // },
     {
       type: "slot",
       slotName: "details",
@@ -346,6 +425,94 @@ const rules = ref({
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   time: [{ required: true, message: "请选择完工期限", trigger: "change" }],
 });
+
+const formConfigOne = computed(() => {
+  return [
+    {
+      type: "select",
+      prop: "resultType",
+      label: "跟进结果",
+      data: [
+        {
+          label: "处理中",
+          value: "0",
+        },
+        {
+          label: "已处理",
+          value: "1",
+        },
+      ],
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "followUpTime",
+      label: "跟进时间",
+      format: "YYYY-MM-DD HH:mm:ss",
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "跟进记录",
+      itemType: "textarea",
+    },
+  ];
+});
+
+const rulesOne = ref({
+  resultType: [
+    { required: true, message: "请选择跟进结果", trigger: "change" },
+  ],
+  followUpTime: [
+    { required: true, message: "请选择跟进时间", trigger: "change" },
+  ],
+  remark: [{ required: true, message: "请输入跟进记录", trigger: "blur" }],
+});
+
+const activities = ref([]);
+const lookRecords = (row) => {
+  proxy
+    .post("/contractProductFollowUp/list", {
+      contractProductId: row.productId,
+    })
+    .then((res) => {
+      if (res.length > 0) {
+        activities.value = res;
+        dialogVisibleTwo.value = true;
+      } else
+        return ElMessage({
+          message: "暂无跟进记录!",
+          type: "info",
+        });
+    });
+};
+const handleFollow = (row) => {
+  formData.dataOne = {
+    contractProductId: row.productId,
+  };
+  dialogVisibleOne.value = true;
+};
+
+const submitFormOne = () => {
+  submitOne.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/contractProductFollowUp/add", formData.dataOne).then(
+      () => {
+        ElMessage({
+          message: "提交成功",
+          type: "success",
+        });
+        dialogVisibleOne.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
+
 const transferToProduction = (row) => {
   if (row && row.id) {
     formData.data = {
@@ -380,6 +547,22 @@ const transferToProduction = (row) => {
   }
   dialogVisible.value = true;
 };
+// 监听选中的值,并动态更新是否可选中
+watch(selectData, (newVal, oldVal) => {
+  if (newVal.length == 0) {
+    sourceList.value.data.forEach((x) => {
+      x.isCheck = true;
+    });
+  } else if (newVal.length == 1) {
+    const current = newVal[0];
+    sourceList.value.data.forEach((x) => {
+      if (x.corporationId !== current.corporationId) {
+        x.isCheck = false;
+      }
+    });
+  }
+});
+
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     if (!(formData.data.list && formData.data.list.length > 0)) {
@@ -405,6 +588,13 @@ const submitForm = () => {
 const handleDelete = (index) => {
   formData.data.list.splice(index, 1);
 };
+
+const getRowClass = ({ row }) => {
+  if (row.expendQuantity < 0) {
+    return "redClass";
+  }
+  return "";
+};
 </script>
 
 <style lang="scss" scoped>
@@ -414,4 +604,12 @@ const handleDelete = (index) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+:deep(.el-table__header-wrapper .el-checkbox) {
+  display: none;
+}
+</style>
+<style >
+.redClass {
+  color: #f54a45 !important;
+}
 </style>

+ 31 - 1
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -186,6 +186,15 @@ const config = computed(() => {
   return [
     {
       type: "selection",
+      attrs: {
+        checkAtt: "isCheck",
+      },
+    },
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "corporationName",
+      },
     },
     {
       attrs: {
@@ -353,7 +362,10 @@ const getList = async (req) => {
     .post("/subscribeDetail/page", sourceList.value.pagination)
     .then((message) => {
       console.log(message);
-      sourceList.value.data = message.rows;
+      sourceList.value.data = message.rows.map((x) => ({
+        ...x,
+        isCheck: true,
+      }));
       sourceList.value.pagination.total = message.total;
       setTimeout(() => {
         loading.value = false;
@@ -458,6 +470,21 @@ const getDict = () => {
   });
 };
 getDict();
+// 监听选中的值,并动态更新是否可选中
+watch(selectData, (newVal, oldVal) => {
+  if (newVal.length == 0) {
+    sourceList.value.data.forEach((x) => {
+      x.isCheck = true;
+    });
+  } else if (newVal.length == 1) {
+    const current = newVal[0];
+    sourceList.value.data.forEach((x) => {
+      if (x.corporationId !== current.corporationId) {
+        x.isCheck = false;
+      }
+    });
+  }
+});
 
 const start = () => {
   if (selectData.value.length > 0) {
@@ -483,4 +510,7 @@ const start = () => {
 .tenant {
   padding: 20px;
 }
+:deep(.el-table__header-wrapper .el-checkbox) {
+  display: none;
+}
 </style>

+ 1 - 0
src/views/purchaseManage/purchaseManage/returnGoods/index.vue

@@ -460,6 +460,7 @@ const start = () => {
     path: "/platform_manage/process/processApproval",
     query: {
       flowKey: "sales_return_flow",
+      random: proxy.random(),
     },
   });
 };

+ 1 - 0
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -395,6 +395,7 @@ const openModal = () => {
     path: "/platform_manage/process/processApproval",
     query: {
       flowKey: "subscribe_flow",
+      random: proxy.random(),
     },
   });
 };

+ 1 - 0
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -410,6 +410,7 @@ const purchasePayment = () => {
     query: {
       flowKey: "pay_flow",
       flowName: "采购付款申请",
+      random: proxy.random(),
     },
   });
 };

+ 1 - 0
src/views/purchaseManage/purchasePayment/refund/index.vue

@@ -245,6 +245,7 @@ const applyForRefund = () => {
     query: {
       flowKey: "refund_flow",
       flowName: "退款申请",
+      random: proxy.random(),
     },
   });
 };

+ 95 - 156
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -19,83 +19,37 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList"
-      >
+        @get-list="getList">
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #details>
           <div style="width: 100%">
-            <el-button
-              type="primary"
-              @click="openProduct = true"
-              :disabled="modalType == 'edit'"
-            >
-              选择
-            </el-button>
+            <el-button type="primary" @click="openProduct = true" :disabled="modalType == 'edit'"> 选择 </el-button>
 
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
               <el-table :data="formData.data.supplierPriceList">
                 <el-table-column prop="code" label="货品编码" />
                 <el-table-column prop="name" label="货品名称" min-width="150" />
                 <el-table-column prop="spec" label="规格型号" />
-                <el-table-column
-                  prop="unit"
-                  label="单位"
-                  :formatter="(row) => dictValueLabel(row.unit, productUnit)"
-                />
+                <el-table-column prop="unit" label="单位" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
                 <el-table-column prop="price" label="供应单价" min-width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'supplierPriceList.' + $index + '.price'"
-                      :rules="rules.price"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.price"
-                        :precision="4"
-                        :controls="false"
-                        :min="1"
-                      />
+                    <el-form-item :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                      <el-input-number v-model="row.price" :precision="2" :controls="false" :min="1" />
                     </el-form-item>
                   </template>
                 </el-table-column>
 
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button
-                      type="primary"
-                      link
-                      @click="handleRemove($index)"
-                      :disabled="modalType == 'edit'"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemove($index)" :disabled="modalType == 'edit'">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -105,31 +59,16 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="openProduct"
-      title="选择货品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>
-  
+
 <script setup>
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from "element-plus";
@@ -159,9 +98,7 @@ let openProduct = ref(false);
 let modalType = ref("add");
 let fileList = ref([]);
 let rules = ref({
-  supplierInfoId: [
-    { required: true, message: "请选择供应商", trigger: "change" },
-  ],
+  supplierInfoId: [{ required: true, message: "请选择供应商", trigger: "change" }],
   price: [{ required: true, message: "请输入供应单价", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
@@ -289,15 +226,11 @@ const config = computed(() => {
             el: "button",
             click() {
               // 弹窗提示是否删除
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
                 // 删除
                 proxy
                   .post("/supplierPrice/delete", {
@@ -362,16 +295,14 @@ const formConfig = reactive([
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/supplierPrice/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/supplierPrice/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -412,28 +343,16 @@ const submitForm = () => {
                     message: `已存在供应价格,价格为${res.existSupplierPriceList[0].price}`,
                     type: "info",
                   });
-                  ElMessageBox.confirm(
-                    "继续提交将修改已存在的单价数据, 是否继续?",
-                    "提示",
-                    {
-                      confirmButtonText: "确定",
-                      cancelButtonText: "取消",
-                      type: "warning",
-                    }
-                  )
+                  ElMessageBox.confirm("继续提交将修改已存在的单价数据, 是否继续?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  })
                     .then(() => {
                       const arr = [];
-                      for (
-                        let i = 0;
-                        i < formData.data.supplierPriceList.length;
-                        i++
-                      ) {
+                      for (let i = 0; i < formData.data.supplierPriceList.length; i++) {
                         const iele = formData.data.supplierPriceList[i];
-                        for (
-                          let j = 0;
-                          j < res.existSupplierPriceList.length;
-                          j++
-                        ) {
+                        for (let j = 0; j < res.existSupplierPriceList.length; j++) {
                           const jele = res.existSupplierPriceList[j];
                           if (iele.productInfoId === jele.productInfoId) {
                             jele.price = iele.price;
@@ -446,22 +365,17 @@ const submitForm = () => {
                         price: x.price,
                       }));
                       formData.data.renewWhileItExists = true;
-                      proxy
-                        .post(
-                          "/supplierPrice/" + modalType.value,
-                          formData.data
-                        )
-                        .then((res) => {
-                          if (res.addSuccess) {
-                            ElMessage({
-                              message: "修改成功",
-                              type: "success",
-                            });
-                            getList();
-                            dialogVisible.value = false;
-                            submitLoading.value = false;
-                          }
-                        });
+                      proxy.post("/supplierPrice/" + modalType.value, formData.data).then((res) => {
+                        if (res.addSuccess) {
+                          ElMessage({
+                            message: "修改成功",
+                            type: "success",
+                          });
+                          getList();
+                          dialogVisible.value = false;
+                          submitLoading.value = false;
+                        }
+                      });
                     })
                     .catch(() => {});
                 }
@@ -472,22 +386,19 @@ const submitForm = () => {
             );
           } else {
             formData.data.supplierInfoId = formData.data.supplierInfoIdCopy;
-            formData.data.productInfoId =
-              formData.data.supplierPriceList[0].productInfoId;
+            formData.data.productInfoId = formData.data.supplierPriceList[0].productInfoId;
             formData.data.price = formData.data.supplierPriceList[0].price;
             delete formData.data.supplierPriceList;
             delete formData.data.supplierInfoIdCopy;
-            proxy
-              .post("/supplierPrice/" + modalType.value, formData.data)
-              .then((res) => {
-                ElMessage({
-                  message: "修改成功",
-                  type: "success",
-                });
-                getList();
-                dialogVisible.value = false;
-                submitLoading.value = false;
+            proxy.post("/supplierPrice/" + modalType.value, formData.data).then((res) => {
+              ElMessage({
+                message: "修改成功",
+                type: "success",
               });
+              getList();
+              dialogVisible.value = false;
+              submitLoading.value = false;
+            });
           }
         }
       });
@@ -542,17 +453,33 @@ const handleRemove = (index) => {
 };
 
 const pushGoods = (goods) => {
-  const arr = goods.map((x) => ({ ...x, productInfoId: x.id, price: "" }));
-  arr.forEach((item) => {
-    if (!formData.data.supplierPriceList.some((e) => e.id === item.id)) {
-      formData.data.supplierPriceList.push(item);
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.supplierPriceList && formData.data.supplierPriceList.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.supplierPriceList.filter((itemProduct) => itemProduct.productInfoId === item.id);
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
     }
-  });
-  openProduct.value = false;
-  return ElMessage({
-    message: "添加成功!",
-    type: "success",
-  });
+    const arr = afterFiltering.map((x) => ({ ...x, productInfoId: x.id, price: "" }));
+    arr.forEach((item) => {
+      if (!formData.data.supplierPriceList.some((e) => e.id === item.id)) {
+        formData.data.supplierPriceList.push(item);
+      }
+    });
+    openProduct.value = false;
+    return ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    ElMessage("请选择至少一件物品");
+  }
 };
 const supplierType = ref([]);
 const productUnit = ref([]);
@@ -571,10 +498,22 @@ const getDict = () => {
 };
 getDict();
 getList();
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.supplierPriceList && formData.data.supplierPriceList.length > 0) {
+    data = formData.data.supplierPriceList.map((item) => {
+      return {
+        id: item.productInfoId,
+        name: item.name,
+      };
+    });
+  }
+  return data;
+};
 </script>
-  
+
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
 }
-</style>
+</style>

+ 20 - 2
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -55,7 +55,14 @@
                 label="规格型号"
                 width="160"
               />
-              <el-table-column prop="productUnit" label="单位" width="100" />
+              <el-table-column
+                prop="productUnit"
+                label="单位"
+                width="100"
+                :formatter="
+                  (row) => dictValueLabel(row.productUnit, productUnit)
+                "
+              />
               <el-table-column
                 prop="productQuantity"
                 label="库存数量"
@@ -75,7 +82,8 @@
                         style="width: 100%"
                         :precision="0"
                         :controls="false"
-                        :min="0"
+                        :min="1"
+                        onmousewheel="return false;"
                       />
                     </el-form-item>
                   </div>
@@ -132,6 +140,7 @@ import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryI
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const productUnit = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -189,6 +198,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -224,6 +236,12 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };

+ 131 - 24
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -14,32 +14,88 @@
             action: () => openModal(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
       </byTable>
     </div>
 
-    <el-dialog title="手动入库" v-if="dialogVisible" v-model="dialogVisible" width="1000" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      title="手动入库"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="1000"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #details>
           <div style="width: 100%">
-            <el-button type="primary" @click="openProduct = true">添加明细</el-button>
-            <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
-              <el-table-column prop="productCode" label="产品编码" width="140" />
-              <el-table-column prop="productName" label="产品名称" min-width="220" />
-              <el-table-column prop="productSpec" label="规格型号" min-width="220" />
-              <el-table-column prop="productUnit" label="单位" width="100" />
+            <el-button type="primary" @click="openProduct = true"
+              >添加明细</el-button
+            >
+            <el-table
+              :data="formData.data.list"
+              style="width: 100%; margin-top: 16px"
+            >
+              <el-table-column
+                prop="productCode"
+                label="产品编码"
+                width="140"
+              />
+              <el-table-column
+                prop="productName"
+                label="产品名称"
+                min-width="220"
+              />
+              <el-table-column
+                prop="productSpec"
+                label="规格型号"
+                min-width="220"
+              />
+              <el-table-column
+                prop="productUnit"
+                label="单位"
+                width="100"
+                :formatter="
+                  (row) => dictValueLabel(row.productUnit, productUnit)
+                "
+              />
               <el-table-column label="入库数量" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                      <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
+                    <el-form-item
+                      :prop="'list.' + $index + '.quantity'"
+                      :rules="rules.quantity"
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.quantity"
+                        placeholder="请输入数量"
+                        style="width: 100%"
+                        :precision="0"
+                        :controls="false"
+                        :min="1"
+                        onmousewheel="return false;"
+                      />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="操作" width="80" fixed="right">
+              <el-table-column
+                align="center"
+                label="操作"
+                width="80"
+                fixed="right"
+              >
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+                  <el-button type="primary" link @click="handleDelete($index)"
+                    >删除</el-button
+                  >
                 </template>
               </el-table-column>
             </el-table>
@@ -48,12 +104,24 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog
+      v-if="openProduct"
+      v-model="openProduct"
+      title="选择商品"
+      width="70%"
+      append-to-body
+    >
+      <SelectGoods
+        :selectList="acquireSelectList()"
+        @cancel="openProduct = false"
+        @pushGoods="pushGoods"
+      ></SelectGoods>
     </el-dialog>
   </div>
 </template>
@@ -67,6 +135,8 @@ import SelectGoods from "@/components/product/SelectGoods";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const productUnit = ref([]);
+
 const sourceList = ref({
   data: [],
   pagination: {
@@ -124,6 +194,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -159,17 +232,25 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/stockJournalDetails/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/stockJournalDetails/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -218,8 +299,22 @@ const openModal = () => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.list && formData.data.list.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.list.filter(
+          (itemProduct) => itemProduct.productId === item.id
+        );
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
     formData.data.list = formData.data.list.concat(
-      goods.map((item) => {
+      afterFiltering.map((item) => {
         return {
           productCode: item.code,
           productId: item.id,
@@ -261,6 +356,18 @@ const submitForm = () => {
 const handleDelete = (index) => {
   formData.data.list.splice(index, 1);
 };
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.list && formData.data.list.length > 0) {
+    data = formData.data.list.map((item) => {
+      return {
+        id: item.productId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 20 - 3
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -47,6 +47,7 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
 const productType = ref([]);
+const productUnit = ref([]);
 const status = ref([
   {
     label: "待出库",
@@ -168,6 +169,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -223,11 +227,15 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["product_type"]).then((res) => {
+  proxy.getDictOne(["product_type", "unit"]).then((res) => {
     productType.value = res["product_type"].map((x) => ({
       label: x.dictValue,
       value: x.dictKey,
     }));
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
   });
 };
 const getList = async (req) => {
@@ -236,7 +244,10 @@ const getList = async (req) => {
   proxy
     .post("/stockWaitDetails/page", sourceList.value.pagination)
     .then((res) => {
-      sourceList.value.data = res.rows;
+      sourceList.value.data = res.rows.map((x) => ({
+        ...x,
+        quantity: x.quantity - x.receiptQuantity,
+      }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {
         loading.value = false;
@@ -305,7 +316,7 @@ const formConfig = computed(() => {
       prop: "warehousingQuantity",
       label: "出库数量",
       precision: 0,
-      min: 0,
+      min: 1,
       controls: false,
     },
   ];
@@ -319,6 +330,12 @@ const rules = ref({
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
+    if (formData.data.warehousingQuantity > Number(formData.data.quantity)) {
+      return ElMessage({
+        message: "出库数量不可大于待出库数量",
+        type: "info",
+      });
+    }
     proxy
       .post("/stockWait/add", {
         id: formData.data.id,

+ 55 - 18
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -8,15 +8,31 @@
         :loading="loading"
         :selectConfig="selectConfig"
         highlight-current-row
-        @get-list="getList">
+        @get-list="getList"
+      >
       </byTable>
     </div>
 
-    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="400" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit"> </byForm>
+    <el-dialog
+      title="入库"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="400"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
+      </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -31,6 +47,7 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
 const productType = ref([]);
+const productUnit = ref([]);
 const status = ref([
   {
     label: "待入库",
@@ -40,10 +57,10 @@ const status = ref([
     label: "部分入库",
     value: 1,
   },
-  {
-    label: "入库完成",
-    value: 2,
-  },
+  // {
+  //   label: "入库完成",
+  //   value: 2,
+  // },
 ]);
 const businessType = ref([
   {
@@ -148,6 +165,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -203,23 +223,32 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["product_type"]).then((res) => {
+  proxy.getDictOne(["product_type", "unit"]).then((res) => {
     productType.value = res["product_type"].map((x) => ({
       label: x.dictValue,
       value: x.dictKey,
     }));
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
   });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/stockWaitDetails/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/stockWaitDetails/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows.map((x) => ({
+        ...x,
+        quantity: x.quantity - x.receiptQuantity,
+      }));
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -283,18 +312,26 @@ const formConfig = computed(() => {
       prop: "warehousingQuantity",
       label: "入库数量",
       precision: 0,
-      min: 0,
+      min: 1,
       controls: false,
     },
   ];
 });
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
-  warehousingQuantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
+  warehousingQuantity: [
+    { required: true, message: "请输入入库数量", trigger: "blur" },
+  ],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
+    // if (formData.data.warehousingQuantity > Number(formData.data.quantity)) {
+    //   return ElMessage({
+    //     message: "入库数量不可大于待入库数量",
+    //     type: "info",
+    //   });
+    // }
     proxy
       .post("/stockWait/add", {
         id: formData.data.id,

+ 48 - 3
src/views/purchaseSales/outAndInWarehouse/warehouseAdjustment/index.vue

@@ -74,7 +74,8 @@
                         style="width: 100%"
                         :precision="0"
                         :controls="false"
-                        :min="0"
+                        :min="1"
+                        onmousewheel="return false;"
                       />
                     </el-form-item>
                   </div>
@@ -105,12 +106,14 @@
     </el-dialog>
 
     <el-dialog
+      v-if="openProduct"
       v-model="openProduct"
       title="选择商品"
       width="70%"
       append-to-body
     >
       <SelectGoods
+        :selectList="acquireSelectList()"
         @cancel="openProduct = false"
         @pushGoods="pushGoods"
       ></SelectGoods>
@@ -127,6 +130,7 @@ import SelectGoods from "@/components/product/SelectGoods";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const productUnit = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -210,6 +214,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -221,7 +228,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作人",
-        prop: "opUserName",
+        prop: "operatorName",
         width: 140,
       },
     },
@@ -245,6 +252,12 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -327,9 +340,26 @@ const openModal = () => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (
+      formData.data.stockTransferDetailsList &&
+      formData.data.stockTransferDetailsList.length > 0
+    ) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.stockTransferDetailsList.filter(
+          (itemProduct) => itemProduct.productId === item.id
+        );
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
     formData.data.stockTransferDetailsList =
       formData.data.stockTransferDetailsList.concat(
-        goods.map((item) => {
+        afterFiltering.map((item) => {
           return {
             productCode: item.code,
             productId: item.id,
@@ -382,6 +412,21 @@ const submitForm = () => {
 const handleDelete = (index) => {
   formData.data.stockTransferDetailsList.splice(index, 1);
 };
+const acquireSelectList = () => {
+  let data = [];
+  if (
+    formData.data.stockTransferDetailsList &&
+    formData.data.stockTransferDetailsList.length > 0
+  ) {
+    data = formData.data.stockTransferDetailsList.map((item) => {
+      return {
+        id: item.productId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
 </script>
 
 <style lang="scss" scoped>

+ 75 - 35
src/views/purchaseSales/stockManage/inventory/index.vue

@@ -80,10 +80,12 @@
                   >
                     <el-input-number
                       v-model="row.checkQuantity"
-                      :precision="4"
+                      :precision="0"
                       :controls="false"
                       :min="0"
+                      :disabled="modalType == 'edit'"
                       @change="() => handleChange($index)"
+                      onmousewheel="return false;"
                     />
                   </el-form-item>
                 </template>
@@ -118,19 +120,21 @@
       </template>
     </el-dialog>
     <el-dialog
+      v-if="openProduct"
       v-model="openProduct"
       title="选择物品"
       width="70%"
       append-to-body
     >
       <SelectGoods
+        :selectList="acquireSelectList()"
         @cancel="openProduct = false"
         @pushGoods="pushGoods"
       ></SelectGoods>
     </el-dialog>
   </div>
 </template>
-  
+
 <script setup>
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from "element-plus";
@@ -406,38 +410,62 @@ const handleSelect = (row) => {
 };
 
 const pushGoods = (goods) => {
-  const arr = goods.map((x) => ({
-    productId: x.id,
-    quantity: "",
-    checkQuantity: "",
-    productName: x.name,
-    productCode: x.code,
-    productUnit: x.unit,
-  }));
-  const ids = arr.map((x) => x.productId);
-  if (formData.data.warehouseId) {
-    proxy
-      .post("/stock/pageByWarehouse", {
-        id: formData.data.warehouseId,
-        productIds: ids,
-      })
-      .then((res) => {
-        const productList = res.rows;
-        for (let i = 0; i < productList.length; i++) {
-          const e = productList[i];
-          for (let j = 0; j < arr.length; j++) {
-            const jele = arr[j];
-            if (e.productId === jele.productId) {
-              formData.data.list.push({ ...jele, quantity: e.quantity });
-            }
-          }
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (formData.data.list && formData.data.list.length > 0) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.list.filter(
+          (itemProduct) => itemProduct.productId === item.id
+        );
+        if (data && data.length > 0) {
+          return false;
         }
+        return true;
       });
+    } else {
+      afterFiltering = goods;
+    }
+    const arr = afterFiltering.map((x) => ({
+      productId: x.id,
+      quantity: "",
+      checkQuantity: "",
+      productName: x.name,
+      productCode: x.code,
+      productUnit: x.unit,
+    }));
+    const ids = arr.map((x) => x.productId);
+    if (formData.data.warehouseId) {
+      proxy
+        .post("/stock/pageByWarehouse", {
+          id: formData.data.warehouseId,
+          productIds: ids,
+        })
+        .then((res) => {
+          const productList = res.rows;
+          if (productList.length > 0) {
+            for (let i = 0; i < arr.length; i++) {
+              const e = arr[i];
+              const current = productList.find(
+                (x) => x.productId === e.productId
+              );
+              if (current) {
+                formData.data.list.push({ ...e, quantity: current.quantity });
+              } else {
+                formData.data.list.push({ ...e, quantity: 0 });
+              }
+            }
+          } else {
+            for (let i = 0; i < arr.length; i++) {
+              const e = arr[i];
+              formData.data.list.push({ ...e, quantity: 0 });
+            }
+          }
+        });
+    }
+    openProduct.value = false;
+  } else {
+    ElMessage("请选择至少一件物品");
   }
-  return ElMessage({
-    message: "添加成功,已为你自动过滤库存数量为0的数据 !",
-    type: "success",
-  });
 };
 
 const handleRemove = (index) => {
@@ -477,7 +505,7 @@ const handleRemove = (index) => {
 // });
 
 const handleChange = (index) => {
-  if (!formData.data.list[index].quantity) return;
+  // if (!formData.data.list[index].quantity) return;
   if (
     formData.data.list[index].quantity > formData.data.list[index].checkQuantity
   ) {
@@ -526,18 +554,30 @@ const handleClickCode = (row) => {
     dialogVisible.value = true;
   });
 };
+const acquireSelectList = () => {
+  let data = [];
+  if (formData.data.list && formData.data.list.length > 0) {
+    data = formData.data.list.map((item) => {
+      return {
+        id: item.productId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
 </script>
-  
+
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
 }
 </style>
-<style >
+<style>
 .redClass {
   color: #f54a45 !important;
 }
 .greenClass {
   color: #39c55a !important;
 }
-</style>
+</style>

+ 1 - 1
src/views/salesMange/saleContract/claim/index.vue

@@ -29,7 +29,7 @@
               <el-table-column prop="money" label="关联金额" min-width="150">
                 <template #default="{ row, $index }">
                   <el-form-item :prop="'claimContractList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
-                    <el-input-number v-model="row.money" :precision="4" :controls="false" :min="0" onmousewheel="return false;" />
+                    <el-input-number v-model="row.money" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
                   </el-form-item>
                 </template>
               </el-table-column>

+ 116 - 73
src/views/salesMange/saleContract/contract/index.vue

@@ -27,9 +27,17 @@
             <span>{{ moneyFormat(item.refundMoney, 2) }}</span>
           </div>
         </template>
-        <template #advanceRatio="{ item }">
+        <template #scale="{ item }">
           <div>
-            <span>{{ item.advanceRatio }}%</span>
+            {{ computeScale(item) }}
+          </div>
+        </template>
+        <template #refundStatusNew="{ item }">
+          <div>
+            <span v-if="item.refundStatus && item.refundStatus !== 0">
+              {{ dictValueLabel(item.refundStatus, refundStatusNew) }}
+            </span>
+            <span v-else>{{ dictValueLabel(item.refundStatusNew, refundStatusNew) }}</span>
           </div>
         </template>
       </byTable>
@@ -133,7 +141,7 @@
               {{ item.productName }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
-              {{ item.productUnit }}
+              {{ dictValueLabel(item.productUnit, productUnit) }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ item.productQuantity }}
@@ -229,6 +237,7 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
+const route = useRoute();
 
 const { proxy } = getCurrentInstance();
 const contractType = ref([]);
@@ -237,6 +246,7 @@ const tradeMethods = ref([]);
 const corporationList = ref([]);
 const customerList = ref([]);
 const shippingMethod = ref([]);
+const productUnit = ref([]);
 const userList = ref([]);
 const status = ref([
   {
@@ -311,7 +321,7 @@ const config = computed(() => {
       attrs: {
         label: "归属公司",
         prop: "sellCorporationId",
-        "min-width": 220,
+        "min-width": 160,
       },
       render(type) {
         let text = "";
@@ -352,7 +362,7 @@ const config = computed(() => {
       attrs: {
         label: "客户",
         prop: "buyCorporationId",
-        "min-width": 220,
+        "min-width": 180,
       },
       render(type) {
         let text = "";
@@ -369,21 +379,28 @@ const config = computed(() => {
       attrs: {
         label: "版本号",
         prop: "version",
-        width: 120,
+        width: 80,
       },
     },
     {
       attrs: {
         label: "合同金额",
         slot: "amount",
-        width: 140,
+        width: 120,
       },
     },
     {
       attrs: {
         label: "已到账金额",
         slot: "refundMoney",
-        width: 140,
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "到账比例",
+        slot: "scale",
+        width: 100,
       },
     },
     {
@@ -407,7 +424,7 @@ const config = computed(() => {
       attrs: {
         label: "审批状态",
         prop: "status",
-        width: 140,
+        width: 120,
       },
       render(type) {
         let text = "";
@@ -423,29 +440,42 @@ const config = computed(() => {
     {
       attrs: {
         label: "到款状态",
-        prop: "refundStatusNew",
-        width: 140,
-      },
-      render(type) {
-        let text = "";
-        if (refundStatusNew.value && refundStatusNew.value.length > 0) {
-          let data = refundStatusNew.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        slot: "refundStatusNew",
+        width: 120,
       },
+      // render(type) {
+      //   let text = "";
+      //   if (refundStatusNew.value && refundStatusNew.value.length > 0) {
+      //     let data = refundStatusNew.value.filter((item) => item.value == type);
+      //     if (data && data.length > 0) {
+      //       text = data[0].label;
+      //     }
+      //   }
+      //   return text;
+      // },
     },
     {
       attrs: {
         label: "操作",
-        width: "120",
+        width: "180",
         align: "center",
         fixed: "right",
       },
       renderHTML(row) {
         return [
+          !row.refundStatus && row.refundStatusNew == 10
+            ? {
+                attrs: {
+                  label: "到款完成",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickAccomplish(row);
+                },
+              }
+            : {},
           {
             attrs: {
               label: "打印",
@@ -491,57 +521,38 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "contract_type",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        contractType.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "account_currency",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        accountCurrency.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "trade_mode",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        tradeMethods.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
+  proxy.getDictOne(["contract_type", "account_currency", "trade_methods", "shipping_method", "unit"]).then((res) => {
+    if (res.contract_type && res.contract_type.length > 0) {
+      contractType.value = res.contract_type.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    }
+    if (res.account_currency && res.account_currency.length > 0) {
+      accountCurrency.value = res.account_currency.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    }
+    if (res.trade_methods && res.trade_methods.length > 0) {
+      tradeMethods.value = res.trade_methods.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    }
+    if (res.shipping_method && res.shipping_method.length > 0) {
+      shippingMethod.value = res.shipping_method.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    }
+    if (res.unit && res.unit.length > 0) {
+      productUnit.value = res.unit.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    }
+  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -578,6 +589,23 @@ const getDict = () => {
       }
     });
   proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "shipping_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        shippingMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
     .get("/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
@@ -604,6 +632,9 @@ const getList = async (req) => {
   });
 };
 getDict();
+if(route.query.code){
+    sourceList.value.pagination.keyword=route.query.code
+}
 getList();
 const newContract = () => {
   proxy.$router.replace({
@@ -649,6 +680,18 @@ const statisticsTwo = (label, index) => {
   }
   return num;
 };
+const computeScale = (item) => {
+  let text = 0;
+  if (item.refundMoney && Number(item.refundMoney) > 0 && item.amount && Number(item.amount) > 0) {
+    text = parseFloat(Number(item.refundMoney) / Number(item.amount)).toFixed(2);
+  }
+  return text + "%";
+};
+const clickAccomplish = (row) => {
+  proxy.post("/contract/toTheAccount", { id: row.id }).then(() => {
+    getList();
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 4 - 0
src/views/salesMange/saleContract/priceSheet/index.vue

@@ -227,6 +227,7 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import moment from "moment";
 import useUserStore from "@/store/modules/user";
+const route = useRoute();
 
 const { proxy } = getCurrentInstance();
 const accountList = ref([]);
@@ -498,6 +499,9 @@ const getList = async (req) => {
   });
 };
 getDict();
+if(route.query.code){
+    sourceList.value.pagination.keyword=route.query.code
+}
 getList();
 const newPriceSheet = () => {
   proxy.$router.replace({