yusheng hai 1 ano
pai
achega
0e3bddd717
Modificáronse 23 ficheiros con 391 adicións e 435 borrados
  1. 1 1
      src/BIZComponents/inventoryTable.vue
  2. 20 0
      src/api/saleManage/palletManagement.js
  3. 3 1
      src/views/contractManage/contractBook/components/detailDialog.vue
  4. 18 5
      src/views/contractManage/contractChange/components/addOrEditDialog.vue
  5. 26 23
      src/views/financialManage/invoiceManage/components/addOrEditDialog.vue
  6. 4 4
      src/views/purchasingManage/inquiryManage/components/addDialog.vue
  7. 5 51
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  8. 36 72
      src/views/purchasingManage/purchaseOrder/components/addDialog.vue
  9. 7 1
      src/views/purchasingManage/purchaseOrder/components/inquiryList.vue
  10. 2 4
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  11. 23 48
      src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue
  12. 21 46
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue
  13. 94 87
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue
  14. 52 49
      src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue
  15. 1 0
      src/views/purchasingManage/purchasePlanManage/components/purchaseNeed-list.vue
  16. 7 0
      src/views/saleManage/saleOrder/components/contractListDialog.vue
  17. 1 9
      src/views/saleManage/saleOrder/index.vue
  18. 1 8
      src/views/saleManage/saleOrder/invoice/components/detailDialog.vue
  19. 13 9
      src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue
  20. 20 2
      src/views/saleManage/saleOrder/invoice/index.vue
  21. 4 1
      src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue
  22. 30 14
      src/views/saleManage/saleOrder/palletManagement/index.vue
  23. 2 0
      vue.config.js

+ 1 - 1
src/BIZComponents/inventoryTable.vue

@@ -1332,7 +1332,7 @@
           this.$set(parasm, 'measuringUnit', item.measuringUnit);
           this.$set(parasm, 'specification', item.specification);
           this.$set(parasm, 'weightUnit', item.weightUnit);
-          this.$set(parasm, 'singleWeight', item.roughWeight);
+          this.$set(parasm, 'singleWeight', item.netWeight);
           this.$set(parasm, 'pricingWay', item.pricingWay || 1);
 
           this.$set(parasm, 'imgCode', item.imgCode);

+ 20 - 0
src/api/saleManage/palletManagement.js

@@ -9,3 +9,23 @@ export async function getTableList(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+/**
+ * 详情
+ */
+export async function getDetail(data) {
+  const res = await request.post(`/eom/saleordersendrecord/listForTrayListDetail`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 更新
+ */
+export async function updateTrayList(data) {
+  const res = await request.put(`/eom/saleordersendrecord/updateTrayList`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 3 - 1
src/views/contractManage/contractBook/components/detailDialog.vue

@@ -267,7 +267,9 @@
         activeComp: 'main',
         tabOptions: [
           { key: 'main', name: '合同详情' },
-          { key: 'bpm', name: '流程详情' }
+          { key: 'bpm', name: '流程详情' },
+          { key: 'changeList', name: '变更记录' },
+          { key: 'dversion', name: '历史版本' },
         ],
         visible: false,
         detailId: '',

+ 18 - 5
src/views/contractManage/contractChange/components/addOrEditDialog.vue

@@ -8,7 +8,14 @@
     :close-on-click-modal="false"
     width="1000px"
     :before-close="cancel"
+    :fullscreen="fullscreen"
   >
+    <template slot="title">
+      <modalTitle
+        :title="title"
+        @setFullscreen="fullscreen = !fullscreen"
+      ></modalTitle>
+    </template>
     <div class="switch_left" v-if="dialogType=='view'">
       <ul>
         <li
@@ -43,32 +50,34 @@
               v-model="form.contractName"
               @click.native="selectContract"
               readonly
+              :disabled="dialogType=='view'"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item label="附件" prop="file">
-            <fileMain v-model="form.file"></fileMain>
+            <fileMain v-model="form.file" :type="dialogType=='view'?'view':'add'"></fileMain>
           </el-form-item>
         </el-col>
         <el-col :span="24">
           <el-form-item label="变更原因" prop="reason">
-            <el-input v-model="form.reason" type="textarea"></el-input>
+            <el-input v-model="form.reason" type="textarea" :disabled="dialogType=='view'"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="24">
           <el-form-item label="变更描述" prop="remark">
-            <el-input v-model="form.remark" type="remark"></el-input>
+            <el-input v-model="form.remark" type="remark" :disabled="dialogType=='view'"></el-input>
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <div slot="footer">
-      <el-button type="primary" @click="handleSave()" v-click-once
+      <el-button type="primary" v-if="dialogType!='view'" @click="handleSave()" v-click-once
         >保存</el-button
       >
       <el-button @click="cancel">返回</el-button>
     </div>
+    <bpmDetail v-if="activeComp==='bpm'&&form.processInstanceId" :id="form.processInstanceId"></bpmDetail>
     <contractListDialog
       ref="selectContractRef"
       @changeParent="changeContract"
@@ -86,6 +95,9 @@
   } from '@/api/contractManage/contractChange.js';
   import fileMain from '@/components/addDoc/index.vue';
   import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import modalTitle from '@/BIZComponents/modalTitle.vue';
+
   const defForm = {
     name: '',
     changeCode: '',
@@ -97,13 +109,14 @@
     contractId: ''
   };
   export default {
-    components: { fileMain, contractListDialog },
+    components: { fileMain, contractListDialog,bpmDetail,modalTitle },
     computed: {
       ...mapGetters(['user'])
     },
     data() {
       return {
         activeComp: 'main',
+        fullscreen:false,
         tabOptions: [
           { key: 'main', name: '变更详情' },
           { key: 'bpm', name: '流程详情' }

+ 26 - 23
src/views/financialManage/invoiceManage/components/addOrEditDialog.vue

@@ -171,13 +171,13 @@
               style="width: 100%"
               v-model="form.companyName"
               placeholder="请选择"
+              @change="enterpriseChange"
             >
               <el-option
                 v-for="item in enterprisePage"
                 :key="item.id"
                 :label="item.name"
                 :value="item.name"
-                @click.native="enterpriseChange(item)"
               >
               </el-option>
             </el-select>
@@ -240,13 +240,13 @@
               style="width: 100%"
               v-model="form.receiverName"
               placeholder="请选择"
+              @change="enterpriseChange"
             >
               <el-option
                 v-for="item in enterprisePage"
                 :key="item.id"
                 :label="item.name"
                 :value="item.name"
-                @click.native="enterpriseChange(item)"
               >
               </el-option>
             </el-select>
@@ -441,7 +441,7 @@
         isOtherSourceFlag: false,
         processSubmitDialogFlag: false,
         accountStatementDialogFlag: false,
-        paymentListDialogFlag:false,
+        paymentListDialogFlag: false,
         enterprisePage: [],
 
         form: {
@@ -493,7 +493,7 @@
           }).then((res) => {
             this.enterprisePage = [];
             this.enterprisePage.push(...res.list);
-            this.enterpriseChange(this.enterprisePage[0]);
+            this.enterpriseChange(this.enterprisePage[0]?.name);
           });
         } else {
           await this.getInfo(row.id);
@@ -560,13 +560,14 @@
         this.$forceUpdate();
       },
       async getContactDetail(id, data) {
-        if (!id) {
-          return;
+        let contactValue = {};
+        if (id) {
+          this.form.contactId = id;
+          contactValue = await contactDetail(id);
         }
-        this.form.contactId = id;
-        const { base, other, bankList, linkList } = await contactDetail(id);
+        const { base, other, bankList, linkList } = contactValue;
         if (this.form.type == 2) {
-          this.form.companyName = data.partbName || base.name;
+          this.form.companyName = base.name;
           this.form.companyUsc =
             data.partbUnifiedSocialCreditCode || base.unifiedSocialCreditCode;
           this.form.companyAddress =
@@ -577,13 +578,16 @@
 
           this.form.companyBankAccount = bankList[0]?.accountNo;
           this.form.companyBankBranchNo = bankList[0]?.bankName;
+          this.enterpriseChange(data.partaName);
+
         } else {
-          this.form.receiverName = data.partaName || base.name;
+          this.form.receiverName = base.name;
           this.form.receiverAddress =
             data.partaAddress || other?.addressName + other?.address;
           this.form.receiverTel =
             data.partaTel ||
             linkList.find((item) => item.ifChief == 1)?.mobilePhone;
+          this.enterpriseChange(data.partbName);
         }
       },
       //订单回调
@@ -643,6 +647,7 @@
       },
       //对账单回调
       getAccountData(tableInfo) {
+        console.log(tableInfo,'tableInfo')
         this.getContactDetail(tableInfo.contactId, {});
         this.$nextTick(() => {
           this.$set(this.form, 'sourceId', tableInfo?.children?.id);
@@ -746,10 +751,7 @@
       changeUserInfo(val, info) {
         this.form.applyUserName = info.name;
       },
-      //选择人员数据
-      changDrawerName(val, info) {
-        this.form.drawerName = info.name;
-      },
+
       //
       handleSelType(val) {
         this.form = Object.assign({}, this.form, defForm);
@@ -757,22 +759,23 @@
           this.$set(this.form, 'sourceType', '');
         }
         this.$refs.table.clearTable();
-        this.enterpriseChange(this.enterprisePage[0] || {});
+        this.enterpriseChange(this.enterprisePage[0]?.name);
       },
       setPrice(val) {
         this.form.amount = val;
       },
       //系统公司信息
-      enterpriseChange(data = {}) {
+      enterpriseChange(name) {
+        let data = this.enterprisePage.find((item) => item.name == name);
         if (this.form.type == 1) {
-          this.form.companyName = data.name;
-          this.form.companyUsc = data.unifiedSocialCreditCode;
-          this.form.companyAddress = data.address;
-          this.form.companyTel = data.tel;
+          this.form.companyName = data?.name;
+          this.form.companyUsc = data?.unifiedSocialCreditCode;
+          this.form.companyAddress = data?.address;
+          this.form.companyTel = data?.tel;
         } else {
-          this.form.receiverName = data.name;
-          this.form.receiverAddress = data.address;
-          this.form.receiverTel = data.tel;
+          this.form.receiverName = data?.name;
+          this.form.receiverAddress = data?.address;
+          this.form.receiverTel = data?.tel;
         }
         this.$forceUpdate();
       },

+ 4 - 4
src/views/purchasingManage/inquiryManage/components/addDialog.vue

@@ -527,8 +527,8 @@
           supplierCode: data.base.code,
           files: [],
           preferentialPrice: '',
-          settlementMode: '',
-          settlementModeName: '',
+          settlementMode: '4',
+          settlementModeName: '分期付款',
           taxRate: '',
           totalPrice: '',
           resultList: [obj]
@@ -565,8 +565,8 @@
           item['files'] = [];
           item['supplierName'] = item.name;
           item['preferentialPrice'] = '';
-          item['settlementMode'] = '';
-          item['settlementModeName'] = '';
+          item['settlementMode'] = '4';
+          item['settlementModeName'] = '分期付款';
           item['taxRate'] = '';
           item['totalPrice'] = '';
           item['resultList'] = copyObj(this.$refs.inventoryTable.selection);

+ 5 - 51
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -60,11 +60,7 @@
       <template v-slot:settlementMode="{ row, $index }">
         <el-form-item
           prop="settlementMode"
-          :rules="{
-            required: true,
-            message: '请输入优惠价',
-            trigger: 'change'
-          }"
+  
         >
           <DictSelection
             dictName="结算方式"
@@ -123,26 +119,7 @@
             v-model="form.files"
             :type="status == 'Detail' ? 'view' : ''"
           ></fileMain>
-          <!--          <fileUpload-->
-          <!--            v-if="status != 'Detail'"-->
-          <!--            v-model="form.files"-->
-          <!--            module="main"-->
-          <!--            :showLib="false"-->
-          <!--            :limit="5"-->
-          <!--          />-->
-          <!--          <div-->
-          <!--            v-if=" form.files && form.files?.length && status == 'Detail' ">-->
-          <!--            <el-link-->
-          <!--              v-for="link in form.files"-->
-          <!--              :key="link.id"-->
-          <!--              type="primary"-->
-          <!--              :underline="false"-->
-          <!--              @click="downloadFile(link)"-->
-          <!--            >-->
-          <!--              {{ link.name }}-->
-          <!--            </el-link-->
-          <!--            >-->
-          <!--          </div>-->
+
         </el-form-item>
       </template>
 
@@ -314,23 +291,7 @@
           ></el-input>
         </el-form-item>
       </template>
-      <!--      <template v-slot:measuringUnit="scope">-->
-      <!--        <el-form-item-->
-      <!--          style="margin-bottom: 20px"-->
-      <!--          :prop="'resultList.' + scope.$index + '.measuringUnit'"-->
-      <!--          :rules="{-->
-      <!--            required: false,-->
-      <!--            message: '请输入',-->
-      <!--            trigger: 'blur'-->
-      <!--          }"-->
-      <!--        >-->
-      <!--          <el-input-->
-      <!--            v-model="scope.row.measuringUnit"-->
-      <!--            placeholder="请输入"-->
-      <!--            :disabled="true"-->
-      <!--          ></el-input>-->
-      <!--        </el-form-item>-->
-      <!--      </template>-->
+
 
       <template v-slot:remark="scope" v-if="status !== 'Detail'">
         <el-form-item
@@ -854,7 +815,7 @@
                 supplierName: 0,
                 supplierTotalPrice: 0,
                 preferentialPrice: 0,
-                settlementMode: 0,
+                settlementMode: '4',
                 taxRate: 0,
                 files: 0,
                 deliveryDate: 0
@@ -869,14 +830,7 @@
               });
               this.spanArr.push(obj);
             }
-            // let totalPriceSame = item.totalPrice === this.form.resultList[index - 1].totalPrice;
-            // if (totalPriceSame) {
-            //   this.spanArr[pos].totalPrice += 1;
-            //   this.spanArr.push({ totalPrice: 0 });
-            // } else {
-            //   pos = index;
-            //   this.spanArr.push({ totalPrice: 1 });
-            // }
+        
           }
         });
       },

+ 36 - 72
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -32,17 +32,13 @@
               clearable
               v-model="form.sourceType"
               :disabled="isFlag"
+              @change="sourceTypeChange"
             >
-              <!--  v-if="form.sourceType != 1" -->
             </DictSelection>
           </el-form-item>
 
           <el-form-item label="来源类型" prop="relationType">
-            <!--            <el-input-->
-            <!--              @click.native="handPurchasePlan"-->
-            <!--              v-model="form.relationType"-->
-            <!--              placeholder="请选择"-->
-            <!--            ></el-input>-->
+    
             <el-select
               v-model="form.relationType"
               filterable
@@ -67,14 +63,7 @@
               }}</el-radio>
             </el-radio-group>
           </el-form-item>
-          <!-- <el-form-item
-            prop="remark"
-            label="是否带料"
-            v-if="['3', '4', '5', '6','7'].includes(form.sourceType)"
-          >
-          outsourceType
-          </el-form-item> -->
-
+       
           <el-form-item
             v-if="form.relationType == 1"
             label="采购需求单"
@@ -91,11 +80,7 @@
             label="采购计划单"
             prop="relationName"
           >
-            <!--            <el-input-->
-            <!--              @click.native="handPurchasePlan"-->
-            <!--              v-model="form.purchasePlanName"-->
-            <!--              placeholder="请选择"-->
-            <!--            ></el-input> -->
+
             <el-input
               @click.native="handPurchasePlan"
               v-model="form.relationName"
@@ -145,30 +130,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <!-- <el-form-item
-            label="交货日期"
-            prop="deliveryDate"
-
-          >
-            <el-date-picker
-              v-model="form.deliveryDate"
-              type="date"
-              placeholder="选择日期"
-            >
-            </el-date-picker>
-          </el-form-item> -->
-          <!--          <el-form-item-->
-          <!--            label="采购订单类型"-->
-          <!--            prop="purchaseType"-->
-          <!--           -->
-          <!--          >-->
-          <!--            <DictSelection-->
-          <!--              dictName="采购订单类型"-->
-          <!--              clearable-->
-          <!--              v-model="form.purchaseType"-->
-          <!--            >-->
-          <!--            </DictSelection>-->
-          <!--          </el-form-item>-->
+       
           <el-form-item label="项目名称" prop="projectName">
             <el-input
               clearable
@@ -185,17 +147,7 @@
             >
             </DictSelection>
           </el-form-item>
-          <!-- <el-form-item label="计价方式" prop="pricingWay">
-            <el-radio-group
-              v-model="form.pricingWay"
-              @change="changePricingWay"
-              :disabled="!!form.contractId"
-            >
-              <el-radio v-for="item in pricingWayList" :label="item.id">{{
-                item.name
-              }}</el-radio>
-            </el-radio-group>
-          </el-form-item> -->
+       
 
           <el-form-item label="需求人" prop="requireUserId">
             <personSelect
@@ -211,7 +163,6 @@
       <el-row>
         <el-col :span="12">
           <el-form-item label="采购方名称" prop="partaName">
-            <!--            <el-input clearable v-model="form.partaName" placeholder="请输入"/>-->
             <el-select
               style="width: 100%"
               v-model="form.partaName"
@@ -466,6 +417,7 @@
       ref="selectContractRef"
       @changeParent="changeContract"
       :type="2"
+      :sourceType="form.relationType"
     ></contractListDialog>
     <inquiryManageList
       ref="inquiryManageRef"
@@ -582,8 +534,8 @@
         saleType: '',
         saleTypeName: '',
         totalAmount: '',
-        settlementMode: '',
-        settlementModeName: '',
+        settlementMode: '4',
+        settlementModeName: '分期付款',
         partaUnifiedSocialCreditCode: '',
         partbUnifiedSocialCreditCode: '',
         partaAddress: '',
@@ -678,7 +630,6 @@
             }
           ],
           contractName: [
-            // this.OutValidate.includes(this.form.sourceType)
             {
               required: true,
               message: '请选择合同',
@@ -758,10 +709,7 @@
 
         this.getrequireUser(id);
       },
-      //切换计价方式重新算费用
-      changePricingWay() {
-        this.$refs.inventoryTable.getTotalPrice();
-      },
+
       //选择采购需求
       handPurchaseNeed() {
         this.$refs.purchaseNeedList.open(
@@ -838,7 +786,9 @@
         if (info.productList.lenght > 1) {
           this.$refs.planTableListRef.open(info);
         } else {
-          this.putTableValue(info);
+          this.$nextTick(() => {
+            this.putTableValue(info);
+          });
         }
         // let form = {
         //   contractVO: {
@@ -858,7 +808,7 @@
       },
       //选择核价单
       handInquiry(e) {
-        this.$refs.inquiryListRef.open();
+        this.$refs.inquiryListRef.open(this.form.relationType);
       },
       //选择采购核价回调
       async changeInquiryList(data) {
@@ -883,7 +833,9 @@
         if (info.productList.lenght > 1) {
           this.$refs.planTableListRef.open(info);
         } else {
-          this.putTableValue(info);
+          this.$nextTick(() => {
+            this.putTableValue(info);
+          });
         }
 
         this.form = {
@@ -913,6 +865,13 @@
       },
 
       async putTableValue({ productList, rawDetailList, outputDetailList }) {
+        let totalPrice=0;
+        productList.forEach(item=>{
+          totalPrice+=item.totalPrice
+        })
+        this.$store.commit('order/setAllcountAmount', totalPrice);
+        this.$set(this.form,'totalPrice',totalPrice)
+
         this.$refs.inventoryTable &&
           this.$refs.inventoryTable.putTableValue(productList);
         this.$refs.rawDetailListRef &&
@@ -1036,8 +995,6 @@
             });
             this.getLinkInfo(partaId);
 
-       
-
             if (info.productList.lenght > 1) {
               this.$refs.planTableListRef.contractOpen(
                 info.productList,
@@ -1088,7 +1045,6 @@
             this.getLinkInfo(data.partaId);
             this.getrequireUser(this.form.requireDeptId);
             this.$store.commit('order/setContractId', data.contractId);
-   
           });
         }
       },
@@ -1105,7 +1061,14 @@
           return this.$message.error('请先选择名称');
         }
       },
+      sourceTypeChange(){
+        this.valueChange()
+
+      },
       handleChangeRelationType(val) {
+        this.valueChange()
+      },
+      valueChange(){
         this.form.purchasePlanId = '';
         this.form.purchasePlanNo = '';
         this.form.purchasePlanName = '';
@@ -1113,8 +1076,10 @@
         this.form.relationId = '';
         this.form.relationCode = '';
         this.form.relationName = '';
-        this.$refs.inventoryTable &&
+        this.$nextTick(() => {
+          this.$refs.inventoryTable &&
           this.$refs.inventoryTable.putTableValue([]);
+        })
       },
       //选择下拉框
       onchangeLink(selectedOptions) {
@@ -1172,8 +1137,7 @@
         //  this.form.productList=productList
 
         this.$nextTick(() => {
-          // this.$refs.inventoryTable &&
-          // this.$refs.inventoryTable.putTableValue(productList);
+       
           let firstLink =
             this.linkNameOptions.find((item) => item.ifChief == 1) || {};
           this.form = Object.assign({}, this.form, {
@@ -1232,7 +1196,7 @@
         let item = {
           id: this.form.contractId
         };
-        this.$refs.selectContractRef.open(item);
+        this.$refs.selectContractRef.open(item,this.form.relationType);
       },
       //清除合同
       clearContrcat() {

+ 7 - 1
src/views/purchasingManage/purchaseOrder/components/inquiryList.vue

@@ -8,6 +8,7 @@
     :close-on-press-escape="false"
     append-to-body
     width="70%"
+    v-if="visible"
   >
     <el-card shadow="never">
       <searchProduct @search="reload"></searchProduct>
@@ -54,6 +55,7 @@ export default {
       radio: null,
       selection: [],
       current: {},
+      sourceType:'',
       columns: [
         {
           columnKey: 'index',
@@ -129,12 +131,16 @@ export default {
 
   watch: {},
   methods: {
-    open() {
+    open(sourceType) {
+      this.sourceType=sourceType
       this.visible = true;
     },
 
     /* 表格数据源 */
     datasource({page, limit, where, order}) {
+      if(this.sourceType){
+        where['sourceType']=this.sourceType
+      }
       return getTableList({
         pageNum: page,
         size: limit,

+ 2 - 4
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -1089,11 +1089,9 @@
             item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
               ? item.guaranteePeriodUnitCode + ''
               : '';
-            // item.deliveryDeadline = item.customerExpectDeliveryDeadline;
-            // if (item.deliveryDays) {
-            //   item['deliveryDeadline'] = this.setDay(item.deliveryDays);//customerExpectDeliveryDeadline
-            // }
+
           });
+          console.log(data,'data')
           this.form.datasource = data;
           this.allPrice= this.$store.state.order.allcountAmount;
           let codeList = this.form.datasource

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

@@ -24,7 +24,7 @@
             v-for="item in tabOptions"
             :key="item.key"
             :class="{ active: activeComp == item.key }"
-            @click="activeComp = item.key"
+            @click="handleTag(item.key)"
           >
             {{ item.name }}
           </li>
@@ -46,13 +46,6 @@
               <el-input v-model="form.linkPhone" disabled></el-input>
             </el-form-item>
 
-            <!-- <el-form-item
-            label="客户地址:"
-            prop="partaAddress"
-
-          >
-            {{ form.receiveAddress }}
-          </el-form-item> -->
             <el-form-item label="车牌号:" prop="carNo">
               <el-input v-model="form.carNo" disabled></el-input>
             </el-form-item>
@@ -60,17 +53,7 @@
               <el-input v-model="form.receiveDate" disabled></el-input>
             </el-form-item>
             <el-form-item label="附件:" prop="receiveFiles">
-              <!--              <div v-if="detailData.sendFiles && detailData.sendFiles?.length">-->
-              <!--                <el-link-->
-              <!--                  v-for="link in detailData.sendFiles"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)"-->
-              <!--                >-->
-              <!--                  {{ link.name }}</el-link-->
-              <!--                >-->
-              <!--              </div>-->
+        
               <fileMain v-model="form.receiveFiles" type="view"></fileMain>
             </el-form-item>
             <el-form-item label="质检回执:" prop="qualityReportFiles">
@@ -103,12 +86,7 @@
             <el-form-item prop="outsourceSendCode" label="委外发货单编码:">
               <el-input v-model="form.outsourceSendCode" disabled></el-input>
             </el-form-item>
-            <!-- <el-form-item prop="pricingWay" label="计价方式:">
-              <el-select v-model="form.pricingWay" disabled style="width: 100%">
-                <el-option label="按数量计费" :value="1"></el-option>
-                <el-option label="按重量计费" :value="2"></el-option>
-              </el-select>
-            </el-form-item> -->
+         
 
             <el-form-item label="制单人:" prop="makerName">
               <el-input v-model="form.makerName" disabled></el-input>
@@ -126,10 +104,7 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <!-- <el-form-item prop="isQmsCheck" label="是否需要质检:">
-              {{ form.isQmsCheck == 1 ? '是' : '否' }}
-            </el-form-item> -->
-
+        
             <el-form-item v-if="form.reviewStatus == 2" label="入库单:">
               <el-link
                 type="primary"
@@ -192,11 +167,10 @@
       <el-button @click="cancel">返回</el-button>
     </div>
     <!--入库详情-->
-    <innertboundDetailsDialog
-      v-if="innerboundDetailsDialogFlag"
-      ref="innerboundDetailsDialogRef"
-      :innerboundDetailsDialogFlag.sync="innerboundDetailsDialogFlag"
-    ></innertboundDetailsDialog>
+    <innerBoundDetails
+    v-if="activeComp === 'store'"
+      ref="innerBoundDetailsRef"
+    ></innerBoundDetails>
   </ele-modal>
 </template>
 
@@ -208,7 +182,7 @@
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
 
   import { getReceiveSaleOrderrecordDetail } from '@/api/purchasingManage/purchaseorderreceive';
-  import innertboundDetailsDialog from '@/BIZComponents/innerboundDetailsDialog.vue';
+  import innerBoundDetails from '@/BIZComponents/innerdetails.vue';
   import fileMain from '@/components/addDoc/index.vue';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
 
@@ -216,9 +190,10 @@
     mixins: [dictMixins],
     components: {
       fileMain,
-      innertboundDetailsDialog,
+      // innertboundDetailsDialog,
       bpmDetail,
-      modalTitle
+      modalTitle,
+      innerBoundDetails
     },
     data() {
       return {
@@ -226,7 +201,8 @@
         activeComp: 'main',
         tabOptions: [
           { key: 'main', name: '收货单详情' },
-          { key: 'bpm', name: '流程详情' }
+          { key: 'bpm', name: '流程详情' },
+          { key: 'store', name: '入库单详情' }
         ],
         reviewStatusEnum,
         visible: false,
@@ -596,16 +572,7 @@
         this.getDetailData(row.id);
         this.detailId = row.id;
       },
-      //入库单详情
-      handleInnerBound() {
-        this.innerboundDetailsDialogFlag = true;
-        this.$nextTick(() => {
-          let row = {
-            code: this.form.receiveNo
-          };
-          this.$refs.innerboundDetailsDialogRef.init(row);
-        });
-      },
+
       cancel() {
         this.$nextTick(() => {
           // 关闭后,销毁所有的表单数据
@@ -619,6 +586,14 @@
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
       },
+      handleTag(val) {
+        this.activeComp = val;
+        if (val == 'store') {
+          this.$nextTick(() => {
+            this.$refs.innerBoundDetailsRef._getInfo(this.form.receiveNo);
+          });
+        }
+      },
       async getDetailData(id) {
         this.loading = true;
         const data = await getReceiveSaleOrderrecordDetail(id);

+ 21 - 46
src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue

@@ -23,7 +23,7 @@
             v-for="item in tabOptions"
             :key="item.key"
             :class="{ active: activeComp == item.key }"
-            @click="activeComp = item.key"
+            @click="handleTag(item.key)"
           >
             {{ item.name }}
           </li>
@@ -72,15 +72,6 @@
             </el-form-item>
           </el-col>
 
-          <!-- <el-col :span="12">
-            <el-form-item
-              label="计价方式:">
-              <el-select v-model="form.pricingWay" disabled style="width: 100%">
-                <el-option label="按数量计费" :value="1"></el-option>
-                <el-option label="按重量计费" :value="2"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> -->
           <el-col :span="12">
             <el-form-item label="外协单位电话:" prop="linkPhone">
               <el-input v-model="form.linkPhone" disabled></el-input>
@@ -112,16 +103,6 @@
           <el-col :span="12">
             <el-form-item prop="files" label="附件:">
               <fileMain v-model="form.files" type="view"></fileMain>
-              <!--              <div v-if="row.files && row.files?.length">-->
-              <!--                <el-link-->
-              <!--                  v-for="link in row.files"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)">-->
-              <!--                  {{ link.name }}-->
-              <!--                </el-link>-->
-              <!--              </div>-->
             </el-form-item>
           </el-col>
           <el-col :span="12"> </el-col>
@@ -137,26 +118,8 @@
         :datasource="detailData.productList"
         row-key="id"
       >
-        <!-- <template v-slot:toolbar>
-          <div class="headbox">
-          <span class="amount">总计:{{detailData.totalAmount}}元</span>
-          <span class="amount">应付金额:{{detailData.payAmount}}元</span>
-        </div>
-        </template> -->
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-          <!--          <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>
       </ele-pro-table>
     </div>
@@ -165,7 +128,10 @@
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
     ></bpmDetail>
-
+    <out-bound-details
+      v-if="activeComp === 'store'"
+      ref="innerBoundDetailsRef"
+    ></out-bound-details>
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
     </div>
@@ -182,24 +148,27 @@
   import fileUpload from '@/components/upload/fileUpload.vue';
   import fileMain from '@/components/addDoc/index.vue';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
-
+  import outBoundDetails from '@/BIZComponents/outdetails.vue';
   export default {
     mixins: [dictMixins],
     components: {
       fileMain,
       fileUpload,
       bpmDetail,
-      modalTitle
+      modalTitle,
+      outBoundDetails
     },
     props: {
       detailDialogFlag: Boolean
     },
+
     data() {
       return {
         activeComp: 'main',
         tabOptions: [
           { key: 'main', name: '发货单详情' },
-          { key: 'bpm', name: '流程详情' }
+          { key: 'bpm', name: '流程详情' },
+          { key: 'store', name: '出库单详情' }
         ],
         fullscreen: false,
         reviewStatusEnum,
@@ -374,9 +343,7 @@
             prop: 'taxRate',
             label: '税率',
             formatter: (_row, _column, cellValue) => {
-              return _row.taxRate
-                ? _row.taxRate+'%'
-                : '';
+              return _row.taxRate ? _row.taxRate + '%' : '';
             },
             align: 'center'
           },
@@ -481,7 +448,7 @@
             prop: 'technicalDrawings',
             label: '技术图纸',
             slot: 'technicalDrawings',
-            
+
             align: 'center'
           },
           {
@@ -510,6 +477,14 @@
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
       },
+      handleTag(val) {
+        this.activeComp = val;
+        if (val == 'store') {
+          this.$nextTick(() => {
+            this.$refs.innerBoundDetailsRef._getInfo(this.form.code);
+          });
+        }
+      },
       async getDetailData(id) {
         this.loading = true;
         const data = await getPurchaseOutSourceSendDetailAPI(id);

+ 94 - 87
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -17,7 +17,7 @@
             type="primary"
             icon="el-icon-plus"
             class="ele-btn-icon"
-            @click="handlAdd"
+            @click="handlAdd('', -1)"
           >
             新增
           </el-button>
@@ -29,18 +29,6 @@
           :prop="'datasource.' + $index + '.technicalDrawings'"
         >
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-          <!--          <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>-->
         </el-form-item>
       </template>
       <template v-slot:industryArtFiles="{ row, $index }">
@@ -49,18 +37,6 @@
           :prop="'datasource.' + $index + '.industryArtFiles'"
         >
           <fileMain v-model="row.industryArtFiles" type="view"></fileMain>
-          <!--          <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>-->
         </el-form-item>
       </template>
       <template v-slot:otherFiles="{ row, $index }">
@@ -69,18 +45,6 @@
           :prop="'datasource.' + $index + '.otherFiles'"
         >
           <fileMain v-model="row.otherFiles" type="view"></fileMain>
-          <!--          <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>-->
         </el-form-item>
       </template>
       <template v-slot:customerReqFiles="{ row, $index }">
@@ -123,7 +87,6 @@
             { required: true, message: '请输入发货数量', trigger: 'blur' }
           ]"
         >
-          <!--           { validator: validateTotalCount(scope.row), trigger: 'blur' }-->
           <el-input
             v-model="scope.row.totalCount"
             @input="(val) => changeNum(val, scope.row, scope.$index)"
@@ -136,17 +99,13 @@
           :prop="'datasource.' + scope.$index + '.warehouseId'"
           :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]"
         >
-          <el-select
-            v-model="scope.row.warehouseId"
-            placeholder="请选择"
-           
-          >
+          <el-select v-model="scope.row.warehouseId" placeholder="请选择">
             <el-option
               v-for="item in scope.row.warehouseList"
               :key="item.warehouseId"
               :label="item.warehouseName"
               :value="item.warehouseId"
-              @click.native="warehouseChange(scope.$index, scope.row,item)"
+              @click.native="warehouseChange(scope.$index, scope.row, item)"
             >
             </el-option>
           </el-select>
@@ -180,16 +139,17 @@
     </ele-pro-table>
     <product-list
       ref="productListRef"
-      :orderId="orderId"
+      classType="1"
+      :isGetInventoryTotal="true"
       @changeParent="changeParent"
-      :productType="productType"
     ></product-list>
   </el-form>
 </template>
 <script>
   import { emailReg, phoneReg, numberReg } from 'ele-admin';
   import dictMixins from '@/mixins/dictMixins';
-  import productList from './product-list.vue';
+  // import productList from './product-list.vue';
+  import productList from '@/BIZComponents/product-list.vue';
   import {
     getWarehouseList,
     getWarehouseOutStock,
@@ -199,6 +159,7 @@
   import { copyObj } from '@/utils/util';
   import { getFile } from '@/api/system/file';
   import fileMain from '@/components/addDoc/index.vue';
+  import { getCode } from '@/components/addDoc/api/index.js';
 
   export default {
     mixins: [dictMixins],
@@ -427,9 +388,7 @@
             prop: 'taxRate',
             label: '税率',
             formatter: (_row, _column, cellValue) => {
-              return _row.taxRate
-                ? _row.taxRate+'%'
-                : '';
+              return _row.taxRate ? _row.taxRate + '%' : '';
             },
             align: 'center',
             show: !this.detailType
@@ -466,7 +425,6 @@
             }
           },
 
-
           {
             prop: 'provenance',
             label: '产地',
@@ -503,9 +461,13 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
+              let val = '';
+              if (_row.guaranteePeriod) {
+                val += _row.guaranteePeriod;
+              }
+              if (_row.guaranteePeriodUnitName) {
+                val += _row.guaranteePeriodUnitName;
+              }
             },
             align: 'center'
           },
@@ -596,12 +558,19 @@
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
       },
-      async warehouseChange(index, row,item) {
+      async warehouseChange(index, row, item) {
+        console.log(item, 'row');
 
-        console.log(item,'row')
-
-        this.$set(this.form.datasource[index], 'warehouseName', item.warehouseName);
-        this.$set(this.form.datasource[index], 'warehouseCode', item.warehouseCode||0);
+        this.$set(
+          this.form.datasource[index],
+          'warehouseName',
+          item.warehouseName
+        );
+        this.$set(
+          this.form.datasource[index],
+          'warehouseCode',
+          item.warehouseCode || 0
+        );
         const warehouseOutStock = await getWarehouseOutStock({
           warehouseId: item.warehouseId,
           code: row.productCode
@@ -659,16 +628,72 @@
 
         return num;
       },
+      // //选择产品回调
+      // changeParent(obj, idx) {
+      //   obj.orderTotalCount = obj.totalCount;
+      //   obj.id = '';
+      //   this.$set(
+      //     this.form.datasource,
+      //     this.form.datasource.length,
+      //     copyObj(obj)
+      //   );
+      // },
+
       //选择产品回调
-      changeParent(obj, idx) {
-        obj.orderTotalCount = obj.totalCount;
-        obj.id = '';
-        this.$set(
-          this.form.datasource,
-          this.form.datasource.length,
-          copyObj(obj)
-        );
+      changeParent(obj = [], idx) {
+        obj.forEach(async (item, index) => {
+          let i = idx == -1 ? index : idx;
+          let row = JSON.parse(JSON.stringify(this.defaultForm));
+          row.key = this.form.datasource.length + 1;
+          let parasm = idx == -1 ? row : this.form.datasource[i];
+          this.$set(parasm, 'productId', item.id);
+          this.$set(parasm, 'categoryName', item.name);
+          this.$set(parasm, 'productCategoryId', item.categoryLevelId);
+          this.$set(parasm, 'productBrand', item.brandNum);
+          this.$set(parasm, 'productCategoryName', item.categoryLevelPath);
+          this.$set(parasm, 'productCode', item.code);
+          this.$set(parasm, 'productName', item.name);
+          this.$set(parasm, 'modelType', item.modelType);
+          this.$set(parasm, 'availableCountBase', item.availableCountBase);
+          this.$set(parasm, 'measuringUnit', item.measuringUnit);
+          this.$set(parasm, 'specification', item.specification);
+          this.$set(parasm, 'weightUnit', item.weightUnit);
+          this.$set(parasm, 'imgCode', item.imgCode);
+          this.$set(parasm, 'produceType', item.componentAttribute);
+          this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
+          this.$set(parasm, 'singleWeight', item.netWeight);
+          this.$set(parasm, 'pricingWay', item.pricingWay || 1);
+          this.$set(parasm, 'singlePrice', 0);
+          this.$set(parasm, 'discountSinglePrice', 0);
+          
+          this.$set(
+            parasm,
+            'warehouseList',
+            await getIdWarehouseList({
+              categoryId: item.id
+            })
+          );
+          this.$set(
+            parasm,
+            'packingSpecification',
+            item.extField?.packingSpecification
+          );
+          this.$set(
+            parasm,
+            'supplierMark',
+            this.form.datasource[0]?.supplierMark
+          );
+          this.$set(parasm, 'batchNo', await getCode('1900101420390125570'));
+          if (item.purchaseOrigins?.length > 0) {
+            item.purchaseOrigins = item.purchaseOrigins.map((val) => val + '');
+          }
+          this.$set(parasm, 'provenance', item.purchaseOrigins || []);
+          if (idx == -1) {
+            this.form.datasource.push(row);
+          }
+        });
       },
+
       validateTotalCount(row) {
         return (rule, value, callback) => {
           if (isNaN(value) || Number(value) <= 0) {
@@ -735,24 +760,6 @@
           });
         }
       },
-      //选择产品
-      handParent(row, index) {
-        let item = {
-          id: row.productCode
-        };
-        this.$refs.productListRef.open(item, index);
-      },
-      //选择技术人回调
-      changeAnswer(obj, idx) {
-        this.$set(this.form.datasource[idx], 'technicalAnswerId', obj.id);
-        this.$set(this.form.datasource[idx], 'technicalAnswerName', obj.name);
-      },
-      handHead(row, index) {
-        let item = {
-          id: row.technicalAnswerId
-        };
-        this.$refs.headRef.open(item, index);
-      },
 
       remove(i) {
         this.form.datasource.splice(i, 1);
@@ -769,9 +776,9 @@
         });
       },
       // 添加
-      handlAdd() {
+      handlAdd(item, index) {
         if (!this.orderId) return this.$message.error('请先选择订单');
-        this.$refs.productListRef.open(this.form.datasource);
+        this.$refs.productListRef.open(item, index);
       },
 
       validateForm(callback) {

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

@@ -24,7 +24,7 @@
             v-for="item in tabOptions"
             :key="item.key"
             :class="{ active: activeComp == item.key }"
-            @click="activeComp = item.key"
+            @click="handleTag(item.key)"
           >
             {{ item.name }}
           </li>
@@ -80,15 +80,6 @@
             </el-form-item>
             <el-form-item label="回执附件:" prop="repliedFiles">
               <fileMain v-model="form.repliedFiles" type="view"></fileMain>
-              <!--              <div v-if="detailData.repliedFiles && detailData.repliedFiles?.length">-->
-              <!--                <el-link-->
-              <!--                  v-for="link in detailData.repliedFiles"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)">-->
-              <!--                  {{ link.name }}</el-link>-->
-              <!--              </div>-->
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -98,8 +89,8 @@
                 disabled
                 style="width: 100%"
               >
-              <el-option :value="1" label="采购收货单退货"></el-option>
-              <el-option :value="2" label="委外发货单退货"></el-option>
+                <el-option :value="1" label="采购收货单退货"></el-option>
+                <el-option :value="2" label="委外发货单退货"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="退货单编码:" prop="returnNo">
@@ -148,19 +139,6 @@
             </el-form-item>
             <el-form-item label="附件:" prop="returnFiles">
               <fileMain v-model="form.returnFiles" type="view"></fileMain>
-              <!--              <div-->
-              <!--                v-if="detailData.returnFiles && detailData.returnFiles?.length"-->
-              <!--              >-->
-              <!--                <el-link-->
-              <!--                  v-for="link in detailData.returnFiles"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)"-->
-              <!--                >-->
-              <!--                  {{ link.name }}</el-link-->
-              <!--                >-->
-              <!--              </div>-->
             </el-form-item>
           </el-col>
         </el-row>
@@ -183,17 +161,6 @@
         </template> -->
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-          <!--          <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>
       </ele-pro-table>
     </div>
@@ -201,6 +168,16 @@
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
     ></bpmDetail>
+    <!--入库详情-->
+    <innerBoundDetails
+      v-if="activeComp === 'store'"
+      ref="innerBoundDetailsRef"
+    ></innerBoundDetails>
+    <!--出库详情-->
+    <outBoundDetails
+      v-if="activeComp === 'store1'"
+      ref="outBoundDetailsRef"
+    ></outBoundDetails>
 
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
@@ -219,18 +196,16 @@
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   import fileMain from '@/components/addDoc/index.vue';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
-
+  import innerBoundDetails from '@/BIZComponents/innerdetails.vue';
+  import outBoundDetails from '@/BIZComponents/outdetails.vue';
   export default {
-    components: { fileMain, bpmDetail, modalTitle },
+    components: { fileMain, bpmDetail, modalTitle, innerBoundDetails,outBoundDetails },
     mixins: [dictMixins],
     data() {
       return {
         fullscreen: false,
         activeComp: 'returnOrder',
-        tabOptions: [
-          { key: 'returnOrder', name: '退货单详情' },
-          { key: 'bpm', name: '流程详情' }
-        ],
+        tabOptions: [],
         codeData: [],
         reviewStatusEnum,
         visible: false,
@@ -372,8 +347,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -388,9 +366,7 @@
             prop: 'taxRate',
             label: '税率',
             formatter: (_row, _column, cellValue) => {
-              return _row.taxRate
-                ? _row.taxRate+'%'
-                : '';
+              return _row.taxRate ? _row.taxRate + '%' : '';
             },
             align: 'center'
           },
@@ -487,7 +463,6 @@
     },
     created() {
       this.requestDict('产地');
-
     },
     methods: {
       async getcode(code) {
@@ -500,7 +475,19 @@
         this.getDetailData(row.id);
         this.detailId = row.id;
       },
-
+      handleTag(val) {
+        this.activeComp = val;
+        if (val == 'store') {
+          this.$nextTick(() => {
+            this.$refs.innerBoundDetailsRef._getInfo(this.form.returnNo);
+          });
+        }
+        if (val == 'store1') {
+          this.$nextTick(() => {
+            this.$refs.outBoundDetails._getInfo(this.form.returnNo);
+          });
+        }
+      },
       cancel() {
         this.$nextTick(() => {
           // 关闭后,销毁所有的表单数据
@@ -516,9 +503,25 @@
         getFile({ objectName: file.storePath }, file.name);
       },
       async getDetailData(id) {
+        this.tabOptions = [
+          { key: 'returnOrder', name: '退货单详情' },
+          { key: 'bpm', name: '流程详情' }
+        ];
         this.loading = true;
         await this.getcode('sale_return_type');
         const data = await getReturnSaleOrderrecordDetail(id);
+        if (data.returnSourceType == 2) {
+          this.tabOptions = [
+            ...this.tabOptions,
+            { key: 'store', name: '入库单详情' }
+          ];
+        } else {
+          this.tabOptions = [
+            ...this.tabOptions,
+            { key: 'store1', name: '出库单详情' }
+          ];
+        }
+
         this.loading = false;
         if (data) {
           let productList = data.productList;

+ 1 - 0
src/views/purchasingManage/purchasePlanManage/components/purchaseNeed-list.vue

@@ -7,6 +7,7 @@
     top="5vh"
     :close-on-press-escape="false"
     append-to-body
+    v-if="visible"
     width="70%"
   >
     <search-quotation @search="reload"> </search-quotation>

+ 7 - 0
src/views/saleManage/saleOrder/components/contractListDialog.vue

@@ -103,6 +103,10 @@
       isAdd: { //对账单选择合同 
         default: false,
         type: Boolean
+      },
+      sourceType:{
+        default: '',
+        type: String
       }
     },
     data() {
@@ -275,6 +279,9 @@
         if(this.isChange){
           where['ifRelation'] =0;
         }
+        if(this.sourceType){
+          where['sourceType'] = this.sourceType;
+        }
         let params = {
           pageNum: page,
           size: limit,

+ 1 - 9
src/views/saleManage/saleOrder/index.vue

@@ -135,15 +135,7 @@
                       删除
                     </el-link>
                   </template>
-                  <template v-slot:reference>
-                    <el-link
-                      type="danger"
-                      :underline="false"
-                      icon="el-icon-delete"
-                    >
-                      删除
-                    </el-link>
-                  </template>
+          
                 </el-popconfirm>
                 <el-dropdown
                   @command="(command) => handleCommand(command, row)"

+ 1 - 8
src/views/saleManage/saleOrder/invoice/components/detailDialog.vue

@@ -193,19 +193,12 @@
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
     ></bpmDetail>
- 
-    <!-- <el-tabs type="border-card" v-if="activeComp === 'store'"> -->
-  <!-- <el-tab-pane :label="'出库单'+(index+1)" v-for="(item,index) in qmsAll" :key="item.id">
 
-  </el-tab-pane> -->
   <out-bound-details
     v-if="activeComp === 'store'"
       ref="innerBoundDetailsRef"
     ></out-bound-details>
-  <!-- <el-tab-pane label="配置管理">配置管理</el-tab-pane>
-  <el-tab-pane label="角色管理">角色管理</el-tab-pane>
-  <el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane> -->
-<!-- </el-tabs> -->
+
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
     </div>

+ 13 - 9
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -125,7 +125,7 @@
       <template v-slot:totalCount="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.totalCount'"
-          :rules="[{ required: true, message: '请输入数字', trigger: 'blur' }]"
+          :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
         >
           <el-input
             v-model="scope.row.totalCount"
@@ -197,10 +197,11 @@
         </el-form-item>
       </template>
       <template v-slot:warehouseId="scope">
-        <el-form-item :prop="'datasource.' + scope.$index + '.warehouseId'">
+        <el-form-item :prop="'datasource.' + scope.$index + '.warehouseId'"   :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]">
           <el-select
             v-model="scope.row.warehouseId"
             placeholder="请选择"
+          
             @change="warehouseChange(scope.$index, scope.row)"
           >
             <el-option
@@ -213,14 +214,14 @@
           </el-select>
         </el-form-item>
       </template>
-      <template v-slot:warehouseNum="scope">
+      <!-- <template v-slot:warehouseNum="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.warehouseNum'"
           :rules="[{ required: true, message: '库存不足', trigger: 'blur' }]"
         >
           <el-input v-model="scope.row.warehouseNum" readonly> </el-input>
         </el-form-item>
-      </template>
+      </template> -->
 
       <template v-slot:headerWarehouseNum="{ column }">
         <span class="is-required">{{ column.label }}</span>
@@ -229,6 +230,10 @@
         <span class="is-required">{{ column.label }}</span>
       </template>
       <template v-slot:headerTotalCount="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+      
+      <template v-slot:receiveTotalWeight="{ column }">
         <span :class="{ 'is-required': entrustedCode && pricingWay == 2 }">{{
           column.label
         }}</span>
@@ -491,7 +496,7 @@
             prop: 'warehouseId',
             label: '仓库名称',
             slot: 'warehouseId',
-
+            headerSlot: 'headerWarehouseId',
             align: 'center'
           },
           {
@@ -501,7 +506,6 @@
             align: 'center',
             slot: 'warehouseNum',
 
-            headerSlot: 'headerWarehouseNum'
           },
 
           // {
@@ -556,7 +560,7 @@
             label: '收货总重',
             slot: 'receiveTotalWeight',
             align: 'center',
-            headerSlot: 'headerTotalCount'
+            headerSlot: 'headerReceiveTotalWeight'
           },
           {
             width: 100,
@@ -749,12 +753,12 @@
             this.$set(
               this.form.datasource[index],
               'discountTotalPrice',
-              item.discountSinglePrice * item.totalCount*(singleWeight||0)
+              item.discountSinglePrice * item.totalCount*(item.singleWeight||0)
             );
             this.$set(
               this.form.datasource[index],
               'totalPrice',
-              item.singlePrice * item.totalCount*(singleWeight||0)
+              item.singlePrice * item.totalCount*(item.singleWeight||0)
             );
           }
         });

+ 20 - 2
src/views/saleManage/saleOrder/invoice/index.vue

@@ -117,6 +117,15 @@
                 </el-link>
               </template>
             </el-popconfirm>
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-edit"
+              @click="creatInvoiceConfirm(row)"
+              v-if="[2].includes(row.reviewStatus)"
+            >
+              创建收货确认单
+            </el-link>
             <el-link
               type="primary"
               :underline="false"
@@ -158,12 +167,19 @@
       ref="processSubmitDialogRef"
       @reload="reload"
     ></process-submit-dialog>
+    <addInvoiceConfirm
+      ref="addInvoiceConfirmRef"
+      @done="reload"
+      :contactData="contactData"
+      :saleOrderData="saleOrderData"
+    ></addInvoiceConfirm>
   </div>
 </template>
 
 <script>
   import searchTable from './components/searchTable.vue';
   import addInvoiceDialog from './components/addInvoiceDialog.vue';
+  import addInvoiceConfirm from '@/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue';
   import detailDialog from './components/detailDialog.vue';
   import popModal from '@/components/pop-modal';
   import { reviewStatusEnum } from '@/enum/dict';
@@ -189,7 +205,7 @@
       addReturnGoodsDialog,
       orderDetailDialog,
       addInvoiceDialog,
-      detailDialog
+      detailDialog,addInvoiceConfirm
     },
 
     //客户管理数据
@@ -365,7 +381,9 @@
         this.$refs.invoiceDialogRef.$refs.form &&
           this.$refs.invoiceDialogRef.$refs.form.clearValidate();
       },
-
+      creatInvoiceConfirm(row){
+        this.$refs.addInvoiceConfirmRef.open('add', {},row);
+      },
       //批量删除
       allDelBtn() {
         if (this.selection.length === 0) return;

+ 4 - 1
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -783,13 +783,16 @@
       },
 
       //打开新增编辑弹框
-      async open(type, row) {
+      async open(type, row,invoiceData) {
         this.title = type === 'add' ? '新增收货确认单' : '修改';
         this.row = row;
         this.visible = true;
         if (row && row?.id) {
           await this.getSendSaleOrderDetail(row?.id);
         }
+        if(invoiceData){
+          this.changeOrder(invoiceData)
+        }
         this.isUpdate = type != 'add';
       },
       totalCountChange(row) {

+ 30 - 14
src/views/saleManage/saleOrder/palletManagement/index.vue

@@ -17,9 +17,6 @@
           cache-key="eomContactPageTable"
           :page-size="20"
         >
- 
-
-
           <template v-slot:orderNo="{ row }">
             <el-link
               type="primary"
@@ -29,13 +26,23 @@
               {{ row.orderNo }}
             </el-link>
           </template>
-
+          <!-- 表头工具栏 -->
+          <template v-slot:action="{ row }">
+            <el-button
+              size="small"
+              type="primary"
+              class="ele-btn-icon"
+              @click="openEdit(row)"
+            >
+              详情
+            </el-button>
+          </template>
         </ele-pro-table>
       </div>
     </el-card>
 
     <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
-
+    <detailDialog ref="detailDialog" @success="reload"></detailDialog>
   </div>
 </template>
 
@@ -43,6 +50,7 @@
   import searchTable from './components/searchTable.vue';
 
   import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
+  import detailDialog from './components/detailDialog.vue';
 
   import dictMixins from '@/mixins/dictMixins';
   import { getTableList } from '@/api/saleManage/palletManagement';
@@ -52,15 +60,13 @@
     components: {
       searchTable,
       orderDetailDialog,
+      detailDialog
     },
 
     data() {
       return {
-
-      
         loading: false, // 加载状态
         columns: [
-    
           {
             columnKey: 'index',
             label: '序号',
@@ -70,7 +76,7 @@
             showOverflowTooltip: true,
             fixed: 'left'
           },
-          
+
           {
             prop: 'projectName',
             label: '项目名称',
@@ -83,7 +89,7 @@
             label: '销售订单编码',
             align: 'center',
             sortable: true,
-            // slot: 'orderNo',
+            slot: 'orderNo',
             showOverflowTooltip: true,
             minWidth: 200
           },
@@ -101,7 +107,7 @@
             showOverflowTooltip: true,
             minWidth: 140
           },
-   
+
           {
             prop: 'resviceNum',
             label: '已回收数量',
@@ -116,6 +122,16 @@
             showOverflowTooltip: true,
             minWidth: 140
           },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 160,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
           // {
           //   prop: 'createUserName',
           //   label: '创建人',
@@ -130,7 +146,6 @@
           //   showOverflowTooltip: true,
           //   minWidth: 170
           // },
-      
         ]
       };
     },
@@ -150,8 +165,9 @@
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
-
-     
+      openEdit(row) {
+        this.$refs.detailDialog.open(row);
+      },
       //查看详情
       openorderDetail(row, type) {
         if (type === 'docNo') {

+ 2 - 0
vue.config.js

@@ -38,6 +38,8 @@ module.exports = {
         // target: 'http://192.168.1.132:18086', // 徐1
         // target: 'http://192.168.1.134:18086', //徐2
         target: 'http://192.168.1.105:18086',
+        // target: 'http://192.168.1.103:18086',
+        // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.105:18086',
         // target: 'http://192.168.1.114:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域