yusheng 1 yıl önce
ebeveyn
işleme
c296a4d686

+ 1 - 0
src/BIZComponents/innerdetails.vue

@@ -711,6 +711,7 @@
       },
       getValue() {
         return this.multipleSelection.map((item) => {
+          item['packageId'] = item.id;
           item['outInCode'] = item.bizNo;
           item['outboundType'] = item.outType;
           item['outboundDetailId'] = item.id;

+ 30 - 21
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.bizNo&&infoData.bizNo.toString() }}</span>
+                  <span>{{ infoData.bizNo && infoData.bizNo.toString() }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -118,9 +118,9 @@
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
-            
+
             <el-table-column
-             minWidth="150"
+              minWidth="150"
               label="出库单号"
               prop="bizNo"
               align="center"
@@ -259,7 +259,6 @@
               prop="purpose"
               :show-overflow-tooltip="true"
             ></el-table-column>
-     
           </el-table>
         </div>
         <div class="mt20">
@@ -275,9 +274,15 @@
             :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" 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"
@@ -641,25 +646,26 @@
           return { dictCode: item.id, dictValue: item.name };
         });
       },
-      async _getInfo(sourceBizNo,type,list=[]) {
+      async _getInfo(sourceBizNo, type, list = []) {
         const dataArray = await 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 = dataArray[0];
+          res.outInDetailList = dataArray.map(
+            (item) => item.outInDetailList[0]
+          );
+          res['bizNo'] = dataArray.map((item) => item.bizNo);
         }
         // 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];
             return {
               ...productItem,
               outInDetailRecordRequestList:
@@ -704,9 +710,9 @@
         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) {
@@ -714,6 +720,9 @@
       },
       getValue() {
         return this.multipleSelection.map((item) => {
+          item['outInCode'] = item.bizNo;
+          item['packageId'] = item.id;
+
           item['outInCode'] = item.bizNo;
           item['outboundType'] = item.outType;
           item['outboundDetailId'] = item.id;
@@ -721,7 +730,7 @@
           item['productCode'] = item.categoryCode;
           item['measuringUnit'] = item.measureUnit;
           item['productId'] = item.categoryId;
-          item['receiveTotalWeight']=item.weight;
+          item['receiveTotalWeight'] = item.weight;
           this.productList.forEach((val) => {
             if (item.categoryCode == val.categoryCode) {
               item['warehouseId'] = val.warehouseId;

+ 1 - 1
src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue

@@ -492,7 +492,7 @@
         this.innerboundDetailsDialogFlag = true;
         this.$nextTick(() => {
           let row = {
-            sendNo: this.form.receiveNo
+            code: this.form.receiveNo
           };
           this.$refs.innerboundDetailsDialogRef.init(row);
         });

+ 1 - 1
src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue

@@ -129,7 +129,7 @@
 
             <el-form-item label="审核状态:" prop="reviewStatus">
               <el-select
-                v-model="form.returnSourceType"
+                v-model="form.reviewStatus"
                 disabled
                 style="width: 100%"
               >

+ 764 - 681
src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue

@@ -23,15 +23,15 @@
           </el-button>
           <div class="pricebox">
             <span class="amount">总金额:{{ totalAmount }}元</span>
-<!--            <span>优惠后总金额:</span>-->
-<!--            <el-input-->
-<!--              v-model="payAmount"-->
-<!--              style="width: 150px"-->
-<!--              placeholder="请输入">-->
-<!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->
-
-<!--              <template slot="append">元</template>-->
-<!--            </el-input>-->
+            <!--            <span>优惠后总金额:</span>-->
+            <!--            <el-input-->
+            <!--              v-model="payAmount"-->
+            <!--              style="width: 150px"-->
+            <!--              placeholder="请输入">-->
+            <!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->
+
+            <!--              <template slot="append">元</template>-->
+            <!--            </el-input>-->
           </div>
         </div>
       </template>
@@ -79,24 +79,24 @@
           />
         </el-form-item>
       </template>
-<!--      <template v-slot:singlePrice="{ row, $index }">-->
-<!--        <el-form-item-->
-<!--          style="margin-bottom: 20px"-->
-<!--          :prop="'datasource.' + $index + '.singlePrice'"-->
-<!--        >-->
-<!--          <el-input-->
-<!--            type="number"-->
-<!--            clearable-->
-<!--            v-model="row.singlePrice"-->
-<!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
-<!--            placeholder="请输入"-->
-<!--          />-->
-<!--        </el-form-item>-->
-<!--      </template>-->
+      <!--      <template v-slot:singlePrice="{ row, $index }">-->
+      <!--        <el-form-item-->
+      <!--          style="margin-bottom: 20px"-->
+      <!--          :prop="'datasource.' + $index + '.singlePrice'"-->
+      <!--        >-->
+      <!--          <el-input-->
+      <!--            type="number"-->
+      <!--            clearable-->
+      <!--            v-model="row.singlePrice"-->
+      <!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
+      <!--            placeholder="请输入"-->
+      <!--          />-->
+      <!--        </el-form-item>-->
+      <!--      </template>-->
 
       <template v-slot:totalPrice="{ row, $index }">
         <el-form-item
-          v-if="returnSourceType==2"
+          v-if="returnSourceType == 2"
           style="margin-bottom: 20px"
           :prop="'datasource.' + $index + '.totalPrice'"
         >
@@ -108,10 +108,9 @@
             placeholder="请输入"
           />
         </el-form-item>
-        <span v-else>{{row.totalPrice}}</span>
+        <span v-else>{{ row.totalPrice }}</span>
       </template>
 
-
       <!-- <template v-slot:returnType="{ row, $index }">
         <el-form-item
           style="margin-bottom: 20px"
@@ -136,7 +135,7 @@
         >
           <el-input
             v-model="scope.row.totalCount"
-            @input="(val) => changeNum(val, scope.$index,scope.row)"
+            @input="(val) => changeNum(val, scope.$index, scope.row)"
           ></el-input>
         </el-form-item>
       </template>
@@ -145,21 +144,21 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
-        
         >
-          <el-input v-model="scope.row.sendTotalWeight" @blur="changeSendTotalWeight(scope.$index)"
-                    :disabled="!outsourceSendCode"
-                    style="width: 60%; margin-right: 10px">
-
+          <el-input
+            v-model="scope.row.sendTotalWeight"
+            @blur="changeSendTotalWeight(scope.$index)"
+            :disabled="!outsourceSendCode"
+            style="width: 60%; margin-right: 10px"
+          >
           </el-input>
           <el-button
             size="small"
             type="primary"
-            v-if="[2,3].includes(Number(sourceType))&&outsourceSendCode"
-            @click.native="(e)=>handleOutBound(e,scope.row,scope.$index)"
-          >选择
-          </el-button
-          >
+            v-if="[2, 3].includes(Number(sourceType)) && outsourceSendCode"
+            @click.native="(e) => handleOutBound(e, scope.row, scope.$index)"
+            >选择
+          </el-button>
         </el-form-item>
       </template>
       <!--   收货总重   -->
@@ -167,19 +166,19 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.receiveTotalWeight'"
-          
         >
-          <el-input v-model="scope.row.receiveTotalWeight" @blur="changeReceiveTotalWeight(scope.$index)"
-                    style="width: 60%; margin-right: 10px">
-
+          <el-input
+            v-model="scope.row.receiveTotalWeight"
+            @blur="changeReceiveTotalWeight(scope.$index)"
+            style="width: 60%; margin-right: 10px"
+          >
           </el-input>
           <el-button
             size="small"
             type="primary"
-            @click.native="(e)=>handleInnerBound(e,scope.row,scope.$index)"
-          >选择
-          </el-button
-          >
+            @click.native="(e) => handleInnerBound(e, scope.row, scope.$index)"
+            >选择
+          </el-button>
         </el-form-item>
       </template>
       <!-- <template v-slot:warehouseId="scope">
@@ -232,696 +231,780 @@
       @changeParent="changeParent"
     ></product-list>
     <!--出库详情-->
-    <outbound-details-dialog v-if="outboundDetailsDialogFlag" ref="outboundDetailsDialogRef"
-                             :outboundDetailsDialogFlag.sync="outboundDetailsDialogFlag"
-                             @saveDate="saveDate"></outbound-details-dialog>
+    <outbound-details-dialog
+      v-if="outboundDetailsDialogFlag"
+      ref="outboundDetailsDialogRef"
+      :outboundDetailsDialogFlag.sync="outboundDetailsDialogFlag"
+      @saveDate="saveDate"
+    ></outbound-details-dialog>
     <!--入库详情-->
-    <innertboundDetailsDialog v-if="innerboundDetailsDialogFlag" ref="innerboundDetailsDialogRef"
-                              :innerboundDetailsDialogFlag.sync="innerboundDetailsDialogFlag"
-                              @saveDate="saveInnerDate"></innertboundDetailsDialog>
+    <innertboundDetailsDialog
+      v-if="innerboundDetailsDialogFlag"
+      ref="innerboundDetailsDialogRef"
+      :innerboundDetailsDialogFlag.sync="innerboundDetailsDialogFlag"
+      @saveDate="saveInnerDate"
+    ></innertboundDetailsDialog>
   </el-form>
 </template>
 <script>
-import {numberReg} from 'ele-admin';
-import dictMixins from '@/mixins/dictMixins';
-import productList from '@/views/saleManage/saleOrder/invoice/components/product-list.vue';
-import {
-  // getWarehouseList,
-  getWarehouseOutStock
-} from '@/api/saleManage/saleorder';
-import outboundDetailsDialog from "@/views/purchasingManage/purchaseOrder/invoice/components/outboundDetailsDialog.vue";
-import innertboundDetailsDialog from './innerboundDetailsDialog.vue'
-
-export default {
-  mixins: [dictMixins],
-  props: {
-    receiveId: String,
-    payAmount: [Number, String],
-    returnSourceType: [Number, String],
-    pricingWay: [Number, String],
-    sourceType: [Number, String],
-    outsourceSendCode: [Number, String],
-    receiveNo: [Number, String],
-  },
-  components: {
-    outboundDetailsDialog,
-    innertboundDetailsDialog,
-    productList
-  },
-  data() {
-    const defaultForm = {
-      key: null,
-      endTime: '',
-      isFirst: 0,
-      name: '',
-      startTime: '',
-      workHour: '',
-      technicalDrawings: []
-    };
-    return {
-      discountTotalPrice: 0.0,
-      allPrice: 0.0,
-      totalAmount: 0.0,
-      outboundDetailsDialogFlag: false,
-      innerboundDetailsDialogFlag: false,
-      numberReg,
-      defaultForm,
-      // warehouseList: [],
-      form: {
-        datasource: []
-      },
-      rules: {},
-
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          width: 200,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'productCode',
-          label: '编码',
-          slot: 'productCode',
-          align: "center"
-        },
-        {
-          width: 200,
-          prop: 'productCategoryName',
-          label: '类型',
-          slot: 'productCategoryName',
-          align: "center"
-        },
-        {
-          width: 160,
-          prop: 'productBrand',
-          label: '牌号',
-          slot: 'productBrand',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'imgCode',
-          align: 'center',
-          label: '图号/件号',
-          showOverflowTooltip: true
-        },
-        {
-          width: 120,
-          prop: 'produceType',
-          align: 'center',
-          label: '生产类型',
-          showOverflowTooltip: true
-        },
-        {
-          width: 120,
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true
-        },
-        {
-          width: 120,
-          prop: 'packingSpecification',
-          align: 'center',
-          label: '包装规格',
-          showOverflowTooltip: true
-        },
-        {
-          width: 150,
-          prop: 'taskName',
-          label: '工序',
-          slot: 'taskName',
-          align: "center"
-        },
-        {
-          width: 110,
-          prop: 'batchNo',
-          label: '批次号',
-          slot: 'batchNo',
-          align: "center",
-        },
-        {
-          width: 200,
-          prop: 'warehouseName',
-          label: '仓库名称',
-          slot: 'warehouseName',
-          align: "center",
-        },
-        {
-          width: 100,
-          prop: 'warehouseNum',
-          label: '库存',
-          slot: 'warehouseNum',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'receiveTotalCount',
-          label: '收货数量',
-          slot: 'receiveTotalCount',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'totalCount',
-          label: '退货数量',
-          slot: 'totalCount',
-          headerSlot: 'headerTotalCount',
-          align: "center"
-        },
-        {
-          width: 80,
-          prop: 'measuringUnit',
-          label: '计量单位',
-          slot: 'measuringUnit',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'singleWeight',
-          label: '单重',
-          slot: 'singleWeight',
-          align: "center"
-        },
-        {
-          width: 200,
-          prop: 'sendTotalWeight',
-          label: '发货总重',
-          slot: 'sendTotalWeight',
-          align: "center",
-          headerSlot: 'headerSendTotalWeight'
-        },
-        {
-          width: 200,
-          prop: 'receiveTotalWeight',
-          label: '收货总重',
-          slot: 'receiveTotalWeight',
-          align: "center",
-          headerSlot: 'headerSendTotalWeight'
-        },
-        {
-          width: 100,
-          prop: 'increaseTotalWeight',
-          label: '增重重量',
-          slot: 'increaseTotalWeight',
-          align: "center"
+  import { numberReg } from 'ele-admin';
+  import dictMixins from '@/mixins/dictMixins';
+  import productList from '@/views/saleManage/saleOrder/invoice/components/product-list.vue';
+  import {
+    // getWarehouseList,
+    getWarehouseOutStock
+  } from '@/api/saleManage/saleorder';
+  import outboundDetailsDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/outboundDetailsDialog.vue';
+  import innertboundDetailsDialog from './innerboundDetailsDialog.vue';
+
+  export default {
+    mixins: [dictMixins],
+    props: {
+      receiveId: String,
+      payAmount: [Number, String],
+      returnSourceType: [Number, String],
+      pricingWay: [Number, String],
+      sourceType: [Number, String],
+      outsourceSendCode: [Number, String],
+      receiveNo: [Number, String]
+    },
+    components: {
+      outboundDetailsDialog,
+      innertboundDetailsDialog,
+      productList
+    },
+    data() {
+      const defaultForm = {
+        key: null,
+        endTime: '',
+        isFirst: 0,
+        name: '',
+        startTime: '',
+        workHour: '',
+        technicalDrawings: []
+      };
+      return {
+        discountTotalPrice: 0.0,
+        allPrice: 0.0,
+        totalAmount: 0.0,
+        outboundDetailsDialogFlag: false,
+        innerboundDetailsDialogFlag: false,
+        numberReg,
+        defaultForm,
+        // warehouseList: [],
+        form: {
+          datasource: []
         },
-        {
+        rules: {},
+
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 200,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'productCategoryName',
+            label: '类型',
+            slot: 'productCategoryName',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'imgCode',
+            align: 'center',
+            label: '图号/件号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'produceType',
+            align: 'center',
+            label: '生产类型',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'approvalNumber',
+            align: 'center',
+            label: '批准文号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
+          },
+          {
+            width: 150,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'warehouseName',
+            label: '仓库名称',
+            slot: 'warehouseName',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'warehouseNum',
+            label: '库存',
+            slot: 'warehouseNum',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'receiveTotalCount',
+            label: '收货数量',
+            slot: 'receiveTotalCount',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalCount',
+            label: '退货数量',
+            slot: 'totalCount',
+            headerSlot: 'headerTotalCount',
+            align: 'center'
+          },
+          {
+            width: 80,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            slot: 'measuringUnit',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'singleWeight',
+            label: '单重',
+            slot: 'singleWeight',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'sendTotalWeight',
+            label: '发货总重',
+            slot: 'sendTotalWeight',
+            align: 'center',
+            headerSlot: 'headerSendTotalWeight'
+          },
+          {
+            width: 200,
+            prop: 'receiveTotalWeight',
+            label: '收货总重',
+            slot: 'receiveTotalWeight',
+            align: 'center',
+            headerSlot: 'headerSendTotalWeight'
+          },
+          {
+            width: 100,
+            prop: 'increaseTotalWeight',
+            label: '增重重量',
+            slot: 'increaseTotalWeight',
+            align: 'center'
+          },
+          {
             width: 160,
             prop: 'pricingWay',
             label: '计价方式',
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
-        {
-          width: 160,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice',
-          align: "center"
-        },
-        {
+          {
+            width: 160,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
             width: 120,
             prop: 'taxRate',
             label: '税率',
             slot: 'taxRate',
-            align: 'center',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'discountSinglePrice',
+            label: '折后单价',
+            slot: 'discountSinglePrice',
+            align: 'center'
+          },
+          {
+            width: 140,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'discountTotalPrice',
+            label: '折后合计',
+            slot: 'discountTotalPrice',
+            align: 'center'
           },
-        {
-          width: 160,
-          prop: 'discountSinglePrice',
-          label: '折后单价',
-          slot: 'discountSinglePrice',
-          align: "center"
-        },
-        {
-          width: 140,
-          prop: 'totalPrice',
-          label: '合计',
-          slot: 'totalPrice',
-          align: "center",
-        },
-        {
-          width: 120,
-          prop: 'discountTotalPrice',
-          label: '折后合计',
-          slot: 'discountTotalPrice',
-          align: "center"
-        },
-
-        {
-          width: 200,
-          prop: 'returnReason',
-          label: '退货原因',
-          slot: 'returnReason',
-          align: "center"
-        },
-        // {
-        //   width: 140,
-        //   prop: 'returnType',
-        //   label: '退货类型',
-        //   slot: 'returnType'
-        // },
-
-        // {
-        //   width: 80,
-        //   prop: 'deliveryDays',
-        //   label: '交期(天)',
-        //   slot: 'deliveryDays'
-        // },
-        // {
-        //   width: 200,
-        //   prop: 'guaranteePeriod',
-        //   label: '质保期',
-        //   slot: 'guaranteePeriod'
-        // },
 
-        // {
-        //   width: 130,
-        //   prop: 'technicalAnswerName',
-        //   label: '技术答疑人',
-        //   slot: 'technicalAnswerName'
-        // },
-        // {
-        //   width: 220,
-        //   prop: 'technicalParams',
-        //   label: '技术参数',
-        //   slot: 'technicalParams'
-        // },
-        // {
-        //   width: 240,
-        //   prop: 'technicalDrawings',
-        //   label: '技术图纸',
-        //   slot: 'technicalDrawings'
-        // },
-        {
-          width: 220,
-          prop: 'remark',
-          label: '备注',
-          slot: 'remark',
-          align: "center"
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 120,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          fixed: 'right',
-          showOverflowTooltip: true
-        }
-      ]
-    };
-  },
-  computed: {
-    contractId() {
-      return this.$store.state.order.contractId;
-    }
-  },
-  created() {
-    // getWarehouseList().then((res) => {
-    //   this.warehouseList = res;
-    // });
-  },
-  methods: {
-    changeNumSinglePrice(val,index){
-      if(!val){
-        this.$set(this.form.datasource[index], 'singlePrice', 0)
-        this.$set(this.form.datasource[index], 'discountSinglePrice', 0)
-      }else {
-        this.$set(this.form.datasource[index], 'discountSinglePrice', val)
-      }
-      let totalCount = this.form.datasource[index].totalCount
-      this.changeNum(totalCount,index,this.form.datasource[index])
+          {
+            width: 200,
+            prop: 'returnReason',
+            label: '退货原因',
+            slot: 'returnReason',
+            align: 'center'
+          },
+          // {
+          //   width: 140,
+          //   prop: 'returnType',
+          //   label: '退货类型',
+          //   slot: 'returnType'
+          // },
+
+          // {
+          //   width: 80,
+          //   prop: 'deliveryDays',
+          //   label: '交期(天)',
+          //   slot: 'deliveryDays'
+          // },
+          // {
+          //   width: 200,
+          //   prop: 'guaranteePeriod',
+          //   label: '质保期',
+          //   slot: 'guaranteePeriod'
+          // },
+
+          // {
+          //   width: 130,
+          //   prop: 'technicalAnswerName',
+          //   label: '技术答疑人',
+          //   slot: 'technicalAnswerName'
+          // },
+          // {
+          //   width: 220,
+          //   prop: 'technicalParams',
+          //   label: '技术参数',
+          //   slot: 'technicalParams'
+          // },
+          // {
+          //   width: 240,
+          //   prop: 'technicalDrawings',
+          //   label: '技术图纸',
+          //   slot: 'technicalDrawings'
+          // },
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 120,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            fixed: 'right',
+            showOverflowTooltip: true
+          }
+        ]
+      };
     },
-    changeTotalPrice(val,index){
-      if(!val){
-        this.$set(this.form.datasource[index], 'totalPrice', 0)
-        this.$set(this.form.datasource[index], 'discountTotalPrice', 0)
-      }else {
-        this.$set(this.form.datasource[index], 'discountTotalPrice', val)
+    computed: {
+      contractId() {
+        return this.$store.state.order.contractId;
       }
-      this.gettotalAmount()
     },
-    //修改数量更新合计/总重
-    changeNum(val, index,row) {
-      this.curIndex = index
-      if (row.pricingWay == 2) {
-        if (val != this.form.datasource[index].receiveTotalCount) {
-          this.$set(this.form.datasource[index], 'sendTotalWeight', '')
-          this.$set(this.form.datasource[index], 'receiveTotalWeight', '')
-          this.$set(this.form.datasource[index], 'increaseTotalWeight', '')
-          this.getWeightPrice()
+    created() {
+      // getWarehouseList().then((res) => {
+      //   this.warehouseList = res;
+      // });
+    },
+    methods: {
+      changeNumSinglePrice(val, index) {
+        if (!val) {
+          this.$set(this.form.datasource[index], 'singlePrice', 0);
+          this.$set(this.form.datasource[index], 'discountSinglePrice', 0);
         } else {
-          let find = this.oldSendTotalWeightList.find(key => key.productCode == this.form.datasource[index].productCode) || {}
-          this.$set(this.form.datasource[index], 'sendTotalWeight', find.oldSendTotalWeight)
-          this.$set(this.form.datasource[index], 'receiveTotalWeight', find.oldReceiveTotalWeight)
-          this.setIcreaseTotalWeight()
+          this.$set(this.form.datasource[index], 'discountSinglePrice', val);
         }
-      } else {
-        if (val != this.form.datasource[index].receiveTotalCount) {
-          this.$set(this.form.datasource[index], 'sendTotalWeight', '')
-          this.$set(this.form.datasource[index], 'receiveTotalWeight', '')
-          this.$set(this.form.datasource[index], 'increaseTotalWeight', '')
+        let totalCount = this.form.datasource[index].totalCount;
+        this.changeNum(totalCount, index, this.form.datasource[index]);
+      },
+      changeTotalPrice(val, index) {
+        if (!val) {
+          this.$set(this.form.datasource[index], 'totalPrice', 0);
+          this.$set(this.form.datasource[index], 'discountTotalPrice', 0);
         } else {
-          let find = this.oldSendTotalWeightList.find(key => key.productCode == this.form.datasource[index].productCode) || {}
-          this.$set(this.form.datasource[index], 'sendTotalWeight', find.oldSendTotalWeight)
-          this.$set(this.form.datasource[index], 'receiveTotalWeight', find.oldReceiveTotalWeight)
-          this.setIcreaseTotalWeight()
+          this.$set(this.form.datasource[index], 'discountTotalPrice', val);
         }
-
-        this.$set(this.form.datasource[index], 'totalPrice', (Number(this.form.datasource[index].singlePrice) * val).toFixed(2));
-        this.$set(this.form.datasource[index], 'discountTotalPrice', (Number(this.form.datasource[index].discountSinglePrice) * val).toFixed(2));
-
-        this.$store.commit('returnGoods/setIsDefaultPayableAmount', false);
         this.gettotalAmount();
-      }
-    },
-    getWeightPrice() {
-      let increaseTotalWeight = this.form.datasource[this.curIndex].increaseTotalWeight
-      let singlePrice = this.form.datasource[this.curIndex].singlePrice
-      let discountSinglePrice = this.form.datasource[this.curIndex].discountSinglePrice
-      this.$set(this.form.datasource[this.curIndex], 'totalPrice', (Number(increaseTotalWeight) * Number(singlePrice)).toFixed(2));
-      this.$set(this.form.datasource[this.curIndex], 'discountTotalPrice', (Number(discountSinglePrice) * Number(increaseTotalWeight)).toFixed(2));
-      this.gettotalAmount();
-    },
+      },
+      //修改数量更新合计/总重
+      changeNum(val, index, row) {
+        this.curIndex = index;
+        if (row.pricingWay == 2) {
+          if (val != this.form.datasource[index].receiveTotalCount) {
+            this.$set(this.form.datasource[index], 'sendTotalWeight', '');
+            this.$set(this.form.datasource[index], 'receiveTotalWeight', '');
+            this.$set(this.form.datasource[index], 'increaseTotalWeight', '');
+            this.getWeightPrice();
+          } else {
+            let find =
+              this.oldSendTotalWeightList.find(
+                (key) =>
+                  key.productCode == this.form.datasource[index].productCode
+              ) || {};
+            this.$set(
+              this.form.datasource[index],
+              'sendTotalWeight',
+              find.oldSendTotalWeight
+            );
+            this.$set(
+              this.form.datasource[index],
+              'receiveTotalWeight',
+              find.oldReceiveTotalWeight
+            );
+            this.setIcreaseTotalWeight();
+          }
+        } else {
+          if (val != this.form.datasource[index].receiveTotalCount) {
+            this.$set(this.form.datasource[index], 'sendTotalWeight', '');
+            this.$set(this.form.datasource[index], 'receiveTotalWeight', '');
+            this.$set(this.form.datasource[index], 'increaseTotalWeight', '');
+          } else {
+            let find =
+              this.oldSendTotalWeightList.find(
+                (key) =>
+                  key.productCode == this.form.datasource[index].productCode
+              ) || {};
+            this.$set(
+              this.form.datasource[index],
+              'sendTotalWeight',
+              find.oldSendTotalWeight
+            );
+            this.$set(
+              this.form.datasource[index],
+              'receiveTotalWeight',
+              find.oldReceiveTotalWeight
+            );
+            this.setIcreaseTotalWeight();
+          }
 
-    //出库单详情
-    handleOutBound(e, rows, index) {
-      this.curIndex = index
-      this.outboundDetailsDialogFlag = true
-      this.$nextTick(() => {
-        let row = {
-          sendNo: this.outsourceSendCode,
-          productCode: rows.productCode
+          this.$set(
+            this.form.datasource[index],
+            'totalPrice',
+            (Number(this.form.datasource[index].singlePrice) * val).toFixed(2)
+          );
+          this.$set(
+            this.form.datasource[index],
+            'discountTotalPrice',
+            (
+              Number(this.form.datasource[index].discountSinglePrice) * val
+            ).toFixed(2)
+          );
+
+          this.$store.commit('returnGoods/setIsDefaultPayableAmount', false);
+          this.gettotalAmount();
         }
-        this.$refs.outboundDetailsDialogRef.init(row)
-      })
-    },
-    //选择退货信息回调
-    saveDate(data = []) {
-      let totalWeight = data.reduce((num, row) => {
-        num += Number(row.weight)
-        return num
-      }, 0)
-      this.$set(this.form.datasource[this.curIndex], 'sendTotalWeight', totalWeight);
-      this.setIcreaseTotalWeight()
-    },
+      },
+      getWeightPrice() {
+        let increaseTotalWeight =
+          this.form.datasource[this.curIndex].increaseTotalWeight;
+        let singlePrice = this.form.datasource[this.curIndex].singlePrice;
+        let discountSinglePrice =
+          this.form.datasource[this.curIndex].discountSinglePrice;
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'totalPrice',
+          (Number(increaseTotalWeight) * Number(singlePrice)).toFixed(2)
+        );
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'discountTotalPrice',
+          (Number(discountSinglePrice) * Number(increaseTotalWeight)).toFixed(2)
+        );
+        this.gettotalAmount();
+      },
 
-    //入库单详情
-    handleInnerBound(e, rows, index) {
-      this.curIndex = index
-      this.innerboundDetailsDialogFlag = true
-      this.$nextTick(() => {
-        let row = {
-          sendNo: this.receiveNo,
-          productCode: rows.productCode
-        }
-        this.$refs.innerboundDetailsDialogRef.init(row)
-      })
-    },
-    //选择入库单信息
-    saveInnerDate(data = []) {
-      let totalWeight = data.reduce((num, row) => {
-        num += Number(row.weight)
-        return num
-      }, 0)
-      this.$set(this.form.datasource[this.curIndex], 'receiveTotalWeight', totalWeight);
-      this.setIcreaseTotalWeight()
-    },
-    //修改发货总重
-    changeSendTotalWeight(index) {
-      this.curIndex = index
-      this.setIcreaseTotalWeight()
-    },
-    //修改收货总重
-    changeReceiveTotalWeight(index) {
-      this.curIndex = index
-      this.setIcreaseTotalWeight()
-    },
-    //设置增重总重
-    setIcreaseTotalWeight() {
-      let receiveTotalWeight = Number(this.form.datasource[this.curIndex].receiveTotalWeight)||0
-      let sendTotalWeight = Number(this.form.datasource[this.curIndex].sendTotalWeight)||0
-      if ([2, 3].includes(Number(this.sourceType))) {
-        if (this.form.datasource[this.curIndex].pricingWay == 2) {
-          if ((isNaN(receiveTotalWeight) || isNaN(sendTotalWeight))) {
-            return this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', '');
+      //出库单详情
+      handleOutBound(e, rows, index) {
+        this.curIndex = index;
+        this.outboundDetailsDialogFlag = true;
+        this.$nextTick(() => {
+          let row = {
+            sendNo: this.outsourceSendCode,
+            productCode: rows.productCode
+          };
+          this.$refs.outboundDetailsDialogRef.init(row);
+        });
+      },
+      //选择退货信息回调
+      saveDate(data = []) {
+        let totalWeight = data.reduce((num, row) => {
+          num += Number(row.weight);
+          return num;
+        }, 0);
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'sendTotalWeight',
+          totalWeight
+        );
+        this.setIcreaseTotalWeight();
+      },
+
+      //入库单详情
+      handleInnerBound(e, rows, index) {
+        this.curIndex = index;
+        this.innerboundDetailsDialogFlag = true;
+        this.$nextTick(() => {
+          let row = {
+            sendNo: this.receiveNo,
+            productCode: rows.productCode
+          };
+          this.$refs.innerboundDetailsDialogRef.init(row);
+        });
+      },
+      //选择入库单信息
+      saveInnerDate(data = []) {
+        let totalWeight = data.reduce((num, row) => {
+          num += Number(row.weight);
+          return num;
+        }, 0);
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'receiveTotalWeight',
+          totalWeight
+        );
+        this.setIcreaseTotalWeight();
+      },
+      //修改发货总重
+      changeSendTotalWeight(index) {
+        this.curIndex = index;
+        this.setIcreaseTotalWeight();
+      },
+      //修改收货总重
+      changeReceiveTotalWeight(index) {
+        this.curIndex = index;
+        this.setIcreaseTotalWeight();
+      },
+      //设置增重总重
+      setIcreaseTotalWeight() {
+        let receiveTotalWeight =
+          Number(this.form.datasource[this.curIndex].receiveTotalWeight) || 0;
+        let sendTotalWeight =
+          Number(this.form.datasource[this.curIndex].sendTotalWeight) || 0;
+        if ([2, 3].includes(Number(this.sourceType))) {
+          if (this.form.datasource[this.curIndex].pricingWay == 2) {
+            if (isNaN(receiveTotalWeight) || isNaN(sendTotalWeight)) {
+              return this.$set(
+                this.form.datasource[this.curIndex],
+                'increaseTotalWeight',
+                ''
+              );
+            } else {
+              this.$set(
+                this.form.datasource[this.curIndex],
+                'increaseTotalWeight',
+                (receiveTotalWeight - sendTotalWeight).toFixed(2)
+              );
+            }
           } else {
-            this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (receiveTotalWeight - sendTotalWeight).toFixed(2));
+            this.$set(
+              this.form.datasource[this.curIndex],
+              'increaseTotalWeight',
+              (receiveTotalWeight - sendTotalWeight).toFixed(2)
+            );
           }
         } else {
-          this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (receiveTotalWeight - sendTotalWeight).toFixed(2));
+          this.$set(
+            this.form.datasource[this.curIndex],
+            'increaseTotalWeight',
+            receiveTotalWeight
+          );
         }
-      } else {
-        this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', receiveTotalWeight);
-      }
-      if (this.form.datasource[this.curIndex].pricingWay == 2) {
-        this.getWeightPrice()
-      }
-
-    },
-    //获取订单总金额
-    gettotalAmount() {
-      let productData = this.form.datasource;
-      if (productData.length) {
-        let sum = productData
-          .reduce((sum, item) => {
-            return sum + Number(item.totalPrice);
-          }, 0).toFixed(2);
-        this.totalAmount = productData.reduce((sum, item) => {
-          return sum + Number(item.discountTotalPrice);
-        }, 0).toFixed(2)
-        this.$emit('update:payAmount', this.totalAmount)
-        this.$store.commit('returnGoods/setAllcountAmount', sum);
-      } else {
-        this.$store.commit('returnGoods/setAllcountAmount', 0);
-      }
-    },
-    //选择产品回调
-    async changeParent(obj, idx) {
-      obj.receiveTotalCount = obj.totalCount;
-      obj.receiveProductId = obj.id;
-      obj.id = ''
+        if (this.form.datasource[this.curIndex].pricingWay == 2) {
+          this.getWeightPrice();
+        }
+      },
+      //获取订单总金额
+      gettotalAmount() {
+        let productData = this.form.datasource;
+        if (productData.length) {
+          let sum = productData
+            .reduce((sum, item) => {
+              return sum + Number(item.totalPrice);
+            }, 0)
+            .toFixed(2);
+          this.totalAmount = productData
+            .reduce((sum, item) => {
+              return sum + Number(item.discountTotalPrice);
+            }, 0)
+            .toFixed(2);
+          this.$emit('update:payAmount', this.totalAmount);
+          this.$store.commit('returnGoods/setAllcountAmount', sum);
+        } else {
+          this.$store.commit('returnGoods/setAllcountAmount', 0);
+        }
+      },
+      //选择产品回调
+      async changeParent(obj, idx) {
+        obj.receiveTotalCount = obj.totalCount;
+        obj.receiveProductId = obj.id;
+        obj.id = '';
+
+        if (obj.warehouseId) {
+          obj['warehouseNum'] = await getWarehouseOutStock({
+            warehouseId: obj.warehouseId,
+            code: obj.productCode
+          });
+        }
+        this.$set(this.form.datasource, this.form.datasource.length, obj);
+      },
 
-      if (obj.warehouseId) {
-        obj['warehouseNum'] = await getWarehouseOutStock({
-          warehouseId: obj.warehouseId,
-          code: obj.productCode
+      // async warehouseChange(index, row) {
+      //   let warehouseIds =
+      //     this.form.datasource
+      //       .filter(
+      //         (item, i) => row.productCode == item.productCode && index != i
+      //       )
+      //       .map((item) => item.warehouseId) || [];
+      //   const data = this.warehouseList.find(
+      //     (item) => item.id == row.warehouseId
+      //   );
+      //   if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
+      //     row.warehouseId = '';
+      //     return this.$message.error('同一个产品不能选择相同的仓库');
+      //   }
+
+      //   this.$set(this.form.datasource[index], 'warehouseName', data.name);
+      //   this.$set(this.form.datasource[index], 'warehouseCode', data.code);
+      //   const warehouseOutStock = await getWarehouseOutStock({
+      //     warehouseId: data.id,
+      //     code: row.productCode
+      //   });
+      //   this.$set(
+      //     this.form.datasource[index],
+      //     'warehouseNum',
+      //     warehouseOutStock
+      //   );
+      // },
+
+      validateTotalCount(row) {
+        return (rule, value, callback) => {
+          if (isNaN(value) || Number(value) <= 0) {
+            this.$message.error('请输入大于0的数');
+            callback(new Error('请输入大于0的数字'));
+            // else if (Number(value) > row.receiveTotalCount) {
+            //     this.$message.error('退货数量不能大于收货数量');
+            //     callback(new Error('退货数量不能大于收货数量'));
+            //   }
+          } else {
+            callback();
+          }
+        };
+      },
+      // else if (this.getTotalCount(row)> row.warehouseNum) {
+      //       this.$message.error('退货数量不能大于库存');
+      //       callback(new Error('退货数量不能大于库存'));
+      //     }
+      getTotalCount(row) {
+        let num = 0;
+        this.form.datasource
+          .filter((item) => item.warehouseId == row.warehouseId)
+          .forEach((item) => {
+            num += Number(item.totalCount);
+          });
+
+        return num;
+      },
+      // 返回列表数据
+      getTableValue() {
+        let comitDatasource = this.form.datasource;
+        if (comitDatasource.length === 0) return [];
+        comitDatasource.forEach((v) => {
+          v.totalCount = Number(v.totalCount);
+          v.technicalDrawings = Array.isArray(v.technicalDrawings)
+            ? v.technicalDrawings
+            : [];
         });
-      }
-      this.$set(this.form.datasource, this.form.datasource.length, obj);
-    },
-
-    // async warehouseChange(index, row) {
-    //   let warehouseIds =
-    //     this.form.datasource
-    //       .filter(
-    //         (item, i) => row.productCode == item.productCode && index != i
-    //       )
-    //       .map((item) => item.warehouseId) || [];
-    //   const data = this.warehouseList.find(
-    //     (item) => item.id == row.warehouseId
-    //   );
-    //   if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
-    //     row.warehouseId = '';
-    //     return this.$message.error('同一个产品不能选择相同的仓库');
-    //   }
-
-    //   this.$set(this.form.datasource[index], 'warehouseName', data.name);
-    //   this.$set(this.form.datasource[index], 'warehouseCode', data.code);
-    //   const warehouseOutStock = await getWarehouseOutStock({
-    //     warehouseId: data.id,
-    //     code: row.productCode
-    //   });
-    //   this.$set(
-    //     this.form.datasource[index],
-    //     'warehouseNum',
-    //     warehouseOutStock
-    //   );
-    // },
+        return comitDatasource;
+      },
+      getPrice() {
+        return [this.allPrice];
+      },
 
-    validateTotalCount(row) {
-      return (rule, value, callback) => {
-        if (isNaN(value) || Number(value) <= 0) {
-          this.$message.error('请输入大于0的数');
-          callback(new Error('请输入大于0的数字'));
-        // else if (Number(value) > row.receiveTotalCount) {
-        //     this.$message.error('退货数量不能大于收货数量');
-        //     callback(new Error('退货数量不能大于收货数量'));
-        //   }
-        }  else {
-          callback();
+      //修改回显
+      putTableValue(data) {
+        if (data) {
+          data.forEach((v, index) => {
+            v.receiveTotalCount = v.receiveTotalCount || v.totalCount;
+            v.receiveProductId = v.receiveProductId || v.id;
+          });
+          this.oldSendTotalWeightList = data.map((item) => {
+            return {
+              productCode: item.productCode,
+              oldSendTotalWeight: item.sendTotalWeight,
+              oldReceiveTotalWeight: item.receiveTotalWeight
+            };
+          });
+          this.form.datasource = data;
+          this.form.datasource.forEach(async (v, index) => {
+            if (v.warehouseId) {
+              this.$set(
+                this.form.datasource[index],
+                'warehouseNum',
+                await getWarehouseOutStock({
+                  warehouseId: v.warehouseId,
+                  code: v.productCode
+                })
+              );
+            }
+          });
+          this.gettotalAmount();
         }
-      };
-    },
-    // else if (this.getTotalCount(row)> row.warehouseNum) {
-    //       this.$message.error('退货数量不能大于库存');
-    //       callback(new Error('退货数量不能大于库存'));
-    //     }
-    getTotalCount(row) {
-      let num = 0;
-      this.form.datasource.filter(item => item.warehouseId == row.warehouseId).forEach(item => {
-        num += Number(item.totalCount)
-      })
-
-      return num;
-    },
-    // 返回列表数据
-    getTableValue() {
-      let comitDatasource = this.form.datasource;
-      if (comitDatasource.length === 0) return [];
-      comitDatasource.forEach((v) => {
-        v.totalCount = Number(v.totalCount);
-        v.technicalDrawings = Array.isArray(v.technicalDrawings)
-          ? v.technicalDrawings
-          : [];
-      });
-      return comitDatasource;
-    },
-    getPrice() {
-      return [this.allPrice];
-    },
+      },
 
-    //修改回显
-    putTableValue(data) {
-      if (data) {
-        data.forEach((v, index) => {
-          v.receiveTotalCount = v.receiveTotalCount || v.totalCount;
-          v.receiveProductId = v.receiveProductId || v.id;
-        });
-        this.oldSendTotalWeightList = data.map(item => {
-          return {
-            productCode: item.productCode,
-            oldSendTotalWeight: item.sendTotalWeight,
-            oldReceiveTotalWeight: item.receiveTotalWeight
-          }
-        })
-        this.form.datasource = data;
-        this.form.datasource.forEach(async (v, index) => {
-          if (v.warehouseId) {
-            this.$set(
-              this.form.datasource[index], 'warehouseNum',
-              await getWarehouseOutStock({
-                warehouseId: v.warehouseId,
-                code: v.productCode
-              })
-            );
-          }
+      remove(row) {
+        let index = this.form.datasource.findIndex((n) => n.key == row.key);
+        if (index !== -1) {
+          this.form.datasource.splice(index, 1);
+          this.setSort();
+          this.gettotalAmount();
+        }
+      },
+      // 清空表格
+      restTable() {
+        this.form.datasource = [];
+      },
+      // 重新排序
+      setSort() {
+        this.form.datasource.forEach((n, index) => {
+          n.key = index + 1;
         });
-        this.gettotalAmount();
-      }
-    },
+      },
+      // 添加
+      handlAdd() {
+        if (!this.receiveId) return this.$message.error('请先选择收货单');
+        this.$refs.productListRef.open(this.form.datasource);
+      },
 
-    remove(row) {
-      let index = this.form.datasource.findIndex((n) => n.key == row.key);
-      if (index !== -1) {
-        this.form.datasource.splice(index, 1);
-        this.setSort();
-        this.gettotalAmount();
+      validateForm(callback) {
+        //开始表单校验
+        this.$refs.form.validate((valid) => {
+          callback(valid);
+        });
       }
-    },
-    // 清空表格
-    restTable() {
-      this.form.datasource = [];
-    },
-    // 重新排序
-    setSort() {
-      this.form.datasource.forEach((n, index) => {
-        n.key = index + 1;
-      });
-    },
-    // 添加
-    handlAdd() {
-      if (!this.receiveId) return this.$message.error('请先选择收货单');
-      this.$refs.productListRef.open(this.form.datasource);
-    },
-
-    validateForm(callback) {
-      //开始表单校验
-      this.$refs.form.validate((valid) => {
-        callback(valid);
-      });
     }
-  }
-};
+  };
 </script>
 <style lang="scss" scoped>
-.headbox {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    padding-right: 30px;
+  .headbox {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      padding-right: 30px;
+    }
   }
-}
 
-.time-form .el-form-item {
-  margin-bottom: 0 !important;
-}
+  .time-form .el-form-item {
+    margin-bottom: 0 !important;
+  }
 
-::v-deep .period {
-  display: flex;
+  ::v-deep .period {
+    display: flex;
 
-  .borderleftnone {
-    .el-input--medium .el-input__inner {
-      border-top-right-radius: 0;
-      border-bottom-right-radius: 0;
+    .borderleftnone {
+      .el-input--medium .el-input__inner {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+      }
     }
-  }
 
-  .borderrightnone {
-    .el-input--medium .el-input__inner {
-      border-top-left-radius: 0;
-      border-bottom-left-radius: 0;
+    .borderrightnone {
+      .el-input--medium .el-input__inner {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+      }
     }
   }
-}
 
-::v-deep .time-form tbody > tr:hover > td {
-  background-color: transparent !important;
-}
+  ::v-deep .time-form tbody > tr:hover > td {
+    background-color: transparent !important;
+  }
 
-::v-deep .time-form .el-table tr {
-  background-color: #ffffff;
-}
+  ::v-deep .time-form .el-table tr {
+    background-color: #ffffff;
+  }
 
-.pricebox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  font-weight: bold;
-}
+  .pricebox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    font-weight: bold;
+  }
 </style>

+ 33 - 7
src/views/saleManage/saleOrder/exceptionManagement/components/addOrEditDialog.vue

@@ -15,7 +15,22 @@
         @setFullscreen="fullscreen = !fullscreen"
       ></modalTitle>
     </template>
-    <el-form ref="form" :model="form" label-width="120px" class="el-form-box">
+    <div class="switch" v-if="title!='处置'">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="activeComp=item.key"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+
+    <el-form ref="form" :model="form" label-width="120px" class="el-form-box" v-if="activeComp=='main'">
       <headerTitle title="基本信息"></headerTitle>
 
       <el-row :gutter="12">
@@ -68,9 +83,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-    </el-form>
-
-    <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
+      <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
     <ele-pro-table
       ref="table"
       :needPage="false"
@@ -96,6 +109,9 @@
         </el-select>
       </template>
     </ele-pro-table>
+    </el-form>
+
+
 
     <div slot="footer" class="footer">
       <el-button
@@ -115,7 +131,11 @@
 
       <el-button @click="cancel">返回</el-button>
     </div>
-
+    <bpmDetail
+      :key="activeComp"
+      v-if="activeComp === 'bpm' && form.processInstanceId"
+      :id="form.processInstanceId"
+    ></bpmDetail>
     <process-submit-dialog
       :isNotNeedProcess="false"
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
@@ -132,14 +152,20 @@
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import { relationType } from '@/enum/dict.js';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
-
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   export default {
     mixins: [dictMixins],
     components: {
-      processSubmitDialog,modalTitle
+      processSubmitDialog,modalTitle,bpmDetail
     },
     data() {
       return {
+        activeComp: 'main',
+        tabOptions: [
+          { key: 'main', name: '处置详情' },
+          { key: 'bpm', name: '流程详情' },
+       
+        ],
         title: '',
         addOrEditDialogFlag: false,
         fullscreen: false,

+ 12 - 34
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -94,15 +94,8 @@
           </el-form-item>
         </el-col>
       </el-row>
+
       <el-row :gutter="12">
-        <el-col :span="12">
-          <el-form-item label="计价方式">
-            <el-select v-model="form.pricingWay" disabled style="width: 100%">
-              <el-option label="按数量计费" :value="1"></el-option>
-              <el-option label="按重量计费" :value="2"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
         <el-col :span="12">
           <el-form-item label="客户电话" prop="linkPhone">
             <el-input
@@ -113,19 +106,6 @@
             />
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="12">
-        <!-- <el-col :span="12">
-          <el-form-item label="车辆名称" >
-            <el-input clearable readonly @click.native="handleSelectDevice" v-model="form.deviceName"
-                      placeholder="请输入"/>
-          </el-form-item>
-        </el-col> -->
-        <!-- <el-col :span="12">
-          <el-form-item label="车辆号" prop="carNo">
-            <el-input clearable v-model="form.carNo" placeholder="请输入"/>
-          </el-form-item>
-        </el-col> -->
         <el-col :span="12">
           <el-form-item label="收货地址" prop="receiveAddress">
             <el-input
@@ -141,8 +121,6 @@
             <el-input clearable v-model="form.projectName" :disabled="true" />
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="12">
         <el-col :span="12">
           <el-form-item prop="sendFiles" label="发货附件">
             <fileMain v-model="form.sendFiles" type="view"></fileMain>
@@ -466,17 +444,17 @@
             showOverflowTooltip: true,
             align: 'center'
           },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
 
-          //   }
-          // },
+            }
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -861,7 +839,7 @@
             if (item.productCode == val.productCode) {
               item['singlePrice'] = val.singlePrice;
               item['clientCode'] = item.clientCode || val.customerMark;
-              item['pricingWay'] = val.pricingWay || this.form.pricingWay || 1;
+              item['pricingWay'] = item.pricingWay||val.pricingWay || 1;
 
               if (item.pricingWay == 1) {
                 item.totalPrice = item.singlePrice * item.totalCount;

+ 18 - 4
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -192,7 +192,7 @@
       <inventoryTable1
         v-show="['20', '40'].includes(form.type) && form.returnSourceType == 1"
         ref="inventoryTableref1"
-        :sendId="form.sendId"
+        :customerMark="customerMark"
       ></inventoryTable1>
     </el-form>
 
@@ -284,8 +284,10 @@
   import modalTitle from '@/BIZComponents/modalTitle.vue';
   import outboundDetailsDialog from './outboundDetailsDialog.vue';
   import outboundDetailsDialog1 from '@/views/saleManage/saleOrder/entrustedReceive/components/outboundDetailsDialog.vue';
-  import inventoryTable1 from './inventoryTableReturn.vue';
+  import inventoryTable1 from '@/BIZComponents/inventoryTable.vue';
   import { getSendSaleOrderConfirmDetail } from '@/api/saleManage/invoiceConfirm';
+  import { contactDetail } from '@/api/saleManage/contact';
+  
   export default {
     mixins: [dictMixins],
     components: {
@@ -344,6 +346,7 @@
 
       return {
         fullscreen: false, //全屏
+        customerMark:'',
         oldProductList: [],
         returnList: [
           { label: '原货退回', value: '1' },
@@ -673,6 +676,11 @@
         // this.getSendSaleOrderDetail(this.form.sendId);
         this.handleSetReturnSourceType();
       },
+     async contactDetail(id){
+      const {base}= await contactDetail(id)
+      this.customerMark=base.serialNo
+      this.$refs.inventoryTableref1.setCustomerMark(base.serialNo)
+      },
       //设置退货类型
       handleSetReturnSourceType(val) {
         this.$nextTick(() => {
@@ -787,6 +795,9 @@
 
         this.loading = false;
         if (data) {
+          if(data.contactId){
+             this.contactDetail(data.contactId)
+          }
           data.productList.forEach((item) => {
             item.sendProductId = item.productId;
             item.id = '';
@@ -809,7 +820,7 @@
               entrustedReceiveCode: ''
             });
             if (params.activeName == 2) {
-              this.productList = data.productList;
+               this.productList = data.productList;
               this.$refs.inventoryTableref &&
                 this.$refs.inventoryTableref.putTableValue(res.productList);
               return;
@@ -865,6 +876,9 @@
         this.loading = true;
         const data = await getSendSaleOrderrecordDetailSplit(id);
         this.productList = data.productList;
+        if(data.contactId){
+             this.contactDetail(data.contactId)
+          }
         if (type) return;
         if (data.entrustedCode) {
           await this.getInfo({ id: data.entrustedId });
@@ -913,7 +927,7 @@
             this.$refs.inventoryTableref &&
               this.$refs.inventoryTableref.putTableValue(data.productList);
             this.$refs.inventoryTableref1 &&
-              this.$refs.inventoryTableref1.putTableValue(data);
+              this.$refs.inventoryTableref1.putTableValue({productList:data.redressProductList});
             if (this.form.returnSourceType != 2) {
               this.getSendSaleOrderDetail(data.sendId, 1);
             } else {

+ 14 - 3
src/views/saleManage/saleOrder/returnGoods/components/detailDialog.vue

@@ -67,12 +67,12 @@
                 <template slot="append">元</template>
               </el-input>
             </el-form-item>
-            <el-form-item label="计价方式:">
+            <!-- <el-form-item label="计价方式:">
               <el-select v-model="form.pricingWay" disabled style="width: 100%">
                 <el-option :value="1" label="按数量计费"></el-option>
                 <el-option :value="2" label="按重量计费"></el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="备注:" prop="remark">
               <el-input
                 :rows="4"
@@ -352,6 +352,17 @@
             slot: 'weightUnit',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -583,7 +594,7 @@
           },
 
           {
-            minWidth: 80,
+            minWidth: 120,
             prop: 'receiveTotalWeight',
             label: '重量',
             // slot: 'singleWeight',

+ 1 - 1
src/views/saleManage/saleOrder/returnGoods/components/inventoryTable.vue

@@ -475,7 +475,7 @@
           //   align: 'center'
           // },
           {
-            minWidth: 80,
+            minWidth: 120,
             prop: 'receiveTotalWeight',
             label: '重量',
             // slot: 'singleWeight',