yusheng 1 год назад
Родитель
Сommit
8c16a4f463
30 измененных файлов с 803 добавлено и 783 удалено
  1. 40 22
      src/BIZComponents/inventoryTable.vue
  2. 7 7
      src/BIZComponents/inventoryTableDetails.vue
  3. 7 7
      src/BIZComponents/product-list.vue
  4. 7 7
      src/BIZComponents/saleGeneralityInventoryTable.vue
  5. 5 5
      src/BIZComponents/setProduct.js
  6. 1 6
      src/views/purchasingManage/inquiryManage/components/addDialog.vue
  7. 17 1
      src/views/purchasingManage/inquiryManage/components/detailDialog.vue
  8. 3 3
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  9. 7 10
      src/views/purchasingManage/inquiryManage/components/inventoryTable.vue
  10. 8 8
      src/views/purchasingManage/producerManage/components/addContactDialog.vue
  11. 7 7
      src/views/purchasingManage/producerManage/components/contactDetailDialog.vue
  12. 36 35
      src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue
  13. 7 7
      src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue
  14. 1 1
      src/views/purchasingManage/purchaseOrder/accountstatement/components/purchaseForm.vue
  15. 47 77
      src/views/purchasingManage/purchaseOrder/components/addDialog.vue
  16. 466 454
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  17. 23 23
      src/views/purchasingManage/purchaseOrder/components/planTableList.vue
  18. 7 7
      src/views/purchasingManage/purchaseOrder/components/supplierGoodsListDialog.vue
  19. 2 2
      src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue
  20. 7 7
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue
  21. 7 7
      src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue
  22. 7 7
      src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue
  23. 8 8
      src/views/purchasingManage/supplierManage/components/addContactDialog.vue
  24. 8 16
      src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue
  25. 8 9
      src/views/saleManage/contact/components/addContactDialog.vue
  26. 1 1
      src/views/saleManage/contact/components/darwerComponents/certificateTable.vue
  27. 37 15
      src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue
  28. 8 10
      src/views/saleManage/saleOrder/invoice/components/orderListDialog.vue
  29. 7 7
      src/views/saleManage/saleOrder/returnGoods/components/inventoryTableReturn.vue
  30. 7 7
      src/views/saleManage/saleOrder/returnGoods/components/inventoryTableReturnDetail.vue

+ 40 - 22
src/BIZComponents/inventoryTable.vue

@@ -440,8 +440,9 @@
           <el-date-picker
             style="width: 140px"
             v-model="scope.row.produceDeliveryDeadline"
-            @change="setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')"
-
+            @change="
+              setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
+            "
             type="date"
             placeholder="选择日期"
           >
@@ -464,7 +465,9 @@
             style="width: 140px"
             :disabled="isContractId"
             v-model="scope.row.customerExpectDeliveryDeadline"
-            @change="setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')"
+            @change="
+              setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
+            "
             type="date"
             placeholder="选择日期"
           >
@@ -853,7 +856,7 @@
             slot: 'provenance',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 200,
+            minWidth: 200
             // show:this.contractBookType==2
           },
           {
@@ -964,13 +967,13 @@
             label: '图号/件号',
             showOverflowTooltip: true
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
 
           {
             width: 220,
@@ -1087,7 +1090,11 @@
               this.form.datasource[i],
               'guaranteePeriodDeadline',
               guaranteePeriodUnitName != 'second'
-                ? this.setDay(item.guaranteePeriod, guaranteePeriodUnitName,item)
+                ? this.setDay(
+                    item.guaranteePeriod,
+                    guaranteePeriodUnitName,
+                    item
+                  )
                 : ''
             );
             // }
@@ -1103,7 +1110,7 @@
             this.form.datasource[index],
             'guaranteePeriodDeadline',
             guaranteePeriodUnitName != 'second'
-              ? this.setDay(row.guaranteePeriod, guaranteePeriodUnitName,row)
+              ? this.setDay(row.guaranteePeriod, guaranteePeriodUnitName, row)
               : ''
           );
         }
@@ -1117,9 +1124,12 @@
           ? 'year'
           : 'second';
       },
-      setDay(addDay, dateType = 'day',item) {
-        let tiem= this.contractBookType==1? item.produceDeliveryDeadline:item.customerExpectDeliveryDeadline;
-        return dayjs( tiem|| new Date())
+      setDay(addDay, dateType = 'day', item) {
+        let tiem =
+          this.contractBookType == 1
+            ? item.produceDeliveryDeadline
+            : item.customerExpectDeliveryDeadline;
+        return dayjs(tiem || new Date())
           .add(addDay, dateType)
           .format('YYYY-MM-DD');
       },
@@ -1233,7 +1243,11 @@
               item['guaranteePeriodDeadline'] =
                 item['guaranteePeriodDeadline'] ||
                 guaranteePeriodUnitName != 'second'
-                  ? this.setDay(item.guaranteePeriod, guaranteePeriodUnitName,item)
+                  ? this.setDay(
+                      item.guaranteePeriod,
+                      guaranteePeriodUnitName,
+                      item
+                    )
                   : '';
             }
             item.entrustedEnterpriseIdList = supplierObj[item.productId];
@@ -1261,14 +1275,18 @@
           let inventoryTotalList = await getInventoryTotalAPI(codeList);
           this.form.datasource
             .filter((item) => item.productCode)
-            .forEach((item) => {
+            .forEach((item, index) => {
               let find =
                 inventoryTotalList.find(
                   (key) => key.code == item.productCode
                 ) || {};
-              item.availableCountBase = find.availableCountBase;
+              this.form.datasource;
+              this.$set(
+                this.form.datasource[index],
+                'availableCountBase',
+                find.availableCountBase
+              );
             });
-            this.$forceUpdate()
           this.$refs.table.reload();
         }
       },
@@ -1325,8 +1343,8 @@
             item.extField.packingSpecification
           );
           this.$set(parasm, 'customerMark', this.customerMark);
-          if(item.purchaseOrigins?.length>0){
-            item.purchaseOrigins=item.purchaseOrigins.map(val=>val+'')
+          if (item.purchaseOrigins?.length > 0) {
+            item.purchaseOrigins = item.purchaseOrigins.map((val) => val + '');
           }
           this.$set(parasm, 'provenance', item.purchaseOrigins || []);
 

+ 7 - 7
src/BIZComponents/inventoryTableDetails.vue

@@ -350,13 +350,13 @@
                 ?.toString();
             }
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

+ 7 - 7
src/BIZComponents/product-list.vue

@@ -173,13 +173,13 @@
             },
             minWidth: 110
           },
-          {
-            prop: 'extField.approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+          // {
+          //   prop: 'extField.approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110
+          // },
           {
             prop: 'extField.packingSpecification',
             align: 'center',

+ 7 - 7
src/BIZComponents/saleGeneralityInventoryTable.vue

@@ -827,13 +827,13 @@
                 : '';
             }
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

+ 5 - 5
src/BIZComponents/setProduct.js

@@ -1,19 +1,19 @@
 //改变数量
-export function changeCount(row, index, arr) {
+export function changeCount(row, index, arr,noDiscountSingle) {
   if (row) {
     singleWeightChange(row, index);
   }
-  return getNumTotalPrice(arr);
+  return getNumTotalPrice(arr,noDiscountSingle);
 }
 
 //计算总金额
-function getNumTotalPrice(arr) {
+function getNumTotalPrice(arr,noDiscountSingle) {
   let sum = 0;
   arr.forEach((r, index) => {
     if (r.singlePrice && r.totalCount) {
-      r.discountSinglePrice = r.singlePrice;
+      r.discountSinglePrice = !noDiscountSingle?r.singlePrice:r.discountSinglePrice;
       r.totalPrice = getAllPrice(r);
-      r.discountTotalPrice = r.totalPrice;
+      r.discountTotalPrice = !noDiscountSingle?r.totalPrice:r.discountTotalPrice;
       sum += Number(r.totalPrice);
     } else {
       r.totalPrice = 0;

+ 1 - 6
src/views/purchasingManage/inquiryManage/components/addDialog.vue

@@ -86,12 +86,7 @@
           <el-col :span="8">
             <el-form-item prop="files" label="附件">
               <fileMain v-model="form.files" type="view"></fileMain>
-              <!--              <fileUpload-->
-              <!--                v-model="form.files"-->
-              <!--                module="main"-->
-              <!--                :showLib="false"-->
-              <!--                :limit="1"-->
-              <!--              />-->
+
             </el-form-item>
           </el-col>
         </el-row>

+ 17 - 1
src/views/purchasingManage/inquiryManage/components/detailDialog.vue

@@ -135,7 +135,9 @@
   import planDetaillog from '../../../purchasingManage/purchasePlanManage/components/detailDialog.vue';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   import fileMain from "@/components/addDoc/index.vue";
-
+  import {
+    contactQueryByCategoryIdsAPI,
+  } from '@/api/saleManage/contact';
   export default {
     mixins: [dictMixins],
     components: {
@@ -207,6 +209,13 @@
             align: 'center',
           },
 
+          {
+            minWidth: 200,
+            prop: 'supplierName',
+            label: '供应商',
+            showOverflowTooltip: true,
+            align: 'center',
+          },
           {
             minWidth: 80,
             prop: 'productBrand',
@@ -357,6 +366,13 @@
         const data = await getpurchaseinquiry(id);
         this.loading = false;
         if (data) {
+          let categoryIds=data.detailList.map(item=>item.productId)
+          let supplierObj = await contactQueryByCategoryIdsAPI({ categoryIds });
+          data.detailList.forEach((item) => {
+            if(supplierObj[item.productId]){
+              item.supplierName= supplierObj[item.productId].filter(val=>item.supplierIds.includes(val.id)).map(val1=>val1.name).toString()
+            }
+          });
           this.form = data;
           if (data.files && data.files.length > 0) {
             this.form.files = data.files[0];

+ 3 - 3
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -105,7 +105,7 @@
       <template v-slot:taxRate="{ row, $index }">
         <el-form-item prop="taxRate" v-if="status !== 'Detail'">
           <el-input
-            v-model="form.taxRate"
+            v-model="row.taxRate"
             style="width: 100%"
             :disabled="status == 'Detail'"
           >
@@ -113,7 +113,7 @@
           </el-input>
         </el-form-item>
         <span v-else>
-          {{ form.taxRate }}
+          {{ row.taxRate}}
         </span>
       </template>
       <template v-slot:files="{ row, $index }">
@@ -608,7 +608,7 @@
       label: '税率',
       slot: 'taxRate',
       align: 'center',
-      isMerge: true,
+      // isMerge: true,
       showOverflowTooltip: true
     },
     {

+ 7 - 10
src/views/purchasingManage/inquiryManage/components/inventoryTable.vue

@@ -379,13 +379,13 @@
                 : '';
             }
           },
-          {
-            minWidth: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   minWidth: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             minWidth: 120,
             prop: 'packingSpecification',
@@ -501,9 +501,6 @@
         return comitDatasource;
       },
       filterMethod(value, row, column) {
-        console.log(value);
-        console.log(row);
-
         let ids = row.supplierIds;
         if (ids.length > 0 && ids.includes(value)) {
           return row;

+ 8 - 8
src/views/purchasingManage/producerManage/components/addContactDialog.vue

@@ -601,7 +601,7 @@
 
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此资质吗?"
+              title="确定要删除此资质吗?"
               @confirm="handleRemove(scope.row)"
             >
               <template v-slot:reference>
@@ -992,13 +992,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 110
         },
-        {
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
+        // {
+        //   prop: 'approvalNumber',
+        //   align: 'center',
+        //   label: '批准文号',
+        //   showOverflowTooltip: true,
+        //   minWidth: 110
+        // },
         {
           prop: 'packingSpecification',
           align: 'center',

+ 7 - 7
src/views/purchasingManage/producerManage/components/contactDetailDialog.vue

@@ -1307,13 +1307,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 110
         },
-        {
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
+        // {
+        //   prop: 'approvalNumber',
+        //   align: 'center',
+        //   label: '批准文号',
+        //   showOverflowTooltip: true,
+        //   minWidth: 110
+        // },
         {
           prop: 'packingSpecification',
           align: 'center',

+ 36 - 35
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -116,15 +116,7 @@
           <el-col :span="12">
             <el-form-item prop="askFile" label="附件:">
               <fileMain v-model="form.fileId" type="view"></fileMain>
-              <!-- <el-link
-                v-if="form.files && form.files !== ''"
-                type="primary"
-                :underline="false"
-                @click="downloadFile(form.files)"
-              >
-                {{ form.files.name }}
-              </el-link
-              > -->
+
             </el-form-item>
           </el-col>
         </el-row>
@@ -157,33 +149,11 @@
 
         <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>
         <template v-slot:files="{ row }">
           <fileMain v-model="row.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>-->
+
         </template>
       </ele-pro-table>
     </div>
@@ -209,6 +179,7 @@
   import timeDialog from '@/components/timeDialog/index.vue';
   import fileMain from '@/components/addDoc/index';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
+  import { getByCode } from '@/api/system/dictionary-data';
 
   export default {
     mixins: [dictMixins],
@@ -313,10 +284,9 @@
             minWidth: 200,
             showOverflowTooltip: true,
             formatter: (row, column) => {
-       
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -365,6 +335,34 @@
             slot: 'expectReceiveDate',
             align: 'center'
           },
+          {
+            width: 120,
+            prop: 'produceType',
+            align: 'center',
+            label: '属性类型',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.produceType && row.produceType.length
+                ? row.produceType
+                .map((item) => this.getDictValue('生产类型', item))
+                    .join(',')
+                : '';
+            }
+          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
+          {
+            width: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
+          },
           {
             width: 160,
             prop: 'technicalDrawings',
@@ -391,8 +389,11 @@
     },
     created() {
       this.requestDict('产地');
+      this.requestDict('生产类型');
+
     },
     methods: {
+
       async open(row) {
         this.visible = true;
         this.getDetailData(row.requirementId || row.id);

+ 7 - 7
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -532,13 +532,13 @@
                 : '';
             }
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

+ 1 - 1
src/views/purchasingManage/purchaseOrder/accountstatement/components/purchaseForm.vue

@@ -250,7 +250,7 @@
           sourceType: { required: true, message: '请选择', trigger: 'change' },
           contactId: { required: true, message: '请选择', trigger: 'change' },
           projectId: { required: true, message: '请选择', trigger: 'change' },
-          orderId: { required: true, message: '请选择', trigger: 'change' },
+          // orderId: { required: true, message: '请选择', trigger: 'change' },
           dateType: { required: true, message: '请选择', trigger: 'change' },
           year: { required: true, message: '请选择', trigger: 'change' },
           quarter: { required: true, message: '请选择', trigger: 'change' },

+ 47 - 77
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -537,7 +537,6 @@
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import purchaseNeedList from '@/views/purchasingManage/purchasePlanManage/components/purchaseNeed-list.vue';
   import inquiryList from './inquiryList.vue';
-  import { getInventoryTotalAPI } from '@/api/wms';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
   import {
     contactDetail,
@@ -789,18 +788,7 @@
           },
           productList: info.productList || []
         };
-        const codeList = form.productList
-          .filter((item) => item.productCode)
-          .map((item) => item.productCode);
-        let inventoryTotalList = await getInventoryTotalAPI(codeList);
-        form.productList
-          .filter((item) => item.productCode)
-          .forEach((item) => {
-            let find =
-              inventoryTotalList.find((key) => key.code == item.productCode) ||
-              {};
-            item.availableCountBase = find.availableCountBase;
-          });
+
         this.$refs.inventoryTable &&
           this.$refs.inventoryTable.putTableValue(form.productList);
       },
@@ -840,12 +828,18 @@
         this.$set(this.form, 'relationCode', data.planCode);
         const res = await getplanDetail(data.id);
         this.$set(this.form, 'isFirstProcess', res.isFirstProcess);
-        if (res.detailList.lenght > 1) {
-          this.$refs.planTableListRef.open(res);
+
+        let info = await getProductsBySource({
+          relationId: this.form.relationId,
+          relationType: this.form.relationType
+        });
+        info['rawDetailList'] = info.rawList;
+        info['outputDetailList'] = info.outputList;
+        if (info.productList.lenght > 1) {
+          this.$refs.planTableListRef.open(info);
         } else {
-          this.putTableValue(res);
+          this.putTableValue(info);
         }
-
         // let form = {
         //   contractVO: {
         //     ...this.form
@@ -861,7 +855,6 @@
         // });
         // this.$refs.inventoryTable &&
         // this.$refs.inventoryTable.putTableValue(form.productList);
-        // await this.getLinkInfo(cusInfo?.base?.id)
       },
       //选择核价单
       handInquiry(e) {
@@ -879,76 +872,54 @@
         this.$set(this.form, 'relationCode', data.inquiryCode);
         const res = await getpurchaseinquiry(data.id);
         this.$set(this.form, 'isFirstProcess', res.isFirstProcess);
-        res['rawDetailList'] = res.rawList;
-        res['outputDetailList'] = res.outputList;
-        if (res.detailList.lenght > 1) {
-          this.$refs.planTableListRef.open(res);
-        } else {
-          this.putTableValue(res);
-        }
-      },
 
-      async putTableValue({ detailList, rawDetailList, outputDetailList }) {
-        console.log(detailList, 'detailList');
         let info = await getProductsBySource({
           relationId: this.form.relationId,
           relationType: this.form.relationType,
-
-          supplierId: this.form.relationType == 3 ? this.winnerSuppleIds : ''
+          supplierId: this.winnerSuppleIds
         });
-        let form = {
-          contractVO: {
-            ...this.form
-          },
-          productList: detailList || []
+        info['rawDetailList'] = info.rawList;
+        info['outputDetailList'] = info.outputList;
+        if (info.productList.lenght > 1) {
+          this.$refs.planTableListRef.open(info);
+        } else {
+          this.putTableValue(info);
+        }
+
+        this.form = {
+          ...this.form,
+          partbId: info.partbId,
+          partbName: info.partbName,
+          partbAddress: info.partaAddress,
+          partbLinkId: info.partaAddress,
+          partbLinkName: info.partbLinkName,
+          partbEmail: info.partbEmail,
+          partbTel: info.partbTel
         };
-        if (this.form.relationType == 3) {
-          this.form = {
-            ...this.form,
-            partbId: info.partbId,
-            partbName: info.partbName,
-            partbAddress: info.partaAddress,
-            partbLinkId: info.partaAddress,
-            partbLinkName: info.partbLinkName,
-            partbEmail: info.partbEmail,
-            partbTel: info.partbTel
-          };
-          await this.getLinkInfo(info.partbId);
-          this.$nextTick(() => {
-            let firstLink =
-              this.linkNameOptions.find((item) => item.ifChief == 1) || {};
-            this.form = Object.assign({}, this.form, {
-              partbLinkId: firstLink.id || this.linkNameOptions[0]?.id,
-              partbLinkName:
-                firstLink.linkName || this.linkNameOptions[0]?.linkName,
-              partbTel:
-                firstLink.mobilePhone || this.linkNameOptions[0]?.mobilePhone
-            });
-            this.setProductInfo();
+        await this.getLinkInfo(info.partbId);
+        this.$nextTick(() => {
+          let firstLink =
+            this.linkNameOptions.find((item) => item.ifChief == 1) || {};
+          this.form = Object.assign({}, this.form, {
+            partbLinkId: firstLink.id || this.linkNameOptions[0]?.id,
+            partbLinkName:
+              firstLink.linkName || this.linkNameOptions[0]?.linkName,
+            partbTel:
+              firstLink.mobilePhone || this.linkNameOptions[0]?.mobilePhone
           });
-        }
+          this.setProductInfo();
+        });
+        await this.changeParent({ id: info.partbId });
+      },
+
+      async putTableValue({ productList, rawDetailList, outputDetailList }) {
 
-        const codeList = [
-          ...form.productList,
-          ...rawDetailList,
-          ...outputDetailList
-        ].map((item) => item.productCode);
-        let inventoryTotalList = await getInventoryTotalAPI(codeList);
-        [...form.productList, ...rawDetailList, ...outputDetailList].forEach(
-          (item) => {
-            let find =
-              inventoryTotalList.find((key) => key.code == item.productCode) ||
-              {};
-            item.availableCountBase = find.availableCountBase;
-          }
-        );
         this.$refs.inventoryTable &&
-          this.$refs.inventoryTable.putTableValue(form.productList);
+          this.$refs.inventoryTable.putTableValue(productList);
         this.$refs.rawDetailListRef &&
           this.$refs.rawDetailListRef.putTableValue(rawDetailList); //原料
         this.$refs.outputDetailListRef &&
           this.$refs.outputDetailListRef.putTableValue(outputDetailList);
-        await this.changeParent({ id: info.partbId });
       },
 
       // //选择需求类型
@@ -1221,8 +1192,7 @@
           contractNo: obj.contractNo,
           relationId: obj.id,
           relationName: obj.contractName,
-          relationCode: obj.contractNo,
-          
+          relationCode: obj.contractNo
         });
 
         await this.getPlanInfo(this.form.contractId);

Разница между файлами не показана из-за своего большого размера
+ 466 - 454
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue


+ 23 - 23
src/views/purchasingManage/purchaseOrder/components/planTableList.vue

@@ -124,18 +124,18 @@
             slot: 'totalCount',
             align: 'center'
           },
-          {
-            width: 80,
-            prop: 'doneTotalCount',
-            label: '已采数量',
-            align: 'center'
-          },
-          {
-            width: 80,
-            prop: 'waitTotalCount',
-            label: '待采数量',
-            align: 'center'
-          },
+          // {
+          //   width: 80,
+          //   prop: 'doneTotalCount',
+          //   label: '已采数量',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 80,
+          //   prop: 'waitTotalCount',
+          //   label: '待采数量',
+          //   align: 'center'
+          // },
 
           {
             width: 100,
@@ -160,15 +160,15 @@
             align: 'center'
           },
 
-          {
-            width: 150,
-            prop: 'arrivalWay',
-            label: '到货方式',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 1 ? '一次性到货' : '分批到货';
-            },
-            align: 'center'
-          },
+          // {
+          //   width: 150,
+          //   prop: 'arrivalWay',
+          //   label: '到货方式',
+          //   formatter: (row, column, cellValue) => {
+          //     return cellValue == 1 ? '一次性到货' : '分批到货';
+          //   },
+          //   align: 'center'
+          // },
           {
             width: 170,
             prop: 'receiveDate',
@@ -205,7 +205,7 @@
       async open(data) {
         this.visible = true;
 
-        this.tableList = data.detailList;
+        this.tableList = data.productList;
         this.rawDetailList = data.rawDetailList || [];
         this.outputDetailList = data.outputDetailList || [];
       },
@@ -240,7 +240,7 @@
           return;
         }
         this.$emit('success', {
-          detailList: this.selection,
+          productList: this.selection,
           rawDetailList: this.rawDetailList,
           outputDetailList: this.outputDetailList
         });

+ 7 - 7
src/views/purchasingManage/purchaseOrder/components/supplierGoodsListDialog.vue

@@ -112,13 +112,13 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
-          {
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+          // {
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110
+          // },
           {
             prop: 'packingSpecification',
             align: 'center',

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

@@ -144,8 +144,8 @@
             <el-form-item label="合格数:" prop="qmsPassNum">
               <el-input v-model="form.qmsPassNum" disabled></el-input>
             </el-form-item>
-            <el-form-item label="不合格数:" prop="qmsNoPassNum">
-              <el-input v-model="form.qmsPassNum" disabled></el-input>
+            <el-form-item label="不合格数:" prop="qmsNopassNum">
+              <el-input v-model="form.qmsNopassNum" disabled></el-input>
             </el-form-item>
           </el-col>
         </el-row>

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

@@ -302,13 +302,13 @@
             label: '属性类型',
             showOverflowTooltip: true
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

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

@@ -361,13 +361,13 @@
             label: '属性类型',
             showOverflowTooltip: true
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

+ 7 - 7
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -650,13 +650,13 @@
                 : '';
             }
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

+ 8 - 8
src/views/purchasingManage/supplierManage/components/addContactDialog.vue

@@ -598,7 +598,7 @@
 
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此资质吗?"
+              title="确定要删除此资质吗?"
               @confirm="handleRemove(scope.row)"
             >
               <template v-slot:reference>
@@ -1023,13 +1023,13 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
-          {
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+          // {
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110
+          // },
           {
             prop: 'packingSpecification',
             align: 'center',

+ 8 - 16
src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue

@@ -139,15 +139,7 @@
                 <el-input v-model="form.remark" disabled type="textarea"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
-              <el-form-item prop="businessLicenseFile" label="营业执照附件:">
-                <fileMain v-model="form.businessLicenseFile" type="view"></fileMain>
-<!--                <el-link v-if="form.businessLicenseFile && form.businessLicenseFile !== ''"-->
-<!--                         type="primary" :underline="false"-->
-<!--                         @click="downloadFile(form.businessLicenseFile)"> {{ form.businessLicenseFile.name }}-->
-<!--                </el-link>-->
-              </el-form-item>
-            </el-col>
+
           </el-row>
         </el-form>
         <headerTitle title="银行信息" style="margin-top: 30px"></headerTitle>
@@ -1305,13 +1297,13 @@ export default {
               })?.toString()
             }
         },
-        {
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
+        // {
+        //   prop: 'approvalNumber',
+        //   align: 'center',
+        //   label: '批准文号',
+        //   showOverflowTooltip: true,
+        //   minWidth: 110
+        // },
         {
           prop: 'packingSpecification',
           align: 'center',

+ 8 - 9
src/views/saleManage/contact/components/addContactDialog.vue

@@ -670,7 +670,7 @@
             </el-link>
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此资质包吗?"
+              title="确定要删除此吗?"
               @confirm="handleRemove(scope.row)"
             >
               <template v-slot:reference>
@@ -780,7 +780,6 @@
         v-if="
           form.type == 1 &&
           activeName == 4 &&
-          form?.id &&
           form.qualificationCensorship == '1'
         "
         @click="save('sub')"
@@ -1030,13 +1029,13 @@
                 ?.toString();
             }
           },
-          {
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+          // {
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110
+          // },
           {
             prop: 'packingSpecification',
             align: 'center',

+ 1 - 1
src/views/saleManage/contact/components/darwerComponents/certificateTable.vue

@@ -48,7 +48,7 @@
 
       <el-popconfirm
         class="ele-action"
-        title="确定要删除此资质吗?"
+        title="确定要删除此资质吗?"
         @confirm="handleRemove(scope.row)"
       >
         <template v-slot:reference>

+ 37 - 15
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -155,7 +155,6 @@
       <template v-slot:receiveTotalWeight="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.receiveTotalWeight'"
-     
         >
           <!-- :disabled="!entrustedCode"         -->
           <el-input-number
@@ -180,7 +179,7 @@
             :controls="false"
             v-model="scope.row.sendTotalWeight"
             style="width: 100%"
-            @input="changeSendTotalWeight(scope.row,scope.$index)"
+            @input="changeSendTotalWeight(scope.row, scope.$index)"
           >
           </el-input-number>
         </el-form-item>
@@ -301,7 +300,7 @@
   import getDynamicsColumns from '@/mixins/getDynamicsColumns';
   import fileMain from '@/components/addDoc/index.vue';
   import selectStockLedgerDialog from '@/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue'; //库存台账
-  import { changeCount } from '@/BIZComponents/setProduct.js';
+  // import { changeCount } from '@/BIZComponents/setProduct.js';
   export default {
     mixins: [dictMixins, getDynamicsColumns],
     props: {
@@ -588,8 +587,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -663,10 +665,9 @@
             minWidth: 200,
             showOverflowTooltip: true,
             formatter: (row, column) => {
-       
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -711,7 +712,7 @@
           }
         ];
       },
-      allPrice:0,
+      allPrice: 0
     },
     methods: {
       downloadFile(file) {
@@ -726,11 +727,33 @@
         });
       },
       //改变数量
-      changeCount(row, index) {
-        const { allPrice, arr } = changeCount(row, index, this.form.datasource);
-        this.form.datasource = arr;
-        this.allPrice = allPrice || 0;
-        this.$emit('setCountAmount', this.allPrice);
+      changeCount() {
+        this.form.datasource.forEach((item, index) => {
+          if (item.pricingWay == 1) {
+            this.$set(
+              this.form.datasource[index],
+              'discountTotalPrice',
+              item.discountSinglePrice * item.totalCount
+            );
+            this.$set(
+              this.form.datasource[index],
+              'totalPrice',
+              item.singlePrice * item.totalCount
+            );
+          }
+          if (item.pricingWay == 2) {
+            this.$set(
+              this.form.datasource[index],
+              'discountTotalPrice',
+              item.discountSinglePrice * item.totalCount*(singleWeight||0)
+            );
+            this.$set(
+              this.form.datasource[index],
+              'totalPrice',
+              item.singlePrice * item.totalCount*(singleWeight||0)
+            );
+          }
+        });
       },
       //获取
       getStockLedger(sendProductDetail) {
@@ -782,7 +805,7 @@
       },
 
       //修改发货总重
-      changeSendTotalWeight(row,index) {
+      changeSendTotalWeight(row, index) {
         this.curIndex = index;
         this.setIcreaseTotalWeight(row);
       },
@@ -830,7 +853,6 @@
       },
       //设置增重总重
       setIcreaseTotalWeight(row) {
-     
         let receiveTotalWeight = Number(
           this.form.datasource[this.curIndex].receiveTotalWeight
         );

+ 8 - 10
src/views/saleManage/saleOrder/invoice/components/orderListDialog.vue

@@ -22,11 +22,12 @@
         @cell-click="cellClick"
       >
         <!-- 表头工具栏 -->
-        <template v-slot:action="{ row }" >
+        <template v-slot:action="{ row }">
           <el-radio v-if="!isAcc" class="radio" v-model="radio" :label="row.id"
             ><i></i
           ></el-radio>
-          <el-button v-if="isAcc"
+          <el-button
+            v-if="isAcc"
             :disabled="row.hasInvoiceApply"
             type="primary"
             @click="selected1(row)"
@@ -34,7 +35,6 @@
             选择
           </el-button>
         </template>
-     
       </ele-pro-table>
     </el-card>
 
@@ -88,7 +88,6 @@
             align: 'center',
             label: '选择',
             minWidth: 100
-
           },
 
           {
@@ -99,14 +98,13 @@
             showOverflowTooltip: true,
             minWidth: 200
           },
+
           {
-            prop: 'sourceTypeName',
-            label: '订单类型',
+            prop: 'saleTypeName',
+            label: '销售类型',
             align: 'center',
-            sortable: true,
             showOverflowTooltip: true,
-            minWidth: 200,
-            fixed: 'left'
+            minWidth: 140
           },
           {
             prop: 'contractName',
@@ -195,7 +193,7 @@
     },
 
     methods: {
-      open(item, currentIndex,isAcc=false) {
+      open(item, currentIndex, isAcc = false) {
         this.currentIndex = currentIndex;
         if (item && item.id) {
           this.radio = item.id;

+ 7 - 7
src/views/saleManage/saleOrder/returnGoods/components/inventoryTableReturn.vue

@@ -847,13 +847,13 @@ export default {
               : '';
           }
         },
-        {
-          width: 120,
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true
-        },
+        // {
+        //   width: 120,
+        //   prop: 'approvalNumber',
+        //   align: 'center',
+        //   label: '批准文号',
+        //   showOverflowTooltip: true
+        // },
         {
           width: 120,
           prop: 'packingSpecification',

+ 7 - 7
src/views/saleManage/saleOrder/returnGoods/components/inventoryTableReturnDetail.vue

@@ -251,13 +251,13 @@
                 : '';
             }
           },
-          {
-            width: 120,
-            prop: 'approvalNumber',
-            align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
-          },
+          // {
+          //   width: 120,
+          //   prop: 'approvalNumber',
+          //   align: 'center',
+          //   label: '批准文号',
+          //   showOverflowTooltip: true
+          // },
           {
             width: 120,
             prop: 'packingSpecification',

Некоторые файлы не были показаны из-за большого количества измененных файлов