Przeglądaj źródła

核价单修改

yusheng 1 rok temu
rodzic
commit
b3a45fc680

+ 30 - 30
src/views/bpm/handleTask/components/inquiryManage/addDialog.vue

@@ -247,15 +247,15 @@
         fn(data);
       },
 
-      setIsInquiry() {
-        let supplierList = [];
+      setIsInquiry(supplierList) {
+        // let supplierList = [];
 
         this.$nextTick(() => {
-          this.supplierList.forEach((item) => {
-            supplierList.push(
-              this.$refs['inquiryTable' + item.supplierId][0].getTableValue()
-            );
-          });
+          // this.supplierList.forEach((item) => {
+          //   supplierList.push(
+          //     this.$refs['inquiryTable' + item.supplierId][0].getTableValue()
+          //   );
+          // });
           this.$refs.inventoryTable.setIsInquiry(supplierList);
         });
       },
@@ -476,31 +476,31 @@
       },
 
       async getTableValue() {
-        let supplierList = [];
-        this.setIsInquiry();
-        this.supplierList.forEach((item) => {
-          supplierList.push(
-            this.$refs['inquiryTable' + item.supplierId][0].getTableValue()
-          );
-        });
-        let is = false;
-        supplierList.forEach((item) => {
-          item.resultList.forEach((val) => {
-            val['technicalDrawings'] = [];
-            if (val.minimumOrderQuantity > val.totalCount) {
-              is = true;
-            }
-          });
-        });
-        if (is) {
-          this.$message.warning('购买数量不能小于最低订购量!');
-          return;
-        }
-        this.form.detailList = this.list;
-        this.form.supplierList = supplierList;
-
         try {
           await this.getValidate();
+          let supplierList = [];
+          this.supplierList.forEach((item) => {
+            supplierList.push(
+              this.$refs['inquiryTable' + item.supplierId][0].getTableValue()
+            );
+          });
+          this.setIsInquiry(supplierList);
+
+          let is = false;
+          supplierList.forEach((item) => {
+            item.resultList.forEach((val) => {
+              val['technicalDrawings'] = [];
+              if (val.minimumOrderQuantity > val.totalCount) {
+                is = true;
+              }
+            });
+          });
+          if (is) {
+            this.$message.warning('购买数量不能小于最低订购量!');
+            return;
+          }
+          this.form.detailList = this.list;
+          this.form.supplierList = supplierList;
           // 表单验证通过,执行保存操作
           this.loading = true;
 

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

@@ -581,7 +581,7 @@
             //供应商列表
             item.resultList.forEach((val) => {
               //供应商产品
-              if (val.productCode == productItem.productCode) {
+              if (val.productCode == productItem.productCode&&val.batchNo == productItem.batchNo&&val.taskId == productItem.taskId) {
                 totalCountS.push(
                   Number(val.totalCount || 0) +
                     Number(productItem.doneTotalCount || 0)

+ 28 - 10
src/views/bpm/handleTask/components/purchaseOrder/accountstatement/page.vue

@@ -11,16 +11,29 @@
         <el-row style="font-weight: 700;color: red">
           <el-divider direction="vertical"></el-divider>
           <span>总金额:</span>
-          <span>{{ dataForm.amountTotalPrice || 0 }}</span>
-          <el-divider direction="vertical"></el-divider>
-          <span>应收金额:</span>
-          <span>{{ dataForm.amountReceivablePrice || 0 }}</span>
-          <el-divider direction="vertical"></el-divider>
-          <span>应付金额:</span>
-          <span>{{ dataForm.amountPayablePrice || 0 }}</span>
+            <span>{{ dataForm.amountTotalPrice || 0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>应收金额:</span>
+            <span>{{ dataForm.amountReceivablePrice || 0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>已收金额:</span>
+            <span>{{ dataForm.amountReceivablePass||0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>应付金额:</span>
+            <span>{{ dataForm.amountPayablePrice || 0 }}</span>
+      
+            <el-divider direction="vertical"></el-divider>
+            <span>已付金额:</span>
+            <span>{{ dataForm.amountPayablePass||0 }}</span>
         </el-row>
       </template>
     </headerTitle>
+    <recorpayTableList
+      ref="recorpayListRef"
+      :dataForm="dataForm"
+      :recorpayList.sync="recorpayList"
+      :dialogType="permissionType"
+    ></recorpayTableList>
     <inventoryTable ref="inventoryTableref" :priceObj="priceObj" :dataForm="dataForm" :datasource.sync="datasource"
                     :dialogType="permissionType"
                     :taskDefinitionKey="taskDefinitionKey"></inventoryTable>
@@ -33,13 +46,14 @@
 import InventoryTable from "./inventoryTable.vue";
 import purchaseForm from "./purchaseForm.vue";
 import {getSearchMergeListByTypeAPI, infoAccountStatementAPI,} from "@/api/bpm/components/saleManage/saleorder";
+import recorpayTableList from '@/views/bpm/handleTask/components/saleOrder/accountstatement/recorpayTableList.vue';
 
 export default {
   name: 'page',
   props: ['permissionType', 'businessId', 'taskDefinitionKey'],
   components: {
     InventoryTable,
-    purchaseForm
+    purchaseForm,recorpayTableList
   },
   data() {
     return {
@@ -65,6 +79,7 @@ export default {
         repliedFiles: [],
         BQYSKZE: undefined,
       },
+      recorpayList:[],
       title: '',
       quarterList: {
         '一季度': ['-01-01 00:00:00', '-03-31 12:59:59'],
@@ -109,6 +124,7 @@ export default {
     async getInfo(id) {
       let data = await infoAccountStatementAPI(id)
       this.datasource = data?.orderList || []
+      this.recorpayList=data?.recorpayList||[]
       this.dataForm = data
       // this.priceObj.amountNotInvoicedPrice = data.amountNotInvoicedPrice
       switch (this.dataForm.dateType) {
@@ -170,8 +186,10 @@ export default {
       this.dataForm = {
         ...this.dataForm,
         amountPayablePrice: data.amountPayablePrice,
-        amountReceivablePrice: data.amountReceivablePrice,
-        amountTotalPrice: data.amountTotalPrice,
+          amountReceivablePrice: data.amountReceivablePrice,
+          amountTotalPrice: data.amountTotalPrice,
+          amountPayablePass: data.amountPayablePass,
+          amountReceivablePass: data.amountReceivablePass,
 
       }
       if (!this.datasource.length) this.$message.warning('暂无订单信息')

+ 29 - 10
src/views/bpm/handleTask/components/saleOrder/accountstatement/page.vue

@@ -11,18 +11,31 @@
         <el-row style="font-weight: 700;color: red">
           <el-divider direction="vertical"></el-divider>
           <span>总金额:</span>
-          <span>{{ dataForm.amountTotalPrice || 0 }}</span>
-          <el-divider direction="vertical"></el-divider>
-          <span>应收金额:</span>
-          <span>{{ dataForm.amountReceivablePrice || 0 }}</span>
-          <el-divider direction="vertical"></el-divider>
-          <span>应付金额:</span>
-          <span>{{ dataForm.amountPayablePrice || 0 }}</span>
+            <span>{{ dataForm.amountTotalPrice || 0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>应收金额:</span>
+            <span>{{ dataForm.amountReceivablePrice || 0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>已收金额:</span>
+            <span>{{ dataForm.amountReceivablePass||0 }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <span>应付金额:</span>
+            <span>{{ dataForm.amountPayablePrice || 0 }}</span>
+      
+            <el-divider direction="vertical"></el-divider>
+            <span>已付金额:</span>
+            <span>{{ dataForm.amountPayablePass||0 }}</span>
 
 
         </el-row>
       </template>
     </headerTitle>
+    <recorpayTableList
+      ref="recorpayListRef"
+      :dataForm="dataForm"
+      :recorpayList.sync="recorpayList"
+      :dialogType="permissionType"
+    ></recorpayTableList>
     <inventoryTable ref="inventoryTableref" :priceObj="priceObj" :dataForm="dataForm" :datasource.sync="datasource"
                     :dialogType="permissionType"
                     :taskDefinitionKey="taskDefinitionKey"></inventoryTable>
@@ -35,13 +48,14 @@
 import InventoryTable from "./inventoryTable.vue";
 import saleForm from "./saleForm.vue";
 import {getSearchMergeListByTypeAPI, infoAccountStatementAPI,} from "@/api/bpm/components/saleManage/saleorder";
+import recorpayTableList from './recorpayTableList.vue';
 
 export default {
   name: 'page',
   props: ['permissionType', 'businessId', 'taskDefinitionKey'],
   components: {
     InventoryTable,
-    saleForm
+    saleForm,recorpayTableList
   },
   data() {
     return {
@@ -67,6 +81,8 @@ export default {
         repliedFiles: [],
         BQYSKZE: undefined,
       },
+      recorpayList:[],
+
       title: '',
       quarterList: {
         '一季度': ['-01-01 00:00:00', '-03-31 12:59:59'],
@@ -112,6 +128,7 @@ export default {
     async getInfo(id) {
       let data = await infoAccountStatementAPI(id)
       this.datasource = data?.orderList || []
+      this.recorpayList=data?.recorpayList||[]
       this.dataForm = data
       //this.priceObj.previousPeriodEndDebt = data.previousPeriodEndDebt
       switch (this.dataForm.dateType) {
@@ -173,8 +190,10 @@ export default {
       this.dataForm = {
         ...this.dataForm,
         amountPayablePrice: data.amountPayablePrice,
-        amountReceivablePrice: data.amountReceivablePrice,
-        amountTotalPrice: data.amountTotalPrice,
+          amountReceivablePrice: data.amountReceivablePrice,
+          amountTotalPrice: data.amountTotalPrice,
+          amountPayablePass: data.amountPayablePass,
+          amountReceivablePass: data.amountReceivablePass,
 
       }
       if (!this.datasource.length) this.$message.warning('暂无订单信息')

+ 194 - 0
src/views/bpm/handleTask/components/saleOrder/accountstatement/recorpayTableList.vue

@@ -0,0 +1,194 @@
+<template>
+  <div>
+    <div v-for="item in recorpayList" style="margin-bottom: 10px">
+      <div>
+        <div style="margin-bottom: 10px; font-weight: bold">
+          <div>
+            <el-divider direction="vertical"></el-divider>
+            <span>{{ item.accType == 1 ? '已付' : '已收' }}:</span>
+            <span>{{ item.code }}</span>
+            <el-divider direction="vertical"></el-divider>
+            <!-- <span>计价方式:</span>
+            <span> {{ item.pricingWay == 1 ? '按数量计费' : '按重量计费' }}</span> -->
+            <!-- <el-divider direction="vertical"></el-divider> -->
+            <span>总金额:</span>
+            <span>{{ item.totalAmount }}</span>
+          </div>
+        </div>
+        <ele-pro-table
+          ref="table"
+          row-key="id"
+          :needPage="false"
+          :columns="getColumns()"
+          max-height="500px"
+          style="margin-bottom: 10px"
+          :toolkit="[]"
+          :datasource="getObj(item)"
+          cache-key="systemRoleTable17-11121"
+          class="time-form"
+        >
+        </ele-pro-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    components: {},
+    props: ['recorpayList', 'dialogType', 'dataForm'],
+    computed: {
+      getObj(){
+        return (j) => {
+          return this.recorpayList.filter(item=>item.code==j.code)
+        }
+      },
+      getColumns() {
+        return (j) => {
+          let basicFields = [
+            {
+              width: 60,
+              label: '序号',
+              type: 'index',
+              columnKey: 'index',
+              align: 'center'
+            },
+            {
+              minWidth: 130,
+              prop: 'contactName',
+              label:'单位名称',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              minWidth: 120,
+              prop: 'sourceType',
+              label: '来源类型',
+              formatter(_row, _column, cellValue) {
+                return cellValue == 2 ? '合同' : cellValue == 3? '订单' : '';
+      
+              },
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              minWidth: 140,
+              prop: 'sourceName',
+              label: '来源名称',
+              slot: 'sourceCode',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              minWidth: 140,
+              prop: 'sourceName',
+              label: '来源编码',
+              slot: 'sourceCode',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              minWidth: 140,
+              prop: 'invoiceCode’',
+              label: '发票编码',
+              align: 'center',
+              showOverflowTooltip: true,
+
+            },
+
+            {
+              minWidth: 100,
+              prop: 'execDate',
+              label: '费用发生日期',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+
+            {
+              minWidth: 120,
+              prop: 'totalAmount',
+              label: '合计金额',
+              align: 'center',
+            },
+            {
+              minWidth: 120,
+              prop: 'remark',
+              label: '备注',
+              slot: 'totalPrice',
+              align: 'center',
+            },
+          ];
+      
+
+          return basicFields;
+        };
+      },
+
+    },
+    data() {
+      return {
+        rules: {},
+        form: {},
+
+      };
+    },
+    methods: {
+     
+
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .headbox {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      padding-right: 30px;
+    }
+  }
+
+  .time-form .el-form-item {
+    margin-bottom: 0 !important;
+  }
+
+  ::v-deep .period {
+    display: flex;
+
+    .borderleftnone {
+      .el-input--medium .el-input__inner {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+      }
+    }
+
+    .borderrightnone {
+      .el-input--medium .el-input__inner {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+      }
+    }
+  }
+
+  ::v-deep .time-form tbody > tr:hover > td {
+    background-color: transparent !important;
+  }
+
+  ::v-deep .time-form .el-table tr {
+    background-color: #ffffff;
+  }
+
+  .pricebox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    font-weight: bold;
+  }
+
+  ::v-deep.el-divider {
+    margin: 10px;
+    font-weight: bold;
+  }
+</style>