cz преди 1 година
родител
ревизия
6adee1ab36

+ 3 - 2
package.json

@@ -38,7 +38,6 @@
     "echarts-gl": "^2.0.9",
     "element-plus": "2.2.27",
     "file-saver": "^2.0.5",
-    "xlsx": "^0.18.5",
     "fuse.js": "6.6.2",
     "html2canvas": "^1.4.1",
     "jquery": "^3.7.0",
@@ -61,11 +60,13 @@
     "vue-i18n": "^9.3.0-beta.17",
     "vue-router": "4.1.4",
     "vue-super-flow": "^1.3.8",
-    "vue3-print-nb": "^0.1.4"
+    "vue3-print-nb": "^0.1.4",
+    "xlsx": "^0.18.5"
   },
   "devDependencies": {
     "@vitejs/plugin-vue": "3.1.0",
     "@vue/compiler-sfc": "3.2.45",
+    "rollup-plugin-visualizer": "^5.12.0",
     "sass": "1.56.1",
     "unplugin-auto-import": "0.11.4",
     "vite": "3.2.3",

+ 1 - 1
src/components/byForm/index.vue

@@ -107,7 +107,7 @@
           </slot>
 
           <div class="upload" v-else-if="i.type == 'upload'">
-            <el-upload :file-list="formData[i.prop]?formData[i.prop]:[]" :action="uploadUrl" :data="uploadData"
+            <el-upload :file-list="formData[i.prop]?formData[i.prop]:[]" multiple :action="uploadUrl" :data="uploadData"
                        :list-type="i.listType ? i.listType : 'text'" :accept="i.accept?i.accept :''" :limit="i.limit?i.limit:3"
                        :before-upload="(file)=>handleBeforeUpload(file,i)" :on-success="()=>handleSuccess(i)"
                        :on-remove="(file)=>handleRemove(file,i)" :on-exceed="()=>handleExceed(i)" :on-preview="onPreviewFile">

+ 71 - 21
src/components/process/SF/Contract.vue

@@ -155,19 +155,19 @@
       <template #advanceRatio>
         <el-row style="width: 100%">
           <el-col :span="6" style="padding-right:8px">
-            <el-form-item label="定⾦⽐例" prop="advanceRatio" class="margin-b-0 wid100">
+            <el-form-item label="定金比例(%)" prop="advanceRatio" class="margin-b-0 wid100">
               <el-input-number v-model="formData.data.advanceRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
                                :controls="false" @change="(val)=>changeAdvanceRatio(val,true)" />
             </el-form-item>
           </el-col>
           <el-col :span="6" style="padding:0px 4px">
-            <el-form-item label="出货前付款比例" prop="beforeShipmentRatio" class="margin-b-0 wid100">
+            <el-form-item label="出货前付款比例(%)" prop="beforeShipmentRatio" class="margin-b-0 wid100">
               <el-input-number v-model="formData.data.beforeShipmentRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
                                :controls="false" @change="(val)=>changeAdvanceRatio(val,false)" />
             </el-form-item>
           </el-col>
           <el-col :span="6" style="padding:0px 4px">
-            <el-form-item label="出货后付款比例" prop="afterShipmentRatio" class="margin-b-0 wid100">
+            <el-form-item label="出货后付款比例(%)" prop="afterShipmentRatio" class="margin-b-0 wid100">
               <el-input-number v-model="formData.data.afterShipmentRatio" placeholder=" " style="width: 100%" :precision="2" :min="0" :max="100"
                                :controls="false" disabled />
             </el-form-item>
@@ -260,19 +260,40 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column prop="productName" label="商品其他信息" width="500">
+            <el-table-column prop="productName" label="商品信息" width="250">
               <template #default="{ row, $index }">
                 <div style="width: 100%;line-height:22px">
-                  <el-row :gutter="5">
+                  <div>
+                    分类:{{row.productClassifyName}}
+                  </div>
+                  <div>
+                    编码:{{row.productCode}}
+                  </div>
+                  <div>
+                    名称:{{row.productName}}
+                  </div>
+                  <div>
+                    规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                  <div>
+                    颜色:{{row.productColor}}
+                  </div>
+                  <div>
+                    纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
+                  </div>
+                  <div>
+                    净重: {{row.productNetWeight}}
+                  </div>
+                  <div>
+                    单位:{{row.productUnit}}
+                  </div>
+                  <!-- <el-row :gutter="5">
                     <el-col :span="12">
                       分类:{{row.productClassifyName}}
                     </el-col>
                     <el-col :span="12">
                       编码名称:{{row.productCode}}({{row.productName}})
                     </el-col>
-                    <!-- <el-col :span="7">
-                      名称:{{row.productName}}
-                    </el-col> -->
                   </el-row>
                   <el-row :gutter="5">
                     <el-col :span="12">
@@ -292,7 +313,7 @@
                     <el-col :span="6">
                       单位:{{row.productUnit}}
                     </el-col>
-                  </el-row>
+                  </el-row> -->
                 </div>
               </template>
             </el-table-column>
@@ -308,13 +329,33 @@
             <el-table-column prop="ww" label="纹路" width="140" />
             <el-table-column prop="weight" label="净重" width="140" />
             <el-table-column prop="unit" label="单位" width="140" /> -->
-            <el-table-column label="生产plt文件" width="210">
+            <el-table-column label="生产plt文件" width="180">
               <template #default="{ row, $index }">
                 <div style="width:100%">
-                  <div style="display:flex">
+                  <!-- <div style="display:flex">
                     <div style="writing-mode: vertical-rl;margin-right:10px;background:rgb(94 120 145);color:#fff;padding:5px 2px;border-radius:3px;line-height:21px;;cursor:pointer"
                          @click="handleClickUploadOne($index)" v-if="!judgeStatus()">
-                      {{row.isShowProductFile?'上  传  文  件':'取  消  上  传'}}
+                      {{row.isShowProductFile?'上  传  p   l   t':'取  消  上  传'}}
+                    </div>
+                    <div>
+                      <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
+                        <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
+                      </div>
+                      <div v-else>
+                        <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="1" :list-type="'text'"
+                                   :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
+                                   :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile"
+                                   :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
+                          <el-button text type="primary">上传</el-button>
+                        </el-upload>
+                      </div>
+                    </div>
+                  </div> -->
+                  <div>
+                    <!-- writing-mode: vertical-rl; 文字垂直排 -->
+                    <div style="margin-right:10px;background:rgb(94 120 145);color:#fff;padding:5px 2px;border-radius:3px;line-height:21px;;cursor:pointer;width:60px;text-align:center"
+                         @click="handleClickUploadOne($index)" v-if="!judgeStatus()">
+                      {{row.isShowProductFile?'上传plt':'取消上传'}}
                     </div>
                     <div>
                       <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
@@ -919,7 +960,13 @@ const formConfig = computed(() => {
       label: "其他收款方式备注说明",
       itemType: "textarea",
       itemWidth: 100,
-      isShow: formData.data.paymentMethod == "other",
+      isShow:
+        formData.data.paymentMethod &&
+        !["bank", "bank1", "阿里巴巴", "wxPay", "aliPay"].includes(
+          formData.data.paymentMethod
+        )
+          ? true
+          : false,
     },
     {
       type: "slot",
@@ -930,7 +977,7 @@ const formConfig = computed(() => {
     // {
     //   type: "number",
     //   prop: "advanceRatio",
-    //   label: "定⾦⽐例",
+    //   label: "定金比例",
     //   precision: 2,
     //   min: 0,
     //   max: 100,
@@ -1047,12 +1094,14 @@ const formConfig = computed(() => {
     },
     {
       type: "date",
+      itemType: "date",
       prop: "saleDate",
       label: "销售日期",
       itemWidth: 50,
     },
     {
       type: "date",
+      itemType: "date",
       prop: "deliveryTime",
       label: "交货期限",
       itemWidth: 50,
@@ -1064,13 +1113,13 @@ const formConfig = computed(() => {
       data: shippingMethod.value,
       itemWidth: 50,
     },
-    {
-      type: "select",
-      prop: "taxTransportationWay",
-      label: "税运⽅式",
-      data: taxTransportationWay.value,
-      itemWidth: 50,
-    },
+    // {
+    //   type: "select",
+    //   prop: "taxTransportationWay",
+    //   label: "税运方式",
+    //   data: taxTransportationWay.value,
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "input",
     //   prop: "transportRemark",
@@ -2227,6 +2276,7 @@ const getPriceSheetData = (id) => {
 const isEditList = ref(true);
 onMounted(() => {
   formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
+  formData.data.salesmanId = proxy.useUserStore().user.userId;
   handleOfCompanyIdChange(formData.data.ofCompanyId);
   if (
     proxy.useUserStore().currentCompany == proxy.useUserStore().user.ofCompanyId

+ 30 - 8
src/components/process/SF/Purchase.vue

@@ -457,7 +457,7 @@ const formConfig = computed(() => {
     },
     {
       type: "date",
-      prop: "subcribeTime",
+      prop: "purchaseTime",
       itemType: "date",
       label: "采购日期",
       itemWidth: 25,
@@ -727,7 +727,7 @@ const rules = ref({
   purchaseUserId: [
     { required: true, message: "请选择采购员", trigger: "change" },
   ],
-  subcribeTime: [
+  purchaseTime: [
     { required: true, message: "请选择采购日期", trigger: "change" },
   ],
   prodCompanyId: [
@@ -1249,6 +1249,24 @@ const getAllData = (businessId) => {
       if (formData.data.provinceId) {
         getCityData(formData.data.provinceId, "30");
       }
+
+      proxy
+        .post("/fileInfo/getList", { businessIdList: [businessId] })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.fileList = fileObj[businessId]
+              .filter((x) => x.businessType == "0")
+              .map((item) => {
+                return {
+                  ...item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
+          } else {
+            formData.data.fileList = [];
+          }
+        });
     });
   }
 };
@@ -1256,10 +1274,14 @@ const getAllData = (businessId) => {
 const getProductList = (ids) => {
   if (ids && ids.length > 0) {
     proxy.post("/subscribeDetail/detail", { ids }).then((res) => {
-      formData.data.companyId = route.query.companyId;
+      formData.data.companyId = res.companyId;
+      formData.data.deptId = res.deptId;
+      formData.data.purchaseUserId = res.subcribeUserId;
+      formData.data.warehouseId = res.putWarehouseId;
       getDeptData(formData.data.companyId);
-      if (res && res.length > 0) {
-        formData.data.purchaseProductList = res.map((item) => {
+      let detailList = res.subscribeDetailList;
+      if (detailList && detailList.length > 0) {
+        formData.data.purchaseProductList = detailList.map((item) => {
           let dataResourceId =
             item.dataType == 0 ? item.id : item.contractDetailId;
           return {
@@ -1291,11 +1313,11 @@ const getProductList = (ids) => {
         formData.data.dataResource =
           formData.data.purchaseProductList[0].dataResource;
         if (formData.data.purchaseProductList[0].dataType == 0) {
-          formData.data.dataResourceId = res[0].subscribeId;
+          formData.data.dataResourceId = detailList[0].subscribeId;
         } else {
-          formData.data.dataResourceId = res[0].contractId;
+          formData.data.dataResourceId = detailList[0].contractId;
         }
-        let productIdList = res.map((x) => x.productId);
+        let productIdList = detailList.map((x) => x.productId);
         proxy
           .post("/fileInfo/getList", {
             businessIdList: productIdList,

+ 50 - 3
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -141,6 +141,12 @@
           </div>
         </template>
 
+        <template #receiptStockQuantity="{item}">
+          <div>
+            <span class="el-click">{{item.receiptStockQuantity}}</span>
+          </div>
+        </template>
+
         <template #scale="{ item }">
           <div>
             {{ computeScale(item) }}
@@ -655,14 +661,14 @@ const config = computed(() => {
     {
       attrs: {
         label: "已出库数量",
-        prop: "aa",
+        slot: "receiptStockQuantity",
         width: 100,
       },
     },
     {
       attrs: {
         label: "待出库数量",
-        prop: "bb",
+        prop: "waitStockQuantity",
         width: 100,
       },
     },
@@ -687,7 +693,23 @@ const config = computed(() => {
 
     {
       attrs: {
-        label: "已收款金额",
+        label: "累计收款金额",
+        prop: "sumClaimMoney",
+        width: 110,
+        align: "right",
+      },
+    },
+    {
+      attrs: {
+        label: "已结算金额",
+        prop: "sumClaimMoney",
+        width: 100,
+        align: "right",
+      },
+    },
+    {
+      attrs: {
+        label: "未结算金额",
         prop: "sumClaimMoney",
         width: 100,
         align: "right",
@@ -823,6 +845,31 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.status == 0
+            ? {
+                attrs: {
+                  label: "删除",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy
+                    .msgConfirm()
+                    .then((res) => {
+                      proxy
+                        .post("/contract/delete", {
+                          id: row.id,
+                        })
+                        .then((res) => {
+                          proxy.msgTip("操作成功", 1);
+                          getList();
+                        });
+                    })
+                    .catch((err) => {});
+                },
+              }
+            : {},
           row.status == 30 && row.produceStatus != 10
             ? {
                 attrs: {

+ 33 - 3
src/views/MES/productionOrder/index.vue

@@ -191,7 +191,37 @@
                   <div v-else></div>
                 </template>
               </el-table-column>
-              <el-table-column prop="productCnName" label="商品名称" min-width="150" />
+              <el-table-column prop="productName" label="商品信息" min-width="250">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%;line-height:22px">
+                    <div>
+                      分类:{{row.productClassifyName}}
+                    </div>
+                    <div>
+                      编码:{{row.productCode}}
+                    </div>
+                    <div>
+                      名称:{{row.productName}}
+                    </div>
+                    <div>
+                      规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                    </div>
+                    <div>
+                      颜色:{{row.productColor}}
+                    </div>
+                    <div>
+                      纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
+                    </div>
+                    <div>
+                      净重: {{row.productNetWeight}}
+                    </div>
+                    <div>
+                      单位:{{row.productUnit}}
+                    </div>
+                  </div>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column prop="productCnName" label="商品名称" min-width="150" />
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column label="规格尺寸 (cm)" width="130">
                 <template #default="{ row, $index }">
@@ -200,7 +230,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="productColor" label="颜色" width="150" />
+              <el-table-column prop="productColor" label="颜色" width="150" /> -->
               <!-- <el-table-column label="设计图稿" width="80">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
@@ -213,7 +243,7 @@
                   </div>
                 </template>
               </el-table-column> -->
-              <el-table-column label="生产plt文件" width="220">
+              <el-table-column label="生产plt文件" width="180">
                 <template #default="{ row, $index }">
                   <div style="width:100%">
                     <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">

+ 51 - 35
src/views/MES/productionTask/index.vue

@@ -30,6 +30,21 @@
        'select-all':selectRow
         }" :row-class-name="getRowClass" @get-list="getList">
 
+        <template #btn="{ item }">
+          <div style="width: 100%">
+            <el-button type="primary" text @click="printQrCode(item)">任务单</el-button>
+            <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
+              <div style="width:100%">
+                {{item.remark || '无'}}
+              </div>
+              <template #reference>
+                <el-button type="primary" text @click="openRemark(item)">进度说明</el-button>
+              </template>
+            </el-popover>
+            <!-- <el-button type="primary" text @click="openRemark(item)" v-if="!item.remark">进度说明</el-button> -->
+          </div>
+        </template>
+
         <template #orderCode="{ item }">
           <div style="width: 100%" class="el-click" @click="lookDetails(item)">
             {{item.orderCode}}
@@ -669,41 +684,42 @@ const config = ref([
     attrs: {
       label: "操作",
       width: "160",
+      slot: "btn",
       align: "left",
       // fixed: "right",
     },
-    renderHTML(row) {
-      return [
-        {
-          attrs: {
-            label: "打印任务单",
-            type: "primary",
-            text: true,
-          },
-          el: "button",
-          click() {
-            printQrCode(row);
-          },
-        },
-        {
-          attrs: {
-            label: "备注",
-            type: "primary",
-            text: true,
-          },
-          el: "button",
-          click() {
-            openRemark(row);
-          },
-        },
-      ];
-    },
+    // renderHTML(row) {
+    //   return [
+    //     {
+    //       attrs: {
+    //         label: "打印任务单",
+    //         type: "primary",
+    //         text: true,
+    //       },
+    //       el: "button",
+    //       click() {
+    //         printQrCode(row);
+    //       },
+    //     },
+    //     {
+    //       attrs: {
+    //         label: "备注",
+    //         type: "primary",
+    //         text: true,
+    //       },
+    //       el: "button",
+    //       click() {
+    //         openRemark(row);
+    //       },
+    //     },
+    //   ];
+    // },
   },
   {
     attrs: {
       label: "订单号",
       slot: "orderCode",
-      width: 130,
+      width: 150,
       fixed: "left",
     },
   },
@@ -880,13 +896,13 @@ const config = ref([
       width: 100,
     },
   },
-  {
-    attrs: {
-      label: "备注",
-      prop: "remark",
-      "min-width": 200,
-    },
-  },
+  // {
+  //   attrs: {
+  //     label: "备注",
+  //     prop: "remark",
+  //     "min-width": 200,
+  //   },
+  // },
 ]);
 
 const sourceListOne = ref({
@@ -947,7 +963,7 @@ const configOne = ref([
     attrs: {
       label: "订单号",
       prop: "orderCode",
-      width: 130,
+      width: 150,
     },
   },
   {

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

@@ -94,7 +94,7 @@
                                  v-if="index<2">{{ item.name }}</el-button>
                     </template>
                     <!-- 大于等于2 -->
-                    <template v-if="approvalRecordData.buttonInfoList.length>=2">
+                    <template v-if="approvalRecordData.buttonInfoList.length>2">
                       <el-popover placement="bottom-start" title="" :width="120" trigger="hover">
                         <div style="text-align:center;width:100%">
                           <div v-for="(item,index) in approvalRecordData.buttonInfoList" :key="item.type" style="text-align:center;width:100%">
@@ -219,7 +219,7 @@ const route = useRoute();
 const props = defineProps({
   query: Object,
 });
-const StagFlowKey = ref(["contract_flow", "subscribe_flow"]);
+const StagFlowKey = ref(["contract_flow"]);
 // tab切换逻辑
 const activeName = ref("first");
 let auxiliaryData = ref([]);
@@ -399,7 +399,7 @@ const handleSubmitStag = async (_type) => {
             };
           });
           if (flowForm.flowKey == "contract_flow") {
-            proxy.post("/saleQuotation/add", data).then(
+            proxy.post("/contract/add", data).then(
               (res) => {
                 skipPage();
               },

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

@@ -137,6 +137,10 @@ const statusData = ref([
     value: "10",
   },
   {
+    label: "审批驳回",
+    value: "13",
+  },
+  {
     label: "待采购",
     value: "15",
   },

+ 1 - 1
src/views/purchaseManage/supplier/supplier/index.vue

@@ -507,7 +507,7 @@ const formConfig = computed(() => {
       listType: "text",
       accept: "",
       prop: "licenseFileList",
-      label: "供应商营业执照附件",
+      label: "营业执照",
     },
     {
       type: "input",

+ 18 - 0
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -32,6 +32,13 @@
               <el-table-column prop="name" label="物料名称" min-width="150" />
               <!-- <el-table-column prop="spec" label="规格型号" /> -->
               <!-- :formatter="(row) => dictKeyValue(row.unit, materialUnit)" -->
+              <el-table-column label="规格尺寸 (cm)" width="130">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
               <el-table-column prop="unit" label="单位" width="80" />
               <el-table-column prop="price" label="单价(不含税)" width="140">
                 <template #default="{ row, $index }">
@@ -336,6 +343,14 @@ const formConfig = computed(() => [
   },
   {
     type: "input",
+    prop: "size",
+    label: "规格尺寸 (cm)",
+    disabled: true,
+    isShow: modalType.value == "edit",
+    itemWidth: 50,
+  },
+  {
+    type: "input",
     prop: "unit",
     label: "单位",
     disabled: true,
@@ -533,6 +548,9 @@ const selectMaterial = (row) => {
       price: null,
       includingTaxPrice: null,
       productClassifyName: row.classifyName,
+      productLength: row["length"],
+      productWidth: row.width,
+      productHeight: row.height,
     });
     proxy.msgTip("选择成功");
   } else {

Файловите разлики са ограничени, защото са твърде много
+ 151 - 0
stats.html


+ 6 - 4
vite/plugins/index.js

@@ -1,15 +1,17 @@
 import vue from '@vitejs/plugin-vue'
-
 import createAutoImport from './auto-import'
 import createSvgIcon from './svg-icon'
 import createCompression from './compression'
 import createSetupExtend from './setup-extend'
+// 打包体积分析
+import createVisualizer from './visualizer'
 
 export default function createVitePlugins(viteEnv, isBuild = false) {
     const vitePlugins = [vue()]
+    vitePlugins.push(createVisualizer())
     vitePlugins.push(createAutoImport())
-	vitePlugins.push(createSetupExtend())
+    vitePlugins.push(createSetupExtend())
     vitePlugins.push(createSvgIcon(isBuild))
-	isBuild && vitePlugins.push(...createCompression(viteEnv))
+    isBuild && vitePlugins.push(...createCompression(viteEnv))
     return vitePlugins
-}
+}

+ 1 - 1
vite/plugins/setup-extend.js

@@ -2,4 +2,4 @@ import setupExtend from 'vite-plugin-vue-setup-extend'
 
 export default function createSetupExtend() {
     return setupExtend()
-}
+}

+ 7 - 0
vite/plugins/visualizer.js

@@ -0,0 +1,7 @@
+import {
+  visualizer
+} from 'rollup-plugin-visualizer'
+
+export default function createVisualizer() {
+  return visualizer()
+}

Някои файлове не бяха показани, защото твърде много файлове са промени