yusheng hai 11 meses
pai
achega
936e629a02

+ 67 - 31
src/BIZComponents/inventoryTable.vue

@@ -75,7 +75,7 @@
           }"
         >
           <el-input
-            :disabled="isContractId || row.productCode"
+            :disabled="!!row.productCode"
             v-model="row.productName"
             placeholder="请输入"
             style="width: 60%; margin-right: 10px"
@@ -127,7 +127,6 @@
           }"
         >
           <el-input
-            :disabled="isContractId"
             v-model="scope.row.totalCount"
             type="number"
             placeholder="请输入"
@@ -154,7 +153,7 @@
         >
           <el-input
             v-model="scope.row.productBrand"
-            :disabled="scope.row.productCode"
+            :disabled="!!scope.row.productCode"
           ></el-input>
         </el-form-item>
       </template>
@@ -166,7 +165,7 @@
         >
           <el-input
             v-model="scope.row.modelType"
-            :disabled="scope.row.productCode"
+            :disabled="!!scope.row.productCode"
           ></el-input>
         </el-form-item>
       </template>
@@ -177,7 +176,7 @@
         >
           <el-input
             v-model="scope.row.specification"
-            :disabled="scope.row.productCode"
+            :disabled="!!scope.row.productCode"
           ></el-input>
         </el-form-item>
       </template>
@@ -195,7 +194,6 @@
               }"
             >
               <el-input
-                :disabled="isContractId"
                 v-model="scope.row.guaranteePeriod"
                 @change="
                   setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
@@ -209,7 +207,6 @@
               dictName="质保期单位"
               clearable
               v-model="scope.row.guaranteePeriodUnitCode"
-              :disabled="isContractId"
               @change="
                 setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
               "
@@ -225,7 +222,7 @@
         >
           <el-input
             v-model="scope.row.measuringUnit"
-            :disabled="scope.row.productCode"
+            :disabled="!!scope.row.productCode"
             placeholder="请输入"
           ></el-input>
         </el-form-item>
@@ -236,7 +233,6 @@
           :prop="'datasource.' + scope.$index + '.remark'"
         >
           <el-input
-            :disabled="isContractId"
             v-model="scope.row.remark"
             type="textarea"
             placeholder="请输入"
@@ -254,7 +250,6 @@
           }"
         >
           <el-input
-            :disabled="isContractId"
             v-model="scope.row.singlePrice"
             placeholder="请输入"
             type="number"
@@ -284,7 +279,6 @@
           :prop="'datasource.' + scope.$index + '.taxRate'"
         >
           <el-input
-            :disabled="isContractId"
             v-model="scope.row.taxRate"
             placeholder="请输入"
             type="number"
@@ -313,7 +307,6 @@
           <el-input
             v-model="row.technicalAnswerName"
             placeholder="请输入"
-            :disabled="isContractId"
             @click.native="handHead(row, $index)"
           ></el-input>
         </el-form-item>
@@ -326,7 +319,6 @@
           <el-input
             type="textarea"
             v-model="scope.row.technicalParams"
-            :disabled="isContractId"
             placeholder="请输入"
           ></el-input>
         </el-form-item>
@@ -432,7 +424,6 @@
         >
           <el-date-picker
             style="width: 140px"
-            :disabled="isContractId"
             v-model="scope.row.customerExpectDeliveryDeadline"
             @change="
               setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
@@ -450,7 +441,6 @@
         >
           <el-date-picker
             style="width: 140px"
-            :disabled="isContractId"
             v-model="scope.row.guaranteePeriodDeadline"
             type="date"
             placeholder="选择日期"
@@ -464,7 +454,6 @@
           :prop="'datasource.' + scope.$index + '.singleWeight'"
         >
           <el-input
-            :disabled="isContractId"
             v-model="scope.row.singleWeight"
             @input="changeCount(scope.row, scope.$index)"
             placeholder="请输入"
@@ -482,7 +471,6 @@
         >
           <el-input
             v-model="scope.row.technologyRouteName"
-            :disabled="isContractId"
             placeholder="请选择"
             @click.native="openVersion(scope.$index)"
           ></el-input>
@@ -510,6 +498,19 @@
           </el-select>
         </el-form-item>
       </template>
+      <template v-slot:orderNo="{ row , $index}">
+        <el-form-item :prop="'datasource.' + $index + '.orderNo'">
+          <el-select v-model="row.orderNo" style="width: 100%">
+            <el-option
+              :label="item.orderNo"
+              :value="item.orderNo"
+              @click.native="orderNoChange(row, item)"
+              v-for="(item, index) in orderOption"
+              :key="index"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </template>
       <template v-slot:headerPricingWay="{ column }">
         <span class="is-required">{{ column.label }}</span>
       </template>
@@ -556,7 +557,7 @@
   import ProductionVersion from '@/components/ProductionVersion2/index.vue';
   import { getByCode } from '@/api/system/dictionary-data';
   import fileMain from '@/components/addDoc/index.vue';
-  import { pricingWayList,lbjtList } from '@/enum/dict.js';
+  import { pricingWayList, lbjtList } from '@/enum/dict.js';
   import { changeCount } from '@/BIZComponents/setProduct.js';
   import { getInventoryTotalAPI } from '@/api/bpm/components/wms/index.js';
   // import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
@@ -641,6 +642,16 @@
         //折让
         type: Boolean,
         default: true
+      },
+      //是否显示订单编码
+      isOrderNo: {
+        type: Boolean,
+        default: false
+      },
+      orderOption: {
+        default: () => {
+          return [];
+        }
       }
     },
     data() {
@@ -665,8 +676,29 @@
         },
         pricingWayList,
         rules: {},
-        dictList: {},
-        columns: [
+        dictList: {}
+      };
+    },
+    computed: {
+      canHandl() {
+        return this.form.datasource.length;
+      },
+      columns() {
+        let orderColumn = {
+          width: 1,
+          show: false
+        };
+        if (this.isOrderNo) {
+          orderColumn = {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          };
+        }
+        return [
           {
             width: 45,
             type: 'index',
@@ -674,6 +706,7 @@
             align: 'center',
             fixed: 'left'
           },
+          orderColumn,
           {
             width: 280,
             prop: 'productName',
@@ -731,12 +764,13 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              if(row.produceType){
-                return row.produceType.map(item=>{
-                  return lbjtList[item]
-                }).toString()
+              if (row.produceType) {
+                return row.produceType
+                  .map((item) => {
+                    return lbjtList[item];
+                  })
+                  .toString();
               }
-          
             }
           },
           {
@@ -989,12 +1023,7 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ]
-      };
-    },
-    computed: {
-      canHandl() {
-        return this.form.datasource.length;
+        ];
       }
     },
 
@@ -1106,6 +1135,9 @@
       getPrice() {
         return [this.allPrice, this.form.discountTotalPrice];
       },
+      orderNoChange(row, item) {
+        row['orderId'] = item.orderId;
+      },
       //改变数量
       changeCount(row, index) {
         const { allPrice, arr } = changeCount(row, index, this.form.datasource);
@@ -1231,6 +1263,10 @@
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.produceType);
           this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+          if(this.isOrderNo){
+            this.$set(parasm, 'orderNo', this.orderOption[0]?.orderNo);
+            this.$set(parasm, 'orderId', this.orderOption[0]?.orderId);
+          }
           this.$set(
             parasm,
             'packingSpecification',

+ 48 - 16
src/BIZComponents/inventoryTableDetails.vue

@@ -72,7 +72,6 @@
       </template>
     </ele-pro-table>
     <timeDialog ref="timeDialogRef" :view="true"></timeDialog>
-
   </el-form>
 </template>
 <script>
@@ -81,13 +80,14 @@
   import fileMain from '@/components/addDoc/index.vue';
   import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
   const dayjs = require('dayjs');
-  import {lbjtList } from '@/enum/dict.js';
+  import { lbjtList } from '@/enum/dict.js';
   import timeDialog from '@/components/timeDialog/index.vue';
 
   export default {
     mixins: [dictMixins],
     components: {
-      fileMain,timeDialog
+      fileMain,
+      timeDialog
     },
     props: {
       isDiscountTotalPrice: {
@@ -122,6 +122,11 @@
         //是否显示合计
         type: Boolean,
         default: true
+      },
+      //是否显示订单编码
+      isOrderNo: {
+        type: Boolean,
+        default: false
       }
     },
     data() {
@@ -136,6 +141,19 @@
     },
     computed: {
       columns() {
+        let orderColumn = {
+          width: 1,
+          show: false
+        };
+        if (this.isOrderNo) {
+          orderColumn = {
+            minWidth: 200,
+            prop: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          };
+        }
         return [
           {
             width: 45,
@@ -143,6 +161,15 @@
             columnKey: 'index',
             align: 'center'
           },
+          orderColumn,
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             width: 280,
             prop: 'productName',
@@ -288,9 +315,7 @@
             prop: 'taxRate',
             label: '税率',
             formatter: (_row, _column, cellValue) => {
-              return _row.taxRate
-                ? _row.taxRate+'%'
-                : '';
+              return _row.taxRate ? _row.taxRate + '%' : '';
             },
             align: 'center'
           },
@@ -381,12 +406,13 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              if(row.produceType){
-                return row.produceType.map(item=>{
-                  return lbjtList[item]
-                }).toString()
+              if (row.produceType) {
+                return row.produceType
+                  .map((item) => {
+                    return lbjtList[item];
+                  })
+                  .toString();
               }
-          
             }
           },
           {
@@ -415,7 +441,11 @@
             label: '到货方式',
             align: 'center',
             formatter: (_row, _column, cellValue) => {
-              return _row.arrivalWay==1?'一次性到货':_row.arrivalWay==2?'分批到货':''
+              return _row.arrivalWay == 1
+                ? '一次性到货'
+                : _row.arrivalWay == 2
+                ? '分批到货'
+                : '';
             },
             show: this.isArrivalWay
           },
@@ -424,7 +454,7 @@
             prop: 'customerExpectDeliveryDeadline',
             label: this.contractBookType == 1 ? '客户期望交期' : '交付日期',
             slot: 'customerExpectDeliveryDeadline',
-     
+
             align: 'center'
           },
           {
@@ -441,7 +471,7 @@
             prop: 'guaranteePeriod',
             label: '有效期',
             slot: 'guaranteePeriod',
-  
+
             align: 'center',
             formatter: (_row, _column, cellValue) => {
               return (
@@ -512,7 +542,7 @@
             slot: 'remark',
             align: 'center'
           }
-        ]
+        ];
       }
     },
 
@@ -524,7 +554,9 @@
     methods: {
       async getSupplierObj(productList, queryName) {
         try {
-          let categoryIds = productList.filter((item) => item[queryName]).map((item) => item[queryName]);
+          let categoryIds = productList
+            .filter((item) => item[queryName])
+            .map((item) => item[queryName]);
           return await contactQueryByCategoryIdsAPI({
             categoryIds,
             isQueryEE: 1

+ 135 - 76
src/BIZComponents/outdetails.vue

@@ -18,7 +18,7 @@
             <el-form label-width="120px">
               <el-col :span="8">
                 <el-form-item label="出库单号:">
-                  <span>{{ infoData.bizNo&&infoData.bizNo.toString() }}</span>
+                  <span>{{ infoData.bizNo && infoData.bizNo.toString() }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -55,7 +55,7 @@
                 <el-form-item
                   :label="infoData.bizType == 4 ? '领料单:' : '来源单据:'"
                 >
-                <span>{{ infoData.sourceBizNo }}</span>
+                  <span>{{ infoData.sourceBizNo }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -115,12 +115,19 @@
             tooltip-effect="dark"
             :max-height="300"
             :header-cell-style="rowClass"
+            @selection-change="handleSelectionProductChange"
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
-            
             <el-table-column
-             minWidth="150"
+              type="selection"
+              width="55"
+              align="center"
+              :selectable="selectable"
+            >
+            </el-table-column>
+            <el-table-column
+              minWidth="150"
               label="出库单号"
               prop="bizNo"
               align="center"
@@ -237,7 +244,7 @@
             <el-table-column label="单价" prop="price" align="center">
               <template slot-scope="{ row }">
                 <template>
-                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                  {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
                 </template>
               </template>
             </el-table-column>
@@ -259,7 +266,6 @@
               prop="purpose"
               :show-overflow-tooltip="true"
             ></el-table-column>
-     
           </el-table>
         </div>
         <div class="mt20">
@@ -275,9 +281,20 @@
             :header-cell-style="rowClass"
             v-el-table-infinite-scroll="pickingHandleScroll"
           >
-            <el-table-column label="序号" type="index" width="50" align="center">
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              type="selection"
+              :selectable="selectablePick"
+              width="55"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column type="selection" width="55" align="center"> </el-table-column>
             <el-table-column
               label="编码"
               prop="categoryCode"
@@ -385,7 +402,7 @@
             </el-table-column>
           </el-table>
         </div>
-        <!-- <div class="mt20">
+        <div class="mt20">
           <header-title :title="`物料明细`" size="16px"> </header-title>
           <el-table
             ref="multipleTable"
@@ -451,25 +468,26 @@
               </template>
             </el-table-column>
           </el-table>
-        </div> -->
+        </div>
       </div>
     </el-card>
   </div>
 </template>
 
 <script>
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
   import { useDictLabel } from '@/utils/dict';
   import { outputSceneStateEnum } from '@/enum/dict';
   import { mapGetters, mapActions } from 'vuex';
-  import {
-    allCategoryLevel,
-
-  } from '@/api/bpm/components/wms';
   import api from '@/api/warehouseManagement/index.js';
+  import { getUserDetail } from '@/api/system/organization/index.js';
 
+  import { fieldModelAPI } from '@/api/main';
   export default {
     components: {},
-
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
+    },
     data() {
       return {
         newColumns: [], // 动态表头
@@ -495,7 +513,8 @@
         stepsTitle: '已完成',
         stepsStatus: 'success',
         active: 0,
-        multipleSelection: []
+        multipleSelection: [],
+        productSelection: []
       };
     },
     watch: {
@@ -552,26 +571,23 @@
       }
     },
     created() {
-      this.getFieldModel();
       this.requestDict('类型用途');
-      this.getAllCategoryType();
       // this._getInfo();
     },
     methods: {
-      // 获取动态表头
-      getFieldModel() {
-        // fieldModelAPI({ fieldModel: 't_main_category' }).then((res) => {
-        //   let newRes = res.map((m) => {
-        //     return {
-        //       prop: 'extField.' + m.prop,
-        //       label: m.label,
-        //       align: 'center',
-        //       showOverflowTooltip: true
-        //     };
-        //   });
-        //   this.newColumns = [...newRes];
-        // });
+      selectable(row, index) {
+        let arr = this.multipleSelection.map((item) => {
+          return item.batchNo + item.categoryId;
+        });
+        return !arr.includes(row.batchNo + row.categoryId);
+      },
+      selectablePick(row, index) {
+        let arr = this.productSelection.map((item) => {
+          return item.batchNo + item.categoryId;
+        });
+        return !arr.includes(row.batchNo + row.categoryId);
       },
+
       pickingHandleScroll() {
         console.log('---------pickingHandleScroll------------');
         if (this.showPackingList.length < this.packingList.length) {
@@ -608,8 +624,12 @@
       ...mapActions('dict', ['requestDict']),
       getSceneState: useDictLabel(outputSceneStateEnum),
       handleAssetType(r) {
-        const code = this.codeList.find((item) => item.dictCode == r);
-        return code?.dictValue;
+        let codes = r && r.split(',');
+
+        let name = codes?.map((code) => {
+          return this.codeList.find((val) => val.dictCode == code)?.dictValue;
+        });
+        return name?.toString();
       },
       tableRowClassName({ row, rowIndex }) {
         console.log(row);
@@ -628,31 +648,35 @@
         }
         return { background: '#0000' };
       },
-      async getAllCategoryType() {
-        const { data } = await allCategoryLevel();
-        this.codeList = data.map((item) => {
-          return { dictCode: item.id, dictValue: item.name };
-        });
-      },
-      async _getInfo(sourceBizNo,type,list=[]) {
+
+      async _getInfo(sourceBizNo, type, list = []) {
         const dataArray = await api.getInfoBySourceBizNoAll(sourceBizNo);
-        let res={}
-        if (dataArray&&dataArray.length > 0) {
-           res = dataArray[0];
-           res.outInDetailList=dataArray.map(item=>item.outInDetailList[0])
-           res['bizNo']=dataArray.map(item=>item.bizNo)
+        let res = {};
+
+        if (dataArray && dataArray.length > 0) {
+          res = JSON.parse(JSON.stringify(dataArray[0]));
+          res['outInDetailList'] = [];
+          dataArray.forEach((item) => {
+            console.log(item, 'item');
+            item.outInDetailList.forEach((val) => {
+              val['bizNo'] = item.bizNo;
+              res['outInDetailList'].push(val);
+            });
+          });
+          res['bizNo'] = dataArray.map((item) => item.bizNo);
         }
+        let user = await getUserDetail(res.extInfo?.createUserId);
+        res.extInfo['deptName'] = user.deptName;
         // res
-        this.init(res,type);
-
+        this.init(res, type);
       },
-      init(res,type) {
+      init(res, type) {
         console.log(res, 'res');
         this.infoData = res;
         this.extInfo = res.extInfo;
         this.productList = res?.outInDetailList?.map(
           (productItem, productIndex) => {
-            productItem['bizNo']=res.bizNo[productIndex]
+            // productItem['bizNo'] = res.bizNo[productIndex]||res.bizNo[0];
             return {
               ...productItem,
               outInDetailRecordRequestList:
@@ -661,6 +685,7 @@
                     ...packingItem,
                     categoryName: productItem.categoryName,
                     categoryCode: productItem.categoryCode,
+                    bizNo: productItem.bizNo,
                     materialDetailList: packingItem.materialDetailList.map(
                       (materialItem) => {
                         return {
@@ -697,39 +722,73 @@
         console.log(this.materialList);
         this.pickingFetchData();
         this.materielFetchData();
-        if(type==10){
-          this.multipleSelection=this.showPackingList
-          this.$emit('handleSave')
-        }
+        // if (type == 10) {
+        //   this.multipleSelection = this.showPackingList;
+        //   this.$emit('handleSave');
+        // }
       },
       handleSelectionChange(val) {
         this.multipleSelection = val;
       },
-      getValue() {
-        return this.multipleSelection.map((item) => {
-          item['outInCode'] = item.bizNo;
-          item['outboundType'] = item.outType;
-          item['outboundDetailId'] = item.id;
-          item['productName'] = item.categoryName;
-          item['productCode'] = item.categoryCode;
-          item['measuringUnit'] = item.measureUnit;
-          item['productId'] = item.categoryId;
-          item['receiveTotalWeight']=item.weight;
-          this.productList.forEach((val) => {
-            if (item.categoryCode == val.categoryCode) {
-              item['warehouseId'] = val.warehouseId;
-              item['warehouseName'] = val.warehouseName;
-            }
-          });
+      handleSelectionProductChange(val) {
+        this.productSelection = val;
+      },
+      setMultipleSelection() {
+        return (
+          this.multipleSelection.map((item) => {
+            item['outInCode'] = item.bizNo;
+            item['packageId'] = item.id;
+            item['wmsOutId'] = item.outInId;
+            item['wmsOutNo'] = item.bizNo;
+            item['outboundType'] = item.outType;
+            item['outboundDetailId'] = item.id;
+            item['productName'] = item.categoryName;
+            item['productCode'] = item.categoryCode;
+            item['measuringUnit'] = item.measureUnit;
+            item['productId'] = item.categoryId;
+            item['receiveTotalWeight'] = item.weight;
+            item['provenance'] = item['provenance'] || [];
+            this.productList.forEach((val) => {
+              if (item.categoryCode == val.categoryCode) {
+                item['warehouseId'] = val.warehouseId;
+                item['warehouseName'] = val.warehouseName;
+              }
+            });
 
-          item.id = '';
-          return item;
-        });
+            item.id = '';
+            return item;
+          }) || []
+        );
       },
-      download(row) {
-        if (row.storePath) {
-          getFile({ objectName: row.storePath }, row.name);
-        }
+      setProductSelection() {
+        return (
+          this.productSelection.map((item) => {
+            item['outInCode'] = item.bizNo;
+            item['wmsOutId'] = item.outInId;
+            item['wmsOutNo'] = item.bizNo;
+            item['outboundType'] = item.outType;
+            // item['outboundDetailId'] = item.id;
+            item['productName'] = item.categoryName;
+            item['productCode'] = item.categoryCode;
+            item['measuringUnit'] = item.measureUnit;
+            item['productId'] = item.categoryId;
+            item['receiveTotalWeight'] = item.weight;
+            item['provenance'] = item['provenance'] || [];
+            // this.productList.forEach((val) => {
+            //   if (item.categoryCode == val.categoryCode) {
+            //     item['warehouseId'] = val.warehouseId;
+            //     item['warehouseName'] = val.warehouseName;
+            //   }
+            // });
+
+            item.id = '';
+            return item;
+          }) || []
+        );
+      },
+
+      getValue() {
+        return [...this.setMultipleSelection(), ...this.setProductSelection()];
       }
     }
   };

+ 28 - 4
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -115,6 +115,7 @@
         :type="form.type"
         @payAmountChange="payAmountChange"
         @handleSelectGoods="handleSelectGoods"
+        :orderOption="orderOption"
       ></inventoryTable>
       <headerTitle
         title="实物赔偿清单"
@@ -126,6 +127,8 @@
         ref="inventoryTableref1"
         :customerMark="customerMark"
         :isDiscount="false"
+        :orderOption="orderOption"
+        :isOrderNo="true"
         :isProduceDeliveryDeadline="taskDefinitionKey == 'produceLeader'"
       ></inventoryTable1>
     </el-form>
@@ -195,6 +198,7 @@
 
       return {
         outboundDetailsDialogFlag: false,
+        orderOption:[],
         customerMark: '',
         oldColumns: [
           {
@@ -204,6 +208,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             width: 200,
             prop: 'productName',
@@ -560,7 +572,8 @@
         this.loading = false;
         if (data) {
           this.form = data;
-          // this.form.pricingWay = data?.saleOrder?.pricingWay;
+          this.orderOption = data.returnOrderList;
+
           this.form.entrustedCode = data?.entrustedReceiveCode;
           this.form.entrustedId = data?.entrustedReceiveId;
           if (data.contactId) {
@@ -675,7 +688,18 @@
             productList: data.productList,
             redressProductList
           });
-
+          let orderIds = [...data.productList, ...redressProductList].map(
+            (item) => item.orderId
+          );
+          let orderNos = [...data.productList, ...redressProductList].map(
+            (item) => item.orderNo
+          );
+          if (orderIds?.length) {
+            commitData.orderIds = Array.from(new Set(orderIds)).toString();
+          }
+          if (orderNos?.length) {
+            commitData.orderNo = Array.from(new Set(orderNos)).toString();
+          }
           return commitData;
         } catch (error) {
           console.log(error);
@@ -692,8 +716,8 @@
       saveDate(data) {
         data.forEach((item) => {
           item['totalCount'] = item.measureQuantity;
-          item['qmsResult'] = item.result;
-          item['qmsStatus'] = item.status;
+          item['orderId'] = this.orderOption[0]?.orderId;
+          item['orderNo'] = this.orderOption[0]?.orderNo;
           this.productList.forEach((val) => {
             if (item.productCode == val.productCode) {
               item['singlePrice'] = val.singlePrice;

+ 17 - 0
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -140,6 +140,7 @@
       ref="inventoryTabledetailRef"
       :isDiscount="false"
       :isAllPrice="false"
+      :isOrderNo="true"
     ></inventoryTabledetail>
     <inventoryTable
       v-if="
@@ -194,6 +195,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             width: 200,
             prop: 'productName',
@@ -444,6 +453,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             minWidth: 160,
             prop: 'productCode',

+ 29 - 0
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -42,6 +42,19 @@
           </div>
         </div>
       </template>
+      <template v-slot:orderNo="{ row , $index}">
+        <el-form-item :prop="'datasource.' + $index + '.orderNo'">
+          <el-select v-model="row.orderNo" style="width: 100%">
+            <el-option
+              :label="item.orderNo"
+              :value="item.orderNo"
+              @click.native="orderNoChange(row, item)"
+              v-for="(item, index) in orderOption"
+              :key="index"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </template>
       <template v-slot:technicalDrawings="{ row, $index }">
         <el-form-item
           style="margin-bottom: 20px"
@@ -193,6 +206,11 @@
       entrustedCode: [Number, String],
       type: {
         default: ''
+      },
+      orderOption: {
+        default: () => {
+          return [];
+        }
       }
     },
     components: {
@@ -232,6 +250,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             minWidth: 160,
             prop: 'productCode',
@@ -513,6 +539,9 @@
           this.$refs.outboundDetailsDialogRef.init(row);
         });
       },
+      orderNoChange(row, item) {
+        row['orderId'] = item.orderId;
+      },
       //选择退货信息回调
       saveDate(data = []) {
         let totalWeight = data.reduce((num, row) => {

+ 8 - 0
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -158,6 +158,14 @@ export default {
           showOverflowTooltip: true,
           align: 'center'
         },
+        {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
         {
           minWidth: 120,
           prop: 'productName',

+ 8 - 0
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue

@@ -363,6 +363,14 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            minWidth: 200,
+            prop: 'orderNo',
+            slot: 'orderNo',
+            label: '订单编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'productName',