Browse Source

新加字段

Qukatie 8 months ago
parent
commit
e48b2a0f70

+ 88 - 19
src/views/tirePartsMall/financialManagement/purchaseDetail/index.vue

@@ -28,8 +28,8 @@
             </template>
             <template slot="storageIdSearch">
                 <search-query :datalist="storageData" :selectValue="query.storageId" :clearable="true" :buttonIf="false"
-                    :forParameter="{ key: 'id', label: 'cname', value: 'id' }" placeholder="请选择品牌" @corpFocus="storageIdfun"
-                    @corpChange="corpChange($event, 'storageId')">
+                    :forParameter="{ key: 'id', label: 'cname', value: 'id' }" placeholder="请选择品牌"
+                    @corpFocus="storageIdfun" @corpChange="corpChange($event, 'storageId')">
                 </search-query>
             </template>
             <!--<template slot="goodsNameSearch">-->
@@ -53,10 +53,10 @@
                 </search-query>
             </template>
             <template slot="actualPaymentStatusSearch">
-                <search-query :datalist="actualPaymentStatusData" :selectValue="query.actualPaymentStatus" :clearable="true"
-                    :buttonIf="false" :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
-                    placeholder="请选择结算方式" @corpFocus="actualPaymentWorkDictsfun"
-                    @corpChange="corpChange($event, 'actualPaymentStatus')">
+                <search-query :datalist="actualPaymentStatusData" :selectValue="query.actualPaymentStatus"
+                    :clearable="true" :buttonIf="false"
+                    :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }" placeholder="请选择结算方式"
+                    @corpFocus="actualPaymentWorkDictsfun" @corpChange="corpChange($event, 'actualPaymentStatus')">
                 </search-query>
             </template>
             <template slot="bsTypeSearch">
@@ -149,6 +149,7 @@ export default {
                     label: '供应商名称',
                     prop: 'customerName',
                     overHidden: true,
+                    width: 100,
                     search: true,
                     searchslot: true,
                     searchOrder: 3
@@ -218,21 +219,60 @@ export default {
                     label: '花纹',
                     prop: 'pattern',
                     overHidden: true,
-                }, {
-                    label: '数量',
-                    prop: 'goodsNum',
-                    overHidden: true,
-                }, {
+                },
+                // {
+                //     label: '数量',
+                //     prop: 'goodsNum',
+                //     overHidden: true,
+                // }, 
+                {
                     label: '价格',
                     prop: 'price',
                     overHidden: true,
-                }, {
-                    label: '金额',
+                },
+                //  {
+                //     label: '金额',
+                //     prop: 'subTotalMoney',
+                //     overHidden: true,
+                // },
+                {
+                    label: '采购数量',
+                    prop: 'primaryGoodsTotalNum',
+                    overHidden: true,
+                },
+                {
+                    label: '采购金额',
+                    prop: 'primaryGoodsTotalMoney',
+                    overHidden: true,
+                },
+                {
+                    label: '入库数量',
+                    prop: 'goodsNum',
+                    overHidden: true,
+                },
+                {
+                    label: '入库金额',
                     prop: 'subTotalMoney',
                     overHidden: true,
-                }, {
-                    label: '余额',
-                    prop: 'balanceAmount',
+                },
+                {
+                    label: '卖出数量',
+                    prop: 'outGoodsTotalShipNum',
+                    overHidden: true,
+                },
+                {
+                    label: '卖出金额',
+                    prop: 'outGoodsTotalShipAmount',
+                    overHidden: true,
+                },
+                {
+                    label: '剩余数量',
+                    prop: 'surplusNum',
+                    overHidden: true,
+                },
+                {
+                    label: '剩余金额',
+                    prop: 'surplusAmount',
                     overHidden: true,
                 },
                 //  {
@@ -327,12 +367,12 @@ export default {
             commodityLabel: [{
                 id: 1,
                 label: '采购数量',
-                prop: 'goodsSum'
+                prop: 'primaryGoodsTotalNum'
             },
             {
                 id: 2,
                 label: '采购金额',
-                prop: 'amount'
+                prop: 'primaryGoodsTotalMoney'
             },
             // {
             //     id: 3,
@@ -354,6 +394,30 @@ export default {
                 label: '已取消金额',
                 prop: 'amountCancellation'
             },
+            {
+                label: '入库数量',
+                prop: 'goodsSum',
+            },
+            {
+                label: '入库金额',
+                prop: 'amount',
+            },
+            {
+                label: '卖出数量',
+                prop: 'outGoodsTotalShipNum',
+            },
+            {
+                label: '卖出金额',
+                prop: 'outGoodsTotalShipAmount',
+            },
+            {
+                label: '剩余数量',
+                prop: 'surplusNum',
+            },
+            {
+                label: '剩余金额',
+                prop: 'surplusAmount',
+            },
                 // {
                 //     id: 7,
                 //     label: '已取消成本',
@@ -390,7 +454,12 @@ export default {
     },
     methods: {
         resetChange() {
-            this.query = this.$options.data().query
+            this.query = {
+                businesDateStart: defaultDate3()[0],
+                businesDateEnd: defaultDate3()[1],
+                isContain: 1,
+                bsType: 'CG,TKCG,RZCG',
+            }
         },
         cellStyle({ row, rowIndex }) {
             if (row.status == '已取消') {

+ 11 - 5
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -49,7 +49,7 @@
                     </el-button>
                     <el-dropdown-menu slot="dropdown">
                         <el-dropdown-item @click.native="examineBtn('审批')"
-                            :disabled="isExamineBtn && !detailData.check||form.checkStatus=='审核完成'">审批
+                            :disabled="isExamineBtn && !detailData.check || form.checkStatus == '审核完成'">审批
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
                         </el-dropdown-item>
@@ -346,6 +346,7 @@ import {
     getList as KHgetList
 } from "@/api/tirePartsMall/basicData/customerInformation";
 import { getToken } from "@/util/auth";
+import { isProcurement } from "@/api/basicData/configuration";
 export default {
     name: "detailsPage",
 
@@ -440,7 +441,8 @@ export default {
             form: {
                 orderItemsList: [],
                 paymentRecordsList: [],
-                outboundRecordsList: []
+                outboundRecordsList: [],
+                freight:5,
             },
             excelOption: {
                 submitBtn: false,
@@ -1256,8 +1258,11 @@ export default {
             this.isSaveBtn = false
             this.viewDisabled = false;
             this.form.businessSource = '内部销售'
+            isProcurement({ "param": "freight" }).then(res => {
+                // res.data.data === '1'
+                this.form.freight = res.data.data
+            })
         }
-        console.log('this.detailData.check', this.detailData.check);
         if (this.detailData.check) {
             this.isExamineBtn = false
             // this.batchNo = this.detailData.check.batchNo
@@ -1291,6 +1296,7 @@ export default {
         if (this.detailData.id) {
             this.getDetailsfun()
         }
+
     },
 
     watch: {
@@ -1594,7 +1600,7 @@ export default {
                     whether: item.whether,
                     units: item.unit,
                     // 小计
-                    subTotalMoney: Number(item.goodsNum * item.price)?Number(item.goodsNum * item.price).toFixed(2):0,
+                    subTotalMoney: Number(item.goodsNum * item.price) ? Number(item.goodsNum * item.price).toFixed(2) : 0,
                     // 备注
                     remarks: item.remarks,
                     // 批次号的状态
@@ -1983,7 +1989,7 @@ export default {
                                     if (res.data.data.records.length) {
                                         res.data.data.records.forEach(e => {
                                             if (e.paramValue == 1) {
-                                                if(!this.form.storageId) return this.$message.error('请选择仓库')
+                                                if (!this.form.storageId) return this.$message.error('请选择仓库')
                                                 whetherExistenceFinancing({
                                                     bsType: "XS",
                                                     ...this.form