Browse Source

计价方式修改

yusheng 1 year ago
parent
commit
02c7669263
22 changed files with 851 additions and 478 deletions
  1. 106 30
      src/BIZComponents/inventoryTable.vue
  2. 167 88
      src/BIZComponents/inventoryTableDetails.vue
  3. 9 0
      src/api/bpm/components/saleManage/contact.js
  4. 2 2
      src/views/bpm/handleTask/components/contactQC/contactDetailDialog.vue
  5. 2 2
      src/views/bpm/handleTask/components/contractBook/addDialog.vue
  6. 267 261
      src/views/bpm/handleTask/components/contractBook/detailDialog.vue
  7. 0 1
      src/views/bpm/handleTask/components/inquiryManage/inquiryTable.vue
  8. 17 0
      src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue
  9. 17 0
      src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue
  10. 17 0
      src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue
  11. 25 11
      src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue
  12. 17 0
      src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue
  13. 17 0
      src/views/bpm/handleTask/components/purchaseOrder/returnGoods/inventoryTable.vue
  14. 29 2
      src/views/bpm/handleTask/components/quotation/addDialog.vue
  15. 18 4
      src/views/bpm/handleTask/components/quotation/detailDialog.vue
  16. 27 21
      src/views/bpm/handleTask/components/saleOrder/detailDialog.vue
  17. 34 15
      src/views/bpm/handleTask/components/saleOrder/entrustedReceive/detailDialog.vue
  18. 4 2
      src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue
  19. 18 29
      src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue
  20. 18 2
      src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue
  21. 18 2
      src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue
  22. 22 6
      src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue

+ 106 - 30
src/BIZComponents/inventoryTable.vue

@@ -33,25 +33,7 @@
             >
               新增
             </el-button>
-            <el-button
-              size="small"
-              type="primary"
-              icon="el-icon-plus"
-              class="ele-btn-icon"
-              v-if="!isContractId"
-              @click="handlAdd"
-            >
-              新增临时产品
-            </el-button>
-            <el-button
-              size="small"
-              type="primary"
-              class="ele-btn-icon"
-              @click="save"
-              v-if="!isContractId && isDrawer"
-            >
-              保存
-            </el-button>
+     
           </div>
           <div class="pricebox">
             <span class="amount">总计:{{ allPrice }}元</span>
@@ -72,7 +54,7 @@
                 :min="0"
                 :max="allPrice"
                 :disabled="!allPrice"
-                v-model="discountTotalPrice"
+                v-model="form.discountTotalPrice"
                 style="width: 180px"
                 placeholder="请输入"
                 @input="discountInputByOrder(form.discountTotalPrice)"
@@ -215,7 +197,7 @@
               style="margin-bottom: 20px"
               :prop="'datasource.' + scope.$index + '.guaranteePeriod'"
               :rules="{
-                required: true,
+                required: contractBookType == 1 ? true : false,
                 pattern: numberReg,
                 message: '请输入质保期',
                 trigger: 'blur'
@@ -291,6 +273,23 @@
           </el-input>
         </el-form-item>
       </template>
+      <template v-slot:taxRate="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.taxRate'"
+        >
+          <el-input
+            :disabled="isContractId"
+            v-model="scope.row.taxRate"
+            placeholder="请输入"
+            type="number"
+            
+          >
+            <template slot="append">%</template>
+          </el-input>
+        </el-form-item>
+      </template>
+      
       <template
         v-slot:headerSinglePrice="{ column }"
        
@@ -298,7 +297,9 @@
         <span :class="isSinglePrice?'is-required':''">{{ column.label }}</span>
       </template>
       <template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
-        <span class="is-required">{{ column.label }}</span>
+        <span :class="contractBookType == 1 ? 'is-required' : ''">{{
+          column.label
+        }}</span>
       </template>
 
       <template v-slot:technicalAnswerName="{ row, $index }">
@@ -392,9 +393,10 @@
       </template>
       <template v-slot:customerExpectDeliveryDeadline="scope">
         <el-form-item
-          :rules="{
+        :rules="{
             required: true,
-            message: '请选择客户期望交期',
+            message:
+              contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
             trigger: 'change'
           }"
           :prop="
@@ -560,6 +562,26 @@
       isDrawer: {
         type: Boolean,
         default: false
+      },
+      isChangeCount: {
+        //默认计算
+        type: Boolean,
+        default: true
+      },
+      contractBookType: {
+        //合同类型 1销售 2采购
+        type: [String, Number],
+        default: 1
+      },
+      isSupplierMark: {
+        //客户代号必填
+        type: Boolean,
+        default: false
+      },
+      isTemporary: {
+        //临时
+        type: Boolean,
+        default: false
       }
     },
     data() {
@@ -575,10 +597,11 @@
       };
       return {
         allPrice: 0,
-        discountTotalPrice: 0,
         numberReg,
         defaultForm,
         form: {
+        discountTotalPrice: 0,
+
           datasource: []
         },
         pricingWayList,
@@ -737,7 +760,25 @@
             headerSlot: 'headerSinglePrice',
             align: 'center'
           },
-
+          {
+            width: 160,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'discountSinglePrice',
+            label: '折让单价',
+            align: 'center',
+            show: this.isDiscount,
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountSinglePrice
+                ? Number(_row.discountSinglePrice).toFixed(2)
+                : '';
+            }
+          },
           {
             width: 120,
             prop: 'totalPrice',
@@ -745,6 +786,18 @@
             slot: 'totalPrice',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'discountTotalPrice',
+            label: '折让合计',
+            align: 'center',
+            show: this.isDiscount,
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountTotalPrice
+                ? Number(_row.discountTotalPrice).toFixed(2)
+                : '';
+            }
+          },
 
           {
             width: 160,
@@ -960,12 +1013,15 @@
         const { allPrice, arr } = changeCount(row, index, this.form.datasource);
         this.form.datasource=arr
         this.allPrice=allPrice||0
-  
+        if (this.isDiscountTotalPrice) {
+          this.form.discountTotalPrice = allPrice;
+        }
+        this.$emit('setCountAmount', this.allPrice);
       
       },
       setCustomerMark(customerMark) {
         this.form.datasource.forEach((item) => {
-          item['customerMark'] = customerMark;
+         item['customerMark'] = customerMark;
           this.$forceUpdate();
         });
       },
@@ -994,7 +1050,15 @@
             }
           });
           this.form.datasource = productList;
-          this.changeCount()
+          if (this.isChangeCount) {
+            this.changeCount();
+          } else {
+            this.allPrice = data.totalAmount || data?.contractVO?.totalPrice;
+          }
+
+          if (this.isDiscountTotalPrice) {
+            this.form.discountTotalPrice = data.payAmount||data?.contractVO?.discountTotalPrice;
+          }
 
           let codeList = this.form.datasource.map((item) => item.productCode);
           //获取仓库库存
@@ -1050,7 +1114,7 @@
           this.$set(parasm, 'specification', item.specification);
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'singleWeight', item.roughWeight);
-          this.$set(parasm, 'pricingWay', 1);
+          this.$set(parasm, 'pricingWay',item.pricingWay||1);
 
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.produceType);
@@ -1089,6 +1153,18 @@
       },
 
       validateForm(callback) {
+        let singleWeightData={}
+        this.form.datasource.forEach(item=>{
+
+          if(item.pricingWay==2&&!item.singleWeight){
+            singleWeightData['name']=item.productName
+          }
+
+        })
+        if(singleWeightData.name){
+          this.$message.warning(singleWeightData.name+'计价方式为重量,单重不能为空');
+          callback(false);
+        }
         //开始表单校验
         this.$refs.form.validate((valid, obj) => {
           if (obj) {

+ 167 - 88
src/BIZComponents/inventoryTableDetails.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-form ref="form" :model="form" :rules="rules">
+  <el-form ref="form" >
     <ele-pro-table
       ref="table"
       :needPage="false"
@@ -14,7 +14,9 @@
         <div class="headbox">
           <div class="pricebox">
             <span class="amount">总计:{{ allPrice }}元</span>
-            <span class="amount" v-if="isDiscountTotalPrice">优惠后总金额:{{ discountTotalPrice }}元</span>
+            <span class="amount" v-if="isDiscountTotalPrice"
+              >优惠后总金额:{{ form.discountTotalPrice }}元</span
+            >
           </div>
         </div>
       </template>
@@ -25,9 +27,9 @@
   import dictMixins from '@/mixins/dictMixins';
 
   import fileMain from '@/components/addDoc/index.vue';
-  import { pricingWayList } from '@/enum/dict.js';
+  import {contactQueryByCategoryIdsAPI} from "@/api/bpm/components/supplierManage/contact";
+
 
-  const dayjs = require('dayjs');
 
   export default {
     mixins: [dictMixins],
@@ -39,18 +41,37 @@
         default: false,
         type: Boolean
       },
+
       isDiscount: {
         //折让
         type: Boolean,
         default: true
       },
+      isCustomerMark: {
+        //客户代号必填
+        type: Boolean,
+        default: false
+      },
+      pageName: {
+        default: ''
+      },
+      isChangeCount: {
+        //默认计算
+        type: Boolean,
+        default: true
+      },
+      contractBookType: {
+        //合同类型 1销售 2采购
+        type: [String, Number],
+        default: 1
+      },
     },
     data() {
       return {
         allPrice: 0,
-        discountTotalPrice: 0,
 
         form: {
+        discountTotalPrice: 0,
           datasource: []
         },
 
@@ -60,7 +81,6 @@
             type: 'index',
             columnKey: 'index',
             align: 'center',
-            fixed: 'left'
           },
           {
             width: 280,
@@ -68,35 +88,21 @@
             label: '名称',
             slot: 'productName',
             headerSlot: 'headerProductName',
-            align: 'center'
+            align: 'center',
           },
           {
             width: 120,
             prop: 'productCode',
             label: '编码',
             slot: 'productCode',
-            align: 'center'
+            align: 'center',
           },
           {
             width: 200,
             prop: 'productCategoryName',
             label: '类型',
             slot: 'productCategoryName',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'productBrand',
-            label: '牌号',
-            slot: 'productBrand',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType',
-            align: 'center'
+            align: 'center',
           },
           {
             width: 120,
@@ -106,44 +112,38 @@
             align: 'center'
           },
           {
-            width: 120,
-            prop: 'imgCode',
-            align: 'center',
-            label: '图号/件号',
-            showOverflowTooltip: true
-          },
-          {
-            width: 120,
-            prop: 'produceType',
+            width: 200,
+            prop: 'customerMark',
+            label: '客户代号',
+            slot: 'customerMark',
+            headerSlot: 'headerCustomerMark',
             align: 'center',
-            label: '生产类型',
-            showOverflowTooltip: true,
-            formatter: (row, column) => {
-              return row?.produceType?.map((item) =>{
-               return this.getDictValue('生产类型', item)
-              })?.toString()
-            }
+            show: this.contractBookType == 1
           },
           {
-            width: 120,
-            prop: 'approvalNumber',
+            width: 200,
+            prop: 'supplierMark',
+            label: '供应商代号',
+            slot: 'supplierMark',
+            headerSlot: 'headerSupplierMark',
             align: 'center',
-            label: '批准文号',
-            showOverflowTooltip: true
+            show: this.contractBookType == 2
           },
           {
-            width: 120,
-            prop: 'packingSpecification',
+            minWidth: 120,
+            prop: 'entrustedEnterpriseId',
+            label: '受托企业',
+            slot: 'entrustedEnterpriseId',
+            show: this.isCustomerMark,
             align: 'center',
-            label: '包装规格',
-            showOverflowTooltip: true
-          },
-          {
-            width: 200,
-            prop: 'customerMark',
-            label: '客户代号',
-            slot: 'customerMark',
-            align: 'center'
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return (
+                this.supplierObj&&this.supplierObj[row.productId]?.find(
+                  (item) => item.id === row.entrustedEnterpriseId
+                )?.name || ''
+              );
+            }
           },
           {
             width: 150,
@@ -153,13 +153,7 @@
             headerSlot: 'headerTotalCount',
             align: 'center'
           },
-          // {
-          //   width: 120,
-          //   prop: 'availableCountBase',
-          //   label: '库存数量',
-          //   slot: 'availableCountBase',
-          //   align: 'center'
-          // },
+
           {
             width: 120,
             prop: 'measuringUnit',
@@ -167,6 +161,23 @@
             slot: 'measuringUnit',
             align: 'center'
           },
+          {
+            minWidth: 110,
+            prop: 'sendTotalCount',
+            label: '已发货数量',
+            slot: 'sendTotalCount',
+            show: this.pageName == 'send',
+            align: 'center'
+          },
+          {
+            minWidth: 110,
+            prop: 'notSendTotalCount',
+            label: '未发货数量',
+            slot: 'notSendTotalCount',
+            show: this.pageName == 'send',
+            align: 'center'
+          },
+
           {
             width: 120,
             prop: 'singleWeight',
@@ -197,7 +208,7 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
             }
           },
           {
@@ -208,12 +219,24 @@
             headerSlot: 'headerSinglePrice',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center'
+          },
           {
             width: 160,
             prop: 'discountSinglePrice',
             label: '折让单价',
             align: 'center',
-            show:this.isDiscount
+            show: this.isDiscount,
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountSinglePrice
+                ? Number(_row.discountSinglePrice).toFixed(2)
+                : '';
+            }
           },
           {
             width: 120,
@@ -227,12 +250,68 @@
             prop: 'discountTotalPrice',
             label: '折让合计',
             align: 'center',
-            show:this.isDiscount
+            show: this.isDiscount,
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountTotalPrice
+                ? Number(_row.discountTotalPrice).toFixed(2)
+                : '';
+            }
+          },
+          {
+            width: 160,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
+
+          {
+            width: 120,
+            prop: 'imgCode',
+            align: 'center',
+            label: '图号/件号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'produceType',
+            align: 'center',
+            label: '生产类型',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row?.produceType
+                ?.map((item) => {
+                  return this.getDictValue('生产类型', item);
+                })
+                ?.toString();
+            }
+          },
+          {
+            width: 120,
+            prop: 'approvalNumber',
+            align: 'center',
+            label: '批准文号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
           },
+
           {
             width: 160,
             prop: 'customerExpectDeliveryDeadline',
-            label: '客户期望交期',
+            label: this.contractBookType == 1 ? '客户期望交期' : '交付日期',
             slot: 'customerExpectDeliveryDeadline',
             headerSlot: 'headerCustomerExpectDeliveryDeadline',
             align: 'center'
@@ -242,10 +321,10 @@
             prop: 'produceDeliveryDeadline',
             label: '生产交付交期',
             slot: 'produceDeliveryDeadline',
-
+            headerSlot: 'headerProduceDeliveryDeadline',
+            show: this.contractBookType == 1,
             align: 'center'
           },
-
           {
             width: 200,
             prop: 'guaranteePeriod',
@@ -317,16 +396,6 @@
             label: '备注',
             slot: 'remark',
             align: 'center'
-          },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 120,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            fixed: 'right',
-            showOverflowTooltip: true
           }
         ]
       };
@@ -335,16 +404,20 @@
 
     created() {
       this.requestDict('生产类型');
-
     },
     methods: {
-
-
-      setDay(addDay, dateType = 'day') {
-        return dayjs(this.contractStartDate || new Date())
-          .add(addDay, dateType)
-          .format('YYYY-MM-DD');
+      async getSupplierObj(productList, queryName) {
+        try {
+          let categoryIds = productList.map((item) => item[queryName]);
+          return await contactQueryByCategoryIdsAPI({
+            categoryIds,
+            isQueryEE: 1
+          });
+        } catch (e) {
+          return Promise.resolve({});
+        }
       },
+
       // 返回列表数据
       getTableValue() {
         let comitDatasource = this.form.datasource;
@@ -366,18 +439,24 @@
 
       //修改回显
       async putTableValue(data) {
+        console.log(data,'dasdas')
         let productList =
           (data &&
             (data.quoteProductList || data.productList || data.detailList)) ||
           [];
         if (productList) {
           this.form.datasource = productList;
-          this.allPrice = data.totalPrice;
-
+          this.allPrice = data.totalAmount || data.totalPrice||data?.contractVO?.totalPrice;
+          if (this.isDiscountTotalPrice) {
+            this.form.discountTotalPrice = data.payAmount||data.discountTotalPrice||data?.contractVO?.discountTotalPrice;
+          }
+          this.supplierObj = await this.getSupplierObj(
+            productList,
+            'productId'
+          );
           this.$refs.table.reload();
         }
-      },
-
+      }
     }
   };
 </script>

+ 9 - 0
src/api/bpm/components/saleManage/contact.js

@@ -19,6 +19,15 @@ export async function getInfoById(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+//根据ID查询分类详情系信息
+export async function getByIds(id) {
+  const res = await request.get(`/main/categoryLevel/getByIds/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 //客户申请列表
 export async function contactApplyList(id) {
   const res = await request.get(`/eom/contactlistapply/getById/${id}`);

+ 2 - 2
src/views/bpm/handleTask/components/contactQC/contactDetailDialog.vue

@@ -335,7 +335,7 @@
 </template>
 
 <script>
-import {contactDetail, getInfoById} from '@/api/bpm/components/saleManage/contact';
+import {contactDetail, getByIds} from '@/api/bpm/components/saleManage/contact';
 import {getFile} from '@/api/system/file';
 import dictMixins from '@/mixins/dictMixins';
 import {copyObj} from '@/utils/util';
@@ -647,7 +647,7 @@ export default {
         this.tableLinkData.forEach(e => e.status = e.status + "");
       }
 
-      await getInfoById(this.form.categoryId).then((res) => {
+      await getByIds(this.form.categoryId).then((res) => {
         this.$set(this.form, 'categoryName', res.data.name)
       });
     },

+ 2 - 2
src/views/bpm/handleTask/components/contractBook/addDialog.vue

@@ -227,7 +227,7 @@
             </DictSelection>
           </el-form-item>
 
-          <el-form-item
+          <!-- <el-form-item
             label="计价方式"
             prop="pricingWay"
             style="margin-bottom: 22px"
@@ -240,7 +240,7 @@
                 item.name
               }}</el-radio>
             </el-radio-group>
-          </el-form-item>
+          </el-form-item> -->
         </el-col>
       </el-row>
       <headerTitle title="基本信息"></headerTitle>

+ 267 - 261
src/views/bpm/handleTask/components/contractBook/detailDialog.vue

@@ -80,13 +80,13 @@
           >
             {{ form.contractEndDate }}
           </el-form-item>
-          <el-form-item
+          <!-- <el-form-item
             label="计价方式:"
             prop="payWay"
             style="margin-bottom: 16px"
           >
             {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item
             label="结算方式:"
             prop="payWay"
@@ -231,9 +231,11 @@
 
     <inventoryTabledetail
       ref="inventoryTabledetailRef"
+      :isCustomerMark="form.type == '1'"
       :isDiscountTotalPrice="true"
       :contractBookType="form.type"
-      :isCustomerMark="false"
+      :pricingWay="form.pricingWay"
+      :isChangeCount="false"
     >
     </inventoryTabledetail>
 
@@ -255,277 +257,281 @@
 </template>
 
 <script>
-import { getDetail } from '@/api/bpm/components/contractManage/contractBook';
-import { getFile } from '@/api/system/file';
-import dictMixins from '@/mixins/dictMixins';
-import { copyObj } from '@/utils/util';
-import inventoryTabledetail from './inventoryTabledetail.vue';
-import fileMain from '@/components/addDoc/index';
+  import { getDetail } from '@/api/bpm/components/contractManage/contractBook';
+  import { getFile } from '@/api/system/file';
+  import dictMixins from '@/mixins/dictMixins';
+  import { copyObj } from '@/utils/util';
+  import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
+  import fileMain from '@/components/addDoc/index';
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    inventoryTabledetail,
-    fileMain
-  },
-  props: {
-    businessId: {
-      default: ''
-    }
-  },
-  data() {
-    return {
-      visible: false,
-      detailId: '',
-      title: '详情',
-      row: {},
-      activeName: 'base',
-      form: {},
-      rules: {},
-      detailData: {},
-      receiptPaymentListcolumns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          width: 200,
-          prop: 'moneyName',
-          label: '款项名称',
-          slot: 'moneyName'
-        },
-        {
-          width: 100,
-          prop: 'price',
-          label: '金额',
-          slot: 'price',
-          formatter: (_row, _column, cellValue) => {
-            return _row.price + '元';
-          }
-        },
-        {
-          width: 100,
-          prop: 'ratio',
-          label: '比例',
-          slot: 'ratio',
-          formatter: (_row, _column, cellValue) => {
-            return _row.ratio + '%';
+  export default {
+    mixins: [dictMixins],
+    components: {
+      inventoryTabledetail,
+      fileMain
+    },
+    props: {
+      businessId: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        visible: false,
+        detailId: '',
+        title: '详情',
+        row: {},
+        activeName: 'base',
+        form: {},
+        rules: {},
+        detailData: {},
+        receiptPaymentListcolumns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 200,
+            prop: 'moneyName',
+            label: '款项名称',
+            slot: 'moneyName'
+          },
+          {
+            width: 100,
+            prop: 'price',
+            label: '金额',
+            slot: 'price',
+            formatter: (_row, _column, cellValue) => {
+              return _row.price + '元';
+            }
+          },
+          {
+            width: 100,
+            prop: 'ratio',
+            label: '比例',
+            slot: 'ratio',
+            formatter: (_row, _column, cellValue) => {
+              return _row.ratio + '%';
+            }
+          },
+          {
+            width: 160,
+            prop: 'deadLine',
+            label: '截止日期',
+            slot: 'deadLine'
+          },
+          {
+            prop: 'remark',
+            label: '	说明',
+            slot: 'remark'
           }
-        },
-        {
-          width: 160,
-          prop: 'deadLine',
-          label: '截止日期',
-          slot: 'deadLine'
-        },
-        {
-          prop: 'remark',
-          label: '	说明',
-          slot: 'remark'
-        }
-      ],
-      competAnalysisListcolumns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          width: 200,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName'
-        },
-        {
-          width: 120,
-          prop: 'productCode',
-          label: '编码',
-          slot: 'productCode'
-        },
-        {
-          width: 200,
-          prop: 'productCategoryName',
-          label: '类型',
-          slot: 'productCategoryName'
-        },
-        {
-          width: 160,
-          prop: 'productBrand',
-          label: '牌号',
-          slot: 'productBrand'
-        },
-        {
-          width: 120,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType'
-        },
-        {
-          width: 120,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification'
-        },
+        ],
+        competAnalysisListcolumns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 200,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName'
+          },
+          {
+            width: 120,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode'
+          },
+          {
+            width: 200,
+            prop: 'productCategoryName',
+            label: '类型',
+            slot: 'productCategoryName'
+          },
+          {
+            width: 160,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand'
+          },
+          {
+            width: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType'
+          },
+          {
+            width: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification'
+          },
 
-        {
-          width: 160,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice'
-        },
-        {
-          width: 120,
-          prop: 'totalCount',
-          label: '数量',
-          slot: 'totalCount'
-        },
-        {
-          width: 120,
-          prop: 'totalPrice',
-          label: '销售总金额',
-          slot: 'totalPrice',
-          formatter: (_row, _column, cellValue) => {
-            return _row.totalPrice + '元';
-          }
-        },
-        {
-          width: 120,
-          prop: 'measuringUnit',
-          label: '计量单位',
-          slot: 'measuringUnit'
-        },
-        {
-          width: 120,
-          prop: 'deliveryDays',
-          label: '交期(天)',
-          slot: 'deliveryDays'
-        },
-        {
-          width: 200,
-          prop: 'guaranteePeriod',
-          label: '质保期',
-          slot: 'guaranteePeriod',
-          formatter: (_row, _column, cellValue) => {
-            return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
-          }
-        },
-        // {
-        //   width: 120,
-        //   prop: 'guaranteePeriodUnitCode',
-        //   label: '',
-        //   slot: 'guaranteePeriodUnitCode'
-        // },
-        {
-          width: 240,
-          prop: 'customerReqFiles',
-          label: '技术图纸',
-          slot: 'customerReqFiles'
-        },
+          {
+            width: 160,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice'
+          },
+          {
+            width: 120,
+            prop: 'totalCount',
+            label: '数量',
+            slot: 'totalCount'
+          },
+          {
+            width: 120,
+            prop: 'totalPrice',
+            label: '销售总金额',
+            slot: 'totalPrice',
+            formatter: (_row, _column, cellValue) => {
+              return _row.totalPrice + '元';
+            }
+          },
+          {
+            width: 120,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            slot: 'measuringUnit'
+          },
+          {
+            width: 120,
+            prop: 'deliveryDays',
+            label: '交期(天)',
+            slot: 'deliveryDays'
+          },
+          {
+            width: 200,
+            prop: 'guaranteePeriod',
+            label: '质保期',
+            slot: 'guaranteePeriod',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            }
+          },
+          // {
+          //   width: 120,
+          //   prop: 'guaranteePeriodUnitCode',
+          //   label: '',
+          //   slot: 'guaranteePeriodUnitCode'
+          // },
+          {
+            width: 240,
+            prop: 'customerReqFiles',
+            label: '技术图纸',
+            slot: 'customerReqFiles'
+          },
 
-        {
-          width: 120,
-          prop: 'technicalAnswerName',
-          label: '技术答疑人',
-          slot: 'technicalAnswerName'
-        },
-        {
-          width: 220,
-          prop: 'technicalParams',
-          label: '技术参数',
-          slot: 'technicalParams'
-        },
-        {
-          width: 240,
-          prop: 'technicalDrawings',
-          label: '技术图纸',
-          slot: 'technicalDrawings',
-          formatter: (_row, _column, cellValue) => {
-            return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
+          {
+            width: 120,
+            prop: 'technicalAnswerName',
+            label: '技术答疑人',
+            slot: 'technicalAnswerName'
+          },
+          {
+            width: 220,
+            prop: 'technicalParams',
+            label: '技术参数',
+            slot: 'technicalParams'
+          },
+          {
+            width: 240,
+            prop: 'technicalDrawings',
+            label: '技术图纸',
+            slot: 'technicalDrawings',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            }
+          },
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark'
           }
-        },
-        {
-          width: 220,
-          prop: 'remark',
-          label: '备注',
-          slot: 'remark'
-        }
-      ]
-    };
-  },
-  created() {
-    this.getDetailData(this.businessId);
-  },
-  methods: {
-    //导出
-    // async exportTable() {
-    //   this.loading = true;
-    //   const response = await getExport(this.detailId);
-    // },
-    // async open(row) {
-    //   this.form = row;
-    //   this.visible = true;
-    //   this.getDetailData(row.id);
-    //   this.detailId = row.id;
-    // },
-    //文件上传
-    // fileOpen() {
-    //   this.$refs.fileMainRef.open(this.form.fileId, 'view');
-    // },
-    cancel() {
-      this.$nextTick(() => {
-        // 关闭后,销毁所有的表单数据
-        (this.form = copyObj(this.formDef)),
-          (this.otherForm = copyObj(this.otherFormDef)),
-          (this.tableBankData = []);
-        this.tableLinkData = [];
-        this.visible = false;
-      });
+        ]
+      };
     },
-    downloadFile(file) {
-      getFile({ objectName: file.storePath }, file.name);
+    created() {
+      this.getDetailData(this.businessId);
     },
-    async getDetailData(id) {
-      this.loading = true;
-      const data = await getDetail(id);
-      this.loading = false;
-      if (data) {
-        this.detailData = data;
-        this.form = data.contractVO;
-        // if (this.form.fileId) {
-        //     this.form.fileId = JSON.parse(this.form.fileId);
-        //   }
-        this.$refs.inventoryTabledetailRef &&
-          this.$refs.inventoryTabledetailRef.putTableValue({
-            ...data,
-            ...data.contractVO
-          });
-        console.log(this.form.type);
+    methods: {
+      //导出
+      // async exportTable() {
+      //   this.loading = true;
+      //   const response = await getExport(this.detailId);
+      // },
+      // async open(row) {
+      //   this.form = row;
+      //   this.visible = true;
+      //   this.getDetailData(row.id);
+      //   this.detailId = row.id;
+      // },
+      //文件上传
+      // fileOpen() {
+      //   this.$refs.fileMainRef.open(this.form.fileId, 'view');
+      // },
+      cancel() {
+        this.$nextTick(() => {
+          // 关闭后,销毁所有的表单数据
+          (this.form = copyObj(this.formDef)),
+            (this.otherForm = copyObj(this.otherFormDef)),
+            (this.tableBankData = []);
+          this.tableLinkData = [];
+          this.visible = false;
+        });
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      async getDetailData(id) {
+        this.loading = true;
+        const data = await getDetail(id);
+        this.loading = false;
+        if (data) {
+          this.detailData = data;
+          this.form = data.contractVO;
+          // if (this.form.fileId) {
+          //     this.form.fileId = JSON.parse(this.form.fileId);
+          //   }
+          this.$refs.inventoryTabledetailRef &&
+            this.$refs.inventoryTabledetailRef.putTableValue({
+              ...data,
+              ...data.contractVO
+            });
+          console.log(this.form.type);
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="scss">
-.ele-dialog-form {
-  .el-form-item {
-    margin-bottom: 10px;
+  .ele-dialog-form {
+    .el-form-item {
+      margin-bottom: 10px;
+    }
   }
-}
 
-.headbox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    margin-right: 20px;
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
   }
-}
 </style>

+ 0 - 1
src/views/bpm/handleTask/components/inquiryManage/inquiryTable.vue

@@ -800,7 +800,6 @@
           n.key = index + 1;
         });
       },
-
       validateForm(callback) {
         //开始表单校验
         this.$refs.form.validate((valid) => {

+ 17 - 0
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -465,6 +465,16 @@
             slot: 'weightUnit',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -472,6 +482,13 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+          },
           {
             width: 160,
             prop: 'discountSinglePrice',

+ 17 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -381,6 +381,16 @@
             slot: 'weightUnit',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -388,6 +398,13 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+          },
           {
             width: 160,
             prop: 'discountSinglePrice',

+ 17 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue

@@ -326,6 +326,16 @@ export default {
           slot: 'weightUnit',
           align: "center"
         },
+        {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+            }
+          },
         {
           width: 160,
           prop: 'singlePrice',
@@ -333,6 +343,13 @@ export default {
           slot: 'singlePrice',
           align: 'center'
         },
+        {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+          },
         {
           width: 160,
           prop: 'discountSinglePrice',

+ 25 - 11
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue

@@ -44,11 +44,7 @@
         </el-col>
       </el-row>
       <el-row :gutter="20">
-        <el-col :span="12">
-          <el-form-item label="计价方式:" style="margin-bottom: 22px">
-            {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-          </el-form-item>
-        </el-col>
+       
         <el-col :span="12">
           <el-form-item
             label="外协单位电话:"
@@ -58,8 +54,8 @@
             {{ form.linkPhone }}
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="20">
+     
+     
         <el-col :span="12">
           <el-form-item
             label="发货日期:"
@@ -78,8 +74,7 @@
             {{ form.sendNoteNo }}
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="20">
+   
         <el-col :span="12">
           <el-form-item
             label="订单类型:"
@@ -219,9 +214,9 @@
           },
           {
             width: 200,
-            prop: 'customerMark',
+            prop: 'supplierMark',
             label: '客户代号',
-            slot: 'customerMark',
+            slot: 'supplierMark',
             align: 'center'
           },
           {
@@ -267,6 +262,16 @@
             slot: 'weightUnit',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -274,6 +279,15 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          
+          {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+            show: !this.detailType
+          },
           {
             width: 100,
             prop: 'discountSinglePrice',

+ 17 - 0
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue

@@ -339,6 +339,16 @@
             slot: 'increaseTotalWeight',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -346,6 +356,13 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+          },
           {
             width: 160,
             prop: 'discountSinglePrice',

+ 17 - 0
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/inventoryTable.vue

@@ -394,6 +394,16 @@ export default {
           slot: 'increaseTotalWeight',
           align: "center"
         },
+        {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+            }
+          },
         {
           width: 160,
           prop: 'singlePrice',
@@ -401,6 +411,13 @@ export default {
           slot: 'singlePrice',
           align: "center"
         },
+        {
+            width: 120,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+          },
         {
           width: 160,
           prop: 'discountSinglePrice',

+ 29 - 2
src/views/bpm/handleTask/components/quotation/addDialog.vue

@@ -140,6 +140,18 @@
               placeholder="请输入"
             />
           </el-form-item>
+          <el-form-item
+            label="结算方式"
+            prop="settlementMode"
+            style="margin-bottom: 22px"
+          >
+            <DictSelection
+              dictName="结算方式"
+              clearable
+              v-model="form.settlementMode"
+            >
+            </DictSelection>
+          </el-form-item>
         </el-col>
 
         <el-col :span="12">
@@ -222,6 +234,21 @@
 <!--              :limit="1"-->
 <!--            />-->
           </el-form-item>
+          <el-form-item
+            label="是否接受拆单"
+            prop="acceptUnpack"
+            style="margin-bottom: 22px"
+          >
+            <el-select v-model="form.acceptUnpack" placeholder="请选择">
+              <el-option
+                v-for="item in acceptUnpackoptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
         </el-col>
       </el-row>
 
@@ -232,7 +259,7 @@
         :isDeliveryDeadline="false"
         :isGuaranteePeriod="false"
       ></inventoryTable>
-      <el-row style="margin-top: 20px">
+      <!-- <el-row style="margin-top: 20px">
         <el-col :span="6">
           <el-form-item prop="taxRate" label="税率">
             <el-input clearable v-model="form.taxRate" placeholder="请输入">
@@ -283,7 +310,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-      </el-row>
+      </el-row> -->
     </el-form>
 
     <parentList

+ 18 - 4
src/views/bpm/handleTask/components/quotation/detailDialog.vue

@@ -86,6 +86,13 @@
 <!--              {{ form.askFile.name }}</el-link-->
 <!--            >-->
           </el-form-item>
+          <el-form-item
+            label="结算方式"
+            prop="settlementMode"
+            style="margin-bottom: 22px"
+          >
+            {{ form.settlementModeName }}
+          </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item
@@ -125,11 +132,18 @@
           >
             {{ form.quoteAddress }}
           </el-form-item>
+          <el-form-item
+            label="是否接受拆单"
+            prop="acceptUnpack"
+            style="margin-bottom: 22px"
+          >
+            {{ form.acceptUnpack == 1 ? '接受' : '不接受' }}
+          </el-form-item>
         </el-col>
       </el-row>
 
       <el-row style="margin-top: 20px">
-        <el-col :span="6">
+        <!-- <el-col :span="6">
           <el-form-item prop="taxRate" label="税率">
             {{ form.taxRate }}%
           </el-form-item>
@@ -138,8 +152,8 @@
           <el-form-item prop="deliveryDate" label="交货日期">
             {{ form.deliveryDate?.substr(0, 10) }}
           </el-form-item>
-        </el-col>
-        <el-col :span="6">
+        </el-col> -->
+        <!-- <el-col :span="6">
           <el-form-item
             label="结算方式"
             prop="settlementMode"
@@ -156,7 +170,7 @@
           >
             {{ form.acceptUnpack == 1 ? '接受' : '不接受' }}
           </el-form-item>
-        </el-col>
+        </el-col> -->
       </el-row>
     </el-form>
 

+ 27 - 21
src/views/bpm/handleTask/components/saleOrder/detailDialog.vue

@@ -49,19 +49,19 @@
             </el-form-item>
             <el-form-item prop="orderFiles" label="订单附件:">
               <fileMain v-model="detailData.orderFiles" type="view"></fileMain>
-<!--              <div-->
-<!--                v-if="detailData.orderFiles && detailData.orderFiles?.length"-->
-<!--              >-->
-<!--                <el-link-->
-<!--                  v-for="link in detailData.orderFiles"-->
-<!--                  :key="link.id"-->
-<!--                  type="primary"-->
-<!--                  :underline="false"-->
-<!--                  @click="downloadFile(link)"-->
-<!--                >-->
-<!--                  {{ link.name }}</el-link-->
-<!--                >-->
-<!--              </div>-->
+              <!--              <div-->
+              <!--                v-if="detailData.orderFiles && detailData.orderFiles?.length"-->
+              <!--              >-->
+              <!--                <el-link-->
+              <!--                  v-for="link in detailData.orderFiles"-->
+              <!--                  :key="link.id"-->
+              <!--                  type="primary"-->
+              <!--                  :underline="false"-->
+              <!--                  @click="downloadFile(link)"-->
+              <!--                >-->
+              <!--                  {{ link.name }}</el-link-->
+              <!--                >-->
+              <!--              </div>-->
             </el-form-item>
 
             <el-form-item
@@ -123,18 +123,18 @@
             >
               {{ form.totalAmount }}元
             </el-form-item>
-            <el-form-item
+            <!-- <el-form-item
               label="计价方式:"
               style="margin-bottom: 16px"
             >
               {{ form.pricingWay==1?'按数量计费':'按重量计费' }}
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item
               label="订单类型:"
               prop="totalAmount"
               style="margin-bottom: 16px"
             >
-              {{ form.needProduce?'生产性订单':'贸易性订单' }}
+              {{ form.needProduce ? '生产性订单' : '贸易性订单' }}
             </el-form-item>
           </el-col>
         </el-row>
@@ -271,6 +271,8 @@
       <headerTitle title="产品清单"></headerTitle>
       <inventoryTabledetail
         ref="inventoryTabledetailRef"
+        :isCustomerMark="true"
+        :isDiscountTotalPrice="true"
       ></inventoryTabledetail>
     </div>
     <!-- <div v-if="activeComp=='invoice'">
@@ -294,8 +296,8 @@
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import { copyObj } from '@/utils/util';
-  import inventoryTabledetail from '@/views/bpm/handleTask/components/contractBook/inventoryTabledetail.vue';
-  import fileMain from "@/components/addDoc/index.vue";
+  import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
+  import fileMain from '@/components/addDoc/index.vue';
 
   export default {
     mixins: [dictMixins],
@@ -459,7 +461,9 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             }
           },
           // {
@@ -486,7 +490,9 @@
             label: '技术图纸',
             slot: 'technicalDrawings',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             }
           },
           {
@@ -523,7 +529,7 @@
           this.form = data;
           this.detailData = data;
           this.$refs.inventoryTabledetailRef &&
-            this.$refs.inventoryTabledetailRef.putTableValue(data );
+            this.$refs.inventoryTabledetailRef.putTableValue(data);
         }
       }
     }

+ 34 - 15
src/views/bpm/handleTask/components/saleOrder/entrustedReceive/detailDialog.vue

@@ -23,11 +23,11 @@
         </el-col>
       </el-row>
       <el-row :gutter="20">
-        <el-col :span="12">
+        <!-- <el-col :span="12">
           <el-form-item label="计价方式:" style="margin-bottom: 22px">
             {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="12">
           <el-form-item
             label="客户联系人:"
@@ -80,17 +80,17 @@
         <el-col :span="12">
           <el-form-item prop="files" label="附件:">
             <fileMain v-model="form.files" type="view"></fileMain>
-<!--            <div v-if="form.files && form.files?.length">-->
-<!--              <el-link-->
-<!--                v-for="link in form.files"-->
-<!--                :key="link.id"-->
-<!--                type="primary"-->
-<!--                :underline="false"-->
-<!--                @click="downloadFile(link)"-->
-<!--              >-->
-<!--                {{ link.name }}-->
-<!--              </el-link>-->
-<!--            </div>-->
+            <!--            <div v-if="form.files && form.files?.length">-->
+            <!--              <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>
         </el-col>
       </el-row>
@@ -132,10 +132,10 @@
   import { getFile } from '@/api/system/file';
   import { getPSaleEntrustedReceiveDetailAPI } from '@/api/bpm/components/saleManage/entrustedReceive';
   import { deepClone } from '@/components/FormGenerator/utils/index';
-  import fileMain from "@/components/addDoc/index.vue";
+  import fileMain from '@/components/addDoc/index.vue';
 
   export default {
-    components: {fileMain},
+    components: { fileMain },
     props: {
       businessId: {
         default: ''
@@ -261,6 +261,16 @@
             slot: 'weightUnit',
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 160,
             prop: 'singlePrice',
@@ -268,6 +278,12 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 100,
+            prop: 'taxRate',
+            label: '税率',
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'discountSinglePrice',
@@ -366,6 +382,9 @@
         const data = await getPSaleEntrustedReceiveDetailAPI(id);
         this.loading = false;
         if (data) {
+          data.productList.forEach((item) => {
+            data.pricingWay = data.pricingWay || data?.saleOrder?.pricingWay;
+          });
           this.form = deepClone(data);
           this.form.pricingWay = data?.saleOrder?.pricingWay;
           this.detailData = data;

+ 4 - 2
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -31,12 +31,12 @@
             >
             </DictSelection>
           </el-form-item>
-          <el-form-item label="计价方式" style="margin-bottom: 22px">
+          <!-- <el-form-item label="计价方式" style="margin-bottom: 22px">
             <el-select v-model="form.pricingWay" disabled style="width: 100%">
               <el-option label="按数量计费" :value="1"></el-option>
               <el-option label="按重量计费" :value="2"></el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="总金额:" prop="totalAmount">
               <el-input v-model="totalAmount" disabled>
                 <template slot="append">元</template>
@@ -672,6 +672,8 @@
           this.productList.forEach((val) => {
             if (item.productCode == val.productCode) {
               item['singlePrice'] = val.singlePrice;
+              item['clientCode']= item.clientCode||val.customerMark;
+              item['pricingWay'] = item.pricingWay || this.form.pricingWay||1;
             }
           });
         });

+ 18 - 29
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -33,9 +33,9 @@
           >
             {{ form.totalAmount }}元
           </el-form-item>
-          <el-form-item label="计价方式:" style="margin-bottom: 22px">
+          <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
             {{ form.pricingWay == 1 ? '按数量计费' :form.pricingWay == 2 ? '按重量计费':'' }}
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item
             label="备注:"
             prop="remark"
@@ -514,6 +514,16 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -523,38 +533,17 @@
           },
           {
             width: 100,
-            prop: 'totalPrice',
-            label: '合计',
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'materielDesignation',
-            label: '物料代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'clientCode',
-            label: '客户代号',
-            showOverflowTooltip: true,
+            prop: 'taxRate',
+            label: '税率',
             align: 'center'
           },
           {
-            minWidth: 120,
-            prop: 'engrave',
-            label: '刻码',
-            showOverflowTooltip: true,
+            width: 100,
+            prop: 'totalPrice',
+            label: '合计',
             align: 'center'
           },
-          // {
-          //   minWidth: 80,
-          //   prop: 'weight',
-          //   label: '重量',
-          //   showOverflowTooltip: true,
-          //   align: 'center'
-          // },
+         
           {
             minWidth: 80,
             prop: 'receiveTotalWeight',

+ 18 - 2
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -325,6 +325,16 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -332,6 +342,12 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 100,
+            prop: 'taxRate',
+            label: '税率',
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'totalPrice',
@@ -450,10 +466,10 @@
       totalAmount() {
         let num = 0;
         this.form.datasource.forEach((item) => {
-          if (this.pricingWay == 1) {
+          if (item.pricingWay == 1) {
             item.totalPrice = item.singlePrice * item.totalCount;
           }
-          if (this.pricingWay == 2) {
+          if (item.pricingWay == 2) {
             item.totalPrice =
               item.singlePrice * item.totalCount * receiveTotalWeight;
           }

+ 18 - 2
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -41,9 +41,9 @@
             >
               {{ form.totalAmount }}元
             </el-form-item>
-            <el-form-item label="计价方式:" style="margin-bottom: 22px">
+            <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item
               label="备注:"
               prop="remark"
@@ -306,6 +306,16 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -313,6 +323,12 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 100,
+            prop: 'taxRate',
+            label: '税率',
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'materielDesignation',

+ 22 - 6
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue

@@ -50,7 +50,7 @@
           :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
           :rules="[
             {
-              required: pricingWay == 2 && [3, 1].includes(returnSourceType),
+              required: scope.row.pricingWay == 2 && [3, 1].includes(returnSourceType),
               message: '请输入数字',
               trigger: 'blur'
             }
@@ -101,7 +101,7 @@
           :rules="[
             {
               required:
-                (entrustedCode || returnSourceType == 2) && pricingWay == 2,
+                (entrustedCode || returnSourceType == 2) && scope.row.pricingWaypricingWay == 2,
               message: '请输入数字',
               trigger: 'blur'
             }
@@ -232,7 +232,7 @@
       <template v-slot:headerSendTotalWeight="{ column }">
         <span
           :class="{
-            'is-required': pricingWay == 2 && [3, 1].includes(returnSourceType)
+            'is-required': [3, 1].includes(returnSourceType)
           }"
           >{{ column.label }}</span
         >
@@ -241,7 +241,7 @@
         <span
           :class="{
             'is-required':
-              (entrustedCode || returnSourceType == 2) && pricingWay == 2
+              (entrustedCode || returnSourceType == 2)
           }"
           >{{ column.label }}</span
         >
@@ -442,6 +442,16 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '数量' : '重量';
+            }
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -449,6 +459,12 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          {
+            width: 100,
+            prop: 'taxRate',
+            label: '税率',
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'materielDesignation',
@@ -557,10 +573,10 @@
     },
     computed: {
       totalAmount() {
-        if (this.pricingWay == 1) {
+        if (item.pricingWay == 1) {
           item.totalPrice = item.singlePrice * item.totalCount;
         }
-        if (this.pricingWay == 2) {
+        if (item.pricingWay == 2) {
           item.totalPrice =
             item.singlePrice * item.totalCount * receiveTotalWeight;
         }