瀏覽代碼

部分新需求更改

cz 11 月之前
父節點
當前提交
0fd14fd1da
共有 29 個文件被更改,包括 1756 次插入125 次删除
  1. 2 2
      .env.development
  2. 2 2
      .env.staging
  3. 6 3
      src/components/byTable/ElementsMapping.vue
  4. 0 1
      src/components/byTable/index.vue
  5. 1 1
      src/components/headerBar/header-bar.vue
  6. 243 14
      src/components/process/SF/Contract.vue
  7. 243 14
      src/components/process/SF/ContractChange.vue
  8. 1 1
      src/components/process/SF/PriceSheet.vue
  9. 2 2
      src/store/modules/tagsView.js
  10. 43 1
      src/views/EHSD/procurement/purchasedEHSD/index.vue
  11. 11 1
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  12. 39 2
      src/views/EHSD/saleContract/contractEHSD/index.vue
  13. 27 4
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  14. 13 0
      src/views/MES/productionOrder/index.vue
  15. 5 2
      src/views/MES/productionTask/index.vue
  16. 2 2
      src/views/connect/E-mail/mail/com/left.vue
  17. 15 13
      src/views/customer/addCustomer.vue
  18. 2 2
      src/views/customer/file/index.vue
  19. 2 2
      src/views/customer/highseas/index.vue
  20. 2 2
      src/views/customer/portrait/com/CustomerInfo.vue
  21. 2 2
      src/views/customer/privatesea/index.vue
  22. 133 4
      src/views/finance/fundManage/kdCompany/index.vue
  23. 10 10
      src/views/publicModule/codingRule/index.vue
  24. 2 0
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  25. 49 23
      src/views/report/expressPaymentSummary/index.vue
  26. 682 0
      src/views/report/expressRechargeSummary/index.vue
  27. 17 1
      src/views/report/orderSummary/index.vue
  28. 199 13
      src/views/system/dict/dictCommonDtl.vue
  29. 1 1
      vite.config.js

+ 2 - 2
.env.development

@@ -8,13 +8,13 @@ VITE_APP_ENV = 'development'
 VITE_APP_BASE_API = '/dev-api'
 
 # IP地址
-VITE_APP_IP = '121.37.194.75'
+VITE_APP_IP = '139.9.102.170'
 
 # WS
 VITE_APP_WS_API = ':20010/test-api'
 
 #上传文件地址
-VITE_APP_UPLOAD_API='121.37.194.75:20010'
+VITE_APP_UPLOAD_API='139.9.102.170:20010'
 VITE_APP_UPLOAD_BASE_API = '/test-api'
 
 

+ 2 - 2
.env.staging

@@ -8,13 +8,13 @@ VITE_APP_ENV = 'staging'
 VITE_APP_BASE_API = '/test-api'
 
 # IP地址
-VITE_APP_IP = '121.37.194.75'
+VITE_APP_IP = '139.9.102.170'
 
 # WS
 VITE_APP_WS_API = ':20010/test-api'
 
 #上传文件地址
-VITE_APP_UPLOAD_API='121.37.194.75:20010'
+VITE_APP_UPLOAD_API='139.9.102.170:20010'
 VITE_APP_UPLOAD_BASE_API = '/test-api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli

+ 6 - 3
src/components/byTable/ElementsMapping.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-
     <el-button v-for="(i,index) in getCellList" @click="i.click()" :key="index" v-bind="i.attrs" v-debounce
                v-show="index < 2">{{ i.attrs.label }}</el-button>
     <el-dropdown v-show="getCellList && getCellList.length>2">
@@ -11,7 +10,7 @@
       <template #dropdown>
         <el-dropdown-menu>
           <el-dropdown-item :class="index > 1 ? '' : 'dn'" @click="i.click()" v-for="(i,index) in getCellList" :key="index">
-            <span :style="i.attrs.type == 'danger' ? 'color:red' : 'color:#409eff'">{{ i.attrs.label}}</span>
+            <span :style="i.attrs.type == 'danger' ? 'color:#f56c6c' : 'color:#409eff'">{{ i.attrs.label}}</span>
           </el-dropdown-item>
         </el-dropdown-menu>
       </template>
@@ -61,13 +60,17 @@ export default defineComponent({
   },
 });
 </script>
-<style>
+<style scoped>
 .more-btn {
   line-height: 34px;
   font-size: 14px;
   color: #ff9315;
+  padding: 6px;
 }
 .dn {
   display: none !important;
 }
+:deep(.el-dropdown-link) {
+  margin-left: 0px !important;
+}
 </style>

+ 0 - 1
src/components/byTable/index.vue

@@ -441,7 +441,6 @@ export default defineComponent({
       scope.row.$index = scope.$index;
       // const args = propValue !== undefined ? propValue : scope.row;
       const args = propValue !== undefined ? propValue : scope.row;
-      console.log(args, "awdaw");
       return item[fn.name][fn.type](getParent.value, args);
     };
     // 匹配 render 开头的函数

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

@@ -461,7 +461,7 @@ const handleTabChange = (val) => {
     nextTick(() => {
       proxy.$refs["appCode"].innerHTML = ""; //清除二维码方法一
       new QRCode(proxy.$refs["appCode"], {
-        text: "http://121.37.194.75:20011/download/sanfanApp.apk",
+        text: "http://139.9.102.170:20011/download/sanfanApp.apk",
         width: 200,
         height: 200,
         colorDark: "#000000",

+ 243 - 14
src/components/process/SF/Contract.vue

@@ -206,6 +206,11 @@
                 <div style="padding-left:50px">
                   <div style="margin-bottom:10px;">
                     <TitleInfo content='BOM单:'></TitleInfo>
+                    <div v-if="route.query.flowKey=='contract_update_flow'" style="margin-top:10px">
+                      <el-button type="primary" @click="openDialog(scope.$index,1)" plain>主材</el-button>
+                      <el-button type="primary" @click="openDialog(scope.$index,2)" plain>工艺</el-button>
+                      <el-button type="primary" @click="openDialog(scope.$index,3)" plain>辅材</el-button>
+                    </div>
                   </div>
                   <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table" row-key="materialId">
                     <el-table-column label="图片" width="80">
@@ -226,8 +231,32 @@
                       </template>
                     </el-table-column>
                     <el-table-column prop="productColor" label="颜色" width="170" />
-                    <el-table-column prop="standardDosage" label="标准用量" width="100" />
-                    <el-table-column prop="lossRate" label="损耗率(%)" width="100" />
+                    <el-table-column prop="standardDosage" label="标准用量" width="110">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
+                                        :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.standardDosage'"
+                                        :rules="rules.standardDosage" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.standardDosage" placeholder="请输入" style="width: 100%"
+                                             :precision="0" :controls="false" :min="1" @change="calculationAmount(true)" />
+                          </el-form-item>
+                          <span v-else>{{row.standardDosage}}</span>
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="lossRate" label="损耗率(%)" width="110">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
+                                        :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.lossRate'"
+                                        :rules="rules.lossRate" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.lossRate" placeholder="请输入" style="width: 100%" :precision="2"
+                                             :controls="false" :min="0" @change="calculationAmount(true)" />
+                          </el-form-item>
+                          <span v-else>{{row.lossRate}}</span>
+                        </div>
+                      </template>
+                    </el-table-column>
                     <el-table-column prop="quantity" label="数量" width="130">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
@@ -571,6 +600,20 @@
       </template>
     </el-dialog>
 
+    <el-dialog :title="'原材料选择'" v-model="openSelectRawMaterial" width="90%" destroy-on-close>
+      <SelectMaterial :ancestors="110" @selectMaterial="selectRawMaterial"></SelectMaterial>
+      <template #footer>
+        <el-button @click="openSelectRawMaterial = false" size="defualt" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title="'工艺选择'" v-model="openSelectTechnology" width="90%" destroy-on-close>
+      <SelectTechnology :isSelect="true" @selectTechnology="selectTechnology"></SelectTechnology>
+      <template #footer>
+        <el-button @click="openSelectTechnology = false" size="defualt" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
+
     <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
       <SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
       <template #footer>
@@ -589,6 +632,7 @@
 import byForm from "@/components/byForm/index";
 import SelectProduct from "@/components/product/SelectProduct.vue";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
+import SelectTechnology from "@/views/production/project/technology/index.vue";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
@@ -597,7 +641,6 @@ import SelectSample from "@/components/contractCom/selectSample.vue";
 import * as echarts from "echarts";
 import $bus from "@/bus/index.js";
 import { v4 as uuidv4 } from "uuid";
-import { async } from "@antv/x6/lib/registry/marker/main";
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 // 接收父组件的传值
@@ -628,9 +671,13 @@ const settlementWay = computed(
 const frontLinesData = computed(
   () => proxy.useUserStore().allDict["front_lines"]
 );
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const accountList = ref([]);
 const customerList = ref([]);
 const templateList = ref([]);
+const sealUseData = ref([]);
 const userList = ref([]);
 const corporationList = ref([]);
 const customerUserList = ref([]);
@@ -833,6 +880,29 @@ const formConfig = computed(() => {
       itemWidth: 50,
     },
     {
+      type: "select",
+      prop: "placeOrderType",
+      label: "是否首单",
+      data: [
+        {
+          dictKey: "10",
+          dictValue: "首单",
+        },
+        {
+          dictKey: "20",
+          dictValue: "返单",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "qualityLv",
+      label: "品质等级",
+      data: qualityLevel.value,
+      itemWidth: 50,
+    },
+    {
       type: "title",
       title: "贸易信息",
       haveLine: true,
@@ -1254,6 +1324,14 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "sealUseId",
+      label: "用印流水号",
+      data: sealUseData.value,
+      itemWidth: 50,
+      fn: (val) => {},
+    },
+    {
       type: "slot",
       slotName: "templateContent",
       prop: "templateContent",
@@ -1392,7 +1470,10 @@ const getaccountList = (val) => {
     });
 };
 const isFormDetail = ref(false);
-if (route.query && route.query.processType && route.query.processType == 20) {
+if (
+  (route.query && route.query.processType && route.query.processType == 20) ||
+  route.query.currentContractId
+) {
   isFormDetail.value = true;
 }
 
@@ -1411,6 +1492,19 @@ const getDict = () => {
     });
 
   proxy
+    .post("/sealUse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      isLinkContract: isFormDetail.value == true ? "" : 0,
+    })
+    .then((res) => {
+      sealUseData.value = res.rows.map((x) => ({
+        label: x.code,
+        value: x.id,
+      }));
+    });
+
+  proxy
     .post("/customer/selPage", {
       pageNum: 1,
       pageSize: 50,
@@ -1741,6 +1835,37 @@ const selectProduct = async (goods) => {
   }
 };
 
+// const selectMaterial = (goods) => {
+//   let flag = formData.data.contractProductList[
+//     indexValue.value
+//   ].contractProductBomList.some((x) => x.materialId == goods.id);
+//   if (!flag) {
+//     let fileUrl = "";
+//     if (goods.fileList && goods.fileList.length > 0) {
+//       fileUrl = goods.fileList[0].fileUrl;
+//     }
+//     formData.data.contractProductList[
+//       indexValue.value
+//     ].contractProductBomList.push({
+//       fileUrl: fileUrl,
+//       materialId: goods.id,
+//       productName: goods.name,
+//       productCode: goods.customCode,
+//       productLength: goods["length"],
+//       productWidth: goods.width,
+//       productHeight: goods.height,
+//       quantity: null,
+//       price: goods.price || null,
+//       amount: "",
+//       fileList: [],
+//       type: 2,
+//     });
+//     proxy.msgTip("选择成功");
+//   } else {
+//     proxy.msgTip("该物料已选择", 2);
+//   }
+// };
+
 const selectMaterial = (goods) => {
   let flag = formData.data.contractProductList[
     indexValue.value
@@ -1760,8 +1885,12 @@ const selectMaterial = (goods) => {
       productLength: goods["length"],
       productWidth: goods.width,
       productHeight: goods.height,
+      productColor: goods.color,
       quantity: null,
-      price: goods.price || null,
+      standardDosage: 1,
+      lossRate: null,
+      remark: "",
+      price: null,
       amount: "",
       fileList: [],
       type: 2,
@@ -1851,16 +1980,19 @@ const calculationAmount = (flag = false) => {
           Number(formData.data.contractProductList[i].businessCostPrice)
       ).toFixed(2);
       let row = formData.data.contractProductList[i];
-      if (flag) {
+      if (flag && row.quantity) {
         for (let j = 0; j < row.contractProductBomList.length; j++) {
           let jrow = row.contractProductBomList[j];
-          jrow.quantity = Math.ceil(
-            Number(
-              parseFloat(
-                (row.quantity / jrow.standardDosage) * (1 + jrow.lossRate / 100)
-              ).toFixed(2)
-            )
-          );
+          if (jrow.standardDosage && jrow.lossRate != null) {
+            jrow.quantity = Math.ceil(
+              Number(
+                parseFloat(
+                  (row.quantity / jrow.standardDosage) *
+                    (1 + jrow.lossRate / 100)
+                ).toFixed(2)
+              )
+            );
+          }
         }
       }
     }
@@ -2044,7 +2176,11 @@ const handleSubmit = async (isStag = false) => {
     ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         const ele = formData.data.contractProductList[i];
-        if (ele.isShowProductFile && ele.fileListOne.length > 0) {
+        if (
+          ele.isShowProductFile &&
+          ele.fileListOne &&
+          ele.fileListOne.length > 0
+        ) {
           ele.prodFileList = ele.fileListOne;
         }
       }
@@ -2147,6 +2283,97 @@ const handleClickUploadOne = (index) => {
   }
 };
 
+const dialogOpenType = ref(-1);
+const openSelectRawMaterial = ref(false);
+const openSelectTechnology = ref(false);
+const openDialog = (index, type) => {
+  indexValue.value = index;
+  dialogOpenType.value = type;
+  if (type == 1) {
+    openSelectRawMaterial.value = true;
+  }
+  if (type == 2) {
+    openSelectTechnology.value = true;
+  }
+  if (type == 3) {
+    handleClickSelectMaterial(index);
+  }
+};
+
+const selectRawMaterial = (row) => {
+  if (dialogOpenType.value == 1) {
+    let flag = formData.data.contractProductList[
+      indexValue.value
+    ].contractProductBomList.some((x) => x.materialId == row.id);
+    if (!flag) {
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.unshift({
+        materialId: row.id,
+        type: 1,
+        productName: row.name,
+        productCode: row.customCode,
+        productLength: row["length"],
+        productWidth: row.width,
+        productHeight: row.height,
+        productColor: row.color,
+        quantity: null,
+        standardDosage: 1,
+        lossRate: null,
+        remark: "",
+        price: null,
+        amount: "",
+        fileList: [],
+      });
+      proxy.msgTip("选择成功");
+    } else {
+      proxy.msgTip("该物料已选择", 2);
+    }
+  }
+};
+
+const selectTechnology = (row) => {
+  if (
+    dialogOpenType.value == 2 &&
+    row.processRouteList &&
+    row.processRouteList.length > 0
+  ) {
+    formData.data.contractProductList[indexValue.value].technologyId = row.id;
+    formData.data.contractProductList[indexValue.value].contractProductBomList =
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.filter((x) => x.type != 3);
+    let index = formData.data.contractProductList[
+      indexValue.value
+    ].contractProductBomList.findIndex((x) => x.type == 2);
+    let arr = row.processRouteList.map((x) => ({
+      type: 3,
+      materialId: x.id,
+      productName: x.name,
+      productCode: x.code,
+      quantity: null,
+      standardDosage: 1,
+      lossRate: null,
+      remark: "",
+    }));
+
+    if (index >= 0) {
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.splice(index, 0, ...arr);
+    } else {
+      let arrLength =
+        formData.data.contractProductList[indexValue.value]
+          .contractProductBomList.length;
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.splice(arrLength ? arrLength : 0, 0, ...arr);
+    }
+    openSelectTechnology.value = false;
+    return proxy.msgTip("选择成功", 1);
+  }
+};
+
 const getAllData = (businessId) => {
   proxy.post("/contract/detail", { id: businessId }).then(async (res) => {
     res.countryId = res.buyCountryId;
@@ -2333,6 +2560,7 @@ const getPriceSheetData = (id) => {
       // companyId: res.companyId,
       ofCompanyId: res.ofCompanyId,
       deptId: res.deptId,
+      qualityLv: res.qualityLv,
       buyCorporationId: res.buyCorporationId,
       buyAddress: res.buyAddress,
       buyPostalCode: res.buyPostalCode,
@@ -2350,6 +2578,7 @@ const getPriceSheetData = (id) => {
     // } else {
     //   formData.data.contractType = "1";
     // }
+
     formData.data.contractProductList = res.quotationProductList.map((x) => ({
       quotationProductId: x.id,
       fileUrl: "",

+ 243 - 14
src/components/process/SF/ContractChange.vue

@@ -206,6 +206,11 @@
                 <div style="padding-left:50px">
                   <div style="margin-bottom:10px;">
                     <TitleInfo content='BOM单:'></TitleInfo>
+                    <div v-if="route.query.flowKey=='contract_update_flow'" style="margin-top:10px">
+                      <el-button type="primary" @click="openDialog(scope.$index,1)" plain>主材</el-button>
+                      <el-button type="primary" @click="openDialog(scope.$index,2)" plain>工艺</el-button>
+                      <el-button type="primary" @click="openDialog(scope.$index,3)" plain>辅材</el-button>
+                    </div>
                   </div>
                   <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table" row-key="materialId">
                     <el-table-column label="图片" width="80">
@@ -226,8 +231,32 @@
                       </template>
                     </el-table-column>
                     <el-table-column prop="productColor" label="颜色" width="170" />
-                    <el-table-column prop="standardDosage" label="标准用量" width="100" />
-                    <el-table-column prop="lossRate" label="损耗率(%)" width="100" />
+                    <el-table-column prop="standardDosage" label="标准用量" width="110">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
+                                        :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.standardDosage'"
+                                        :rules="rules.standardDosage" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.standardDosage" placeholder="请输入" style="width: 100%"
+                                             :precision="0" :controls="false" :min="1" @change="calculationAmount(true)" />
+                          </el-form-item>
+                          <span v-else>{{row.standardDosage}}</span>
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="lossRate" label="损耗率(%)" width="110">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
+                                        :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.lossRate'"
+                                        :rules="rules.lossRate" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.lossRate" placeholder="请输入" style="width: 100%" :precision="2"
+                                             :controls="false" :min="0" @change="calculationAmount(true)" />
+                          </el-form-item>
+                          <span v-else>{{row.lossRate}}</span>
+                        </div>
+                      </template>
+                    </el-table-column>
                     <el-table-column prop="quantity" label="数量" width="130">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
@@ -571,6 +600,20 @@
       </template>
     </el-dialog>
 
+    <el-dialog :title="'原材料选择'" v-model="openSelectRawMaterial" width="90%" destroy-on-close>
+      <SelectMaterial :ancestors="110" @selectMaterial="selectRawMaterial"></SelectMaterial>
+      <template #footer>
+        <el-button @click="openSelectRawMaterial = false" size="defualt" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title="'工艺选择'" v-model="openSelectTechnology" width="90%" destroy-on-close>
+      <SelectTechnology :isSelect="true" @selectTechnology="selectTechnology"></SelectTechnology>
+      <template #footer>
+        <el-button @click="openSelectTechnology = false" size="defualt" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
+
     <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
       <SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
       <template #footer>
@@ -589,6 +632,7 @@
 import byForm from "@/components/byForm/index";
 import SelectProduct from "@/components/product/SelectProduct.vue";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
+import SelectTechnology from "@/views/production/project/technology/index.vue";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
@@ -597,7 +641,6 @@ import SelectSample from "@/components/contractCom/selectSample.vue";
 import * as echarts from "echarts";
 import $bus from "@/bus/index.js";
 import { v4 as uuidv4 } from "uuid";
-import { async } from "@antv/x6/lib/registry/marker/main";
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 // 接收父组件的传值
@@ -628,9 +671,13 @@ const settlementWay = computed(
 const frontLinesData = computed(
   () => proxy.useUserStore().allDict["front_lines"]
 );
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const accountList = ref([]);
 const customerList = ref([]);
 const templateList = ref([]);
+const sealUseData = ref([]);
 const userList = ref([]);
 const corporationList = ref([]);
 const customerUserList = ref([]);
@@ -833,6 +880,29 @@ const formConfig = computed(() => {
       itemWidth: 50,
     },
     {
+      type: "select",
+      prop: "placeOrderType",
+      label: "是否首单",
+      data: [
+        {
+          dictKey: "10",
+          dictValue: "首单",
+        },
+        {
+          dictKey: "20",
+          dictValue: "返单",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "qualityLv",
+      label: "品质等级",
+      data: qualityLevel.value,
+      itemWidth: 50,
+    },
+    {
       type: "title",
       title: "贸易信息",
       haveLine: true,
@@ -1254,6 +1324,14 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "sealUseId",
+      label: "用印流水号",
+      data: sealUseData.value,
+      itemWidth: 50,
+      fn: (val) => {},
+    },
+    {
       type: "slot",
       slotName: "templateContent",
       prop: "templateContent",
@@ -1392,7 +1470,10 @@ const getaccountList = (val) => {
     });
 };
 const isFormDetail = ref(false);
-if (route.query && route.query.processType && route.query.processType == 20) {
+if (
+  (route.query && route.query.processType && route.query.processType == 20) ||
+  route.query.currentContractId
+) {
   isFormDetail.value = true;
 }
 
@@ -1411,6 +1492,19 @@ const getDict = () => {
     });
 
   proxy
+    .post("/sealUse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      isLinkContract: isFormDetail.value == true ? "" : 0,
+    })
+    .then((res) => {
+      sealUseData.value = res.rows.map((x) => ({
+        label: x.code,
+        value: x.id,
+      }));
+    });
+
+  proxy
     .post("/customer/selPage", {
       pageNum: 1,
       pageSize: 50,
@@ -1741,6 +1835,37 @@ const selectProduct = async (goods) => {
   }
 };
 
+// const selectMaterial = (goods) => {
+//   let flag = formData.data.contractProductList[
+//     indexValue.value
+//   ].contractProductBomList.some((x) => x.materialId == goods.id);
+//   if (!flag) {
+//     let fileUrl = "";
+//     if (goods.fileList && goods.fileList.length > 0) {
+//       fileUrl = goods.fileList[0].fileUrl;
+//     }
+//     formData.data.contractProductList[
+//       indexValue.value
+//     ].contractProductBomList.push({
+//       fileUrl: fileUrl,
+//       materialId: goods.id,
+//       productName: goods.name,
+//       productCode: goods.customCode,
+//       productLength: goods["length"],
+//       productWidth: goods.width,
+//       productHeight: goods.height,
+//       quantity: null,
+//       price: goods.price || null,
+//       amount: "",
+//       fileList: [],
+//       type: 2,
+//     });
+//     proxy.msgTip("选择成功");
+//   } else {
+//     proxy.msgTip("该物料已选择", 2);
+//   }
+// };
+
 const selectMaterial = (goods) => {
   let flag = formData.data.contractProductList[
     indexValue.value
@@ -1760,8 +1885,12 @@ const selectMaterial = (goods) => {
       productLength: goods["length"],
       productWidth: goods.width,
       productHeight: goods.height,
+      productColor: goods.color,
       quantity: null,
-      price: goods.price || null,
+      standardDosage: 1,
+      lossRate: null,
+      remark: "",
+      price: null,
       amount: "",
       fileList: [],
       type: 2,
@@ -1851,16 +1980,19 @@ const calculationAmount = (flag = false) => {
           Number(formData.data.contractProductList[i].businessCostPrice)
       ).toFixed(2);
       let row = formData.data.contractProductList[i];
-      if (flag) {
+      if (flag && row.quantity) {
         for (let j = 0; j < row.contractProductBomList.length; j++) {
           let jrow = row.contractProductBomList[j];
-          jrow.quantity = Math.ceil(
-            Number(
-              parseFloat(
-                (row.quantity / jrow.standardDosage) * (1 + jrow.lossRate / 100)
-              ).toFixed(2)
-            )
-          );
+          if (jrow.standardDosage && jrow.lossRate != null) {
+            jrow.quantity = Math.ceil(
+              Number(
+                parseFloat(
+                  (row.quantity / jrow.standardDosage) *
+                    (1 + jrow.lossRate / 100)
+                ).toFixed(2)
+              )
+            );
+          }
         }
       }
     }
@@ -2044,7 +2176,11 @@ const handleSubmit = async (isStag = false) => {
     ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         const ele = formData.data.contractProductList[i];
-        if (ele.isShowProductFile && ele.fileListOne.length > 0) {
+        if (
+          ele.isShowProductFile &&
+          ele.fileListOne &&
+          ele.fileListOne.length > 0
+        ) {
           ele.prodFileList = ele.fileListOne;
         }
       }
@@ -2147,6 +2283,97 @@ const handleClickUploadOne = (index) => {
   }
 };
 
+const dialogOpenType = ref(-1);
+const openSelectRawMaterial = ref(false);
+const openSelectTechnology = ref(false);
+const openDialog = (index, type) => {
+  indexValue.value = index;
+  dialogOpenType.value = type;
+  if (type == 1) {
+    openSelectRawMaterial.value = true;
+  }
+  if (type == 2) {
+    openSelectTechnology.value = true;
+  }
+  if (type == 3) {
+    handleClickSelectMaterial(index);
+  }
+};
+
+const selectRawMaterial = (row) => {
+  if (dialogOpenType.value == 1) {
+    let flag = formData.data.contractProductList[
+      indexValue.value
+    ].contractProductBomList.some((x) => x.materialId == row.id);
+    if (!flag) {
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.unshift({
+        materialId: row.id,
+        type: 1,
+        productName: row.name,
+        productCode: row.customCode,
+        productLength: row["length"],
+        productWidth: row.width,
+        productHeight: row.height,
+        productColor: row.color,
+        quantity: null,
+        standardDosage: 1,
+        lossRate: null,
+        remark: "",
+        price: null,
+        amount: "",
+        fileList: [],
+      });
+      proxy.msgTip("选择成功");
+    } else {
+      proxy.msgTip("该物料已选择", 2);
+    }
+  }
+};
+
+const selectTechnology = (row) => {
+  if (
+    dialogOpenType.value == 2 &&
+    row.processRouteList &&
+    row.processRouteList.length > 0
+  ) {
+    formData.data.contractProductList[indexValue.value].technologyId = row.id;
+    formData.data.contractProductList[indexValue.value].contractProductBomList =
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.filter((x) => x.type != 3);
+    let index = formData.data.contractProductList[
+      indexValue.value
+    ].contractProductBomList.findIndex((x) => x.type == 2);
+    let arr = row.processRouteList.map((x) => ({
+      type: 3,
+      materialId: x.id,
+      productName: x.name,
+      productCode: x.code,
+      quantity: null,
+      standardDosage: 1,
+      lossRate: null,
+      remark: "",
+    }));
+
+    if (index >= 0) {
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.splice(index, 0, ...arr);
+    } else {
+      let arrLength =
+        formData.data.contractProductList[indexValue.value]
+          .contractProductBomList.length;
+      formData.data.contractProductList[
+        indexValue.value
+      ].contractProductBomList.splice(arrLength ? arrLength : 0, 0, ...arr);
+    }
+    openSelectTechnology.value = false;
+    return proxy.msgTip("选择成功", 1);
+  }
+};
+
 const getAllData = (businessId) => {
   proxy.post("/contract/detail", { id: businessId }).then(async (res) => {
     res.countryId = res.buyCountryId;
@@ -2333,6 +2560,7 @@ const getPriceSheetData = (id) => {
       // companyId: res.companyId,
       ofCompanyId: res.ofCompanyId,
       deptId: res.deptId,
+      qualityLv: res.qualityLv,
       buyCorporationId: res.buyCorporationId,
       buyAddress: res.buyAddress,
       buyPostalCode: res.buyPostalCode,
@@ -2350,6 +2578,7 @@ const getPriceSheetData = (id) => {
     // } else {
     //   formData.data.contractType = "1";
     // }
+
     formData.data.contractProductList = res.quotationProductList.map((x) => ({
       quotationProductId: x.id,
       fileUrl: "",

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

@@ -392,7 +392,7 @@ const formConfig = computed(() => {
     {
       type: "treeSelect",
       prop: "companyId",
-      label: "报价公司",
+      label: "报价供应商",
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",

+ 2 - 2
src/store/modules/tagsView.js

@@ -14,7 +14,7 @@ const useTagsViewStore = defineStore(
         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 ? '查看' : '发起'
+          title = view.query.processType == 10 ? '审批' : view.query.processType == 20 ? '查看' : (view.query.flowName || '发起')
         }
         this.iframeViews.push(
           Object.assign({}, view, {
@@ -26,7 +26,7 @@ const useTagsViewStore = defineStore(
         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 ? '查看' : '发起'
+          title = view.query.processType == 10 ? '审批' : view.query.processType == 20 ? '查看' : (view.query.flowName || '发起')
         }
         this.visitedViews.push(
           Object.assign({}, view, {

+ 43 - 1
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -175,6 +175,8 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import PurchasePDF from "@/components/PDF/purchasePDF.vue";
+import moment from "moment";
+
 // import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 // import PurchasePDFOneNew from "@/components/PDF/purchasePDFOneNew.vue";
 
@@ -253,6 +255,8 @@ const sourceList = ref({
     keyword: "",
     status: "",
     payStatus: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const loading = ref(false);
@@ -274,6 +278,14 @@ const selectConfig = computed(() => {
       prop: "payStatus",
       data: payStatus.value,
     },
+    {
+      type: "time",
+      label: "交付日期",
+      placeholder: "开始日期",
+      prop: "beginTime",
+      placeholderOne: "结束日期",
+      propOne: "endTime",
+    },
   ];
 });
 const config = computed(() => {
@@ -283,6 +295,7 @@ const config = computed(() => {
         label: "业务公司",
         prop: "companyName",
         width: 130,
+        fixed: "left",
       },
     },
     {
@@ -290,6 +303,7 @@ const config = computed(() => {
         label: "采购单号",
         slot: "code",
         width: 180,
+        fixed: "left",
       },
     },
     {
@@ -297,6 +311,7 @@ const config = computed(() => {
         label: "供应商",
         prop: "supplyName",
         "min-width": 220,
+        fixed: "left",
       },
       // render(type) {
       //   return proxy.dictValueLabel(type, supplierList.value);
@@ -304,6 +319,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "交付日期",
+        prop: "deliveryTime",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "采购金额",
         prop: "amount",
         width: 110,
@@ -377,6 +399,7 @@ const config = computed(() => {
         width: 160,
       },
     },
+
     {
       attrs: {
         label: "操作",
@@ -566,8 +589,24 @@ const handleClickCode = (row) => {
 };
 
 const getRowClass = ({ row }) => {
-  if (Number(row.sumPayMoney) > Number(row.amount)) {
+  // 交期
+  let deliveryTime = moment(row.deliveryTime).format("yyyy-MM-DD");
+  // 今天 也是开始日期
+  let today = moment().format("yyyy-MM-DD");
+  //  7天的之内的
+  let endDay7 = moment(today).add(7, "day").format("yyyy-MM-DD");
+  //  3天的之内的
+  let endDay3 = moment(today).add(3, "day").format("yyyy-MM-DD");
+  if (
+    moment(today).isBefore(deliveryTime) &&
+    moment(deliveryTime).isBetween(today, endDay3)
+  ) {
     return "redClass";
+  } else if (
+    moment(today).isBefore(deliveryTime) &&
+    moment(deliveryTime).isBetween(today, endDay7)
+  ) {
+    return "greenClass";
   }
   return "";
 };
@@ -799,4 +838,7 @@ const exportExcel = () => {
 .redClass {
   color: #f54a45 !important;
 }
+.greenClass {
+  color: #cab211 !important;
+}
 </style>

+ 11 - 1
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -443,6 +443,9 @@ import * as echarts from "echarts";
 const { proxy } = getCurrentInstance();
 const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
 const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const props = defineProps({
   rowData: Object,
   dataType: {
@@ -536,7 +539,7 @@ const formConfig = computed(() => {
     {
       type: "treeSelect",
       prop: "companyId",
-      label: "报价公司",
+      label: "报价供应商",
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
@@ -546,6 +549,13 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "qualityLv",
+      label: "品质等级",
+      data: qualityLevel.value,
+      itemWidth: 50,
+    },
+    {
       type: "title1",
       title: "贸易信息",
     },

+ 39 - 2
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -480,6 +480,9 @@ const frontLinesData = computed(
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const accountCurrency = ref([]);
 const tradeMethods = ref([]);
 const corporationList = ref([]);
@@ -609,6 +612,17 @@ const belongTypeData = ref([
     dictValue: "归属业务",
   },
 ]);
+
+const placeOrderTypeData = ref([
+  {
+    dictKey: "10",
+    dictValue: "首单",
+  },
+  {
+    dictKey: "20",
+    dictValue: "返单",
+  },
+]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -792,6 +806,27 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "是否首单",
+        prop: "placeOrderType",
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, placeOrderTypeData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "品质等级",
+        prop: "qualityLv",
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, qualityLevel.value);
+      },
+    },
+
+    {
+      attrs: {
         label: "订单状态",
         slot: "statusSlot",
         width: 100,
@@ -1035,7 +1070,7 @@ const config = computed(() => {
       attrs: {
         label: "操作",
         width: 200,
-        align: "center",
+        align: "right",
         fixed: "right",
       },
       renderHTML(row) {
@@ -1056,7 +1091,9 @@ const config = computed(() => {
               }
             : {},
           // row.produceStatus == 1
-          row.status == 30 && row.produceStatus == 1
+          row.status == 30 &&
+          row.produceStatus == 1 &&
+          row.orderDistributeStatus == 1
             ? {
                 attrs: {
                   label: "终止生产",

+ 27 - 4
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -1281,6 +1281,9 @@ const { proxy } = getCurrentInstance();
 const uploadData = ref({});
 const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
 const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const companyId = ref("");
 const accountList = ref([]);
 const corporationList = ref([]);
@@ -1367,7 +1370,7 @@ const selectConfig = computed(() => {
       data: quotationStatusData.value,
     },
     {
-      label: "报价工厂",
+      label: "报价供应商",
       prop: "companyId",
       data: companyData.value,
     },
@@ -1425,13 +1428,23 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "报价工厂",
+        label: "报价供应商",
         prop: "companyName",
         width: 100,
       },
     },
     {
       attrs: {
+        label: "品质等级",
+        prop: "qualityLv",
+        width: 100,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, qualityLevel.value);
+      },
+    },
+    {
+      attrs: {
         label: "客户名称",
         prop: "buyCorporationName",
         "min-width": 170,
@@ -1837,6 +1850,7 @@ const formConfig = computed(() => {
     //   data: typeData.value,
     //   itemWidth: 50,
     // },
+
     // {
     //   type: "treeSelect",
     //   prop: "ofCompanyId",
@@ -1855,7 +1869,7 @@ const formConfig = computed(() => {
     {
       type: "treeSelect",
       prop: "companyId",
-      label: "报价公司",
+      label: "报价供应商",
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
@@ -1866,6 +1880,13 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "qualityLv",
+      label: "品质等级",
+      data: qualityLevel.value,
+      itemWidth: 50,
+    },
+    {
       type: "title1",
       title: "贸易信息",
     },
@@ -1917,7 +1938,9 @@ const rules = ref({
     { required: true, message: "请选择业务公司", trigger: "change" },
   ],
   ofDeptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
-  companyId: [{ required: true, message: "请选择报价公司", trigger: "change" }],
+  companyId: [
+    { required: true, message: "请选择报价供应商", trigger: "change" },
+  ],
   buyCorporationId: [
     { required: true, message: "请选择客户公司", trigger: "change" },
   ],

+ 13 - 0
src/views/MES/productionOrder/index.vue

@@ -322,6 +322,9 @@ const contractTag = computed(
 const frontLinesData = computed(
   () => proxy.useUserStore().allDict["front_lines"]
 );
+const qualityLevel = computed(
+  () => proxy.useUserStore().allDict["quality_level"]
+);
 const companyData = ref([]);
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -493,6 +496,16 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "品质等级",
+        prop: "qualityLv",
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, qualityLevel.value);
+      },
+    },
+    {
+      attrs: {
         label: "下单时间",
         prop: "createTime",
         width: 160,

+ 5 - 2
src/views/MES/productionTask/index.vue

@@ -134,7 +134,7 @@
 
         <template #progress="{item}">
           <div style="width: 100%">
-            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+            <el-progress type="circle" :percentage="item.percentage" width="60"
                          :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
           </div>
         </template>
@@ -226,7 +226,7 @@
 
         <template #progress="{item}">
           <div style="width: 100%">
-            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+            <el-progress type="circle" :percentage="item.percentage" width="60"
                          :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
           </div>
         </template>
@@ -1260,6 +1260,9 @@ const getList = async () => {
           x.prodTags = [];
         }
         x.incomplete = x.quantity - x.finishQuantity;
+        x.percentage = parseFloat(
+          (x.finishQuantity / x.quantity) * 100
+        ).toFixed(2);
       });
       sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
       sourceList.value.pagination.total = res.total;

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

@@ -832,12 +832,12 @@ const handleCustomerTreeClick = (data, node, type) => {
 };
 
 const getDict = () => {
-  proxy.getDictOne(["customer_source", "customer_status"]).then((res) => {
+  proxy.getDictOne(["customer_source", "customer_type"]).then((res) => {
     mailStore.customerSource = res["customer_source"].map((x) => ({
       label: x.dictValue,
       value: x.dictKey,
     }));
-    mailStore.customerStatus = res["customer_status"].map((x) => ({
+    mailStore.customerStatus = res["customer_type"].map((x) => ({
       label: x.dictValue,
       value: x.dictKey,
     }));

+ 15 - 13
src/views/customer/addCustomer.vue

@@ -291,7 +291,7 @@ const customerSource = computed(
   () => proxy.useUserStore().allDict["customer_source"]
 );
 const customerStatus = computed(
-  () => proxy.useUserStore().allDict["customer_status"]
+  () => proxy.useUserStore().allDict["customer_type"]
 );
 const contactType = computed(
   () => proxy.useUserStore().allDict["contact_type"]
@@ -506,6 +506,8 @@ const formConfig = computed(() => {
       label: "客户编号",
       itemWidth: 100,
       itemType: "text",
+      placeholder: "添加成功后会自动生成",
+      disabled: true,
     },
     {
       type: "slot",
@@ -586,13 +588,13 @@ const formConfig = computed(() => {
       itemWidth: 25,
       itemType: "text",
     },
-    {
-      type: "select",
-      label: "新老客户",
-      prop: "newOld",
-      itemWidth: 25,
-      data: newoldCustomer.value,
-    },
+    // {
+    //   type: "select",
+    //   label: "新老客户",
+    //   prop: "newOld",
+    //   itemWidth: 25,
+    //   data: newoldCustomer.value,
+    // },
     {
       type: "input",
       prop: "annualQuantity",
@@ -618,7 +620,7 @@ const formConfig = computed(() => {
       type: "date",
       itemType: "date",
       prop: "createGroupTime",
-      label: "建群时间",
+      label: "洽谈时间",
       itemWidth: 25,
     },
     {
@@ -896,9 +898,9 @@ const formConfig = computed(() => {
 
 const rules = ref({
   name: [{ required: true, message: "请输入公司/客户主体", trigger: "blur" }],
-  customerCode: [
-    { required: true, message: "请输入客户编号", trigger: "blur" },
-  ],
+  // customerCode: [
+  //   { required: true, message: "请输入客户编号", trigger: "blur" },
+  // ],
   name2: [{ required: true, message: "请输入", trigger: "blur" }],
   // email: [{ required: true, message: "请输入电子邮箱", trigger: "blur" }],
   sex: [{ required: true, message: "请选择性别", trigger: "change" }],
@@ -928,7 +930,7 @@ const rules = ref({
   followUpAsk: [{ required: true, message: "请输入回访要求", trigger: "blur" }],
   remind: [{ required: true, message: "请输入提醒设定", trigger: "blur" }],
   createGroupTime: [
-    { required: true, message: "请选择建群时间", trigger: "change" },
+    { required: true, message: "请选择洽谈时间", trigger: "change" },
   ],
 });
 if (props.isPrivate) {

+ 2 - 2
src/views/customer/file/index.vue

@@ -802,7 +802,7 @@ const getDict = () => {
     .getDictOne([
       "customer_tag",
       "customer_source",
-      "customer_status",
+      "customer_type",
       "contact_type",
     ])
     .then((res) => {
@@ -814,7 +814,7 @@ const getDict = () => {
         label: x.dictValue,
         value: x.dictKey,
       }));
-      customerStatus.value = res["customer_status"].map((x) => ({
+      customerStatus.value = res["customer_type"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));

+ 2 - 2
src/views/customer/highseas/index.vue

@@ -810,7 +810,7 @@ const getDict = () => {
     .getDictOne([
       "customer_tag",
       "customer_source",
-      "customer_status",
+      "customer_type",
       "contact_type",
     ])
     .then((res) => {
@@ -822,7 +822,7 @@ const getDict = () => {
         label: x.dictValue,
         value: x.dictKey,
       }));
-      customerStatus.value = res["customer_status"].map((x) => ({
+      customerStatus.value = res["customer_type"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));

+ 2 - 2
src/views/customer/portrait/com/CustomerInfo.vue

@@ -225,13 +225,13 @@ const customerStatus = ref([]);
 const contactType = ref([]);
 const getDict = () => {
   proxy
-    .getDictOne(["customer_source", "customer_status", "contact_type"])
+    .getDictOne(["customer_source", "customer_type", "contact_type"])
     .then((res) => {
       customerSource.value = res["customer_source"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));
-      customerStatus.value = res["customer_status"].map((x) => ({
+      customerStatus.value = res["customer_type"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));

+ 2 - 2
src/views/customer/privatesea/index.vue

@@ -834,7 +834,7 @@ const getDict = () => {
     .getDictOne([
       "customer_tag",
       "customer_source",
-      "customer_status",
+      "customer_type",
       "contact_type",
     ])
     .then((res) => {
@@ -846,7 +846,7 @@ const getDict = () => {
         label: x.dictValue,
         value: x.dictKey,
       }));
-      customerStatus.value = res["customer_status"].map((x) => ({
+      customerStatus.value = res["customer_type"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));

+ 133 - 4
src/views/finance/fundManage/kdCompany/index.vue

@@ -19,6 +19,46 @@
         <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="配置月发生额" v-if="openSetDialog" v-model="openSetDialog" width="70%">
+      <byForm :formConfig="formShortConfig" :formOption="formOption" v-model="setFormData.data" :rules="setRules" ref="setFormDom">
+        <template #list>
+          <div style="width:100%">
+            <el-button type="primary" plain @click="handleAdd" style="margin-bottom: 16px">
+              添加
+            </el-button>
+            <el-table :data="setFormData.data.logisticsAmountList">
+              <el-table-column label="年份" width="130" fixed="left">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'logisticsAmountList.' + $index + '.year'" :rules="setRules.year" :inline-message="true" class="margin-b-0">
+                    <el-date-picker v-model="row.year" type="year" placeholder="请选择" style="width: 100%" value-format="YYYY" :clearable="false"
+                                    :disabled-date="disabledFn" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column v-for="key in 12" :key="key" :label="key+'月'" width="120">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'logisticsAmountList.' + $index + ('.month'+key+'Amount')" :rules="setRules.amount" :inline-message="true"
+                                class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row['month'+key+'Amount']" placeholder="请输入" style="width: 100%"
+                                     :precision="2" :controls="false" :min="0" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="60" align="center" fixed="right">
+                <template #default="{ $index }">
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openSetDialog=false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitSearch()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -28,6 +68,7 @@ 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([]);
@@ -87,7 +128,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "120",
+        width: "200",
         align: "center",
       },
       renderHTML(row) {
@@ -105,6 +146,17 @@ const config = computed(() => {
           },
           {
             attrs: {
+              label: "配置月发生额",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              handleSet(row);
+            },
+          },
+          {
+            attrs: {
               label: "删除",
               type: "danger",
               text: true,
@@ -239,9 +291,7 @@ const clickBalance = () => {
     ];
   }
 };
-const handleRemove = (index) => {
-  formData.data.accountRemainderList.splice(index, 1);
-};
+
 const isRepeat = (arr) => {
   var hash = {};
   for (var i in arr) {
@@ -298,6 +348,85 @@ const update = (row) => {
   formData.data = proxy.deepClone(row);
   dialogVisible.value = true;
 };
+
+const openSetDialog = ref(false);
+const setFormData = reactive({
+  data: {},
+});
+const setFormDom = ref(null);
+const formShortConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "发生额明细",
+    },
+    {
+      type: "slot",
+      slotName: "list",
+      label: "",
+    },
+  ];
+});
+const setRules = ref({
+  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  year: [{ required: true, message: "请输入年份", trigger: "blur" }],
+});
+const rowData = ref({});
+const handleSet = (row) => {
+  rowData.value = row;
+  openSetDialog.value = true;
+  proxy
+    .post("/logisticsAmount/list", { logisticsCompanyId: row.id })
+    .then((res) => {
+      setFormData.data = {
+        logisticsCompanyId: row.id,
+        logisticsAmountList: res.map((x) => ({ ...x, year: x.year + "" })),
+      };
+    });
+};
+
+const handleAdd = () => {
+  setFormData.data.logisticsAmountList.push({
+    logisticsCompanyId: rowData.value.id,
+    year: "",
+  });
+};
+
+const handleRemove = (index) => {
+  setFormData.data.logisticsAmountList.splice(index, 1);
+};
+
+const submitSearch = () => {
+  setFormDom.value.handleSubmit(() => {
+    if (
+      !(
+        setFormData.data.logisticsAmountList &&
+        setFormData.data.logisticsAmountList.length > 0
+      )
+    ) {
+      return proxy.msgTip("请添加发生额明细", 2);
+    }
+    proxy.post("/logisticsAmount/saveOrEditList", setFormData.data).then(
+      () => {
+        proxy.msgTip("操作成功");
+        openSetDialog.value = false;
+        // getList();
+      },
+      (err) => {
+        console.log(err);
+      }
+    );
+  });
+};
+const currentDate = computed(
+  () => setFormData.data.logisticsAmountList.map((x) => x.year) || []
+);
+const disabledFn = (date) => {
+  // 当前年份
+  let current = moment(date).format("yyyy");
+  // 禁用已选年份
+  return currentDate.value.includes(current);
+};
 </script>
 
 <style lang="scss" scoped>

+ 10 - 10
src/views/publicModule/codingRule/index.vue

@@ -11,32 +11,32 @@
       </byTable>
     </div>
 
-    <el-dialog title="修改编码规则" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+    <el-dialog title="修改编码规则" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #ruleVoList>
           <div style="width: 100%">
             <div v-if="formData.data.ruleVoList && formData.data.ruleVoList.length > 0" id="sort">
-              <div style="display: flex; margin-bottom: 20px" v-for="(row, index) in formData.data.ruleVoList" :key="row.timeKey" ref="sort">
-                <el-form-item :prop="'ruleVoList.' + index + '.ruleType'" :rules="rules.ruleType" label="字符类型" prop="ruleType">
-                  <el-select v-model="row.ruleType" placeholder="请选择字符类型" @change="changeType(row)">
+              <div style="display: flex;" v-for="(row, index) in formData.data.ruleVoList" :key="row.timeKey" ref="sort">
+                <el-form-item :prop="'ruleVoList.' + index + '.ruleType'" :rules="rules.ruleType" label="字符类型" prop="ruleType" style="width:50%">
+                  <el-select v-model="row.ruleType" placeholder="请选择字符类型" @change="changeType(row)" style="width:100%">
                     <el-option v-for="item in ruleType" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
-                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value1" label="  " prop="value" style="margin-left: 8px"
+                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value1" label="" prop="value" style="width:45%;margin-left: 8px"
                               v-if="row.ruleType == 1">
                   <el-input v-model="row.value" placeholder="请输入自定义字符" />
                 </el-form-item>
-                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value5" label="  " prop="value" style="margin-left: 8px"
+                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value5" label="" prop="value" style="width:45%;margin-left: 8px"
                               v-if="row.ruleType == 5">
-                  <el-input-number v-model="row.value" placeholder="请输入自增编号位数" :precision="0" :controls="false" :min="3" />
+                  <el-input-number v-model="row.value" placeholder="请输入自增编号位数" :precision="0" :controls="false" :min="3" style="width:100%" />
                 </el-form-item>
-                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value6" label="  " prop="value" style="margin-left: 8px"
+                <el-form-item :prop="'ruleVoList.' + index + '.value'" :rules="rules.value6" label="" prop="value" style="width:45%;margin-left: 8px"
                               v-if="row.ruleType == 6">
-                  <el-select v-model="row.value" placeholder="请选择日期格式">
+                  <el-select v-model="row.value" placeholder="请选择日期格式" style="width:100%">
                     <el-option v-for="item in dateList" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
-                <el-icon style="margin-left: 8px; color: red; cursor: pointer; transform: translateY(37px)" @click="clickDelete(index)">
+                <el-icon style="margin-left: 8px; color: red; cursor: pointer; transform: translateY(7px)" @click="clickDelete(index)">
                   <Delete />
                 </el-icon>
               </div>

+ 2 - 0
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -544,6 +544,7 @@ const start = () => {
       path: "/platform_manage/process/processApproval",
       query: {
         flowKey: "purchase_flow",
+        flowName: "采购发起流程",
         random: proxy.random(),
         ids,
         companyId: rowCompanyId,
@@ -579,6 +580,7 @@ const startOne = () => {
           path: "/platform_manage/process/processApproval",
           query: {
             flowKey: "purchase_flow",
+            flowName: "采购发起流程",
             random: proxy.random(),
             ids,
             companyId: rowCompanyId,

+ 49 - 23
src/views/report/expressPaymentSummary/index.vue

@@ -11,29 +11,52 @@
         </template>
       </byTable>
 
-      <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%;margin-top:-10px" v-loading="loading" border id="my-table">
-        <el-table-column prop="code" label="快递公司" width="100" fixed="left" />
-        <el-table-column prop="code" label="年初余额" width="100" fixed="left" />
-        <template v-if="monthList && monthList.length>0">
-          <el-table-column v-for="col in monthList" :key="col.key" :label="col.label" align="center">
-            <el-table-column prop="address" label="贷方发生额" width="100" align="right">
-              <template #default="{ row, $index }">
-                <div style="width: 100%" :class="today==col?'isToday':''" v-if="row[col] && row[col].sumContractAmount">
-                  {{moneyFormat(row[col].sumContractAmount,2)}}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="address" label="借方发生额" align="center">
-              <el-table-column prop="address" label="付款" width="100" align="right">
+      <div style="padding:0 15px;background:#fff">
+        <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%;margin-top:-10px" v-loading="loading" border id="my-table">
+          <el-table-column prop="name" label="快递公司" width="130" fixed="left" />
+          <el-table-column prop="yearBeginPayableBalance" label="年初余额" width="80" fixed="left" align="right">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                {{moneyFormat(row.yearBeginPayableBalance,2)}}
+              </div>
+            </template>
+          </el-table-column>
+          <template v-if="monthList && monthList.length>0">
+            <el-table-column v-for="col in monthList" :key="col.key" :label="col.label" align="center">
+              <el-table-column label="贷方发生额" width="80" align="right">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%" v-if="row[col.key] && row[col.key].creditAmount">
+                    {{moneyFormat(row[col.key].creditAmount,2)}}
+                  </div>
+                </template>
               </el-table-column>
-              <el-table-column prop="address" label="抵扣充值" width="100" align="right">
+              <el-table-column label="借方发生额" align="center">
+                <el-table-column label="付款" width="80" align="right">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%" v-if="row[col.key] && row[col.key].paymentAmount">
+                      {{moneyFormat(row[col.key].paymentAmount,2)}}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="抵扣充值" width="80" align="right">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%" v-if="row[col.key] && row[col.key].deductionAmount">
+                      {{moneyFormat(row[col.key].deductionAmount,2)}}
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table-column>
+              <el-table-column label="期末余额" width="80" align="right">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%" v-if="row[col.key] && row[col.key].endingPayableBalance">
+                    {{moneyFormat(row[col.key].endingPayableBalance,2)}}
+                  </div>
+                </template>
               </el-table-column>
             </el-table-column>
-            <el-table-column prop="address" label="期末余额" width="100" align="right">
-            </el-table-column>
-          </el-table-column>
-        </template>
-      </el-table>
+          </template>
+        </el-table>
+      </div>
 
     </div>
 
@@ -403,10 +426,13 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/educationSubsidy/page", sourceList.value.pagination)
+    .post(
+      "/logisticsEndingAmount/logisticsPayableSummary",
+      sourceList.value.pagination
+    )
     .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
+      sourceList.value.data = res;
+      // sourceList.value.pagination.total = res.total;
       setTimeout(() => {
         loading.value = false;
       }, 200);

+ 682 - 0
src/views/report/expressRechargeSummary/index.vue

@@ -0,0 +1,682 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" highlight-current-row
+               :action-list="[
+        ]" @get-list="getList" :hideTable="true" :hidePagination="true">
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+      </byTable>
+      <div style="padding:0 15px;background:#fff">
+        <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%;margin-top:-10px" v-loading="loading" border id="my-table">
+          <el-table-column prop="name" label="快递公司" width="130" fixed="left" />
+          <el-table-column prop="yearBeginBalance" label="年初余额" width="80" fixed="left" align="right">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                {{moneyFormat(row.yearBeginBalance,2)}}
+              </div>
+            </template>
+          </el-table-column>
+          <template v-if="monthList && monthList.length>0">
+            <el-table-column v-for="col in monthList" :key="col.key" :label="col.label" align="center">
+              <el-table-column label="贷方发生额" width="80" align="right">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%" v-if="row[col.key] && row[col.key].deductionAmount">
+                    {{moneyFormat(row[col.key].deductionAmount,2)}}
+                  </div>
+                </template>
+              </el-table-column>
+
+              <el-table-column label="借方发生额" width="80" align="right">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%" v-if="row[col.key] && row[col.key].advanceAmount">
+                    {{moneyFormat(row[col.key].advanceAmount,2)}}
+                  </div>
+                </template>
+              </el-table-column>
+
+              <el-table-column label="期末余额" width="80" align="right">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%" v-if="row[col.key] && row[col.key].endingBalance">
+                    {{moneyFormat(row[col.key].endingBalance,2)}}
+                  </div>
+                </template>
+              </el-table-column>
+
+            </el-table-column>
+          </template>
+        </el-table>
+      </div>
+
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</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 moment from "moment";
+
+const { proxy } = getCurrentInstance();
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 150 - 30;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const monthList = ref([
+  { key: 1, label: "1月" },
+  { key: 2, label: "2月" },
+  { key: 3, label: "3月" },
+  { key: 4, label: "4月" },
+  { key: 5, label: "5月" },
+  { key: 6, label: "6月" },
+  { key: 7, label: "7月" },
+  { key: 8, label: "8月" },
+  { key: 9, label: "9月" },
+  { key: 10, label: "10月" },
+  { key: 11, label: "11月" },
+  { key: 12, label: "12月" },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    year: moment().format("yyyy"),
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const processingMethod = ref([
+  {
+    dictKey: 10,
+    dictValue: "业务自采",
+  },
+  {
+    dictKey: 20,
+    dictValue: "生产处理",
+  },
+]);
+
+const contractType = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "内销订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "外贸订单(退税)",
+  },
+  {
+    dictKey: "4",
+    dictValue: "外贸订单(不退税)",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      type: "time",
+      itemType: "year",
+      label: "年份",
+      placeholder: "请选择",
+      prop: "year",
+      placeholderOne: "",
+      propOne: "",
+      clearable: false,
+      fn: () => {
+        getList();
+      },
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "订单编号",
+        slot: "code",
+      },
+    },
+
+    // {
+    //   attrs: {
+    //     label: "印章类型",
+    //     prop: "type",
+    //   },
+    //   render(val) {
+    //     return proxy.dictKeyValue(val, sealType.value);
+    //   },
+    // },
+    {
+      attrs: {
+        label: "业务员",
+        prop: "createUserName",
+      },
+    },
+    {
+      attrs: {
+        label: "跟单员",
+        prop: "applyTime",
+      },
+    },
+    {
+      attrs: {
+        label: "订单类型",
+        prop: "contractType",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, contractType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "订单处理方式",
+        prop: "processingMethod",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, processingMethod.value);
+      },
+    },
+    {
+      attrs: {
+        label: "销售金额",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "订单出货金额",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "出货申请出货金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "已收定金",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "是否可结算",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "是否已结算",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "客户简称",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "应收金额",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "未收金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "出货日期",
+        prop: "amount",
+      },
+    },
+    {
+      attrs: {
+        label: "账龄级别",
+        prop: "amount",
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "审批状态",
+    //     prop: "status",
+    //     width: 100,
+    //   },
+    //   render(type) {
+    //     return proxy.dictValueLabel(type, statusData.value);
+    //   },
+    // },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/educationSubsidy/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/educationSubsidy/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post(
+      "/logisticsEndingAmount/logisticsRechargeSummary",
+      sourceList.value.pagination
+    )
+    .then((res) => {
+      sourceList.value.data = res;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+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 formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "印章名称",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "select",
+      prop: "sealType",
+      label: "印章类型",
+      data: sealType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "applyUserId",
+      label: "存管人员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      fn: (val) => {
+        let current = userList.value.find((x) => x.value == val);
+        console.log(current, "ada");
+        if (current) {
+          formData.data.deptId = current.deptId;
+        }
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "存管部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      disabled: 50,
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "印章用途",
+      itemWidth: 100,
+      itemType: "textarea",
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入承包商", trigger: "blur" }],
+  taxPoints: [{ required: true, message: "请输入税点", trigger: "blur" }],
+  accountBank: [{ required: true, message: "请输入开户行", trigger: "blur" }],
+  accountName: [{ required: true, message: "请输入开户名", trigger: "blur" }],
+  accountNumber: [{ required: true, message: "请输入账号", trigger: "blur" }],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/contractor/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+:deep(
+    .el-table .el-table__header-wrapper th,
+    .el-table .el-table__fixed-header-wrapper th
+  ) {
+  height: auto !important;
+}
+:deep(.el-table th.el-table__cell) {
+  background: #fff !important;
+}
+:deep(.el-table .el-table__cell) {
+  padding: 0 !important;
+}
+:deep(.el-table .cell) {
+  padding: 0 8px !important;
+  font-size: 12px !important;
+}
+</style>

+ 17 - 1
src/views/report/orderSummary/index.vue

@@ -62,6 +62,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    isSettlement: "",
   },
 });
 const loading = ref(false);
@@ -117,7 +118,22 @@ const contractType = ref([
   },
 ]);
 const selectConfig = computed(() => {
-  return [];
+  return [
+    {
+      label: "是否可结算",
+      prop: "isSettlement",
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+    },
+  ];
 });
 const config = computed(() => {
   return [

+ 199 - 13
src/views/system/dict/dictCommonDtl.vue

@@ -2,15 +2,54 @@
   <div class="dictTenantDtl">
     <el-button type="primary" @click="openModal">添加</el-button>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :hideSearch="true" @get-list="getList">
+      <byTable :source="sourceList.data" :otherHeight="160" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :hideSearch="true" @get-list="getList">
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="400" v-loading="loading">
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="50%" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+        <template #ruleVoList>
+          <div style="width: 100%">
+            <div style="margin-bottom:16px;padding-left:30px">
+              <el-button type="primary" @click="clickAddRule()">添加</el-button>
+            </div>
+            <div v-if="formData.data.ruleJson && formData.data.ruleJson.length > 0" ref="sortDom">
+              <div style="display: flex;" v-for="(row, index) in formData.data.ruleJson" :key="row.timeKey">
+                <el-form-item :prop="'ruleJson.' + index + '.ruleType'" :rules="rules.ruleType" label="字符类型" prop="ruleType" style="width:50%">
+                  <el-select v-model="row.ruleType" placeholder="请选择字符类型" @change="changeType(row)" style="width:100%">
+                    <el-option v-for="item in ruleType" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+                <el-form-item :prop="'ruleJson.' + index + '.value'" :rules="rules.value1" label="" prop="value" style="width:45%;margin-left: 8px"
+                              v-if="row.ruleType == 1">
+                  <el-input v-model="row.value" placeholder="请输入自定义字符" />
+                </el-form-item>
+                <el-form-item :prop="'ruleJson.' + index + '.value'" :rules="rules.value5" label="" prop="value" style="width:45%;margin-left: 8px"
+                              v-if="row.ruleType == 2">
+                  <el-input-number v-model="row.value" placeholder="请输入自增编号位数" :precision="0" :controls="false" :min="3" style="width:100%" />
+                </el-form-item>
+                <el-form-item :prop="'ruleJson.' + index + '.value'" :rules="rules.value6" label="" prop="value" style="width:45%;margin-left: 8px"
+                              v-if="row.ruleType == 3">
+                  <el-select v-model="row.value" placeholder="请选择日期格式" style="width:100%">
+                    <el-option v-for="item in dateList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+                <el-icon style="margin-left: 8px; color: red; cursor: pointer; transform: translateY(7px)" @click="clickDelete(index)">
+                  <Delete />
+                </el-icon>
+              </div>
+            </div>
+
+          </div>
+        </template>
+        <template #codingKey>
+          <div style="width: 100%; text-align: center">
+            <span style="font-size: 21px; font-weight: 700">{{ getCodingKey() }}</span>
+          </div>
+        </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -27,8 +66,10 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import { computed, defineComponent, ref, watch } from "vue";
+import { computed, defineComponent, nextTick, ref, watch } from "vue";
 import { get } from "@vueuse/shared";
+import Sortable from "sortablejs";
+
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -40,7 +81,6 @@ defineProps({
   },
 });
 watch(proxy.data, (newValue, oldValue) => {
-  console.log(proxy.data);
   getList();
 });
 const sourceList = ref({
@@ -184,10 +224,28 @@ const formConfig = computed(() => {
       type: "input",
       itemType: "number",
     },
+    {
+      type: "title1",
+      title: "编码规则",
+      isShow: formData.data.dictCode == "customer_type",
+    },
+    {
+      type: "slot",
+      prop: "ruleVoList",
+      slotName: "ruleVoList",
+      label: "",
+      isShow: formData.data.dictCode == "customer_type",
+    },
+    {
+      type: "slot",
+      prop: "codingKey",
+      slotName: "codingKey",
+      label: "编码预览",
+      isShow: formData.data.dictCode == "customer_type",
+    },
   ];
 });
 const getList = async (req) => {
-  console.log(proxy.data.data.code);
   sourceList.value.pagination = {
     ...sourceList.value.pagination,
     ...req,
@@ -198,7 +256,6 @@ const getList = async (req) => {
   proxy
     .post("/dictCommonData/page", sourceList.value.pagination)
     .then((message) => {
-      console.log(message);
       sourceList.value.data = message.rows;
       sourceList.value.pagination.total = message.total;
       setTimeout(() => {
@@ -206,20 +263,41 @@ const getList = async (req) => {
       }, 200);
     });
 };
+
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {};
+  if (proxy.data.data.code == "customer_type") {
+    formData.data = {
+      dictCode: proxy.data.data.code,
+    };
+  }
 };
 
 const submitForm = () => {
-  console.log(byform.value);
   byform.value.handleSubmit((valid) => {
-    submitLoading.value = true;
     formData.data.dictCode = proxy.data.data.code;
     formData.data.tenantId = proxy.data.data.tenantId;
+    if (formData.data.dictCode == "customer_type") {
+      if (!(formData.data.ruleJson && formData.data.ruleJson.length > 0)) {
+        return ElMessage("请添加编码规则");
+      }
+      let data = formData.data.ruleJson.filter((item) => item.ruleType === 2);
+      if (data && data.length > 0) {
+        if (data.length > 1) {
+          return ElMessage("自增编号只能添加一次");
+        }
+      } else {
+        return ElMessage("编码规则中必须存在一个'自增编号''");
+      }
+    }
+    submitLoading.value = true;
     proxy
-      .post("/dictCommonData/" + modalType.value, formData.data)
+      .post("/dictCommonData/" + modalType.value, {
+        ...formData.data,
+        ruleJson: JSON.stringify(formData.data.ruleJson),
+      })
       .then((res) => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",
@@ -236,9 +314,17 @@ const submitForm = () => {
 };
 
 const getDtl = (row) => {
-  formData.data = { ...row };
+  formData.data = {
+    ...row,
+    ruleJson: row.ruleJson ? JSON.parse(row.ruleJson) : [],
+  };
   modalType.value = "edit";
   dialogVisible.value = true;
+  if (formData.data.dictCode == "customer_type") {
+    nextTick(() => {
+      sortableInit();
+    });
+  }
 };
 
 const changeStatus = (row) => {
@@ -266,11 +352,111 @@ const changeStatus = (row) => {
   });
 };
 getList();
+
+const ruleType = ref([
+  {
+    label: "自定义字符",
+    value: 1,
+  },
+  {
+    label: "自增编号",
+    value: 2,
+  },
+  {
+    label: "日期",
+    value: 3,
+  },
+]);
+
+const dateList = ref([
+  {
+    label: "YY",
+    value: "yy",
+  },
+  {
+    label: "YYYY",
+    value: "yyyy",
+  },
+  {
+    label: "YYYYMM",
+    value: "yyyyMM",
+  },
+  {
+    label: "YYYYMMDD",
+    value: "yyyyMMdd",
+  },
+]);
+
+const clickAddRule = () => {
+  if (formData.data.ruleJson && formData.data.ruleJson.length > 0) {
+    formData.data.ruleJson.push({
+      ruleType: "",
+      value: "",
+      timeKey: new Date().getTime(),
+    });
+  } else {
+    formData.data.ruleJson = [
+      {
+        ruleType: "",
+        value: "",
+        timeKey: new Date().getTime(),
+      },
+    ];
+    if (formData.data.dictCode == "customer_type") {
+      nextTick(() => {
+        sortableInit();
+      });
+    }
+  }
+};
+const changeType = (item) => {
+  if (item.ruleType === 3) {
+    item.value = "";
+  } else if ([1, 2].includes(item.ruleType)) {
+    item.value = "";
+  }
+};
+const clickDelete = (index) => {
+  formData.data.ruleJson.splice(index, 1);
+};
+
+const getCodingKey = () => {
+  let text = "";
+  if (formData.data.ruleJson && formData.data.ruleJson.length > 0) {
+    for (let i = 0; i < formData.data.ruleJson.length; i++) {
+      if (formData.data.ruleJson[i].ruleType === 2) {
+        for (let x = 0; x < formData.data.ruleJson[i].value; x++) {
+          if (x === formData.data.ruleJson[i].value - 1) {
+            text = text + "1";
+          } else {
+            text = text + "0";
+          }
+        }
+      } else {
+        text = text + formData.data.ruleJson[i].value;
+      }
+    }
+  }
+  return text;
+};
+
+const sortDom = ref(null);
+const sortableInit = () => {
+  Sortable.create(sortDom.value, {
+    ghostClass: "sortableActive",
+    onEnd(evt) {
+      const { newIndex, oldIndex } = evt;
+      formData.data.ruleJson.splice(
+        newIndex,
+        0,
+        formData.data.ruleJson.splice(oldIndex, 1)[0]
+      );
+    },
+  });
+};
 </script>
     
   <style lang="scss" scoped>
-.dictTenantDtl {
-}
 .tenant {
   padding: 20px;
 }

+ 1 - 1
vite.config.js

@@ -40,7 +40,7 @@ export default defineConfig(({
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
           // 测试
-          target: 'http://121.37.194.75:20010/test-api',
+          target: 'http://139.9.102.170:20010/test-api',
           // 后端本地
           // target: 'http://192.168.1.101:9898/',
           // 正式地址