Răsfoiți Sursa

退货流程

yusheng 2 ani în urmă
părinte
comite
bc59e3c11a

+ 175 - 0
src/components/timeDialog/index.vue

@@ -0,0 +1,175 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="35%"
+  >
+    <el-form
+      :model="form"
+      ref="tableForm"
+      class="tableForm"
+      :rules="tableFormRules"
+    >
+      <el-button
+        type="primary"
+        size="small"
+        style="margin-bottom: 10px"
+        @click="handleAdd()"
+        v-if="!view"
+        >新增</el-button
+      >
+      <el-table
+        ref="multipleTable"
+        :data="form.arrivalBatch"
+        tooltip-effect="dark"
+        style="width: 100%"
+        stripe
+        :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+      >
+        <el-table-column label="数量" prop="arriveCount">
+          <template slot-scope="{ row, $index }">
+            <el-form-item
+              :prop="'arrivalBatch.' + $index + '.arriveCount'"
+              :rules="tableFormRules.arriveCount"
+            >
+              <el-input
+                placeholder="请输入"
+                clearable
+                v-model="row.arriveCount"
+                :disabled="view"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="到货时间">
+          <template slot-scope="{ row, $index }">
+            <el-form-item
+              :prop="'arrivalBatch.' + $index + '.arriveDate'"
+              :rules="tableFormRules.arriveDate"
+            >
+              <el-date-picker
+                clearable
+                v-model="row.arriveDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="请选择日期"
+                :disabled="view"
+              >
+              </el-date-picker>
+            </el-form-item> </template
+        ></el-table-column>
+
+        
+        <el-table-column label="操作" prop="action" width="80" v-if="!view">
+          <template slot-scope="{ $index }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="handleDel($index)"
+              >删除</el-link
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-form>
+
+    <div class="btns">
+      <el-button type="primary" size="small" @click="handleOk">确认</el-button>
+      <el-button size="small" @click="handleClose">取消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { copyObj } from '@/utils/util';
+
+  export default {
+    components: {},
+    props:{
+        view:{
+            default:false
+        }
+    },
+    data() {
+      return {
+        visible: false,
+        title: '设置分批时间',
+
+        current: null,
+        form: {
+          arrivalBatch: [
+            {
+              arriveDate: null,
+              arriveCount: null
+            }
+          ]
+        },
+
+        tableFormRules: {
+          arriveCount: {
+            required: true,
+            message: '请输入数量',
+            trigger: 'blur'
+          },
+
+          arriveDate: {
+            required: true,
+            message: '请选择日期',
+            trigger: 'change'
+          }
+        }
+      };
+    },
+
+    watch: {},
+    methods: {
+      open(row) {
+        console.log(row, 'row');
+        this.form.arrivalBatch = row.arrivalBatch&&copyObj(row.arrivalBatch)||[];
+        this.current = row;
+        this.visible = true;
+      },
+
+      handleAdd() {
+        this.form.arrivalBatch.push({
+          arriveDate: null,
+          arriveCount: null
+        });
+      },
+
+      handleDel(index) {
+        this.form.arrivalBatch.splice(index, 1);
+      },
+
+      handleOk() {
+        this.$refs.tableForm.validate((valid) => {
+          if (valid) {
+            this.$emit('chooseTime', this.current,copyObj(this.form.arrivalBatch) );
+            this.handleClose();
+          }
+        });
+      },
+
+      handleClose() {
+        this.$refs.tableForm && this.$refs.tableForm.resetFields();
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .btns {
+    margin-top: 20px;
+    text-align: center;
+  }
+
+  .el-form-item {
+    margin-bottom: 20px !important;
+  }
+</style>

+ 7 - 4
src/views/contractManage/contractBook/components/addDialog.vue

@@ -652,7 +652,7 @@
           partbLinkId: '',
           partbLinkName: '',
           partbEmail: '',
-          partbTel: ''
+          partbTel: '',
         });
         this.getLinkInfo(obj.id);
       },
@@ -742,7 +742,6 @@
           return;
         }
         if (this.enterprisePage.length > 0) {
-          console.log('dsds');
           this.form[keyArr[0]] =
             this.form[keyArr[0]] || this.enterprisePage[0].name;
           this.form[keyArr[1]] =
@@ -815,6 +814,8 @@
       },
       //选择客户回调
       changeParent(obj) {
+        console.log(obj,'obj')
+
         this.form = Object.assign({}, this.form, {
           partaId: obj.id,
           partaName: obj.name,
@@ -823,7 +824,9 @@
           partaLinkName: '',
           partaEmail: '',
           partaTel: '',
-          contractName: obj.simpleName
+          contractName: obj.simpleName,
+          partaUnifiedSocialCreditCode: obj.unifiedSocialCreditCode,
+          
         });
         this.getLinkInfo(obj.id);
       },
@@ -869,7 +872,7 @@
           this.$refs.inventoryTable.putTableValue(row);
         this.$refs.paymentListTable &&
           this.$refs.paymentListTable.putTableValue(row.receiptPaymentList);
-        this.changeParent();
+
         this.getEnterprise();
         this.getLinkInfo(
           contractVO.type == '2' ? contractVO.partbId : contractVO.partaId

+ 8 - 3
src/views/contractManage/contractBook/components/inventoryTabledetail.vue

@@ -9,7 +9,7 @@
   >
     <template v-slot:toolbar>
       <div class="headbox">
-        <span class="amount"
+        <span class="amount" v-if="isSinglePrice"
           >总计:{{ form.totalPrice || form.totalAmount }}元</span
         >
         <span
@@ -93,6 +93,10 @@
       isCustomerMark: {
         default: false,
         type: Boolean
+      },
+      isSinglePrice: {
+        default: true,
+        type: Boolean
       }
     },
     data() {
@@ -152,7 +156,8 @@
             width: 160,
             prop: 'singlePrice',
             label: '单价',
-            slot: 'singlePrice'
+            slot: 'singlePrice',
+            show:this.isSinglePrice
           },
 
           {
@@ -296,7 +301,7 @@
       putTableValue(data) {
         console.log(data, 'data');
         let productList =
-          (data && (data.quoteProductList || data.productList)) || [];
+          (data && (data.redressProductList||data.quoteProductList || data.productList)) || [];
         if (data) {
           this.form = data;
           this.productList = productList;

+ 7 - 2
src/views/purchasingManage/inquiryManage/components/addDialog.vue

@@ -223,7 +223,7 @@
       },
       //获取询价详情
       async getDetailData(id) {
-        this.businessId =id
+        this.businessId = id;
         this.loading = true;
         let data = await getpurchaseinquiry(id);
         this.loading = false;
@@ -240,11 +240,16 @@
 
       //获取计划详情
       async getplanData(id, type) {
-
         this.loading = true;
         let data = await getplanDetail(id);
         this.loading = false;
         if (data) {
+          data.detailList.forEach((item) => {
+            if (item.arrivalWay == 2 && item.arrivalBatch.length > 0) {
+              item.expectReceiveDate =
+                item.arrivalBatch[item.arrivalBatch.length - 1].arriveDate;
+            }
+          });
           this.list = data.detailList;
           this.$set(this.form, 'acceptUnpack', data.acceptUnpack);
           this.form.planId = data.id;

+ 23 - 4
src/views/purchasingManage/purchaseNeedManage/components/addDialog.vue

@@ -139,7 +139,8 @@
   import {
     addPurchaseNeedManage,
     getDetail,
-    UpdateInformation,submit
+    UpdateInformation,
+    submit
   } from '@/api/purchasingManage/purchaseNeedManage';
 
   import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
@@ -312,19 +313,37 @@
           await this.getValidate();
           // 表单验证通过,执行保存操作
           this.loading = true;
+          let isArrivalBatch = false;
+          let detailList = this.$refs.inventoryTable.getTableValue();
           if (!this.isUpdate) {
             delete this.form.id;
           }
 
-          if (this.$refs.inventoryTable.getTableValue().length == 0) {
+          if (detailList.length == 0) {
             this.$message.warning('需求清单不能为空');
             return;
           }
+          detailList.forEach((v) => {
+            if (
+              v.arrivalWay == 2 &&
+              (!v.arrivalBatch || v.arrivalBatch.length == 0)
+            ) {
+              isArrivalBatch = true;
+            }
+          });
+          if (isArrivalBatch) {
+            this.$message.warning('请设置分批时间');
+            return;
+          }
+
           this.form.files = this.form.files || [];
 
-          this.form.sourceName = this.getDictValue('需求来源类型', this.form.sourceType);
+          this.form.sourceName = this.getDictValue(
+            '需求来源类型',
+            this.form.sourceType
+          );
           let commitData = Object.assign({}, this.form, {
-            detailList: this.$refs.inventoryTable.getTableValue()
+            detailList
           });
           if (this.isUpdate) {
             UpdateInformation(commitData)

+ 49 - 2
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -40,7 +40,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="需求来源类型:" prop="contactTel">
-              {{ form.sourceName }}
+              {{ form?.sourceName }}
             </el-form-item>
           </el-col>
 
@@ -104,6 +104,34 @@
         :datasource="detailData.detailList"
         row-key="id"
       >
+        <template v-slot:expectReceiveDate="scope">
+          <div v-if="scope.row.arrivalWay == 1">
+            {{ scope.row.expectReceiveDate }}
+          </div>
+          <div v-if="scope.row.arrivalWay == 2">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click.native="handleMethod(scope.row)"
+            >
+              查看分批时间
+            </el-link>
+          </div>
+        </template>
+        
+        <template v-slot:technicalDrawings="{ row }">
+          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
+            <el-link
+              v-for="link in row.technicalDrawings"
+              :key="link.id"
+              type="primary"
+              :underline="false"
+              @click="downloadFile(link)"
+            >
+              {{ link.name }}</el-link
+            >
+          </div>
+        </template>
         <template v-slot:files="{ row }">
           <div v-if="row.files && row.files?.length">
             <el-link
@@ -124,6 +152,7 @@
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
     ></bpmDetail>
+    <timeDialog  ref="timeDialogRef" :view="true"></timeDialog>
 
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
@@ -137,6 +166,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import { copyObj } from '@/utils/util';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import timeDialog from '@/components/timeDialog/index.vue';
 
   export default {
     mixins: [dictMixins],
@@ -146,7 +176,7 @@
       }
     },
     components: {
-      bpmDetail
+      bpmDetail,timeDialog
     },
     data() {
       return {
@@ -222,12 +252,26 @@
             label: '品牌',
             slot: 'brand'
           },
+          {
+            width: 150,
+            prop: 'arrivalWay',
+            label: '	到货方式',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '一次性到货' : '分批到货';
+            }
+          },
           {
             width: 170,
             prop: 'expectReceiveDate',
             label: '到货日期',
             slot: 'expectReceiveDate'
           },
+          {
+            width: 160,
+            prop: 'technicalDrawings',
+            label: '图纸附件',
+            slot: 'technicalDrawings'
+          },
           {
             width: 140,
             prop: 'files',
@@ -261,6 +305,9 @@
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
       },
+      handleMethod(row) {
+        this.$refs.timeDialogRef.open(row);
+      },
       async getDetailData(id) {
         this.loading = true;
         const data = await getDetail(id);

+ 93 - 11
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -51,7 +51,6 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.productCode'"
-         
         >
           <el-input v-model="scope.row.productCode" disabled></el-input>
         </el-form-item>
@@ -60,7 +59,6 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.productCategoryName'"
-          
         >
           <el-input v-model="scope.row.productCategoryName" disabled></el-input>
         </el-form-item>
@@ -198,8 +196,23 @@
           />
         </el-form-item>
       </template>
+      <template v-slot:technicalDrawings="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.technicalDrawings'"
+        >
+          <fileUpload
+            v-model="scope.row.technicalDrawings"
+            module="main"
+            :showLib="false"
+            :limit="5"
+          />
+        </el-form-item>
+      </template>
+
       <template v-slot:expectReceiveDate="scope">
         <el-form-item
+          v-if="scope.row.arrivalWay == 1"
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.expectReceiveDate'"
           :rules="{
@@ -218,7 +231,44 @@
           >
           </el-date-picker>
         </el-form-item>
+        <el-form-item
+          style="margin-bottom: 20px"
+          v-if="scope.row.arrivalWay == 2"
+        >
+          <el-link
+            type="primary"
+            :underline="false"
+            @click.native="handleMethod(scope.row)"
+          >
+            设置分批时间
+          </el-link>
+        </el-form-item>
       </template>
+      <template v-slot:arrivalWay="scope">
+        <el-form-item
+          :prop="'datasource.' + scope.$index + '.arrivalWay'"
+          :rules="{
+            required: true,
+            message: '请选择',
+            trigger: 'blur'
+          }"
+        >
+          <el-select
+            v-model="scope.row.arrivalWay"
+            clearable
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in arrivalWayList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </template>
+
       <template v-slot:headerProductName="{ column }">
         <span class="is-required">{{ column.label }}</span>
       </template>
@@ -228,6 +278,10 @@
       <template v-slot:headerExpectReceiveDate="{ column }">
         <span class="is-required">{{ column.label }}</span>
       </template>
+      <template v-slot:headerArrivalWay="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+
       <!-- 操作列 -->
       <template v-slot:action="scope">
         <el-popconfirm
@@ -249,20 +303,24 @@
       @changeParent="changeParent"
     ></product-list>
     <head-list ref="headRef" @changeParent="changeAnswer"></head-list>
+    <timeDialog @chooseTime="chooseTime" ref="timeDialogRef"></timeDialog>
   </el-form>
 </template>
 <script>
-  import {numberReg } from 'ele-admin';
+  import { numberReg } from 'ele-admin';
   import productList from './product-list.vue';
   import dictMixins from '@/mixins/dictMixins';
   import fileUpload from '@/components/upload/fileUpload';
   import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
+  import timeDialog from '@/components/timeDialog/index.vue';
+  import { copyObj } from '@/utils/util';
   export default {
     mixins: [dictMixins],
     components: {
       productList,
       fileUpload,
-      headList
+      headList,
+      timeDialog
     },
     data() {
       const defaultForm = {
@@ -274,6 +332,10 @@
       return {
         numberReg,
         defaultForm,
+        arrivalWayList: [
+          { label: '一次性到货', value: 1 },
+          { label: '分批到货', value: 2 }
+        ],
         form: {
           datasource: []
         },
@@ -303,7 +365,7 @@
             prop: 'productName',
             label: '名称',
             slot: 'productName',
-            headerSlot: 'headerProductName',
+            headerSlot: 'headerProductName'
           },
           {
             width: 150,
@@ -316,7 +378,7 @@
             prop: 'totalCount',
             label: '数量',
             slot: 'totalCount',
-            headerSlot: 'headerTotalCount',
+            headerSlot: 'headerTotalCount'
           },
           {
             width: 100,
@@ -343,21 +405,32 @@
             label: '品牌',
             slot: 'brand'
           },
+          {
+            width: 160,
+            prop: 'arrivalWay',
+            label: '到货方式',
+            slot: 'arrivalWay',
+            headerSlot: 'headerArrivalWay'
+          },
           {
             width: 170,
             prop: 'expectReceiveDate',
             label: '到货日期',
             slot: 'expectReceiveDate',
-            headerSlot: 'headerExpectReceiveDate',
-
+            headerSlot: 'headerExpectReceiveDate'
           },
           {
-            width: 140,
+            width: 160,
+            prop: 'technicalDrawings',
+            label: '图纸附件',
+            slot: 'technicalDrawings'
+          },
+          {
+            width: 160,
             prop: 'files',
             label: '附件',
             slot: 'files'
           },
-
           {
             width: 220,
             prop: 'remark',
@@ -385,7 +458,9 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
-          v.files = v.files || null;
+          v.files = v.files || [];
+          v.technicalDrawings = v.technicalDrawings || [];
+          v.arrivalBatch = v.arrivalBatch || [];
         });
         return comitDatasource;
       },
@@ -395,6 +470,13 @@
           this.form.datasource = data;
         }
       },
+      handleMethod(row) {
+        this.$refs.timeDialogRef.open(row);
+      },
+      chooseTime(row, arrivalBatch) {
+        row.arrivalBatch = copyObj(arrivalBatch);
+        console.log(row, 'row');
+      },
       //选择产品
       handParent(row, index) {
         // let item = {

+ 54 - 3
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -45,7 +45,7 @@
                 :underline="false"
                 @click="openDetail(form)"
               >
-                {{ form.requirementCode }}
+                {{ form?.requirementCode }}
               </el-link>
               <!-- {{ form.requirementCode }} -->
             </el-form-item>
@@ -126,6 +126,34 @@
         :datasource="detailData.detailList"
         row-key="id"
       >
+        <template v-slot:expectReceiveDate="scope">
+          <div v-if="scope.row.arrivalWay == 1">
+            {{ scope.row.expectReceiveDate }}
+          </div>
+          <div v-if="scope.row.arrivalWay == 2">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click.native="handleMethod(scope.row)"
+            >
+              查看分批时间
+            </el-link>
+          </div>
+        </template>
+
+        <template v-slot:technicalDrawings="{ row }">
+          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
+            <el-link
+              v-for="link in row.technicalDrawings"
+              :key="link.id"
+              type="primary"
+              :underline="false"
+              @click="downloadFile(link)"
+            >
+              {{ link.name }}</el-link
+            >
+          </div>
+        </template>
         <template v-slot:files="{ row }">
           <div v-if="row.files && row.files?.length">
             <el-link
@@ -149,6 +177,8 @@
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
     </div>
+    <timeDialog ref="timeDialogRef" :view="true"></timeDialog>
+
     <detail-dialog
       ref="contactDetailDialogRef"
       :isModal="false"
@@ -163,11 +193,14 @@
   import { copyObj } from '@/utils/util';
   import detailDialog from '../../../purchasingManage/purchaseNeedManage/components/detailDialog.vue';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import timeDialog from '@/components/timeDialog/index.vue';
 
   export default {
     mixins: [dictMixins],
     components: {
-      detailDialog,bpmDetail
+      detailDialog,
+      bpmDetail,
+      timeDialog
     },
     props: {
       isModal: {
@@ -251,11 +284,26 @@
           //   label: '品牌',
           //   slot: 'modelType'
           // },
+
+          {
+            width: 150,
+            prop: 'arrivalWay',
+            label: '到货方式',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '一次性到货' : '分批到货';
+            }
+          },
           {
             width: 170,
             prop: 'receiveDate',
             label: '到货日期',
-            slot: 'receiveDate'
+            slot: 'expectReceiveDate'
+          },
+          {
+            width: 160,
+            prop: 'technicalDrawings',
+            label: '图纸附件',
+            slot: 'technicalDrawings'
           },
           {
             width: 140,
@@ -295,6 +343,9 @@
           this.visible = false;
         });
       },
+      handleMethod(row) {
+        this.$refs.timeDialogRef.open(row);
+      },
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
       },

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

@@ -25,7 +25,7 @@
               placeholder="请输入"
             />
           </el-form-item>
-          <el-form-item
+          <!-- <el-form-item
             label="退货类型"
             prop="sendNo"
             style="margin-bottom: 22px"
@@ -56,7 +56,7 @@
               v-model="aa"
               placeholder="请输入"
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item prop="returnFiles" label="退货附件">
             <fileUpload
               v-model="form.returnFiles"
@@ -65,6 +65,14 @@
               :limit="10"
             />
           </el-form-item>
+          <el-form-item prop="repliedFiles" label="回执附件">
+            <fileUpload
+              v-model="form.repliedFiles"
+              module="main"
+              :showLib="false"
+              :limit="10"
+            />
+          </el-form-item>
         </el-col>
 
         <el-col :span="12">
@@ -88,7 +96,7 @@
               placeholder="请输入"
             />
           </el-form-item>
-          <el-form-item
+          <!-- <el-form-item
             label="总金额"
             prop="bb"
             style="margin-bottom: 22px"
@@ -96,30 +104,17 @@
 
           >
           {{+aa+form.totalAmount}}元
-          </el-form-item>
-          <el-form-item prop="repliedFiles" label="回执附件">
-            <fileUpload
-              v-model="form.repliedFiles"
-              module="main"
-              :showLib="false"
-              :limit="10"
-            />
-          </el-form-item>
+          </el-form-item> -->
         </el-col>
       </el-row>
 
-      <headerTitle
-        title="原货产品清单"
-        style="margin-top: 30px"
-        v-show="['1', '2', '3'].includes(form.returnType)"
-      ></headerTitle>
+      <headerTitle title="原货产品清单" style="margin-top: 30px"></headerTitle>
       <inventoryTable
-        v-show="['1', '2', '3'].includes(form.returnType)"
         :returnType="form.returnType"
         ref="inventoryTableref"
         :sendId="form.sendId"
       ></inventoryTable>
-      <headerTitle
+      <!-- <headerTitle
         title="实物赔偿清单"
         v-show="['2', '4'].includes(form.returnType)"
         style="margin-top: 30px"
@@ -129,7 +124,7 @@
 
         ref="inventoryTableref1"
         :sendId="form.sendId"
-      ></inventoryTable1>
+      ></inventoryTable1> -->
       <!-- <el-row style="margin-top: 20px">
         <el-col :span="12">
           <el-form-item
@@ -165,7 +160,7 @@
 </template>
 
 <script>
-  import {  numberReg } from 'ele-admin';
+  import { numberReg } from 'ele-admin';
   import { acceptUnpackoptions } from '@/enum/dict';
   import fileUpload from '@/components/upload/fileUpload';
   import dictMixins from '@/mixins/dictMixins';
@@ -190,7 +185,8 @@
       fileUpload,
       deptSelect,
       sendListDialog,
-      inventoryTable,inventoryTable1,
+      inventoryTable,
+      inventoryTable1,
       parentList,
       personSelect
     },
@@ -208,7 +204,7 @@
       };
 
       return {
-        aa:'',
+        aa: '',
         returnList: [
           { label: '原货退回', value: '1' },
           { label: '部分原货+实物赔偿', value: '2' },
@@ -381,7 +377,7 @@
         // 是否是修改
         isUpdate: false,
         businessId: '',
-        orderId:""
+        orderId: ''
       };
     },
     computed: {
@@ -402,8 +398,7 @@
         }
       },
       onchangeLink() {
-        this.getSendSaleOrderDetail(this.form.sendId)
-        
+        this.getSendSaleOrderDetail(this.form.sendId);
       },
       //选择订单回调
       changeOrder(obj) {
@@ -422,6 +417,12 @@
         const data = await getSendSaleOrderrecordDetail(id);
         this.loading = false;
         if (data) {
+          data.productList.forEach((item) => {
+            item.sendProductId = item.id;
+            item.id = '';
+          });
+          // console.log(data.productList)
+          // return
           this.$nextTick(() => {
             this.form = Object.assign({}, this.form, {
               orderId: data.orderId,
@@ -533,12 +534,11 @@
           this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
           let commitData = Object.assign({}, this.form, {
             totalAmount: Number(this.totalAmount),
-            productList: data.productList
+            productList: data.productList,
+            redressProductList: []
           });
           commitData.payAmount = data.payAmount;
 
-          console.log(commitData, 'commitData');
-          return;
           if (this.isUpdate) {
             UpdateReturnInformation(commitData)
               .then((res) => {

+ 35 - 22
src/views/saleManage/saleOrder/returnGoods/components/detailDialog.vue

@@ -36,16 +36,23 @@
           >
             {{ form.contactName }}
           </el-form-item>
-
           <el-form-item
-            label="金额:"
-            prop="payAmount"
+            label="退货类型:"
+            prop="contactName"
+            style="margin-bottom: 16px"
+          >
+            {{ form.typeName }}
+          </el-form-item>
+          <el-form-item
+            label="赔偿金额:"
+            prop="redressAmount"
             style="margin-bottom: 16px"
+            v-show="['30', '50'].includes(form.type)"
           >
-            {{ form.payAmount }}元
+            {{ form.redressAmount }}元
           </el-form-item>
           <el-form-item
-            label="总金额:"
+            label="赔偿总金额:"
             prop="totalAmount"
             style="margin-bottom: 16px"
           >
@@ -97,7 +104,7 @@
             prop="reviewStatus"
             style="margin-bottom: 16px"
           >
-            {{ reviewStatusEnum[form.reviewStatus].label }}
+            {{ reviewStatusEnum[form.reviewStatus]?.label }}
           </el-form-item>
           <el-form-item
             label="发货附件:"
@@ -141,8 +148,12 @@
       </el-row>
     </el-form>
 
-    <headerTitle title="产品清单"></headerTitle>
+    <headerTitle
+      title="产品清单"
+      v-show="['10', '20', '30'].includes(form.type)"
+    ></headerTitle>
     <ele-pro-table
+      v-show="['10', '20', '30'].includes(form.type)"
       ref="table"
       :needPage="false"
       :columns="competAnalysisListcolumns"
@@ -170,6 +181,17 @@
         </div>
       </template>
     </ele-pro-table>
+    <headerTitle
+      title="实物赔偿清单"
+      v-show="['20', '40'].includes(form.type)"
+      style="margin-top: 30px"
+    ></headerTitle>
+    <inventoryTabledetail
+      v-show="['20', '40'].includes(form.type)"
+      ref="inventoryTabledetailRef"
+      :isSinglePrice="false"
+
+    ></inventoryTabledetail>
     </div>
    
     <bpmDetail v-if="activeComp==='bpm'&&form.processInstanceId" :id="form.processInstanceId"></bpmDetail>
@@ -188,11 +210,12 @@
   import { reviewStatusEnum } from '@/enum/dict';
   import { copyObj } from '@/utils/util';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import inventoryTabledetail from '@/views/contractManage/contractBook/components/inventoryTabledetail.vue';
 
   export default {
     mixins: [dictMixins],
     components:{
-      bpmDetail
+      bpmDetail,inventoryTabledetail
     },
     data() {
       return {
@@ -301,12 +324,6 @@
             label: '退货原因',
             slot: 'returnReason'
           },
-          {
-            width: 140,
-            prop: 'returnTypeName',
-            label: '退货类型',
-            slot: 'returnTypeName'
-          },
           {
             width: 120,
             prop: 'deliveryDays',
@@ -375,15 +392,11 @@
         const data = await getReturnSaleOrderrecordDetail(id);
         this.loading = false;
         if (data) {
-          let productList = data.productList;
-          productList.forEach((r) => {
-            let foundObject = this.codeData.find(
-              (obj) => obj[r.returnType] != undefined
-            );
-            if (foundObject) {
-              r.returnTypeName = foundObject[r.returnType];
-            }
+          this.$nextTick(() => {
+            this.$refs.inventoryTabledetailRef &&
+              this.$refs.inventoryTabledetailRef.putTableValue(data);
           });
+   
           this.detailData = data;
         }
       }

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

@@ -262,12 +262,12 @@
             label: '退货原因',
             slot: 'returnReason'
           },
-          {
-            width: 140,
-            prop: 'returnType',
-            label: '退货类型',
-            slot: 'returnType'
-          },
+          // {
+          //   width: 140,
+          //   prop: 'returnType',
+          //   label: '退货类型',
+          //   slot: 'returnType'
+          // },
 
           // {
           //   width: 80,