Răsfoiți Sursa

采购收货单流程增加委外操作

Z 2 ani în urmă
părinte
comite
7ef7a27011

+ 1 - 1
src/views/bpm/handleTask/components/purchaseOrder/inventoryTable.vue

@@ -545,7 +545,7 @@ export default {
       let comitDatasource = this.form.datasource;
       if (comitDatasource.length === 0) return [];
       comitDatasource.forEach((v) => {
-        v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
+        // v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
         v.guaranteePeriodUnitName = this.getDictValue(
           '质保期单位',
           v.guaranteePeriodUnitCode

+ 349 - 233
src/views/bpm/handleTask/components/purchaseOrder/invoice/addInvoiceDialog.vue

@@ -2,7 +2,7 @@
   <div>
     <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <headerTitle title="收货信息"></headerTitle>
-      <el-row>
+      <el-row :gutter="20">
         <el-col :span="12">
           <el-form-item
             label="选择订单"
@@ -16,74 +16,77 @@
               placeholder="请输入"
             />
           </el-form-item>
+        </el-col>
+        <el-col :span="12">
           <el-form-item
-            label="供应商名称"
-            prop="supplierName"
+            label="委外发货单"
             style="margin-bottom: 22px"
           >
-            <span>{{ form.supplierName }}</span>
+            <el-input
+              clearable
+              v-model="form.outsourceSendCode"
+              @click.native="handleOutsourceSend"
+              placeholder="请输入"
+            />
           </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
           <el-form-item
-            label="需求类型"
+            label="供应商名称"
+            prop="supplierName"
             style="margin-bottom: 22px"
           >
-            <span>{{ form.sourceTypeName }}</span>
+            <el-input
+              clearable
+              v-model="form.supplierName"
+              disabled
+              placeholder="请输入"
+            />
           </el-form-item>
+        </el-col>
+        <el-col :span="12">
           <el-form-item
             label="供应商联系人"
             prop="linkName"
             style="margin-bottom: 22px"
           >
-            <el-input clearable v-model="form.linkName" placeholder="请输入" />
-          </el-form-item>
-
-          <el-form-item prop="receiveFiles" label="附件">
-            <fileUpload
-              v-model="form.receiveFiles"
-              module="main"
-              :showLib="false"
-              :limit="10"
-            />
+            <el-input clearable v-model="form.linkName" placeholder="请输入"/>
           </el-form-item>
         </el-col>
-
+      </el-row>
+      <el-row :gutter="20">
         <el-col :span="12">
-<!--          <el-form-item-->
-<!--            label="收货单类型"-->
-<!--            prop="receiveType"-->
-<!--            style="margin-bottom: 22px"-->
-<!--          >-->
-<!--            <DictSelection-->
-<!--              dictName="采购收货单类型"-->
-<!--              clearable-->
-<!--              v-model="form.receiveType"-->
-<!--            >-->
-<!--            </DictSelection>-->
-<!--          </el-form-item>-->
           <el-form-item
-            label="供应商车辆号"
-            prop="carNo"
+            label="需求类型"
             style="margin-bottom: 22px"
           >
-            <el-input clearable v-model="form.carNo" placeholder="请输入" />
+            <el-input v-model="form.sourceTypeName" disabled></el-input>
           </el-form-item>
 
-          <!-- <el-form-item
-              label="订单编码"
-              prop="orderNo"
-              style="margin-bottom: 22px"
-            >
-            <span>{{form.orderNo}}</span>
-
-            </el-form-item> -->
-
+        </el-col>
+        <el-col :span="12">
           <el-form-item
             label="供应商电话"
             prop="linkPhone"
             style="margin-bottom: 22px"
           >
-            <el-input clearable v-model="form.linkPhone" placeholder="请输入" />
+            <el-input clearable v-model="form.linkPhone" placeholder="请输入"/>
           </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+
+          <el-form-item
+            label="车辆号"
+            prop="carNo"
+            style="margin-bottom: 22px">
+            <el-input clearable v-model="form.carNo" placeholder="请输入"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
           <el-form-item
             label="送货单号"
             prop="sendNoteNo"
@@ -97,10 +100,35 @@
           </el-form-item>
         </el-col>
       </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item prop="receiveFiles" label="附件">
+            <fileUpload
+              v-model="form.receiveFiles"
+              module="main"
+              :showLib="false"
+              :limit="10"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item
+            label="计价方式"
+            style="margin-bottom: 22px">
+            <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-row>
     </el-form>
 
     <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
     <inventoryTable
+      :pricingWay="form.pricingWay"
+      :sourceType="form.sourceType"
+      :outsourceSendCode="form.outsourceSendCode"
       ref="inventoryTableref"
       :orderId="form.orderId"
     ></inventoryTable>
@@ -109,222 +137,310 @@
       ref="orderListDialogRef"
       @changeParent="changeOrder"
     ></orderListDialog>
+    <!-- 委外收货单   -->
+    <out-source-send-dialog :out-source-send-dialog-flag.sync="outSourceSendDialogFlag" v-if="outSourceSendDialogFlag"
+                            ref="outSourceSendDialogRef" :searchParams="searchParams"
+                            @changeParent="getOutSourceInfo"></out-source-send-dialog>
   </div>
 </template>
 
 <script>
-  import fileUpload from '@/components/upload/fileUpload';
-  import dictMixins from '@/mixins/dictMixins';
-  import { getpurchaseorderDetail } from '@/api/bpm/components/purchasingManage/purchaseOrder';
+import fileUpload from '@/components/upload/fileUpload';
+import dictMixins from '@/mixins/dictMixins';
+import {getpurchaseorderDetail} from '@/api/bpm/components/purchasingManage/purchaseOrder';
+import outSourceSendDialog from "./outSourceSendDialog.vue";
+import {getReceiveSaleOrderrecordDetail} from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
+import inventoryTable from './inventoryTable.vue';
+import orderListDialog from './orderListDialog.vue';
+import {copyObj} from '@/utils/util';
+import {getPurchaseOutSourceSendDetailAPI} from "@/api/bpm/components/purchasingManage/outSourceSend";
+
+export default {
+  mixins: [dictMixins],
+  components: {
+    fileUpload,
+    inventoryTable,
+    orderListDialog,
+    outSourceSendDialog
+  },
+  props: {
+    businessId: {
+      default: ''
+    }
+  },
+  data() {
+    let formDef = {
+      id: '',
+      contractId: '',
+      receiveFiles: [],
+      contractName: '',
+      carNo: '',
+      carId: '',
+      linkName: '',
+      linkPhone: '',
+      orderNo: '',
+      orderId: '',
+      outsourceSendCode: '',
+      outsourceSendId: '',
+      sendNoteNo: '',
+      sourceTypeName: '',
+      receiveType: ""
+    };
+
+    return {
+      detailData: {},
+      searchParams: {},
+      payWayOptions: [],
+      delDetailIds: [],
+      linkNameOptions: [],
+      outSourceSendDialogFlag: false,
+      visible: false,
+      title: '',
+      row: {},
+      activeName: 'base',
+      formDef,
+      form: copyObj(formDef),
+      tableBankData: [],
+      tableLinkData: [],
+      // 组织机构树形结构数据
+      rules: {
+        orderNo: [
+          {required: true, message: '请选择采购订单', trigger: 'change'}
+        ],
+        receiveType: [
+          {required: true, message: '请选择采购单类型', trigger: 'change'}
+        ]
+      },
 
-  import { getReceiveSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
-  import inventoryTable from './inventoryTable.vue';
-  import orderListDialog from './orderListDialog.vue';
-  import { copyObj } from '@/utils/util';
+      // 提交状态
+      loading: false,
+      // 是否是修改
+      isUpdate: false
+    };
+  },
+  computed: {
+    allcountAmount() {
+      return this.$store.state.order.allcountAmount;
+    }
+  },
 
-  export default {
-    mixins: [dictMixins],
-    components: {
-      fileUpload,
-      inventoryTable,
-      orderListDialog
+  created() {
+    this.getReceiveSaleOrderDetail(this.businessId);
+  },
+  methods: {
+    //选择订单回调
+    changeOrder(obj) {
+      this.form = Object.assign({}, this.form, {
+        orderId: obj.id,
+        orderNo: obj.orderNo
+      });
+      this.getPurchaseorder(obj.id);
     },
-    props: {
-      businessId: {
-        default: ''
+    //获取订单详情
+    async getPurchaseorder(id) {
+      this.loading = true;
+      const data = await getpurchaseorderDetail(id);
+      this.loading = false;
+      if (data) {
+        this.$nextTick(() => {
+          let {
+            partbId,
+            partbName,
+            partbTel,
+            orderNo,
+            id,
+            partbLinkName,
+            productList,
+            sourceTypeName,
+            sourceType
+          } = data;
+          if (productList && productList.length > 0) {
+            productList.forEach((v) => {
+              v.orderTotalCount = v.orderTotalCount || v.totalCount;
+            });
+          }
+          this.form = Object.assign({}, this.form, {
+            supplierId: partbId,
+            supplierName: partbName,
+            linkName: partbLinkName,
+            linkPhone: partbTel,
+            orderNo,
+            sourceTypeName,
+            sourceType,
+            orderId: id,
+            productList
+          });
+          this.$refs.inventoryTableref &&
+          this.$refs.inventoryTableref.putTableValue(productList);
+        });
       }
     },
-    data() {
-      let formDef = {
-        id: '',
-        contractId: '',
-        receiveFiles: [],
-        contractName: '',
-        carNo: '',
-        carId: '',
-        linkName: '',
-        linkPhone: '',
-        orderNo: '',
-        orderId: '',
-        sendNoteNo: '',
-        receiveType: '',
-        sourceTypeName: '',
-        sourceType: '',
-      };
 
-      return {
-        detailData: {},
-        payWayOptions: [],
-        delDetailIds: [],
-        linkNameOptions: [],
-        visible: false,
-        title: '',
-        row: {},
-        activeName: 'base',
-        formDef,
-        form: copyObj(formDef),
-        tableBankData: [],
-        tableLinkData: [],
-        // 组织机构树形结构数据
-        rules: {
-          orderNo: [
-            { required: true, message: '请选择采购订单', trigger: 'change' }
-          ],
-          receiveType: [
-            { required: true, message: '请选择采购单类型', trigger: 'change' }
-          ]
-        },
+    //发货单详情
+    async getReceiveSaleOrderDetail(id) {
+      this.loading = true;
+      const data = await getReceiveSaleOrderrecordDetail(id);
+      this.loading = false;
+      if (data) {
+        this.$nextTick(() => {
+          this.form = data;
+          this.$refs.inventoryTableref &&
+          this.$refs.inventoryTableref.putTableValue(data.productList);
+        });
+      }
+    },
 
-        // 提交状态
-        loading: false,
-        // 是否是修改
-        isUpdate: false
+    handHead() {
+      let item = {
+        id: this.form.partbLinkId
       };
+      this.$refs.headRef.open(item);
     },
-    computed: {
-      allcountAmount() {
-        return this.$store.state.order.allcountAmount;
+    //选择委外发货单弹框
+    handleOutsourceSend(e) {
+      if (e.target.nodeName == 'I') {
+        this.form = Object.assign({}, this.form, {
+          contractId: '',
+          receiveFiles: [],
+          contractName: '',
+          carNo: '',
+          carId: '',
+          linkName: '',
+          linkPhone: '',
+          orderNo: '',
+          orderId: '',
+          outsourceSendCode: '',
+          outsourceSendId: '',
+          sendNoteNo: '',
+          sourceTypeName: '',
+          receiveType: "",
+          pricingWay: '',
+        })
+        this.$refs.inventoryTableref &&
+        this.$refs.inventoryTableref.putTableValue([]);
+        return
       }
-    },
+      this.searchParams = {
+        orderId: this.form.orderId
+      }
+      this.outSourceSendDialogFlag = true
+      this.$nextTick(() => {
+        this.$refs.outSourceSendDialogRef.init();
+      })
 
-    created() {
-      this.getReceiveSaleOrderDetail(this.businessId);
     },
-    methods: {
-      //选择订单回调
-      changeOrder(obj) {
-        this.form = Object.assign({}, this.form, {
-          orderId: obj.id,
-          orderNo: obj.orderNo
-        });
-        this.getPurchaseorder(obj.id);
-      },
-      //获取订单详情
-      async getPurchaseorder(id) {
-        this.loading = true;
-        const data = await getpurchaseorderDetail(id);
-        this.loading = false;
-        if (data) {
-          this.$nextTick(() => {
-            let {
-              partbId,
-              partbName,
-              partbTel,
-              orderNo,
-              id,
-              partbLinkName,
-              productList,
-              sourceTypeName,
-              sourceType
-            } = data;
-            if (productList && productList.length > 0) {
-              productList.forEach((v) => {
-                v.orderTotalCount = v.orderTotalCount || v.totalCount;
-              });
-            }
-            this.form = Object.assign({}, this.form, {
-              supplierId: partbId,
-              supplierName: partbName,
-              linkName: partbLinkName,
-              linkPhone: partbTel,
-              orderNo,
-              sourceTypeName,
-              sourceType,
-              orderId: id,
-              productList
-            });
-            this.$refs.inventoryTableref &&
-              this.$refs.inventoryTableref.putTableValue(productList);
+    //获取委外发货单数据回调
+    async getOutSourceInfo(row) {
+      const data = await getPurchaseOutSourceSendDetailAPI(row.id);
+      this.$nextTick(() => {
+        let {
+          carNo,
+          code,
+          linkName,
+          linkPhone,
+          orderId,
+          orderNo,
+          productList,
+          sendNoteNo,
+          supplierId,
+          supplierName,
+          sourceType,
+          sourceTypeName,
+          pricingWay
+        } = data;
+        if (productList && productList.length > 0) {
+          productList.forEach((v) => {
+            v.orderTotalCount = v.orderTotalCount || v.totalCount;
           });
         }
-      },
+        this.form = Object.assign({}, this.form, {
+          supplierId,
+          supplierName,
+          linkName,
+          linkPhone,
+          orderNo,
+          orderId,
+          sourceTypeName,
+          sourceType,
+          productList,
+          sendNoteNo,
+          carNo,
+          pricingWay,
+          outsourceSendCode: code
+        });
+        productList.forEach(item =>{
+          item.id = ''
+        } )
+        this.$refs.inventoryTableref &&
+        this.$refs.inventoryTableref.putTableValue(productList, code);
+      });
+    },
+    //选择订单弹框
+    handleOrderBtn() {
+      let item = {
+        id: this.form.orderId
+      };
+      this.$refs.orderListDialogRef.open(item);
+    },
 
-      //发货单详情
-      async getReceiveSaleOrderDetail(id) {
-        this.loading = true;
-        const data = await getReceiveSaleOrderrecordDetail(id);
-        this.loading = false;
-        if (data) {
-          this.$nextTick(() => {
-            this.form = data;
-            this.$refs.inventoryTableref &&
-              this.$refs.inventoryTableref.putTableValue(data.productList);
+    getValidate() {
+      return Promise.all([
+        new Promise((resolve, reject) => {
+          this.$refs.form.validate((valid) => {
+            if (!valid) {
+              reject(false);
+            } else {
+              resolve(true);
+            }
           });
-        }
-      },
-
-      handHead() {
-        let item = {
-          id: this.form.partbLinkId
-        };
-        this.$refs.headRef.open(item);
-      },
-
-      //选择订单弹框
-      handleOrderBtn() {
-        let item = {
-          id: this.form.orderId
-        };
-        this.$refs.orderListDialogRef.open(item);
-      },
-
-      getValidate() {
-        return Promise.all([
-          new Promise((resolve, reject) => {
-            this.$refs.form.validate((valid) => {
-              if (!valid) {
-                reject(false);
-              } else {
-                resolve(true);
-              }
-            });
-          }),
-          new Promise((resolve, reject) => {
-            this.$refs.inventoryTableref.validateForm((valid) => {
-              if (!valid) {
-                reject(false);
-              } else {
-                resolve(true);
-              }
-            });
-          })
-        ]);
-      },
-      async getTableValue() {
-        try {
-          await this.getValidate();
-          this.form.receiveTypeName = this.getDictValue(
-            '采购收货单类型',
-            this.form.receiveType
-          );
-          // 表单验证通过,执行保存操作
-          this.loading = true;
-          let commitData = Object.assign({}, this.form, {
-            productList: this.$refs.inventoryTableref.getTableValue()
+        }),
+        new Promise((resolve, reject) => {
+          this.$refs.inventoryTableref.validateForm((valid) => {
+            if (!valid) {
+              reject(false);
+            } else {
+              resolve(true);
+            }
           });
-          return commitData;
-        } catch (error) {
-          console.log(error);
-          // 表单验证未通过,不执行保存操作
-        }
+        })
+      ]);
+    },
+    async getTableValue() {
+      try {
+        await this.getValidate();
+        this.form.receiveTypeName = this.getDictValue(
+          '采购收货单类型',
+          this.form.receiveType
+        );
+        // 表单验证通过,执行保存操作
+        this.loading = true;
+        let commitData = Object.assign({}, this.form, {
+          productList: this.$refs.inventoryTableref.getTableValue()
+        });
+        return commitData;
+      } catch (error) {
+        console.log(error);
+        // 表单验证未通过,不执行保存操作
       }
     }
-  };
+  }
+};
 </script>
 <style scoped lang="scss">
-  .TotalAmount {
-    font-size: 16px;
-    padding-right: 30px;
-  }
+.TotalAmount {
+  font-size: 16px;
+  padding-right: 30px;
+}
 
-  .headbox {
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    .amount {
-      font-size: 14px;
-      font-weight: bold;
-      margin-right: 20px;
-    }
+.headbox {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+
+  .amount {
+    font-size: 14px;
+    font-weight: bold;
+    margin-right: 20px;
   }
+}
 </style>

+ 46 - 24
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -15,7 +15,7 @@
       </div>
     </div>
     <div v-show="activeComp == 'main'">
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <headerTitle title="收货信息"></headerTitle>
         <el-row>
           <el-col :span="12">
@@ -40,9 +40,7 @@
             >
               {{ form.linkPhone }}
             </el-form-item>
-            <el-form-item label="需求类型:" style="margin-bottom: 16px">
-              {{ form.sourceTypeName }}
-            </el-form-item>
+
             <!-- <el-form-item
             label="客户地址:"
             prop="partaAddress"
@@ -51,12 +49,13 @@
             {{ form.receiveAddress }}
           </el-form-item> -->
             <el-form-item
-              label="审核状态:"
-              prop="reviewStatus"
+              label="车牌号:"
+              prop="carNo"
               style="margin-bottom: 16px"
             >
-              {{ reviewStatusEnum[form.reviewStatus]?.label }}
+              {{ form.carNo }}
             </el-form-item>
+
             <el-form-item
               label="附件:"
               prop="receiveFiles"
@@ -75,8 +74,8 @@
               </div>
             </el-form-item>
           </el-col>
+
           <el-col :span="12">
-            <!--          <el-col :span="12">-->
             <!--            <el-form-item-->
             <!--              label="采购单类型:"-->
             <!--              prop="receiveTypeName"-->
@@ -84,13 +83,8 @@
             <!--            >-->
             <!--              {{ form.receiveTypeName }}-->
             <!--            </el-form-item>-->
-            <el-form-item
-              label="车牌号:"
-              prop="carNo"
-              style="margin-bottom: 16px"
-            >
-              {{ form.carNo }}
-            </el-form-item>
+
+
 
             <el-form-item
               label="收货单编码:"
@@ -99,6 +93,12 @@
             >
               {{ form.receiveNo }}
             </el-form-item>
+            <el-form-item prop="orderNo" label="订单编码:">
+              {{ form.orderNo }}
+            </el-form-item>
+            <el-form-item prop="outsourceSendCode" label="委外发货单编码:">
+              {{ form.outsourceSendCode }}
+            </el-form-item>
             <el-form-item
               label="制单人:"
               prop="makerName"
@@ -106,8 +106,12 @@
             >
               {{ form.makerName }}
             </el-form-item>
-            <el-form-item prop="orderNo" label="订单编码:">
-              {{ form.orderNo }}
+            <el-form-item
+              label="审核状态:"
+              prop="reviewStatus"
+              style="margin-bottom: 16px"
+            >
+              {{ reviewStatusEnum[form.reviewStatus]?.label }}
             </el-form-item>
             <!-- <el-form-item prop="replied" label="是否回执:">
             {{ form.replied == 1 ? '是' : '否' }}
@@ -261,12 +265,6 @@
             label: '型号',
             slot: 'modelType'
           },
-          {
-            width: 120,
-            prop: 'supplierMark',
-            label: '供应商代号',
-            slot: 'supplierMark'
-          },
           {
             width: 120,
             prop: 'specification',
@@ -316,11 +314,35 @@
             slot: 'totalPrice'
           },
           {
-            width: 120,
+            width: 160,
             prop: 'discountTotalPrice',
             label: '折后合计',
             slot: 'discountTotalPrice'
           },
+          {
+            width: 200,
+            prop: 'sendTotalWeight',
+            label: '发货总重',
+            slot: 'sendTotalWeight',
+            align: "center",
+            headerSlot: 'headerTotalCount'
+          },
+          {
+            width: 100,
+            prop: 'receiveTotalWeight',
+            label: '收货总重',
+            slot: 'receiveTotalWeight',
+            align: "center"
+          },
+          {
+            width: 100,
+            prop: 'increaseTotalWeight',
+            label: '增重重量',
+            slot: 'increaseTotalWeight',
+            align: "center"
+          },
+
+
           {
             width: 80,
             prop: 'deliveryDays',

+ 457 - 341
src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue

@@ -36,7 +36,8 @@
               :underline="false"
               @click="downloadFile(link)"
             >
-              {{ link.name }}</el-link
+              {{ link.name }}
+            </el-link
             >
           </div>
         </el-form-item>
@@ -69,6 +70,27 @@
           ></el-input>
         </el-form-item>
       </template>
+      <template v-slot:sendTotalWeight="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
+          :rules="[
+            { required: [2,3].includes(Number(sourceType))&&pricingWay==2, message: '请输入数字', trigger: 'blur' }
+          ]"
+        >
+          <el-input v-model="scope.row.sendTotalWeight" style="width: 60%; margin-right: 10px">
+
+          </el-input>
+          <el-button
+            size="small"
+            type="primary"
+            v-if="[2,3].includes(Number(sourceType))&&pricingWay==2"
+            @click.native="(e)=>handleOutBound(e,scope.row,scope.$index)"
+          >选择
+          </el-button
+          >
+        </el-form-item>
+      </template>
       <template v-slot:warehouseId="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -99,7 +121,7 @@
         <span class="is-required">{{ column.label }}</span>
       </template>
       <template v-slot:headerTotalCount="{ column }">
-        <span class="is-required">{{ column.label }}</span>
+        <span :class="{'is-required':[2,3].includes(Number(sourceType))&&pricingWay==2}">{{ column.label }}</span>
       </template>
 
       <!-- 操作列 -->
@@ -123,236 +145,322 @@
       type="purchase"
       @changeParent="changeParent"
     ></product-list>
+    <!--出库详情-->
+    <outbound-details-dialog v-if="outboundDetailsDialogFlag" ref="outboundDetailsDialogRef"
+                             :outboundDetailsDialogFlag.sync="outboundDetailsDialogFlag"
+                             @saveDate="saveDate"></outbound-details-dialog>
   </el-form>
 </template>
 <script>
-  import { numberReg } from 'ele-admin';
-  import productList from '@/views/bpm/handleTask/components/saleOrder/invoice/product-list.vue';
-  import dictMixins from '@/mixins/dictMixins';
-  import {
-    getWarehouseList,
-  } from '@/api/bpm/components/saleManage/saleorder';
+import {numberReg} from 'ele-admin';
+import productList from '@/views/bpm/handleTask/components/saleOrder/invoice/product-list.vue';
+import dictMixins from '@/mixins/dictMixins';
+import {
+  getWarehouseList,
+} from '@/api/bpm/components/saleManage/saleorder';
 
-  import { copyObj } from '@/utils/util';
-  export default {
-    mixins: [dictMixins],
-    props: {
-      orderId: String
-    },
-    components: {
-      productList
-    },
-    data() {
-      const defaultForm = {
-        key: null,
-        endTime: '',
-        isFirst: 0,
-        name: '',
-        startTime: '',
-        workHour: '',
-        technicalDrawings: []
-        // warehouseCode:"",
-        // warehouseId:'',
-        // warehouseName:'',
-      };
-      return {
-        discountTotalPrice: 0.0,
-        allPrice: 0.0,
-        numberReg,
-        defaultForm,
-        warehouseList: [],
-        form: {
-          datasource: []
+import {copyObj} from '@/utils/util';
+import OutboundDetailsDialog from "./outboundDetailsDialog.vue";
+
+export default {
+  mixins: [dictMixins],
+  props: {
+    orderId: String,
+    outsourceSendCode: String,
+    pricingWay: [String, Number],
+    sourceType: [String, Number],
+  },
+  components: {
+    OutboundDetailsDialog,
+    productList
+  },
+  data() {
+    const defaultForm = {
+      key: null,
+      endTime: '',
+      isFirst: 0,
+      name: '',
+      startTime: '',
+      workHour: '',
+      technicalDrawings: []
+      // warehouseCode:"",
+      // warehouseId:'',
+      // warehouseName:'',
+    };
+    return {
+      discountTotalPrice: 0.0,
+      allPrice: 0.0,
+      numberReg,
+      defaultForm,
+      oldSendTotalWeightList: [],
+      warehouseList: [],
+      form: {
+        datasource: []
+      },
+      rules: {},
+      outboundDetailsDialogFlag: false,
+      columns: [
+        {
+          width: 45,
+          type: 'index',
+          columnKey: 'index',
+          align: 'center',
+          fixed: 'left'
         },
-        rules: {},
-        columns: [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            width: 200,
-            prop: 'productName',
-            label: '名称',
-            slot: 'productName'
-          },
-          {
-            width: 120,
-            prop: 'productCode',
-            label: '编码',
-            slot: 'productCode'
-          },
-          {
-            width: 200,
-            prop: 'productCategoryName',
-            label: '类型',
-            slot: 'productCategoryName'
-          },
-          {
-            width: 160,
-            prop: 'productBrand',
-            label: '牌号',
-            slot: 'productBrand'
-          },
-          {
-            width: 120,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType'
-          },
-          {
-            width: 120,
-            prop: 'supplierMark',
-            label: '供应商代号',
-            slot: 'supplierMark',
-          },
-          {
-            width: 120,
-            prop: 'specification',
-            label: '规格',
-            slot: 'specification'
-          },
-          {
-            width: 200,
-            prop: 'warehouseId',
-            label: '仓库名称',
-            slot: 'warehouseId',
-            headerSlot: 'headerWarehouseId'
-          },
-          {
-            width: 120,
-            prop: 'totalCount',
-            label: '进货数量',
-            slot: 'totalCount',
-            headerSlot: 'headerTotalCount'
-          },
-          {
-            width: 120,
-            prop: 'orderTotalCount',
-            label: '总数量',
-            slot: 'orderTotalCount'
-          },
-          {
-            width: 80,
-            prop: 'measuringUnit',
-            label: '计量单位',
-            slot: 'measuringUnit'
-          },
-          {
-            width: 160,
-            prop: 'singlePrice',
-            label: '单价',
-            slot: 'singlePrice'
-          },
-          {
-            width: 160,
-            prop: 'discountSinglePrice',
-            label: '折后单价',
-            slot: 'discountSinglePrice'
-          },
-          {
-            width: 120,
-            prop: 'totalPrice',
-            label: '合计',
-            slot: 'totalPrice'
-          },
-          {
-            width: 120,
-            prop: 'discountTotalPrice',
-            label: '折后合计',
-            slot: 'discountTotalPrice'
-          },
-          {
-            width: 80,
-            prop: 'deliveryDays',
-            label: '交期(天)',
-            slot: 'deliveryDays'
-          },
-          {
-            width: 160,
-            prop: 'deliveryDeadline',
-            label: '交期截止日期',
-            slot: 'deliveryDeadline'
-          },
-          {
-            width: 200,
-            prop: 'guaranteePeriod',
-            label: '质保期',
-            slot: 'guaranteePeriod'
-          },
-          {
-            width: 160,
-            prop: 'guaranteePeriodDeadline',
-            label: '质保截止日期',
-            slot: 'guaranteePeriodDeadline'
-          },
-          {
-            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'
-          },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 120,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            fixed: 'right',
-            showOverflowTooltip: true
-          }
-        ]
-      };
+        {
+          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: 'supplierMark',
+          label: '供应商代号',
+          slot: 'supplierMark',
+          align: "center",
+        },
+        {
+          width: 120,
+          prop: 'specification',
+          label: '规格',
+          slot: 'specification',
+          align: "center"
+        },
+        {
+          width: 200,
+          prop: 'warehouseId',
+          label: '仓库名称',
+          slot: 'warehouseId',
+          headerSlot: 'headerWarehouseId',
+          align: "center"
+        },
+        {
+          width: 120,
+          prop: 'totalCount',
+          label: '进货数量',
+          slot: 'totalCount',
+          headerSlot: 'headerTotalCount',
+          align: "center"
+        },
+        {
+          width: 120,
+          prop: 'orderTotalCount',
+          label: '总数量',
+          slot: 'orderTotalCount',
+          align: "center"
+        },
+        {
+          width: 80,
+          prop: 'measuringUnit',
+          label: '计量单位',
+          slot: 'measuringUnit',
+          align: "center"
+        },
+        {
+          width: 160,
+          prop: 'singlePrice',
+          label: '单价',
+          slot: 'singlePrice',
+          align: "center"
+        },
+        {
+          width: 160,
+          prop: 'discountSinglePrice',
+          label: '折后单价',
+          slot: 'discountSinglePrice',
+          align: "center"
+        },
+        {
+          width: 120,
+          prop: 'totalPrice',
+          label: '合计',
+          slot: 'totalPrice',
+          align: "center"
+        },
+        {
+          width: 120,
+          prop: 'discountTotalPrice',
+          label: '折后合计',
+          slot: 'discountTotalPrice',
+          align: "center"
+        },
+        {
+          width: 200,
+          prop: 'sendTotalWeight',
+          label: '发货总重',
+          slot: 'sendTotalWeight',
+          align: "center",
+          headerSlot: 'headerTotalCount'
+        },
+        {
+          width: 100,
+          prop: 'receiveTotalWeight',
+          label: '收货总重',
+          slot: 'receiveTotalWeight',
+          align: "center"
+        },
+        {
+          width: 100,
+          prop: 'increaseTotalWeight',
+          label: '增重重量',
+          slot: 'increaseTotalWeight',
+          align: "center"
+        },
+        {
+          width: 80,
+          prop: 'deliveryDays',
+          label: '交期(天)',
+          slot: 'deliveryDays',
+          align: "center"
+        },
+        {
+          width: 160,
+          prop: 'deliveryDeadline',
+          label: '交期截止日期',
+          slot: 'deliveryDeadline',
+          align: "center"
+        },
+        {
+          width: 200,
+          prop: 'guaranteePeriod',
+          label: '质保期',
+          slot: 'guaranteePeriod',
+          align: "center"
+        },
+        {
+          width: 160,
+          prop: 'guaranteePeriodDeadline',
+          label: '质保截止日期',
+          slot: 'guaranteePeriodDeadline',
+          align: "center"
+        },
+        {
+          width: 130,
+          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: 220,
+          prop: 'remark',
+          label: '备注',
+          slot: 'remark',
+          align: "center"
+        },
+        {
+          columnKey: 'action',
+          label: '操作',
+          width: 120,
+          align: 'center',
+          resizable: false,
+          slot: 'action',
+          fixed: 'right',
+          showOverflowTooltip: true
+        }
+      ]
+    };
+  },
+  created() {
+    getWarehouseList().then((res) => {
+      this.warehouseList = res;
+    });
+  },
+  computed: {},
+  methods: {
+    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);
     },
-    created() {
-      getWarehouseList().then((res) => {
-        this.warehouseList = res;
-      });
+
+    //出库单详情
+    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)
+      })
     },
-    computed: {},
-    methods: {
-      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('同一个产品不能选择相同的仓库');
+    //选择退货信息回调
+    saveDate(data = []) {
+      let totalWeight = data.reduce((num, row) => {
+        num += Number(row.weight)
+        return num
+      }, 0)
+      console.log(totalWeight, this.curIndex);
+      this.$set(this.form.datasource[this.curIndex], 'sendTotalWeight', totalWeight);
+    },
+    //修改数量更新合计/总重
+    changeNum(val, index) {
+      if (this.pricingWay == 2) {
+        if (val != this.form.datasource[index].orderTotalCount) {
+          this.$set(this.form.datasource[index], 'sendTotalWeight', '')
+        } else {
+          let find = this.oldSendTotalWeightList.find(key => key.id == this.form.datasource[index].id) || {}
+          this.$set(this.form.datasource[index], 'sendTotalWeight', find.oldSendTotalWeight)
         }
-        this.$set(this.form.datasource[index], 'warehouseName', data.name);
-        this.$set(this.form.datasource[index], 'warehouseCode', data.code);
-      },
-
-      //修改数量更新合计
-      changeNum(val, index) {
+      } else {
         this.$set(
           this.form.datasource[index],
           'totalPrice',
@@ -363,135 +471,143 @@
           'discountTotalPrice',
           (Number(this.form.datasource[index].discountSinglePrice) * val).toFixed(2)
         );
-      },
-      //选择产品回调
-      changeParent(obj, idx) {
-        obj.orderTotalCount = obj.orderTotalCount || obj.totalCount;
-        obj.id = '';
-        this.$set(
-          this.form.datasource,
-          this.form.datasource.length,
-          copyObj(obj)
-        );
-      },
-      validateTotalCount(row) {
-        return (rule, value, callback) => {
-          if (isNaN(value) || Number(value) <= 0) {
-            this.$message.error('请输入大于0的数');
-            callback(new Error('请输入大于0的数字'));
-          } else if (this.getTotalCount(row) > row.orderTotalCount) {
-            this.$message.error('进货数量不能大于总数量');
-            callback(new Error('进货数量不能大于总数量'));
-          } else {
-            callback();
-          }
-        };
-      },
-      getTotalCount(row) {
-        let num = 0;
-        this.form.datasource
-          .filter((item) => item.productCode == row.productCode)
-          .forEach((item) => {
-            num += Number(item.totalCount);
-          });
-        console.log(num);
-        return num;
-      },
-      // 返回列表数据
-      getTableValue() {
-        let comitDatasource = this.form.datasource;
-        if (comitDatasource.length === 0) return [];
-        comitDatasource.forEach(async (v) => {
-          v.totalCount = Number(v.totalCount);
-          v.technicalDrawings = Array.isArray(v.technicalDrawings)
-            ? v.technicalDrawings
-            : [];
-        });
-        return comitDatasource;
-      },
-      getPrice() {
-        return [this.allPrice];
-      },
+      }
+    },
 
-      //修改回显
-      putTableValue(data) {
-        if (data) {
-          this.form.datasource = data;
-          console.log(data);
+    //选择产品回调
+    changeParent(obj, idx) {
+      obj.orderTotalCount = obj.orderTotalCount || obj.totalCount;
+      obj.id = '';
+      this.$set(
+        this.form.datasource,
+        this.form.datasource.length,
+        copyObj(obj)
+      );
+    },
+    validateTotalCount(row) {
+      return (rule, value, callback) => {
+        if (isNaN(value) || Number(value) <= 0) {
+          this.$message.error('请输入大于0的数');
+          callback(new Error('请输入大于0的数字'));
+        } else if (this.getTotalCount(row) > row.orderTotalCount) {
+          this.$message.error('进货数量不能大于总数量');
+          callback(new Error('进货数量不能大于总数量'));
+        } else {
+          callback();
         }
-      },
-
-      remove(i) {
-        this.form.datasource.splice(i, 1);
-        this.setSort();
-      },
-      // 清空表格
-      restTable() {
-        this.form.datasource = [];
-      },
-      // 重新排序
-      setSort() {
-        this.form.datasource.forEach((n, index) => {
-          n.key = index + 1;
+      };
+    },
+    getTotalCount(row) {
+      let num = 0;
+      this.form.datasource
+        .filter((item) => item.productCode == row.productCode)
+        .forEach((item) => {
+          num += Number(item.totalCount);
         });
-      },
-      // 添加
-      handlAdd() {
-        if (!this.orderId) return this.$message.error('请先选择订单');
-        this.$refs.productListRef.open(this.form.datasource);
-      },
+      console.log(num);
+      return num;
+    },
+    // 返回列表数据
+    getTableValue() {
+      let comitDatasource = this.form.datasource;
+      if (comitDatasource.length === 0) return [];
+      comitDatasource.forEach(async (v) => {
+        v.totalCount = Number(v.totalCount);
+        v.technicalDrawings = Array.isArray(v.technicalDrawings)
+          ? v.technicalDrawings
+          : [];
+      });
+      return comitDatasource;
+    },
+    getPrice() {
+      return [this.allPrice];
+    },
+//修改回显
+    async putTableValue(data = [], code) {
+      this.form.datasource = data;
+      this.oldSendTotalWeightList = this.form.datasource.map(item => {
+        return {
+          id: item.id,
+          oldSendTotalWeight: item.sendTotalWeight
+        }
+      })
+    },
+    remove(i) {
+      this.form.datasource.splice(i, 1);
+      this.setSort();
+    },
+    // 清空表格
+    restTable() {
+      this.form.datasource = [];
+    },
+    // 重新排序
+    setSort() {
+      this.form.datasource.forEach((n, index) => {
+        n.key = index + 1;
+      });
+    },
+    // 添加
+    handlAdd() {
+      if (!this.orderId) return this.$message.error('请先选择订单');
+      this.$refs.productListRef.open(this.form.datasource);
+    },
 
-      validateForm(callback) {
-        //开始表单校验
-        this.$refs.form.validate((valid) => {
-          callback(valid);
-        });
-      }
+    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;
-    }
-  }
-  .time-form .el-form-item {
-    margin-bottom: 0 !important;
+.headbox {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+
+  .amount {
+    font-size: 14px;
+    font-weight: bold;
+    padding-right: 30px;
   }
+}
 
-  ::v-deep .period {
-    display: flex;
-    .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;
-      }
+.time-form .el-form-item {
+  margin-bottom: 0 !important;
+}
+
+::v-deep .period {
+  display: flex;
+
+  .borderleftnone {
+    .el-input--medium .el-input__inner {
+      border-top-right-radius: 0;
+      border-bottom-right-radius: 0;
     }
   }
 
-  ::v-deep .time-form tbody > tr:hover > td {
-    background-color: transparent !important;
-  }
-  ::v-deep .time-form .el-table tr {
-    background-color: #ffffff;
+  .borderrightnone {
+    .el-input--medium .el-input__inner {
+      border-top-left-radius: 0;
+      border-bottom-left-radius: 0;
+    }
   }
+}
 
-  .pricebox {
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    font-weight: bold;
-  }
+::v-deep .time-form tbody > tr:hover > td {
+  background-color: transparent !important;
+}
+
+::v-deep .time-form .el-table tr {
+  background-color: #ffffff;
+}
+
+.pricebox {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  font-weight: bold;
+}
 </style>

+ 106 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/outSourceSearchTable.vue

@@ -0,0 +1,106 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="100px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="收货单编码:" prop="receiveNo">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.receiveNo"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="订单编码:" prop="orderNo">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.orderNo"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+
+        <el-form-item label="供应商名称:" prop="supplierName">
+          <el-input
+            placeholder="请输入"
+            style="max-width:320px"
+            v-model.trim="params.supplierName" controls-position="right">
+          </el-input>
+
+        </el-form-item>
+
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:4 }">
+
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import {reviewStatusEnum} from '@/enum/dict';
+
+const repliedOptions = [
+  {value: 0, label: '否'},
+  {value: 1, label: '是'},
+]
+export default {
+  data() {
+    // 默认表单数据
+    const defaultParams = {
+      supplierName: '',
+      code: '',
+      orderId: '',
+    };
+    return {
+      reviewStatusEnum,
+      defaultParams,
+      repliedOptions,
+      // 表单数据
+      params: {...defaultParams}
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    //选择时间
+    changeDate(e) {
+      this.createTime = e
+    },
+    /* 搜索 */
+    search() {
+      this.$emit('search', {
+        ...this.params
+      });
+    },
+    /*  重置 */
+    reset() {
+      this.createTime = []
+      this.params = Object.assign({}, {...this.defaultParams});
+      this.search();
+    }
+  }
+};
+</script>

+ 201 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/outSourceSendDialog.vue

@@ -0,0 +1,201 @@
+<template>
+  <el-dialog
+    title="选择委外收货单"
+    custom-class="ele-dialog-form long-dialog-form"
+    :visible.sync="outSourceSendDialogFlag"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    top="5vh"
+    :close-on-press-escape="false"
+    append-to-body
+    width="80%"
+  >
+    <el-card shadow="never">
+      <searchTable @search="reload"></searchTable>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        row-key="id"
+        height="calc(100vh - 500px)"
+        class="dict-table"
+        @cell-click="cellClick"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:action="{ row }">
+          <el-radio class="radio" v-model="radio" :label="row.id"
+          ><i></i
+          ></el-radio>
+        </template>
+      </ele-pro-table>
+    </el-card>
+
+    <div class="btns" slot="footer">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import searchTable from './outSourceSearchTable.vue';
+import {getPurchaseOutSourceSendPageAPI} from "@/api/bpm/components/purchasingManage/outSourceSend";
+
+export default {
+  components: {
+    searchTable
+  },
+  props: {
+    searchParams: {
+      type: Object,
+      default: () => {
+      }
+    },
+    outSourceSendDialogFlag: Boolean
+  },
+
+  data() {
+    return {
+      currentIndex: null,
+      columns: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          width: 60,
+          type: 'action',
+          slot: 'action',
+          label: '选择',
+          columnKey: 'action',
+          align: 'center'
+        },
+        {
+          prop: 'code',
+          label: '发货单编码',
+          align: 'center',
+          slot: 'code',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'orderNo',
+          label: '订单编码',
+          align: 'center',
+          slot: 'orderNo',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'sourceTypeName',
+          label: '需求来源',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'supplierName',
+          label: '供应商名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'linkName',
+          label: '供应商联系人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'linkPhone',
+          label: '供应商联系电话',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        }
+      ],
+
+      radio: null
+    };
+  },
+
+  methods: {
+    init() {},
+    /* 表格数据源 */
+    datasource({page, limit, where}) {
+      return getPurchaseOutSourceSendPageAPI({
+        pageNum: page,
+        size: limit,
+        ...where,
+        reviewStatus: 2,
+        ...this.searchParams
+      });
+    },
+
+    /* 刷新表格 */
+    reload(where) {
+      where = {
+        ...where,
+        ...this.searchParams
+      }
+      this.$refs.table.reload({pageNum: 1, where: where});
+    },
+
+
+    // 单击获取id
+    cellClick(row) {
+      this.current = row;
+      this.radio = row.id;
+    },
+    handleClose() {
+      this.$emit('update:outSourceSendDialogFlag', false)
+    },
+
+    selected() {
+      if (!this.current) {
+        return this.$message.warning('请至少选择一条数据');
+      }
+      this.$emit('changeParent', this.current, this.currentIndex);
+      this.handleClose();
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.tree_col {
+  border: 1px solid #eee;
+  padding: 10px 0;
+  box-sizing: border-box;
+  height: 500px;
+  overflow: auto;
+}
+
+.table_col {
+  padding-left: 10px;
+
+  ::v-deep .el-table th.el-table__cell {
+    background: #f2f2f2;
+  }
+}
+
+.pagination {
+  text-align: right;
+  padding: 10px 0;
+}
+
+.btns {
+  text-align: center;
+  padding: 10px 0;
+}
+
+.topsearch {
+  margin-bottom: 15px;
+}
+</style>

+ 752 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/outboundDetailsDialog.vue

@@ -0,0 +1,752 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible.sync="outboundDetailsDialogFlag"
+    :title="title"
+    append-to-body
+    :close-on-click-modal="false"
+    width="80%"
+    :before-close="cancel">
+    <div>
+      <div class="content-detail">
+        <header-title title="基本信息" size="16px"></header-title>
+
+        <div class="mt20">
+          <el-form label-width="110px">
+            <el-col :span="8">
+              <el-form-item label="出库单号">
+                <span>{{ infoData.bizNo }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="出库物品类型">
+                  <span>{{
+                      infoData.bizType == 3
+                        ? '物品'
+                        : getDictValue('类型用途', infoData.assetType)
+                    }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="出库场景">
+                <!--                <span>{{ getSceneState(infoData.bizType) }}</span>-->
+              </el-form-item>
+            </el-col>
+            <el-col :span="8" v-if="infoData.bizType == 3">
+              <el-form-item label="客户名称">
+                <span>{{ infoData.clientName }}</span>
+              </el-form-item>
+            </el-col
+            >
+            <el-col :span="8" v-if="infoData.bizType == 3">
+              <el-form-item label="客户联系人">
+                <span>{{ infoData.clientUser }}</span>
+              </el-form-item>
+            </el-col
+            >
+            <el-col :span="8" v-if="infoData.bizType == 3">
+              <el-form-item label="客户电话">
+                <span>{{ infoData.clientPhone }}</span>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item
+                :label="infoData.bizType == 4 ? '领料单' : '来源单据'"
+              >
+                <span>{{ infoData.sourceBizNo }}</span>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="领料人联系方式">
+                <span>{{ infoData.fromUserPhone }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="出库登记人">
+                <span>{{ infoData.extInfo?.createUserName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="权属部门">
+                <span>{{ infoData.extInfo?.deptName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="创建时间">
+                <span>{{ infoData.createTime }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="出库时间">
+                <span>{{ infoData.createTime }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="状态:">
+                <span>{{ stepsTitle }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领料人部门">
+                <span>{{ infoData.verifyDeptName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领料人">
+                <span>{{ infoData.fromUser }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label="备注">
+                <span>{{ infoData.remark }}</span>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </div>
+      </div>
+      <div class="content-detail mt20">
+        <header-title title="出库物品明细" size="16px"></header-title>
+        <div class="mt20">
+          <div class="mt10">
+            <el-table
+              ref="multipleTable"
+              :data="warehousingMaterialList"
+              tooltip-effect="dark"
+              style="width: 100%"
+
+              stripe
+              :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+            >
+              <!--              <el-table-column-->
+              <!--                align="center"-->
+              <!--                type="selection"-->
+              <!--                width="55">-->
+              <!--              </el-table-column>-->
+              <el-table-column label="序号" type="index" width="50">
+              </el-table-column>
+              <el-table-column
+                label="编码"
+                prop="categoryCode"
+              ></el-table-column>
+              <el-table-column label="名称" prop="name"></el-table-column>
+              <el-table-column
+                label="批次号"
+                prop="batchNo"
+              ></el-table-column>
+              <el-table-column label="最小包装单元" width="120">
+                <template slot-scope="{ row }">
+                  {{ row.minPackingCount }}{{ row.measuringUnit }}/{{
+                    row.packingUnit
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column label="包装数量" prop="availableCountBase">
+                <template slot-scope="{ row }">
+                  {{ row.packingCount }}{{ row.packingUnit }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="计量数量"
+                prop="count"
+              ></el-table-column>
+              <el-table-column
+                label="计量单位"
+                prop="measuringUnit"
+              ></el-table-column>
+              <el-table-column label="重量" prop="weight"></el-table-column>
+              <el-table-column
+                label="重量单位"
+                prop="weightUnit"
+              ></el-table-column>
+              <el-table-column label="单价">
+                <template slot-scope="{ row }">
+                  {{ row.price ? row.price : '-' }}元/{{ row.measuringUnit }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="金额"
+                prop="totalMoney"
+              ></el-table-column>
+              <el-table-column label="领料部门" prop="llbm"></el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </div>
+      <!-- ${
+            infoData.bizType == 3
+              ? '物品'
+              : getDictValue('类型用途', infoData.assetType)
+          }明细 -->
+      <div class="mt20">
+        <header-title :title="`出库包装明细`" size="16px"></header-title>
+        <el-table
+          ref="multipleTable"
+          :data="materialCodeReqList"
+          tooltip-effect="dark"
+          style="width: 100%"
+          @selection-change="selectionChange2"
+
+          stripe
+          :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+        >
+          <el-table-column
+            align="center"
+            type="selection"
+            v-if="!metaList.length"
+            :selectable="(row)=>row.categoryCode==rows.productCode"
+            width="55">
+          </el-table-column>
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <!-- ${
+              infoData.bizType == 3
+                ? '物品'
+                : getDictValue('类型用途', infoData.assetType)
+            } -->
+          <el-table-column
+            :label="`编码`"
+            prop="categoryCode"
+          ></el-table-column>
+          <el-table-column :label="`名称`" prop="name"></el-table-column>
+          <el-table-column label="批次号" prop="batchNo"></el-table-column>
+          <el-table-column
+            label="包装编码"
+            prop="code"
+            width="80"
+          ></el-table-column>
+          <el-table-column label="包装数量" prop="packingCount" width="80">
+            <template slot-scope="{ row }">
+              {{ row.packingCount == 0 ? '0' : row.packingCount }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="包装单位"
+            prop="packingUnit"
+          ></el-table-column>
+          <el-table-column
+            label="计量数量"
+            prop="totalCount"
+          ></el-table-column>
+          <el-table-column
+            label="计量单位"
+            prop="measuringUnit"
+          ></el-table-column>
+          <!-- <el-table-column label="领料部门" prop=""></el-table-column> -->
+          <el-table-column
+            v-if="infoData.bizType == 2 || infoData.bizType == 1"
+            label="物料代号"
+            prop="materielCode"
+          >
+            <template slot-scope="{ row }">
+              {{ row.materielCode }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-if="infoData.bizType == 2 || infoData.bizType == 1"
+            label="客户代号"
+            prop="clientCode"
+          >
+            <template slot-scope="{ row }">
+              {{ row.clientCode }}
+            </template>
+          </el-table-column>
+          <!-- v-if="infoData.bizType == 1" -->
+          <el-table-column label="刻码" prop="engrave">
+            <template slot-scope="{ row }">
+              {{ row.engrave }}
+            </template>
+          </el-table-column>
+          <el-table-column label="重量" prop="weight">
+            <template slot-scope="{ row }">
+              {{ row.weight }}
+            </template>
+          </el-table-column>
+          <el-table-column label="重量单位" prop="weightUtil">
+            <template slot-scope="{ row }">
+              {{ row.weightUtil }}
+            </template>
+          </el-table-column>
+
+          <el-table-column label="日期" prop="createTime" width="200">
+            <template slot="header" slot-scope="scope">
+              <!-- {{ dateTypes != 1 ? '采购日期' : '生产日期' }} -->
+              采购日期
+            </template>
+            <template slot-scope="{ row }">
+              {{ row.createTime }}
+            </template>
+          </el-table-column>
+          <el-table-column label="领料部门" prop="">
+            <template slot-scope="{ row }">
+              {{ row.llbm }}
+            </template>
+          </el-table-column>
+          <!-- <el-table-column label="转消耗" prop="">
+            <template slot-scope="{ row }">
+              <el-checkbox
+                disabled
+                v-model="row.isTransferAsset"
+              ></el-checkbox>
+            </template>
+          </el-table-column> -->
+        </el-table>
+      </div>
+      <div class="mt20">
+        <header-title :title="`出库物料明细`" size="16px"></header-title>
+        <el-table
+          ref="multipleTable1"
+          :data="metaList"
+          tooltip-effect="dark"
+          style="width: 100%"
+          @selection-change="selectionChange3"
+          stripe
+          :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+        >
+          <el-table-column
+            :selectable="(row)=>row.assetCode==rows.productCode"
+            align="center"
+            type="selection"
+            width="55">
+          </el-table-column>
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <el-table-column label="编码" prop="assetCode"></el-table-column>
+          <el-table-column label="名称" prop="assetName"></el-table-column>
+          <el-table-column label="批次号" prop="batchNo"></el-table-column>
+          <el-table-column label="物料编码" prop="no"></el-table-column>
+          <el-table-column label="计量数量" prop="">
+            <template slot-scope="{ row }">1</template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="measuringUnit">
+          </el-table-column>
+          <el-table-column label="物料代号" prop="meterielCode">
+          </el-table-column>
+          <el-table-column label="客户代号" prop="clientCode">
+          </el-table-column>
+          <el-table-column label="刻码" prop="engrave"></el-table-column>
+          <el-table-column label="重量" prop="weight"></el-table-column>
+          <el-table-column label="重量单位" prop="weightUnit">
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+
+    <div slot="footer">
+      <el-button type="primary" @click="handleSave">保存</el-button>
+      <el-button type="info" @click="cancel">关闭</el-button>
+    </div>
+
+  </ele-modal>
+
+</template>
+
+<script>
+
+// import { getInfo } from '@/api/stockManagement/outgoingManagement' '@/components/PageHeader'
+// import PageHeader from '@/components/PageHeader';
+// import { tableHeader } from '../common';
+import {mapGetters, mapActions} from 'vuex';
+//import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+
+// import {
+//   materialType,
+//   warehousingType,
+//   useDict,
+//   useDictLabel,
+//   inputStatus,
+//   outputSceneState,
+//   auditStatus
+// } from '@/utils/dict/index';
+import {getUser} from '@/api/system/user';
+import { getOutInBySourceBizNo } from '@/api/classifyManage/index';
+import {deepClone} from "@/utils";
+
+export default {
+  props: {
+    outboundDetailsDialogFlag: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      title: '信息',
+      selectionChangeList: [],
+      selectionChangeList2: [],
+      selectionChangeList3: [],
+      metaList: [],
+      rows: {},
+      infoData: {},
+      warehousingMaterialList: [],
+      materialCodeReqList: [],
+      tableData2: [],
+      fromUserList: [],
+
+      num: 1,
+      stepsList: [
+        {status: 'Done', nodeName: '创建'},
+        {status: 'Done', nodeName: '暂存', time: '2023-01-06'},
+        {status: 'Done', nodeName: '收货中'},
+        {status: 'Processing', nodeName: '已收货'}
+      ],
+      list: [
+        {
+          name: '紧急',
+          color: 'red'
+        },
+        {
+          name: '重要',
+          color: 'blue'
+        },
+        {
+          name: '已催办',
+          color: 'red'
+        }
+      ],
+      stepsTitle: '已完成',
+      stepsStatus: 'success',
+      active: 0
+    };
+  },
+  watch: {},
+  computed: {
+    ...mapGetters(['getDictValue']),
+    // tableHeader() {
+    //   return tableHeader(this.infoData?.extInfo?.assetType);
+    // }
+  },
+
+  created() {
+    //
+    // this.getUser();
+    // this._getInfo();
+    // this.requestDict('类型用途');
+  },
+  methods: {
+    async init(row = {}) {
+      this.rows = row
+      const data = await getOutInBySourceBizNo(row.sendNo)
+      this.infoData = deepClone(data)
+      //出库物料明细
+      this.warehousingMaterialList = this.infoData?.outInDetailVOList || []
+      //出库包装明细
+      if (this.warehousingMaterialList.length) {
+        this.materialCodeReqList = []
+        this.warehousingMaterialList.forEach(item => {
+          if (item.outInDetailRecordVOList?.length) {
+            item.outInDetailRecordVOList = item.outInDetailRecordVOList.map(i => {
+              return {
+                ...i,
+                outInCode: this.infoData.bizNo,
+                outInId: item.outInId,
+                measurementCount: i.totalCount,
+                outboundDetailId: i.id,
+                outboundType: 1,
+                packageCount: i.packingCount,
+                packingUnit: i.packingUnit,
+                weight: i.weight,
+                specification: item.specification,
+                name: i.name,
+                carveCode: i.engrave,
+                categoryCode: i.categoryCode,
+                id: ''
+              }
+            })
+            this.materialCodeReqList.push(...item.outInDetailRecordVOList)
+          }
+        })
+        //出库物料明细
+        if (this.materialCodeReqList.length) {
+          this.metaList = []
+          this.materialCodeReqList.forEach(item => {
+            if (item.outInDetailRecordMaterialDetailVOList?.length) {
+              item.outInDetailRecordMaterialDetailVOList = item.outInDetailRecordMaterialDetailVOList.map(i => {
+                return {
+                  ...i,
+                  outInId: item.outInId,
+                  outInCode: item.outInCode,
+                  measurementCount: 1,
+                  outboundDetailId: i.id,
+                  outboundType: 2,
+                  packageCount: i.packingCount,
+                  packingUnit: i.packingUnit,
+                  weight: i.weight,
+                  weightUtil: i.weightUnit,
+                  specification: item.specification,
+                  categoryCode: i.assetCode,
+                  carveCode: i.engrave,
+                  name: i.assetName,
+                  id: ''
+                }
+              })
+              this.metaList.push(...item.outInDetailRecordMaterialDetailVOList)
+            }
+          })
+        }
+      }
+
+    },
+    getUserName(id) {
+      let obj = this.fromUserList.find((x) => x.id == id);
+      return obj && obj.name;
+    },
+    async getUser() {
+      let res22 = await warehouseDefinition.getUserPage({
+        groupId: 1,
+        size: 9999,
+        page: 1
+      });
+      this.fromUserList = res22.list;
+    },
+    // selectionChange(val){
+    //   this.selectionChangeList = val
+    // },
+    selectionChange2(val) {
+      this.selectionChangeList2 = val
+      console.log(this.selectionChangeList2);
+    },
+    selectionChange3(val) {
+      this.selectionChangeList3 = val
+      console.log(this.selectionChangeList3);
+    },
+    handleSave() {
+      if (!this.selectionChangeList2.length && !this.selectionChangeList3.length) return this.$message.warning('请选择退货明细')
+      let params = [
+        ...this.selectionChangeList2,
+        ...this.selectionChangeList3
+      ]
+      this.$emit('saveDate', params)
+      this.cancel()
+    },
+    cancel() {
+      this.$emit('update:outboundDetailsDialogFlag', false)
+    },
+    ...mapActions('dict', ['requestDict']),
+
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.stepsStatus {
+  width: 40%;
+  margin: 0 auto;
+}
+
+.p20 {
+  padding: 20px;
+}
+
+.flex {
+  display: flex;
+}
+
+.title {
+  justify-content: space-between;
+  border-bottom: 1px solid #ccc;
+  padding-bottom: 5px;
+
+  span {
+    font-size: 16px;
+  }
+
+  .col {
+    padding-left: 40px;
+    font-size: 14px;
+    color: #aaaaaa;
+  }
+}
+
+.degree {
+  margin-right: 10px;
+  padding: 0px 15px;
+  color: #fff;
+  font-size: 13px;
+  line-height: 23px;
+  border-radius: 23px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  span {
+    width: 5px;
+    height: 5px;
+    border-radius: 100%;
+    margin-right: 6px;
+    background-color: #fff;
+  }
+}
+
+.red {
+  background-color: rgb(163, 0, 20);
+}
+
+.blue {
+  background-color: #1989fa;
+}
+
+.createdInfo {
+  justify-content: space-around;
+  margin-top: 10px;
+  font-size: 14px;
+
+  .col {
+    color: #6e6e6e;
+    padding-right: 10px;
+  }
+}
+
+.mt40 {
+  margin-top: 40px;
+}
+
+.custSteps {
+  margin-top: 20px;
+  margin-left: 70px;
+
+  .box {
+    width: 158px;
+    border: 1px solid #ccc;
+    padding: 10px;
+    flex-direction: row;
+    flex-wrap: wrap;
+    // justify-content: space-between;
+    font-size: 12px;
+    color: #9e9e9e;
+
+    .x {
+      width: 20px;
+      height: 15px;
+      margin-right: 5px;
+    }
+
+    .q {
+      background-color: #d0e4d5;
+    }
+
+    .b {
+      background-color: #1989fa;
+    }
+
+    .g {
+      background-color: #157a2c;
+    }
+
+    .r {
+      background-color: #a30014;
+    }
+
+    .a {
+      align-items: center;
+      margin-bottom: 10px;
+    }
+
+    .mr10 {
+      margin-right: 10px;
+    }
+
+    .mb0 {
+      margin-bottom: 0;
+    }
+  }
+
+  .stepsInfo {
+    // flex: 1;
+    width: 483px;
+  }
+}
+
+.mt20 {
+  margin-top: 20px;
+}
+
+.content-detail {
+  overflow: hidden;
+}
+
+.executor {
+  font-size: 14px;
+
+  .col {
+    color: #6e6e6e;
+    padding-right: 10px;
+  }
+}
+
+.result {
+  justify-content: space-around;
+}
+
+.mr20 {
+  margin-right: 20px;
+}
+
+.details {
+  font-size: 14px;
+  margin-bottom: 10px;
+}
+
+.customSteps {
+  margin-top: 40px;
+  font-size: 14px;
+  margin-left: 80px;
+
+  .time {
+    font-size: 12px;
+    color: #6e6e6e;
+    margin-right: 20px;
+    position: relative;
+
+    &::after {
+      content: '';
+      width: 1px;
+      height: 100%;
+      background-color: #157a2c;
+      position: absolute;
+      right: -26px;
+    }
+  }
+
+  .flex:last-child {
+    .time {
+      &::after {
+        display: none;
+      }
+    }
+  }
+
+  .round {
+    margin-right: 20px;
+    width: 10px;
+    height: 10px;
+    border-radius: 100%;
+    background-color: #157a2c;
+    position: relative;
+
+    span {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      width: 4px;
+      height: 4px;
+      background-color: #fff;
+      border-radius: 100%;
+      transform: translate(-2px, -2px);
+    }
+  }
+
+  .text {
+    .info {
+      margin-top: 10px;
+      width: 955px;
+      background-color: #f0f3f3;
+      overflow: hidden;
+      padding: 10px;
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/addOrEditDialog.vue

@@ -109,6 +109,7 @@
 
     <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
     <inventoryTable
+      :pricingWay="form.pricingWay"
       ref="inventoryTableref"
       :orderId="form.orderId"
     ></inventoryTable>

+ 8 - 1
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/inventoryTable.vue

@@ -202,7 +202,8 @@ export default {
     isShowAdd: {
       type: Boolean,
       default: true
-    }
+    },
+    pricingWay: [String, Number]
   },
   components: {
     productList
@@ -531,11 +532,17 @@ export default {
 
     //修改数量更新合计
     changeNum(val, index) {
+      if (this.pricingWay == 2) return
       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)
+      );
     },
     //选择产品回调
     changeParent(obj, idx) {