Quellcode durchsuchen

供应商,客户代号

yijing vor 1 Jahr
Ursprung
Commit
8d736d59f9

+ 1 - 1
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrder.vue

@@ -5,7 +5,7 @@
     <el-form :rules="rules" ref="formRef" :model="form">
       <header-title title="退货物品明细" size="16px"></header-title>
       <ele-pro-table ref="table" :needPage="false" :columns="columns" :toolkit="[]" :datasource="form.detailList"
-        cache-key="customerReturnOrderDialog" class="time-form" :height="350">
+        cache-key="customerReturnOrderDialog" class="time-form" :height="300">
         <!-- 表头工具栏 -->
         <!--        <template v-slot:toolbar>-->
         <!--          <el-button-->

+ 336 - 403
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="switch">
+    <!-- <div class="switch">
       <div class="switch_left">
         <ul>
           <li
@@ -13,121 +13,64 @@
           </li>
         </ul>
       </div>
-    </div>
-    <div v-show="activeComp == 'main'">
+    </div> -->
+    <div>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <headerTitle title="退货信息"></headerTitle>
         <el-row>
           <el-col :span="12">
-            <el-form-item
-              label="客户名称:"
-              prop="contactName"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="客户名称:" prop="contactName" style="margin-bottom: 16px">
               {{ form.contactName }}
             </el-form-item>
-            <el-form-item
-              label="赔偿金额:"
-              prop="redressAmount"
-              style="margin-bottom: 16px"
-              v-show="['30', '50'].includes(form.type)"
-            >
+            <el-form-item label="赔偿金额:" prop="redressAmount" style="margin-bottom: 16px"
+              v-show="['30', '50'].includes(form.type)">
               {{ form.redressAmount }}元
             </el-form-item>
-            <el-form-item
-              label="赔偿总金额:"
-              prop="totalAmount"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="赔偿总金额:" prop="totalAmount" style="margin-bottom: 16px">
               {{ form.totalAmount }}元
             </el-form-item>
             <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
             </el-form-item> -->
-            <el-form-item
-              label="备注:"
-              prop="remark"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="备注:" prop="remark" style="margin-bottom: 16px">
               {{ form.remark }}
             </el-form-item>
-            <el-form-item
-              label="创建时间:"
-              prop="createTime"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="创建时间:" prop="createTime" style="margin-bottom: 16px">
               {{ form.createTime }}
             </el-form-item>
-            <el-form-item
-              label="制单人:"
-              prop="makerName"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="制单人:" prop="makerName" style="margin-bottom: 16px">
               {{ form.makerName }}
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="退货编码:"
-              prop="returnNo"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="退货编码:" prop="returnNo" style="margin-bottom: 16px">
               {{ form.returnNo }}
             </el-form-item>
-            <el-form-item
-              label="发货编码:"
-              prop="sendNo"
-              style="margin-bottom: 16px"
-            >
+            <el-form-item label="发货编码:" prop="sendNo" style="margin-bottom: 16px">
               {{ form.sendNo }}
             </el-form-item>
             <el-form-item prop="orderNo" label="订单编码:">
               {{ form.orderNo }}
             </el-form-item>
 
-            <el-form-item
-              label="退货附件:"
-              prop="returnFiles"
-              style="margin-bottom: 16px"
-            >
-              <div
-                v-if="detailData.returnFiles && detailData.returnFiles?.length"
-              >
-                <el-link
-                  v-for="link in detailData.returnFiles"
-                  :key="link.id"
-                  type="primary"
-                  :underline="false"
-                  @click="downloadFile(link)"
-                >
+            <el-form-item label="退货附件:" prop="returnFiles" style="margin-bottom: 16px">
+              <div v-if="detailData.returnFiles && detailData.returnFiles?.length">
+                <el-link v-for="link in detailData.returnFiles" :key="link.id" type="primary" :underline="false"
+                  @click="downloadFile(link)">
                   {{ link.name }}
                 </el-link>
               </div>
             </el-form-item>
-            <el-form-item
-              label="回执附件:"
-              prop="repliedFiles"
-              style="margin-bottom: 16px"
-            >
-              <fileMain
-                v-model="form.repliedFiles"
-                :type="
-                  taskDefinitionKey == 'salesmanUploadReceipt' ? '' : 'view'
-                "
-              ></fileMain>
+            <el-form-item label="回执附件:" prop="repliedFiles" style="margin-bottom: 16px">
+              <fileMain v-model="form.repliedFiles" :type="taskDefinitionKey == 'salesmanUploadReceipt' ? '' : 'view'
+                "></fileMain>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <headerTitle title="退货产品明细"></headerTitle>
-      <ele-pro-table
-        ref="table"
-        :needPage="false"
-        :columns="competAnalysisListcolumns"
-        :toolkit="[]"
-        :datasource="detailData.productList"
-        row-key="id"
-      >
+      <ele-pro-table ref="table" :needPage="false" :columns="competAnalysisListcolumns" :toolkit="[]"
+        :datasource="detailData.productList" row-key="id">
       </ele-pro-table>
     </div>
     <!-- <keep-alive>
@@ -145,353 +88,343 @@
       v-if="activeComp == 'inoutBoundView'"
     ></detailDialog> -->
     <keep-alive>
-      <add
-        ref="add"
-        v-if="activeComp == 'inoutBound'"
-        :form="form"
-        :sourceBizNo="form.returnNo"
-        :detailList="form.productList"
-        :bizType="6"
-        :isMoreProduct="true"
-      ></add>
+      <add ref="add" v-if="activeComp == 'inoutBound'" :form="form" :sourceBizNo="form.returnNo"
+        :detailList="form.productList" :bizType="6" :isMoreProduct="true"></add>
     </keep-alive>
-    <detailDialog
-      v-if="activeComp == 'inoutBoundView'"
-      :businessId="form.receiveNo"
-      ref="detailDialog"
-    ></detailDialog>
+    <detailDialog v-if="activeComp == 'inoutBoundView'" :businessId="form.receiveNo" ref="detailDialog"></detailDialog>
   </div>
 </template>
 
 <script>
-  import { getReturnSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
-  import { getFile } from '@/api/system/file';
-  import dictMixins from '@/mixins/dictMixins';
-  import { reviewStatusEnum } from '@/enum/dict';
-  import inventoryTabledetail from './inventoryTabledetail.vue';
-  import inventoryTable from './inventoryTable.vue';
-  // import add from './salesReturnReceipt.vue';
-  // import detailDialog from '@/views/bpm/handleTask/components/inoutBound/detailDialog.vue';
-  import add from '@/views/bpm/stockManagement/storage.vue';
-  import detailDialog from '@/views/bpm/stockManagement/details.vue';
-  import fileUpload from '@/components/upload/fileUpload.vue';
-  import fileMain from '@/components/addDoc/index.vue';
+import { getReturnSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
+import { getFile } from '@/api/system/file';
+import dictMixins from '@/mixins/dictMixins';
+import { reviewStatusEnum } from '@/enum/dict';
+import inventoryTabledetail from './inventoryTabledetail.vue';
+import inventoryTable from './inventoryTable.vue';
+// import add from './salesReturnReceipt.vue';
+// import detailDialog from '@/views/bpm/handleTask/components/inoutBound/detailDialog.vue';
+import add from '@/views/bpm/stockManagement/storage.vue';
+import detailDialog from '@/views/bpm/stockManagement/details.vue';
+import fileUpload from '@/components/upload/fileUpload.vue';
+import fileMain from '@/components/addDoc/index.vue';
 
-  export default {
-    mixins: [dictMixins],
-    components: {
-      fileMain,
-      fileUpload,
-      detailDialog,
-      add,
-      inventoryTabledetail,
-      inventoryTable
-    },
-    data() {
-      return {
-        codeData: [],
-        tabOptions: [{ key: 'main', name: '退货单详情' }],
-        reviewStatusEnum,
-        activeComp: 'main',
-        visible: false,
-        detailId: '',
-        title: '详情',
-        row: {},
-        activeName: 'base',
-        qualityStatus: {
-          0: '未质检',
-          1: '已质检'
-        }, // 质检状态 0未检 1已检
-        qualityResults: {
-          1: '合格',
-          2: '不合格'
-        }, // 质检结果 1合格 2不合格
-        form: {
-          orderFiles: [{ name: '222' }]
+export default {
+  mixins: [dictMixins],
+  components: {
+    fileMain,
+    fileUpload,
+    detailDialog,
+    add,
+    inventoryTabledetail,
+    inventoryTable
+  },
+  data() {
+    return {
+      codeData: [],
+      tabOptions: [{ key: 'main', name: '退货单详情' }],
+      reviewStatusEnum,
+      activeComp: 'main',
+      visible: false,
+      detailId: '',
+      title: '详情',
+      row: {},
+      activeName: 'base',
+      qualityStatus: {
+        0: '未质检',
+        1: '已质检'
+      }, // 质检状态 0未检 1已检
+      qualityResults: {
+        1: '合格',
+        2: '不合格'
+      }, // 质检结果 1合格 2不合格
+      form: {
+        orderFiles: [{ name: '222' }]
+      },
+      rules: {},
+      detailData: {},
+      competAnalysisListcolumns: [
+        {
+          width: 45,
+          type: 'index',
+          columnKey: 'index',
+          align: 'center',
+          fixed: 'left'
+        },
+        {
+          minWidth: 160,
+          prop: 'productCode',
+          label: '编码',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 120,
+          prop: 'productName',
+          label: '名称',
+          showOverflowTooltip: true,
+          align: 'center'
         },
-        rules: {},
-        detailData: {},
-        competAnalysisListcolumns: [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            minWidth: 160,
-            prop: 'productCode',
-            label: '编码',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'productName',
-            label: '名称',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
 
-          {
-            minWidth: 160,
-            prop: 'batchNo',
-            label: '批次号',
-            showOverflowTooltip: true,
-            slot: 'batchNo',
-            align: 'center'
-          },
-          {
-            minWidth: 160,
-            prop: 'barcodes',
-            label: '发货条码',
-            showOverflowTooltip: true,
-            slot: 'barcodes',
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'materielDesignation',
-            label: '物料代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'clientCode',
-            label: '客户代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'engrave',
-            label: '刻码',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 160,
-            prop: 'packageNo',
-            align: 'center',
-            label: '包装编码',
-            showOverflowTooltip: true
-          },
-          {
-            minWidth: 100,
-            prop: 'packingQuantity',
-            align: 'center',
-            label: '包装数量',
-            showOverflowTooltip: true
-          },
-          {
-            minWidth: 120,
-            prop: 'packingUnit',
-            align: 'center',
-            label: '包装单位',
-            showOverflowTooltip: true
-          },
-          {
-            minWidth: 100,
-            prop: 'totalCount',
-            label: '计量数量',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 150,
-            prop: 'measuringUnit',
-            label: '计量单位',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'pricingWay',
-            label: '计价方式',
-            slot: 'pricingWay',
-            align: 'center',
-            formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+        {
+          minWidth: 160,
+          prop: 'batchNo',
+          label: '批次号',
+          showOverflowTooltip: true,
+          slot: 'batchNo',
+          align: 'center'
+        },
+        {
+          minWidth: 160,
+          prop: 'barcodes',
+          label: '发货条码',
+          showOverflowTooltip: true,
+          slot: 'barcodes',
+          align: 'center'
+        },
+        {
+          minWidth: 120,
+          prop: 'materielDesignation',
+          label: '物料代号',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 120,
+          prop: 'clientCode',
+          label: '客户代号',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 120,
+          prop: 'engrave',
+          label: '刻码',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 160,
+          prop: 'packageNo',
+          align: 'center',
+          label: '包装编码',
+          showOverflowTooltip: true
+        },
+        {
+          minWidth: 100,
+          prop: 'packingQuantity',
+          align: 'center',
+          label: '包装数量',
+          showOverflowTooltip: true
+        },
+        {
+          minWidth: 120,
+          prop: 'packingUnit',
+          align: 'center',
+          label: '包装单位',
+          showOverflowTooltip: true
+        },
+        {
+          minWidth: 100,
+          prop: 'totalCount',
+          label: '计量数量',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 150,
+          prop: 'measuringUnit',
+          label: '计量单位',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          width: 160,
+          prop: 'pricingWay',
+          label: '计价方式',
+          slot: 'pricingWay',
+          align: 'center',
+          formatter: (row, column) => {
+            return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费' : '';
 
-            }
-          },
-          {
-            width: 100,
-            prop: 'singlePrice',
-            label: '单价',
-            slot: 'singlePrice',
-            align: 'center'
-          },
-          
- 
-          {
-            width: 120,
-            prop: 'totalPrice',
-            label: '合计',
-            slot: 'totalPrice',
-            align: 'center'
-          },
-          // {
-          //   minWidth: 80,
-          //   prop: 'weight',
-          //   label: '重量',
-          //   showOverflowTooltip: true,
-          //   align: 'center'
-          // },
-          {
-            minWidth: 80,
-            prop: 'receiveTotalWeight',
-            label: '重量',
-            // slot: 'singleWeight',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 100,
-            prop: 'weightUnit',
-            label: '重量单位',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            prop: 'provenance',
-            label: '产地',
-            slot: 'provenance',
-            align: 'center',
-            minWidth: 200,
-            showOverflowTooltip: true,
-            formatter: (row, column) => {
-              return row.provenance && row.provenance.length
-                ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
-                    .join(',')
-                : '';
-            }
-          },
+          }
+        },
+        {
+          width: 100,
+          prop: 'singlePrice',
+          label: '单价',
+          slot: 'singlePrice',
+          align: 'center'
+        },
 
-          {
-            minWidth: 200,
-            prop: 'returnReason',
-            label: '退货原因',
-            slot: 'returnReason',
-            align: 'center'
-          },
 
-          {
-            width: 220,
-            prop: 'remark',
-            label: '备注',
-            slot: 'remark',
-            align: 'center'
+        {
+          width: 120,
+          prop: 'totalPrice',
+          label: '合计',
+          slot: 'totalPrice',
+          align: 'center'
+        },
+        // {
+        //   minWidth: 80,
+        //   prop: 'weight',
+        //   label: '重量',
+        //   showOverflowTooltip: true,
+        //   align: 'center'
+        // },
+        {
+          minWidth: 80,
+          prop: 'receiveTotalWeight',
+          label: '重量',
+          // slot: 'singleWeight',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          minWidth: 100,
+          prop: 'weightUnit',
+          label: '重量单位',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          prop: 'provenance',
+          label: '产地',
+          slot: 'provenance',
+          align: 'center',
+          minWidth: 200,
+          showOverflowTooltip: true,
+          formatter: (row, column) => {
+            return row.provenance && row.provenance.length
+              ? row.provenance
+                .map((item) => this.getDictValue('产地', item))
+                .join(',')
+              : '';
           }
-        ]
-      };
+        },
+
+        {
+          minWidth: 200,
+          prop: 'returnReason',
+          label: '退货原因',
+          slot: 'returnReason',
+          align: 'center'
+        },
+
+        {
+          width: 220,
+          prop: 'remark',
+          label: '备注',
+          slot: 'remark',
+          align: 'center'
+        }
+      ]
+    };
+  },
+  props: {
+    businessId: {
+      default: ''
     },
-    props: {
-      businessId: {
-        default: ''
-      },
-      taskDefinitionKey: {
-        default: ''
-      }
+    taskDefinitionKey: {
+      default: ''
+    }
+  },
+  created() {
+    this.requestDict('产地');
+    this.getDetailData(this.businessId);
+    if (this.taskDefinitionKey == 'storemanApprove') {
+      this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
+    }
+    if (this.taskDefinitionKey == 'salesmanUploadReceipt') {
+      this.tabOptions.push({ key: 'inoutBoundView', name: '入库单详情' });
+      // this.activeComp = 'inoutBoundView';
+    }
+    console.log('this.tabOptions----------------', this.tabOptions);
+  },
+  methods: {
+    changeActive(item) {
+      this.activeComp = item.key;
+      this.$emit('activeCompChange', item.key);
+      // if (
+      //   this.taskDefinitionKey == 'storemanApprove' &&
+      //   item.key == 'inoutBound'
+      // ) {
+      //   this.$nextTick(() => {
+      //     this.$refs.add.pickerSuccess(this.form);
+      //   });
+      // }
     },
-    created() {
-      this.requestDict('产地');
-      this.getDetailData(this.businessId);
-      if (this.taskDefinitionKey == 'storemanApprove') {
-        this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
-      }
-      if (this.taskDefinitionKey == 'salesmanUploadReceipt') {
-        this.tabOptions.push({ key: 'inoutBoundView', name: '入库单详情' });
-        // this.activeComp = 'inoutBoundView';
-      }
-      console.log('this.tabOptions----------------', this.tabOptions);
+    downloadFile(file) {
+      getFile({ objectName: file.storePath }, file.name);
     },
-    methods: {
-      changeActive(item) {
-        this.activeComp = item.key;
-        this.$emit('activeCompChange', item.key);
-        // if (
-        //   this.taskDefinitionKey == 'storemanApprove' &&
-        //   item.key == 'inoutBound'
-        // ) {
-        //   this.$nextTick(() => {
-        //     this.$refs.add.pickerSuccess(this.form);
-        //   });
-        // }
-      },
-      downloadFile(file) {
-        getFile({ objectName: file.storePath }, file.name);
-      },
-      async getTableValue() {
-        try {
-          await this.getValidate();
-          // 表单验证通过,执行保存操作
-          this.loading = true;
-          this.form.repliedFiles = this.form.repliedFiles || [];
-          this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
-          this.form.returnStorageData = await this.$refs.add.getReturnStorage();
-          return Object.assign({}, this.form);
-        } catch (error) {
-          console.log(error);
-          return '';
-          // 表单验证未通过,不执行保存操作
-        }
-      },
-      save(data) {
-        this.$refs.add.handleNewSave(data);
-      },
-      success() {
-        this.$emit('handleClose');
-      },
-      getValidate() {
-        return Promise.all([
-          new Promise((resolve, reject) => {
-            resolve(true);
-          })
-        ]);
-      },
-      async getDetailData(id) {
+    async getTableValue() {
+      try {
+        await this.getValidate();
+        // 表单验证通过,执行保存操作
         this.loading = true;
-        const data = await getReturnSaleOrderrecordDetail(id);
-        this.loading = false;
-        if (data) {
-          this.detailData = data;
-          this.form = data;
-          this.form.productList.forEach(item=>{
-            item['packingWeight']=item.receiveTotalWeight
-            item['quantity']=item.totalCount
-          })
-          this.form.pricingWay = data.saleOrder.pricingWay;
-          this.$nextTick(() => {
-            if (this.taskDefinitionKey == 'storemanApprove') {
-              this.activeComp = 'inoutBound';
-              this.$emit('activeCompChange', 'inoutBound');
-            }
-          });
-        }
+        this.form.repliedFiles = this.form.repliedFiles || [];
+        this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
+        this.form.returnStorageData = await this.$refs.add.getReturnStorage();
+        return Object.assign({}, this.form);
+      } catch (error) {
+        console.log(error);
+        return '';
+        // 表单验证未通过,不执行保存操作
+      }
+    },
+    save(data) {
+      this.$refs.add.handleNewSave(data);
+    },
+    success() {
+      this.$emit('handleClose');
+    },
+    getValidate() {
+      return Promise.all([
+        new Promise((resolve, reject) => {
+          resolve(true);
+        })
+      ]);
+    },
+    async getDetailData(id) {
+      this.loading = true;
+      const data = await getReturnSaleOrderrecordDetail(id);
+      this.loading = false;
+      if (data) {
+        this.detailData = data;
+        this.form = data;
+        this.form.productList.forEach(item => {
+          item['packingWeight'] = item.receiveTotalWeight
+          item['quantity'] = item.totalCount
+        })
+        this.form.pricingWay = data.saleOrder.pricingWay;
+        this.$nextTick(() => {
+          if (this.taskDefinitionKey == 'storemanApprove') {
+            this.activeComp = 'inoutBound';
+            this.$emit('activeCompChange', 'inoutBound');
+          }
+        });
       }
     }
-  };
+  }
+};
 </script>
 
 <style scoped lang="scss">
-  .ele-dialog-form {
-    .el-form-item {
-      margin-bottom: 10px;
-    }
+.ele-dialog-form {
+  .el-form-item {
+    margin-bottom: 10px;
   }
+}
 
-  .headbox {
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    .amount {
-      font-size: 14px;
-      font-weight: bold;
-      margin-right: 20px;
-    }
+.headbox {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+
+  .amount {
+    font-size: 14px;
+    font-weight: bold;
+    margin-right: 20px;
   }
+}
 </style>

+ 28 - 18
src/views/bpm/stockManagement/storage.vue

@@ -227,7 +227,7 @@
               </el-table-column>
               <el-table-column label="供应商" align="center" prop="supplierId" width="200" :show-overflow-tooltip="true">
                 <template slot-scope="{ row, $index }">
-                  <template v-if="row.isSave">
+                  <template v-if="row.isSave || row.supplierId">
                     {{ row.supplierName }}
                   </template>
                   <el-select v-else @change="selectSupplier($event, row)" v-model="row.supplierId" placeholder="请选择"
@@ -317,7 +317,7 @@
             fixed="left"></el-table-column>
           <el-table-column label="名称" prop="categoryName" width="150" :show-overflow-tooltip="true"
             fixed="left"></el-table-column>
-          <el-table-column label="批次号" prop="batchNo" width="70"></el-table-column>
+          <el-table-column label="批次号" prop="batchNo" width="100"></el-table-column>
           <el-table-column :label="`包装编码`" prop="packageNo" width="200" :show-overflow-tooltip="true"></el-table-column>
           <el-table-column label="包装数量" prop="packingQuantity" width="80"></el-table-column>
           <el-table-column label="单位" prop="packingUnit"></el-table-column>
@@ -344,18 +344,18 @@
             </template>
           </el-table-column>
           <el-table-column label="客户代号" prop="clientCode">
-            <template slot-scope="{ row, $index }" v-if="bizType != 2">
+            <template slot-scope="{ row, $index }">
               <el-input v-if="!row.isPack" :ref="'packing_clientCode' + $index" @keyup.native="
                 moveFocus($event, $index, 'packing_clientCode', '包装', row)
                 " v-model="row.clientCode"></el-input>
               <span v-else> {{ row.clientCode }}</span>
             </template>
-            <template slot-scope="{ row, $index }" v-if="bizType == 2">
+            <!-- <template slot-scope="{ row, $index }" v-if="bizType == 2">
               <el-input v-if="!row.isPack" :ref="'packing_clientCode' + $index" @keyup.native="
                 moveFocus($event, $index, 'packing_clientCode', '包装', row)
                 " v-model="row.customerMark"></el-input>
               <span v-else> {{ row.customerMark }}</span>
-            </template>
+            </template> -->
           </el-table-column>
           <el-table-column label="刻码" prop="engrave" width="140">
             <template slot-scope="{ row, $index }">
@@ -455,18 +455,18 @@
             </template>
           </el-table-column>
           <el-table-column label="客户代号" prop="clientCode">
-            <template slot-scope="{ row, $index }" v-if="bizType != 2">
+            <template slot-scope="{ row, $index }">
               <el-input v-if="!row.isPack" :ref="'material_clientCode' + $index" @keyup.native="
                 moveFocus($event, $index, 'material_clientCode', '物料', row)
                 " v-model="row.clientCode"></el-input>
               <span v-else>{{ row.clientCode }}</span>
             </template>
-            <template slot-scope="{ row, $index }" v-if="bizType == 2">
+            <!-- <template slot-scope="{ row, $index }" v-if="bizType == 2">
               <el-input v-if="!row.isPack" :ref="'packing_clientCode' + $index" @keyup.native="
                 moveFocus($event, $index, 'packing_clientCode', '物料', row)
                 " v-model="row.customerMark"></el-input>
               <span v-else> {{ row.customerMark }}</span>
-            </template>
+            </template> -->
           </el-table-column>
           <el-table-column label="刻码" prop="engrave" width="140">
             <template slot-scope="{ row, $index }">
@@ -805,7 +805,6 @@ export default {
       console.log(this.sourceBizNo, 'sourceBizNo')
       this.formData.type = 1;
       this.formData.bizType = this.bizType;
-
       if (this.sourceBizNo != null || this.sourceBizNo != '') {
         // this.formData.sourceBizNo = this.sourceBizNo;
         this.$set(this.formData, 'sourceBizNo', this.sourceBizNo);
@@ -1020,7 +1019,6 @@ export default {
 
           // 生成产品列表
           this.productList = res.map((item, index) => {
-            console.log(item.packingUnit, 'iiiiiii')
             // 显示规格
             let packingSpecificationLabel = this.packingSpecificationOption[
               index
@@ -1102,7 +1100,6 @@ export default {
                   break;
               }
             }
-            console.log(item.packingUnit, 'item11111111111')
             let packingUnit = item.packingUnit;
             let singleWeight = item.singleWeight || 0; // 单重重量
             return {
@@ -1259,6 +1256,13 @@ export default {
               this.curDateType = 'purchaseDate';
             }
 
+            let clientCode = ''
+            if (this.bizType == 2) {
+              clientCode = item.customerMark
+            } else if (this.bizType != 2) {
+              clientCode = item.clientCode || item.extInfo?.clientCode
+            }
+
             return {
               index: this.isMoreProduct
                 ? this.productList.find(
@@ -1304,7 +1308,7 @@ export default {
 
               netWeight: this.productList[0].netWeight, // 净重
               barcodes: item.barcodes || item.sendCode, // 发货条码
-              clientCode: item.clientCode || item.extInfo?.clientCode, // 客户代号
+              clientCode: clientCode, // 客户代号
               materielDesignation:
                 item.materielDesignation || item.extInfo?.materielCode, // 物料代号
               engrave: item.engrave || item.extInfo?.engrave, // 刻码
@@ -2328,7 +2332,10 @@ export default {
     // 打开仓库弹框
     handleWareHouse(row, idx, type) {
       console.log(row, '踩踩踩踩踩踩踩踩踩踩踩', this.form)
-
+      if (row.packingSpecificationLabel?.length < 1) {
+        this.$message.error('请到主数据维护包装组信息!')
+        return;
+      }
       if (row.isSave) {
         return false;
       }
@@ -2491,9 +2498,6 @@ export default {
         this.$refs.wareHouseDailogRef.open(
           pNum,
           mNum,
-          null,
-          null,
-          null,
           // this.form.categoryLevelTopId
         );
       }
@@ -2514,7 +2518,6 @@ export default {
       console.log(idx, this.productList, 'idxidxidxidx')
 
       if (idx > -1) {
-
         this.$set(
 
           this.productList[idx],
@@ -2793,6 +2796,13 @@ export default {
             }
             console.log(measureQuantity, 'measureQuantity')
           }
+          let clientCode = ''
+          if (this.bizType == 2) {
+            clientCode = row?.customerMark
+          } else if (this.bizType != 2) {
+            clientCode = row.extInfo?.clientCode
+          }
+
           console.log(filterArr[0], 'filterArr[0]')
           let item = {
 
@@ -2844,7 +2854,7 @@ export default {
             weightUnit: row.weightUnit, // 重量单位
             netWeight: row.netWeight, // 净重
             barcodes: '', // 发货条码
-            clientCode: row.extInfo ? row.extInfo.clientCode : '', // 客户代号
+            clientCode: clientCode, // 客户代号
             materielDesignation: row.extInfo ? row.extInfo.materielCode : '', // 物料代号
             engrave: '', // 刻码
             isUnpack: row.isUnpack, // 是否允许拆包

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
 
-        target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18186',
         changeOrigin: true, // 只有这个值为true的情况下 s才表示开启跨域
         pathRewrite: {