yusheng 1 рік тому
батько
коміт
efaf535588

+ 1 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -680,7 +680,7 @@
               data.discountTotalPrice ||
               data?.contractVO?.discountTotalPrice;
           }
-          this.setDeliveryDays();
+          // this.setDeliveryDays();
           this.supplierObj = await this.getSupplierObj(
             productList,
             'productId'

+ 6 - 2
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -404,7 +404,11 @@
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.batchNo'"
         >
-          <el-input v-model="scope.row.batchNo" placeholder="请输入" v-no-chinese>
+          <el-input
+            v-model="scope.row.batchNo"
+            placeholder="请输入"
+            v-no-chinese
+          >
           </el-input>
         </el-form-item>
       </template>
@@ -488,7 +492,7 @@
   const dayjs = require('dayjs');
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     props: {
       isContractId: {
         type: Boolean,

+ 7 - 1
src/views/saleManage/contact/components/certificateManagement/components/add-dialog.vue

@@ -172,7 +172,7 @@
           status: [
             { required: true, trigger: 'change', message: '请选择状态' }
           ],
-          fileObj: [{ required: true, trigger: 'change', message: '请选择' }]
+          fileObj: [{ required: true, trigger: 'input', message: ' ' }]
         },
         form: { ...defaultForm },
         title: '新增',
@@ -232,9 +232,15 @@
 
       save() {
         this.$refs.form.validate((valid) => {
+          if (!this.form.fileObj.length) {
+            this.$message.warning('请上传附件!');
+
+            return 
+          }
           if (!valid) {
             return false;
           }
+
           this.loading = true;
           if (this.form.date?.length) {
             this.form.validityStartTime = this.form.date[0];

+ 1 - 1
src/views/saleManage/contact/components/certificateManagement/index.vue

@@ -46,7 +46,7 @@
         type="primary"
         :underline="false"
         icon="el-icon-edit"
-        @click="handleUpload(row)"
+        @click="handleUpload('edit',row)"
         v-if="[0, 3].includes(row.approvalStatus)"
       >
         修改

+ 1 - 0
src/views/saleManage/saleOrder/components/drawer.vue

@@ -199,6 +199,7 @@ export default {
 
   methods: {
     async open(row) {
+      this.activeName='详细信息'
       this.row = await getSaleOrderDetail(row.id);
       this.orderNoCountData = await queryOrderNoCount(row.orderNo);
 

+ 12 - 4
src/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue

@@ -333,7 +333,7 @@
           orderNo: res.map((item) => item.orderNo).toString(),
           productList: res.map((item) => item.productList).flat(),
           typedetailIds: res.map((item) => item.typedetailIds).flat(),
-          
+
           totalAmount: res.reduce(
             (sum, obj) =>
               sum + ((obj.totalAmount && Number(obj.totalAmount)) || 0),
@@ -470,7 +470,7 @@
         // this.saleOrderValue = data.saleOrder;
         if (data.saleOrderList) {
           this.setData(data.saleOrderList, 'sendInit');
-        } else if(data.saleOrder) {
+        } else if (data.saleOrder) {
           this.setData([data.saleOrder], 'sendInit');
         }
 
@@ -575,7 +575,6 @@
         this.$refs.replaceRef.putTableValue(list, 'add');
       },
 
-
       //选择订单弹框
       handleOrderBtn(e) {
         if (e.target.nodeName == 'I') {
@@ -754,7 +753,16 @@
         this.$nextTick(() => {
           let params = {
             businessId: this.businessId || res,
-            businessKey: 'sales_send_approve',
+            businessKey:
+              data.saleTypeName.indexOf('技改') != '-1'
+                ? 'sele_order_send_correction'
+                : data.saleTypeName.indexOf('三包') != '-1'
+                ? 'eom_sh'
+                : data.saleTypeName.indexOf('补发') != '-1'
+                ? 'eom_sh'
+                : data.saleTypeName.indexOf('赠品') != '-1'
+                ? 'sale_order_send_giftAndOther'
+                : 'sales_send_approve',
             formCreateUserId: data.createUserId,
             variables: {
               businessCode: data.docNo,

+ 10 - 9
src/views/saleManage/saleOrder/invoice/index.vue

@@ -513,15 +513,16 @@
         this.$nextTick(() => {
           let params = {
             businessId: res.id,
-            businessKey: res.saleTypeName.indexOf('技改')
-              ? 'sele_order_send_correction'
-              : res.saleTypeName.indexOf('三包')
-              ? 'eom_sh'
-              : res.saleTypeName.indexOf('补发')
-              ? 'eom_sh'
-              : res.saleTypeName.indexOf('赠品')
-              ? 'sale_order_send_giftAndOther'
-              : 'sales_send_approve',
+            businessKey:
+              res.saleTypeName.indexOf('技改') != '-1'
+                ? 'sele_order_send_correction'
+                : res.saleTypeName.indexOf('三包') != '-1'
+                ? 'eom_sh'
+                : res.saleTypeName.indexOf('补发') != '-1'
+                ? 'eom_sh'
+                : res.saleTypeName.indexOf('赠品') != '-1'
+                ? 'sale_order_send_giftAndOther'
+                : 'sales_send_approve',
             // businessKey:'eom_sh',
             formCreateUserId: res.createUserId,
             variables: {

+ 326 - 314
src/views/salesServiceManagement/components/invoiceDialog.vue

@@ -11,7 +11,12 @@
     :maxable="true"
   >
     <div class="main_container">
-      <el-form :model="searchForm" label-width="120px" @keyup.enter.native="onSearch" @submit.native.prevent>
+      <el-form
+        :model="searchForm"
+        label-width="120px"
+        @keyup.enter.native="onSearch"
+        @submit.native.prevent
+      >
         <el-row>
           <el-col :span="8">
             <el-form-item label="发货单编码:">
@@ -49,7 +54,7 @@
           <el-col :span="8">
             <el-form-item label="创建时间:">
               <el-date-picker
-                style="width: 100%;"
+                style="width: 100%"
                 v-model="searchForm.time"
                 type="datetimerange"
                 start-placeholder="开始日期"
@@ -67,9 +72,16 @@
                 icon="el-icon-search"
                 class="ele-btn-icon"
                 @click="onSearch"
-              >查询</el-button>
+                >查询</el-button
+              >
 
-              <el-button @click="reset" icon="el-icon-refresh" class="ele-btn-icon" size="medium">重置</el-button>
+              <el-button
+                @click="reset"
+                icon="el-icon-refresh"
+                class="ele-btn-icon"
+                size="medium"
+                >重置</el-button
+              >
               <slot></slot>
             </el-form-item>
           </el-col>
@@ -104,332 +116,332 @@
 </template>
 
 <script>
-import { parameterGetByCode } from '@/api/main';
-import {
-  getSendTableList,
-  getSendSaleOrderrecordDetailSplit
-} from '@/api/saleManage/saleordersendrecord';
-import { reviewStatusEnum } from '@/enum/dict';
-import { lbjtList } from '@/enum/dict.js';
-import { getInfoBySourceBizNoAll } from '@/api/wms';
-const dayjs = require('dayjs');
+  import { parameterGetByCode } from '@/api/main';
+  import {
+    getSendTableList,
+    getSendSaleOrderrecordDetailSplit
+  } from '@/api/saleManage/saleordersendrecord';
+  import { reviewStatusEnum } from '@/enum/dict';
+  import { lbjtList } from '@/enum/dict.js';
+  import { getInfoBySourceBizNoAll } from '@/api/wms';
+  const dayjs = require('dayjs');
 
-export default {
-  props: {
-    contractBookType: {
-      //合同类型 1销售 2采购
-      type: [String, Number],
-      default: 1
-    }
-  },
-  components: {},
+  export default {
+    props: {
+      contractBookType: {
+        //合同类型 1销售 2采购
+        type: [String, Number],
+        default: 1
+      }
+    },
+    components: {},
 
-  data() {
-    return {
-      addRepairNotesDialog: false,
-      rowClickData: {},
-      selection: [],
-      packingList: [],
-      columns: [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true
-        },
+    data() {
+      return {
+        addRepairNotesDialog: false,
+        rowClickData: {},
+        selection: [],
+        packingList: [],
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
 
-        {
-          prop: 'docNo',
-          label: '发货单编码',
-          sortable: true,
-          align: 'center',
-          slot: 'docNo',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
+          {
+            prop: 'docNo',
+            label: '发货单编码',
+            sortable: true,
+            align: 'center',
+            slot: 'docNo',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
 
-        {
-          prop: 'orderNo',
-          label: '销售订单编码',
-          sortable: true,
-          align: 'center',
-          slot: 'orderNo',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'contactName',
-          label: '客户名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'replied',
-          label: '是否回执',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120,
-          formatter: (_row, _column, cellValue) => {
-            return _row.replied == 1 ? '是' : '否';
+          {
+            prop: 'orderNo',
+            label: '销售订单编码',
+            sortable: true,
+            align: 'center',
+            slot: 'orderNo',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'contactName',
+            label: '客户名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'replied',
+            label: '是否回执',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return _row.replied == 1 ? '是' : '否';
+            }
+          },
+          {
+            prop: 'reviewStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatusEnum[_row.reviewStatus].label;
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
           }
-        },
-        {
-          prop: 'reviewStatus',
-          label: '状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatusEnum[_row.reviewStatus].label;
+        ],
+        columnsPro: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productCategoryName',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryCode',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryName',
+            label: '名称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productBrand',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'packingSpecification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'measureQuantity',
+            label: '计量数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'singlePrice',
+            label: '单价(元)',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'barcodes',
+            label: '发货条码/车架号',
+            align: 'center',
+            showOverflowTooltip: true
           }
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        }
-      ],
-      columnsPro: [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'productCategoryName',
-          label: '类型',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'categoryCode',
-          label: '编码',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'categoryName',
-          label: '名称',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'productBrand',
-          label: '牌号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'categoryModel',
-          label: '型号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'packingSpecification',
-          label: '规格',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'batchNo',
-          label: '批次号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'measureQuantity',
-          label: '计量数量',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'singlePrice',
-          label: '单价(元)',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'barcodes',
-          label: '发货条码/车架号',
-          align: 'center',
-          showOverflowTooltip: true
-        }
-      ],
-      contactId: '',
-      goodsShow: false,
-      searchForm: {}
-    };
-  },
-  created() {},
-  methods: {
-    // 初始化数据(父组件调用)
-    open(data, obj) {
-      this.contactId = data;
-      this.addRepairNotesDialog = true;
-      // 数据回显 ***
-      this.rowClickData.id = obj.orderId;
-      this.rowClickData.docNo = obj.orderCode;
-      this.packingList = JSON.parse(JSON.stringify(obj.tableList));
-
-      this.$nextTick(() => {
-        this.packingList.forEach((row) => {
-          this.$refs.tableRef3.toggleRowSelection(row);
-        });
-        this.reload();
-      });
-    },
-
-    datasource({ page, limit, where, order }) {
-      return getSendTableList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    onSearch() {
-      let data = JSON.parse(JSON.stringify(this.searchForm));
-      if (data.time?.length > 0) {
-        data.createTimeStart = data.time[0];
-        data.createTimeEnd = data.time[1];
-      }
-      delete data.time;
-      this.reload(data);
-    },
-    reset() {
-      this.searchForm = {
-        docNo: '',
-        orderNo: '',
-        contactName: '',
-        time: []
-      };
-      this.reload({});
-    },
-    reload(where) {
-      where = {
-        ...where,
-        // contractId: this.contractId,
-        contactId: this.contactId,
-        reviewStatus: 2
-      };
-      this.$refs.tableRef2.reload({ page: 1, where });
-    },
-    async rowClick(row) {
-      this.rowClickData = row;
-      let params = {
-        code: 'after_sales_product_list_source'
+        ],
+        contactId: '',
+        goodsShow: false,
+        searchForm: {}
       };
-      const res = await parameterGetByCode(params);
-      if (res.value == '1') {
-        this.getInfo(row);
-      } else {
-        this._getInfo(row.docNo);
-      }
-    },
-    handleClose() {
-      this.addRepairNotesDialog = false;
-    },
-    submitAdd() {
-      if (!this.selection.length) {
-        return this.$message.warning('请至少选择一条数据');
-      }
-      this.$emit('changeParent', {
-        orderCode: this.rowClickData.docNo,
-        orderId: this.rowClickData.id,
-        tableList: this.selection
-      });
-      this.handleClose();
     },
+    created() {},
+    methods: {
+      // 初始化数据(父组件调用)
+      open(data, obj) {
+        this.contactId = data;
+        this.addRepairNotesDialog = true;
+        // 数据回显 ***
+        this.rowClickData.id = obj.orderId;
+        this.rowClickData.docNo = obj.orderCode;
+        this.packingList = JSON.parse(JSON.stringify(obj.tableList));
 
-    async getInfo(row) {
-      const res = await getSendSaleOrderrecordDetailSplit(row.id);
-      let list = res.productList.map((el) => {
-        el.categoryCode = el.productCode;
-        el.categoryName = el.productName;
-        el.categoryModel = el.modelType;
-        el.measureQuantity = el.totalCount;
-        el.barcodes = el.carCode;
-        el.packingSpecification = el.specification;
-        el.shipmentDate = row.createTime || null;
-        (el.guaranteePeriodDeadline = this.getTime(row.createTime)[0]),
-          (el.warrantyStatus = this.getTime(row.createTime)[1]);
-        return el;
-      });
-      this.packingList = list;
-    },
-
-    async _getInfo(sourceBizNo) {
-      const dataArray = await getInfoBySourceBizNoAll(sourceBizNo);
-      let res = {};
-      if (dataArray && dataArray.length > 0) {
-        res = JSON.parse(JSON.stringify(dataArray[0]));
-        res['outInDetailList'] = [];
-        dataArray.forEach((item) => {
-          item.outInDetailList.forEach((val) => {
-            res['outInDetailList'].push(val);
+        this.$nextTick(() => {
+          this.packingList.forEach((row) => {
+            this.$refs.tableRef3.toggleRowSelection(row);
           });
+          this.reload();
         });
-      }
-      this.init(res);
-    },
-    init(res) {
-      this.infoData = res;
-      this.productList = res?.outInDetailList?.map(
-        (productItem, productIndex) => {
-          return {
-            ...productItem,
-            outInDetailRecordRequestList:
-              productItem.outInDetailRecordRequestList.map((packingItem) => {
-                return {
-                  ...packingItem,
-                  categoryName: productItem.categoryName,
-                  categoryCode: productItem.categoryCode,
-                  categoryModel: productItem.categoryModel,
-                  produceTime: packingItem.produceTime || null,
-                  shipmentDate: res.createTime || null,
-                  guaranteePeriodDeadline: this.getTime(res.createTime)[0],
-                  warrantyStatus: this.getTime(res.createTime)[1]
-                };
-              })
-          };
+      },
+
+      datasource({ page, limit, where, order }) {
+        return getSendTableList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      onSearch() {
+        let data = JSON.parse(JSON.stringify(this.searchForm));
+        if (data.time?.length > 0) {
+          data.createTimeStart = data.time[0];
+          data.createTimeEnd = data.time[1];
+        }
+        delete data.time;
+        this.reload(data);
+      },
+      reset() {
+        this.searchForm = {
+          docNo: '',
+          orderNo: '',
+          contactName: '',
+          time: []
+        };
+        this.reload({});
+      },
+      reload(where) {
+        where = {
+          ...where,
+          // contractId: this.contractId,
+          contactId: this.contactId,
+          reviewStatus: 2
+        };
+        this.$refs.tableRef2.reload({ page: 1, where });
+      },
+      async rowClick(row) {
+        this.rowClickData = row;
+        let params = {
+          code: 'after_sales_product_list_source'
+        };
+        const res = await parameterGetByCode(params);
+        if (res.value == '1') {
+          this.getInfo(row);
+        } else {
+          this._getInfo(row.docNo);
+        }
+      },
+      handleClose() {
+        this.addRepairNotesDialog = false;
+      },
+      submitAdd() {
+        if (!this.selection.length) {
+          return this.$message.warning('请至少选择一条数据');
         }
-      );
-      // 获取包装维度数据
-      const arr = [];
-      for (const key in this.productList) {
-        for (const k in this.productList[key].outInDetailRecordRequestList) {
-          arr.push({
-            ...this.productList[key].outInDetailRecordRequestList[k]
+        this.$emit('changeParent', {
+          orderCode: this.rowClickData.docNo,
+          orderId: this.rowClickData.id,
+          tableList: this.selection
+        });
+        this.handleClose();
+      },
+
+      async getInfo(row) {
+        const res = await getSendSaleOrderrecordDetailSplit(row.id);
+        let list = res.productList.map((el) => {
+          el.categoryCode = el.productCode;
+          el.categoryName = el.productName;
+          el.categoryModel = el.modelType;
+          el.measureQuantity = el.totalCount;
+          el.barcodes = el.carCode;
+          el.packingSpecification = el.specification;
+          el.shipmentDate = row.createTime || null;
+          (el.guaranteePeriodDeadline = this.getTime(row.createTime)[0]),
+            (el.warrantyStatus = this.getTime(row.createTime)[1]);
+          return el;
+        });
+        this.packingList = list;
+      },
+
+      async _getInfo(sourceBizNo) {
+        const dataArray = await getInfoBySourceBizNoAll(sourceBizNo);
+        let res = {};
+        if (dataArray && dataArray.length > 0) {
+          res = JSON.parse(JSON.stringify(dataArray[0]));
+          res['outInDetailList'] = [];
+          dataArray.forEach((item) => {
+            item.outInDetailList.forEach((val) => {
+              res['outInDetailList'].push(val);
+            });
           });
         }
-      }
-      this.packingList = arr;
-    },
+        this.init(res);
+      },
+      init(res) {
+        this.infoData = res;
+        this.productList = res?.outInDetailList?.map(
+          (productItem, productIndex) => {
+            return {
+              ...productItem,
+              outInDetailRecordRequestList:
+                productItem.outInDetailRecordRequestList.map((packingItem) => {
+                  return {
+                    ...packingItem,
+                    categoryName: productItem.categoryName,
+                    categoryCode: productItem.categoryCode,
+                    categoryModel: productItem.categoryModel,
+                    produceTime: packingItem.produceTime || null,
+                    shipmentDate: res.createTime || null,
+                    guaranteePeriodDeadline: this.getTime(res.createTime)[0],
+                    warrantyStatus: this.getTime(res.createTime)[1]
+                  };
+                })
+            };
+          }
+        );
+        // 获取包装维度数据
+        const arr = [];
+        for (const key in this.productList) {
+          for (const k in this.productList[key].outInDetailRecordRequestList) {
+            arr.push({
+              ...this.productList[key].outInDetailRecordRequestList[k]
+            });
+          }
+        }
+        this.packingList = arr;
+      },
 
-    getTime(createTime) {
-      let date = new Date(createTime);
-      date.setMonth(date.getMonth() + 13); // 月份加13月
-      let time = dayjs(date).format('YYYY-MM-DD HH:mm:ss');
-      let warrantyStatus =
-        new Date(time).getTime() > new Date().getTime() ? 0 : 1;
-      return [time, warrantyStatus];
+      getTime(createTime) {
+        let date = new Date(createTime);
+        date.setMonth(date.getMonth() + 13); // 月份加13月
+        let time = dayjs(date).format('YYYY-MM-DD HH:mm:ss');
+        let warrantyStatus =
+          new Date(time).getTime() > new Date().getTime() ? 0 : 1;
+        return [time, warrantyStatus];
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped></style>