Z 2 лет назад
Родитель
Сommit
f6b7cca332

+ 12 - 12
src/views/bpm/handleTask/components/contractBook/inventoryTable.vue

@@ -710,12 +710,12 @@ export default {
           headerSlot: 'headerSinglePrice',
           headerSlot: 'headerSinglePrice',
           align: "center"
           align: "center"
         },
         },
-        {
-          width: 160,
-          prop: 'discountSinglePrice',
-          label: '折让单价',
-          align: "center",
-        },
+        // {
+        //   width: 160,
+        //   prop: 'discountSinglePrice',
+        //   label: '折让单价',
+        //   align: "center",
+        // },
         {
         {
           width: 120,
           width: 120,
           prop: 'totalPrice',
           prop: 'totalPrice',
@@ -723,12 +723,12 @@ export default {
           slot: 'totalPrice',
           slot: 'totalPrice',
           align: "center"
           align: "center"
         },
         },
-        {
-          width: 160,
-          prop: 'discountTotalPrice',
-          label: '折让合计',
-          align: "center",
-        },
+        // {
+        //   width: 160,
+        //   prop: 'discountTotalPrice',
+        //   label: '折让合计',
+        //   align: "center",
+        // },
 
 
         // {
         // {
         //   width: 80,
         //   width: 80,

+ 6 - 3
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -298,8 +298,10 @@
               sendId: data.id,
               sendId: data.id,
               contactName: data.contactName,
               contactName: data.contactName,
               pricingWay: data?.saleOrder?.pricingWay,
               pricingWay: data?.saleOrder?.pricingWay,
-              entrustedCode: data.entrustedCode,
-              entrustedId: data.entrustedId
+              entrustedCode:'',
+              entrustedId: '',
+              entrustedReceiveId: '',
+              entrustedReceiveCode: '',
             });
             });
             // this.$refs.inventoryTableref &&
             // this.$refs.inventoryTableref &&
             //   this.$refs.inventoryTableref.putTableValue(data.productList);
             //   this.$refs.inventoryTableref.putTableValue(data.productList);
@@ -316,6 +318,8 @@
           this.$nextTick(() => {
           this.$nextTick(() => {
             this.form = data;
             this.form = data;
             this.form.pricingWay = data?.saleOrder?.pricingWay;
             this.form.pricingWay = data?.saleOrder?.pricingWay;
+            this.form.entrustedCode = data?.entrustedReceiveCode;
+            this.form.entrustedId = data?.entrustedReceiveId;
             this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref &&
               this.$refs.inventoryTableref.putTableValue(data.productList);
               this.$refs.inventoryTableref.putTableValue(data.productList);
             this.$refs.inventoryTableref1 &&
             this.$refs.inventoryTableref1 &&
@@ -388,7 +392,6 @@
       },
       },
       onchangeLink() {
       onchangeLink() {
         this.getSendSaleOrderDetail(this.form.sendId);
         this.getSendSaleOrderDetail(this.form.sendId);
-        console.log(this.form, 'this.form');
       },
       },
 
 
       async getTableValue() {
       async getTableValue() {

+ 8 - 5
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -33,6 +33,11 @@
           >
           >
             {{ form.totalAmount }}元
             {{ form.totalAmount }}元
           </el-form-item>
           </el-form-item>
+          <el-form-item
+            label="计价方式:"
+            style="margin-bottom: 22px">
+            {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
+          </el-form-item>
           <el-form-item
           <el-form-item
             label="备注:"
             label="备注:"
             prop="remark"
             prop="remark"
@@ -171,9 +176,7 @@
       style="margin-top: 30px"
       style="margin-top: 30px"
     ></headerTitle>
     ></headerTitle>
     <inventoryTabledetail
     <inventoryTabledetail
-      v-if="
-        ['20', '40'].includes(form.type) && taskDefinitionKey != 'produceLeader'
-      "
+      v-if=" ['20', '40'].includes(form.type) && taskDefinitionKey != 'produceLeader'"
       ref="inventoryTabledetailRef"
       ref="inventoryTabledetailRef"
       :isSinglePrice="false"
       :isSinglePrice="false"
     ></inventoryTabledetail>
     ></inventoryTabledetail>
@@ -193,8 +196,8 @@
   import { getFile } from '@/api/system/file';
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
   import { reviewStatusEnum } from '@/enum/dict';
   import { reviewStatusEnum } from '@/enum/dict';
-  import inventoryTabledetail from '@/views/bpm/handleTask/components/contractBook/inventoryTabledetail.vue';
-  import inventoryTable from '@/views/bpm/handleTask/components/contractBook/inventoryTable.vue';
+  import inventoryTabledetail from './inventoryTabledetail.vue';
+  import inventoryTable from './inventoryTable.vue';
 
 
   export default {
   export default {
     mixins: [dictMixins],
     mixins: [dictMixins],

+ 6 - 19
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -326,24 +326,12 @@ export default {
             label: '单价',
             label: '单价',
             slot: 'singlePrice'
             slot: 'singlePrice'
           },
           },
-          {
-            width: 160,
-            prop: 'discountSinglePrice',
-            label: '折让单价',
-            slot: 'discountSinglePrice'
-          },
           {
           {
             width: 120,
             width: 120,
             prop: 'totalPrice',
             prop: 'totalPrice',
             label: '合计',
             label: '合计',
             slot: 'totalPrice'
             slot: 'totalPrice'
           },
           },
-          {
-            width: 120,
-            prop: 'discountTotalPrice',
-            label: '折让合计',
-            slot: 'discountTotalPrice'
-          },
           {
           {
             width: 200,
             width: 200,
             prop: 'returnReason',
             prop: 'returnReason',
@@ -519,7 +507,7 @@ export default {
       setIcreaseTotalWeight() {
       setIcreaseTotalWeight() {
         let sendTotalWeight = Number(this.form.datasource[this.curIndex].sendTotalWeight)
         let sendTotalWeight = Number(this.form.datasource[this.curIndex].sendTotalWeight)
         let receiveTotalWeight = Number(this.form.datasource[this.curIndex].receiveTotalWeight)
         let receiveTotalWeight = Number(this.form.datasource[this.curIndex].receiveTotalWeight)
-        if (this.entrustedCode) {
+        // if (this.entrustedCode) {
           if (this.pricingWay == 2) {
           if (this.pricingWay == 2) {
             if (isNaN(receiveTotalWeight) || isNaN(sendTotalWeight)) {
             if (isNaN(receiveTotalWeight) || isNaN(sendTotalWeight)) {
               return this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', '');
               return this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', '');
@@ -529,13 +517,13 @@ export default {
           } else {
           } else {
             this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (sendTotalWeight - receiveTotalWeight).toFixed(2));
             this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (sendTotalWeight - receiveTotalWeight).toFixed(2));
           }
           }
-        } else {
-          this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', sendTotalWeight);
-        }
+        // } else {
+        //   this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', sendTotalWeight);
+        // }
         if (this.pricingWay == 2) {
         if (this.pricingWay == 2) {
           this.getWeightPrice()
           this.getWeightPrice()
         }
         }
-
+        this.$refs.table.reload()
       },
       },
       //获取订单总金额
       //获取订单总金额
       gettotalAmount() {
       gettotalAmount() {
@@ -551,8 +539,7 @@ export default {
               return sum + Number(item.discountTotalPrice);
               return sum + Number(item.discountTotalPrice);
             }, 0)
             }, 0)
             .toFixed(2);
             .toFixed(2);
-
-
+          this.$emit('update:payAmount', this.payAmount)
           this.$store.commit('returnGoods/setAllcountAmount', sum);
           this.$store.commit('returnGoods/setAllcountAmount', sum);
         } else {
         } else {
           this.$store.commit('returnGoods/setAllcountAmount', 0);
           this.$store.commit('returnGoods/setAllcountAmount', 0);

+ 356 - 0
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTabledetail.vue

@@ -0,0 +1,356 @@
+<template>
+  <ele-pro-table
+    ref="table"
+    :needPage="false"
+    :columns="competAnalysisListcolumns"
+    :toolkit="[]"
+    :datasource="productList"
+    row-key="id"
+  >
+    <template v-slot:toolbar>
+      <div class="headbox">
+        <span class="amount" v-if="isSinglePrice"
+        >总计:{{ form.totalPrice || form.totalAmount }}元</span
+        >
+        <!--  v-if="isDiscountTotalPrice"       -->
+        <span
+          class="amount"
+
+          style="margin-left: 12px"
+        >优惠总金额:{{ form.discountTotalPrice || form.payAmount }}元</span
+        >
+      </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:industryArtFiles="{ row }">
+      <div v-if="row.industryArtFiles && row.industryArtFiles?.length">
+        <el-link
+          v-for="link in row.industryArtFiles"
+          :key="link.id"
+          type="primary"
+          :underline="false"
+          @click="downloadFile(link)"
+        >
+          {{ link.name }}</el-link
+        >
+      </div>
+    </template>
+    <template v-slot:otherFiles="{ row }">
+      <div v-if="row.otherFiles && row.otherFiles?.length">
+        <el-link
+          v-for="link in row.otherFiles"
+          :key="link.id"
+          type="primary"
+          :underline="false"
+          @click="downloadFile(link)"
+        >
+          {{ link.name }}</el-link
+        >
+      </div>
+    </template>
+    <template v-slot:customerReqFiles="{ row }">
+      <div v-if="row.customerReqFiles && row.customerReqFiles?.length">
+        <el-link
+          v-for="link in row.customerReqFiles"
+          :key="link.id"
+          type="primary"
+          :underline="false"
+          @click="downloadFile(link)"
+        >
+          {{ link.name }}</el-link
+        >
+      </div>
+    </template>
+  </ele-pro-table>
+</template>
+<script>
+import {getFile} from "@/api/system/file";
+
+export default {
+  props: {
+    contractStartDate: {},
+    isDiscountTotalPrice: {
+      default: false,
+      type: Boolean
+    },
+    isDeliveryDeadline: {
+      default: true,
+      type: Boolean
+    },
+    isGuaranteePeriod: {
+      default: true,
+      type: Boolean
+    },
+    isCustomerMark: {
+      default: true,
+      type: Boolean
+    },
+    isSinglePrice: {
+      default: true,
+      type: Boolean
+    },
+    contractBookType: {
+      default: 1
+    }
+  },
+  data() {
+    return {
+      competAnalysisListcolumns: [
+        {
+          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: 160,
+          prop: 'customerMark',
+          label: '客户代号',
+          slot: 'customerMark',
+          show: this.isCustomerMark,
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'totalCount',
+          label: '数量',
+          slot: 'totalCount',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'measuringUnit',
+          label: '计量单位',
+          slot: 'measuringUnit',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'singleWeight',
+          label: '单重',
+          slot: 'singleWeight',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'totalWeight',
+          label: '总重',
+          slot: 'totalWeight',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'weightUnit',
+          label: '重量单位',
+          slot: 'weightUnit',
+          align: 'center'
+        },
+
+        {
+          width: 160,
+          prop: 'singlePrice',
+          label: '单价',
+          slot: 'singlePrice',
+          align: 'center'
+        },
+
+        {
+          width: 120,
+          prop: 'totalPrice',
+          label: '合计',
+          slot: 'totalPrice',
+          formatter: (_row, _column, cellValue) => {
+            return _row.totalPrice?_row.totalPrice + '元':'';
+          },
+          align: 'center'
+        },
+
+        // {
+        //   width: 120,
+        //   prop: 'deliveryDays',
+        //   label: '交期(天)',
+        //   slot: 'deliveryDays'
+        // },
+        // {
+        //   width: 160,
+        //   prop: 'deliveryDeadline',
+        //   label: '交期截止日期',
+        //   slot: 'deliveryDeadline',
+        //   show: this.isDeliveryDeadline
+        // },
+        {
+          width: 160,
+          prop: 'customerExpectDeliveryDeadline',
+          label: this.contractBookType == 1 ? '客户期望交期' : '交付日期',
+          slot: 'customerExpectDeliveryDeadline',
+          align: 'center'
+        },
+        {
+          width: 160,
+          prop: 'produceDeliveryDeadline',
+          label: '生产交付交期',
+          slot: 'produceDeliveryDeadline',
+          show: this.contractBookType == 1 ? true : false,
+          align: 'center'
+
+        },
+        {
+          width: 200,
+          prop: 'guaranteePeriod',
+          label: '质保期',
+          slot: 'guaranteePeriod',
+          formatter: (_row, _column, cellValue) => {
+            return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+          },
+          align: 'center'
+        },
+        {
+          width: 200,
+          prop: 'guaranteePeriodDeadline',
+          label: '质保期截止日期',
+          slot: 'guaranteePeriodDeadline',
+          show: this.isGuaranteePeriod,
+          align: 'center'
+        },
+        // {
+        //   width: 120,
+        //   prop: 'guaranteePeriodUnitCode',
+        //   label: '',
+        //   slot: 'guaranteePeriodUnitCode'
+        // },
+        {
+          width: 220,
+          prop: 'customerReqFiles',
+          label: '客户需求',
+          slot: 'customerReqFiles',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'technicalAnswerName',
+          label: '技术答疑人',
+          slot: 'technicalAnswerName',
+          align: 'center'
+        },
+        {
+          width: 220,
+          prop: 'technicalParams',
+          label: '技术参数',
+          slot: 'technicalParams',
+          align: 'center'
+        },
+        {
+          width: 240,
+          prop: 'technicalDrawings',
+          label: '技术图纸',
+          slot: 'technicalDrawings',
+          align: 'center'
+        },
+        {
+          width: 240,
+          prop: 'technologyRouteName',
+          label: '工艺路线',
+          slot: 'technologyRouteName',
+          show: this.contractBookType == 1 ? true : false
+
+        },
+        {
+          width: 240,
+          prop: 'industryArtFiles',
+          label: '工艺附件',
+          slot: 'industryArtFiles',
+          align: 'center'
+        },
+        {
+          width: 240,
+          prop: 'otherFiles',
+          label: '其他附件',
+          slot: 'otherFiles',
+          align: 'center'
+        },
+        {
+          width: 220,
+          prop: 'remark',
+          label: '备注',
+          slot: 'remark',
+          align: 'center'
+        }
+      ],
+      form: {},
+      productList: []
+    };
+  },
+  computed: {},
+
+  methods: {
+    //修改回显
+    putTableValue(data) {
+      let productList =
+        (data && (data.redressProductList || data.quoteProductList || data.productList)) || [];
+      if (data) {
+        this.form = data;
+        this.productList = productList;
+      }
+    },
+    downloadFile(file) {
+      getFile({objectName: file.storePath}, file.name);
+    },
+  }
+};
+</script>
+<style lang="scss" scoped></style>