|
@@ -44,6 +44,11 @@
|
|
|
:disabled="detailData.seeDisabled"
|
|
|
@click.native="applySettlement('申请')"
|
|
|
>申请退款</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="openApplicationDialog"
|
|
|
+ :disabled="!form.id"
|
|
|
+ >查看账单
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<el-dropdown style="margin-right: 8px;">
|
|
@@ -264,6 +269,7 @@
|
|
|
allow-create
|
|
|
filterable
|
|
|
v-input-limit="2"
|
|
|
+ default-first-option
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in purchasePriceOption"
|
|
@@ -282,6 +288,7 @@
|
|
|
allow-create
|
|
|
filterable
|
|
|
v-input-limit="2"
|
|
|
+ default-first-option
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in salesPriceOtion"
|
|
@@ -326,10 +333,10 @@
|
|
|
>删 除</el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft" slot-scope="{size}">
|
|
|
- <el-tabs v-model="goodsActives" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled">
|
|
|
+ <el-tabs v-model="goodsActives" @tab-click="handleClick" :before-leave="beforeLeave">
|
|
|
+ <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled || goodsActives == 'goods'">
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled">
|
|
|
+ <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled || goodsActives == 'gift'">
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<el-button type="primary"
|
|
@@ -393,6 +400,7 @@
|
|
|
:orderFeesList="advantageProjectData"
|
|
|
:disabled="detailData.seeDisabled"
|
|
|
feeUrl="/blade-purchase-sales/orderfees/update"
|
|
|
+ optionType="GN"
|
|
|
/>
|
|
|
<!-- <containerTitle title="费用明细"></containerTitle>-->
|
|
|
<!-- <basic-container style="margin-bottom: 10px">-->
|
|
@@ -686,6 +694,24 @@
|
|
|
reportName="销售明细(N)"
|
|
|
@onClose="onClose()"
|
|
|
></report-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="申请记录"
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="applicationDialog"
|
|
|
+ width="60%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <bill-application
|
|
|
+ :billId="form.id"
|
|
|
+ @choceApplication="choceApplication"
|
|
|
+ >
|
|
|
+ </bill-application>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -730,6 +756,7 @@ import { getToken } from "@/util/auth";
|
|
|
import Cookies from 'js-cookie'
|
|
|
import feeInfo from "@/components/fee-info/main";
|
|
|
import {corpsAddrSelect} from "@/api/basicData/customerInformation";
|
|
|
+import billApplication from "@/components/bill/billApplication";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -743,6 +770,7 @@ export default {
|
|
|
ApplyPayment,
|
|
|
reportDialog,
|
|
|
feeInfo,
|
|
|
+ billApplication,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -1111,10 +1139,9 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},{
|
|
|
- label: '制单日期',
|
|
|
- prop: 'createTime',
|
|
|
- type: 'datetime',
|
|
|
- disabled:true,
|
|
|
+ label: '特价占比',
|
|
|
+ prop: 'specialOfferOf',
|
|
|
+ disabled: false,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -1122,10 +1149,21 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
- label: '特价占比',
|
|
|
- prop: 'specialOfferOf',
|
|
|
- disabled: false,
|
|
|
+ },{
|
|
|
+ label: '赠送积分',
|
|
|
+ prop: 'presenterIntegral',
|
|
|
+ disabled: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },{
|
|
|
+ label: '兑换积分',
|
|
|
+ prop: 'convertIntegral',
|
|
|
+ disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -1145,6 +1183,18 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},{
|
|
|
+ label: '制单日期',
|
|
|
+ prop: 'createTime',
|
|
|
+ type: 'datetime',
|
|
|
+ disabled:true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
label: '特别提醒',
|
|
|
prop: 'specialRemarks',
|
|
|
type: 'textarea',
|
|
@@ -1373,6 +1423,7 @@ export default {
|
|
|
goodsShowData: [],
|
|
|
arrivalOptions: [],
|
|
|
shippingOptions: [],
|
|
|
+ applicationDialog:false,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1399,6 +1450,8 @@ export default {
|
|
|
this.$set(this.form, 'overPayment', 0)
|
|
|
this.$set(this.form, 'orderAmount', 0)
|
|
|
this.$set(this.form, 'predictOceanFreight', 0)
|
|
|
+ this.$set(this.form, 'presenterIntegral' , 0)
|
|
|
+ this.$set(this.form, 'convertIntegral' , 0)
|
|
|
let date = new Date();
|
|
|
let year = date.getFullYear();
|
|
|
let month = date.getMonth() + 1;
|
|
@@ -1423,8 +1476,7 @@ export default {
|
|
|
if (this.detailData.copyId) {
|
|
|
this.queryData(this.detailData.copyId, true)
|
|
|
}
|
|
|
- },
|
|
|
- watch: {
|
|
|
+ this.oldForm = Object.assign({}, this.form)
|
|
|
},
|
|
|
methods: {
|
|
|
getGoodsRow(event,row) {
|
|
@@ -1621,6 +1673,7 @@ export default {
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
this.tableData = []
|
|
|
this.commodityData = false
|
|
|
+ this.goodsListSave = [];
|
|
|
},
|
|
|
//政策价格导入
|
|
|
policy() {
|
|
@@ -1752,7 +1805,10 @@ export default {
|
|
|
this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
|
|
|
this.$router.push({
|
|
|
path: "/businessManagement/deliveryNotice/index",
|
|
|
- query: {form: JSON.stringify(res.data.data)},
|
|
|
+ query: {
|
|
|
+ form: JSON.stringify(res.data.data),
|
|
|
+ pageType: "Generate",
|
|
|
+ },
|
|
|
});
|
|
|
})
|
|
|
}
|
|
@@ -1790,6 +1846,7 @@ export default {
|
|
|
exchangeRate: '1',
|
|
|
taxRate: '0',
|
|
|
accDate: this.form.businesDate,
|
|
|
+ srcType: 1,
|
|
|
}
|
|
|
if(bool){ //申请货款
|
|
|
this.billData.srcId = -1
|
|
@@ -1941,116 +1998,133 @@ export default {
|
|
|
this.dialogCost = false
|
|
|
},
|
|
|
//确认导入触发
|
|
|
- importGoods() {
|
|
|
+ async importGoods() {
|
|
|
if (this.goodsListSave.length > 0) {
|
|
|
- for (let item in this.goodsListSave) {
|
|
|
- selectGoodsNum({
|
|
|
- goodsId: this.goodsListSave[item].id,
|
|
|
- itemType: this.goodsListSave[item].typeno
|
|
|
- }).then(res => {
|
|
|
- this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
|
|
|
- this.goodsListSave[item].storageQuantity = res.data.data
|
|
|
- delete this.goodsListSave[item].goodsTypeName
|
|
|
- this.goodsListSave[item].itemId = this.goodsListSave[item].id
|
|
|
- this.$set(this.goodsListSave[item], 'itemType', this.goodsListSave[item].typeno)
|
|
|
- this.$set(this.goodsListSave[item], 'orderQuantity', 0)
|
|
|
- this.$set(this.goodsListSave[item], 'actualQuantity', 0)
|
|
|
+ this.goodsListSaveHandle()
|
|
|
+ } else {
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ this.tableDataHandle()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goodsListSaveHandle() {
|
|
|
+ for (let item in this.goodsListSave) {
|
|
|
+ getMarketPrice({code: this.goodsListSave[item].code}).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.goodsListSave[item], 'price', res.data.data[0].salesPrice)
|
|
|
+ } else {
|
|
|
+ this.$set(this.goodsListSave[item], 'price', '0')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
+ } else {
|
|
|
this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
|
|
|
- this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
|
|
|
- getMarketPrice({code: this.goodsListSave[item].code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(this.goodsListSave[item], 'price', res.data.data[0].salesPrice)
|
|
|
- } else {
|
|
|
- this.$set(this.goodsListSave[item], 'price', '0')
|
|
|
- }
|
|
|
- })
|
|
|
- getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
- } else {
|
|
|
- this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
|
|
|
- }
|
|
|
- })
|
|
|
- this.goodsListSave[item].amount = 0
|
|
|
- if (this.goodsActives == "goods") {
|
|
|
- this.$set(this.goodsListSave[item], 'goodType', 0)
|
|
|
- } else {
|
|
|
- this.$set(this.goodsListSave[item], 'goodType', 1)
|
|
|
- }
|
|
|
- this.goodsListSave[item].sort = this.maxGoodsNum + 1
|
|
|
- if (this.form.packageRemarks) {
|
|
|
- this.goodsListSave[item].packageRemarks = this.form.packageRemarks
|
|
|
- }
|
|
|
- delete this.goodsListSave[item].id
|
|
|
- delete this.goodsListSave[item].pid
|
|
|
- delete this.goodsListSave[item].isDeleted
|
|
|
- delete this.goodsListSave[item].status
|
|
|
- delete this.goodsListSave[item].tenantId
|
|
|
- delete this.goodsListSave[item].updateTime
|
|
|
- delete this.goodsListSave[item].updateUser
|
|
|
- delete this.goodsListSave[item].updateUserName
|
|
|
- this.maxGoodsNum++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ selectGoodsNum({
|
|
|
+ goodsId: this.goodsListSave[item].id,
|
|
|
+ itemType: this.goodsListSave[item].typeno
|
|
|
+ }).then(res => {
|
|
|
+ this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data)
|
|
|
+ // this.goodsListSave[item].storageQuantity = res.data.data
|
|
|
+ this.$set(this.goodsListSave[item], 'priceCategory', this.goodsListSave[item].goodsTypeName)
|
|
|
+ // this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
|
|
|
+ delete this.goodsListSave[item].goodsTypeName
|
|
|
+ this.goodsListSave[item].itemId = this.goodsListSave[item].id
|
|
|
+ this.$set(this.goodsListSave[item], 'corpName', this.goodsListSave[item].cname)
|
|
|
+ this.$set(this.goodsListSave[item], 'itemType', this.goodsListSave[item].typeno)
|
|
|
+ this.$set(this.goodsListSave[item], 'orderQuantity', 1)
|
|
|
+ this.$set(this.goodsListSave[item], 'actualQuantity', 0)
|
|
|
+ this.$set(this.goodsListSave[item], 'integral', '0')
|
|
|
+ this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
|
|
|
+ this.goodsListSave[item].amount = 0
|
|
|
+ if (this.goodsActives == "goods") {
|
|
|
+ this.$set(this.goodsListSave[item], 'goodType', 0)
|
|
|
+ } else {
|
|
|
+ this.$set(this.goodsListSave[item], 'goodType', 1)
|
|
|
+ }
|
|
|
+ this.goodsListSave[item].sort = this.maxGoodsNum + 1
|
|
|
+ if (this.form.packageRemarks) {
|
|
|
+ this.goodsListSave[item].packageRemarks = this.form.packageRemarks
|
|
|
+ }
|
|
|
+ delete this.goodsListSave[item].id
|
|
|
+ delete this.goodsListSave[item].pid
|
|
|
+ delete this.goodsListSave[item].isDeleted
|
|
|
+ delete this.goodsListSave[item].status
|
|
|
+ delete this.goodsListSave[item].tenantId
|
|
|
+ delete this.goodsListSave[item].updateTime
|
|
|
+ delete this.goodsListSave[item].updateUser
|
|
|
+ delete this.goodsListSave[item].updateUserName
|
|
|
+ this.maxGoodsNum++
|
|
|
+ this.quantityChange(this.goodsListSave[item])
|
|
|
+ this.$nextTick(() => {
|
|
|
this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
|
|
|
- this.$refs.crudContact.rowCell(this.goodsListSave[item], this.contactsData.length - 1)
|
|
|
})
|
|
|
- }
|
|
|
- this.dialogVisible = false
|
|
|
- } else {
|
|
|
- if (this.tableData.length > 0) {
|
|
|
- for (let item in this.tableData) {
|
|
|
- selectGoodsNum({
|
|
|
- goodsId: this.tableData[item].id,
|
|
|
- itemType: this.tableData[item].typeno
|
|
|
- }).then(res => {
|
|
|
- this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
|
|
|
- this.tableData[item].storageQuantity = res.data.data
|
|
|
- delete this.tableData[item].goodsTypeName
|
|
|
- this.tableData[item].itemId = this.tableData[item].id
|
|
|
- this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
|
|
|
- this.$set(this.tableData[item], 'orderQuantity', 0)
|
|
|
- this.$set(this.tableData[item], 'actualQuantity', 0)
|
|
|
- this.$set(this.tableData[item], 'purchaseAmount', '0')
|
|
|
- this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
|
|
|
- getMarketPrice({code: this.tableData[item].code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(this.tableData[item], 'price', res.data.data[0].salesPrice)
|
|
|
- } else {
|
|
|
- this.$set(this.tableData[item], 'price', '0')
|
|
|
- }
|
|
|
- })
|
|
|
- getPurchasePrice({code: this.tableData[item].code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
- } else {
|
|
|
- this.$set(this.tableData[item], 'purchaseAmount', '0')
|
|
|
- }
|
|
|
- })
|
|
|
- this.tableData[item].amount = 0
|
|
|
- if (this.goodsActives == "goods") {
|
|
|
- this.$set(this.tableData[item], 'goodType', 0)
|
|
|
- } else {
|
|
|
- this.$set(this.tableData[item], 'goodType', 1)
|
|
|
- }
|
|
|
- this.tableData[item].sort = this.maxGoodsNum + 1
|
|
|
- if (this.form.packageRemarks) {
|
|
|
- this.tableData[item].packageRemarks = this.form.packageRemarks
|
|
|
- }
|
|
|
- delete this.tableData[item].id
|
|
|
- delete this.tableData[item].pid
|
|
|
- delete this.tableData[item].isDeleted
|
|
|
- delete this.tableData[item].status
|
|
|
- delete this.tableData[item].tenantId
|
|
|
- delete this.tableData[item].updateTime
|
|
|
- delete this.tableData[item].updateUser
|
|
|
- delete this.tableData[item].updateUserName
|
|
|
- this.maxGoodsNum++
|
|
|
- this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
|
- this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
|
|
|
- })
|
|
|
+ // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.dialogVisible = false
|
|
|
+ },
|
|
|
+ tableDataHandle() {
|
|
|
+ for (let item=0;item<this.tableData.length;item++) {
|
|
|
+ getMarketPrice({code: this.tableData[item].code}).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.tableData[item], 'price', res.data.data[0].salesPrice)
|
|
|
+ } else {
|
|
|
+ this.$set(this.tableData[item], 'price', '0')
|
|
|
}
|
|
|
- this.dialogVisible = false
|
|
|
- }
|
|
|
+ })
|
|
|
+ getPurchasePrice({code: this.tableData[item].code}).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
+ } else {
|
|
|
+ this.$set(this.tableData[item], 'purchaseAmount', '0')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // debugger
|
|
|
+ selectGoodsNum({
|
|
|
+ goodsId: this.tableData[item].id,
|
|
|
+ itemType: this.tableData[item].typeno
|
|
|
+ }).then(res => {
|
|
|
+ this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
|
|
|
+ this.tableData[item].storageQuantity = res.data.data
|
|
|
+ delete this.tableData[item].goodsTypeName
|
|
|
+ this.tableData[item].itemId = this.tableData[item].id
|
|
|
+ this.$set(this.tableData[item], 'corpName', this.tableData[item].cname)
|
|
|
+ this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
|
|
|
+ this.$set(this.tableData[item], 'orderQuantity', 1)
|
|
|
+ this.$set(this.tableData[item], 'actualQuantity', 0)
|
|
|
+ this.$set(this.tableData[item], 'integral', '0')
|
|
|
+ this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
|
|
|
+ this.tableData[item].amount = 0
|
|
|
+ if (this.goodsActives == "goods") {
|
|
|
+ this.$set(this.tableData[item], 'goodType', 0)
|
|
|
+ } else {
|
|
|
+ this.$set(this.tableData[item], 'goodType', 1)
|
|
|
+ }
|
|
|
+ this.tableData[item].sort = this.maxGoodsNum + 1
|
|
|
+ if (this.form.packageRemarks) {
|
|
|
+ this.tableData[item].packageRemarks = this.form.packageRemarks
|
|
|
+ }
|
|
|
+ delete this.tableData[item].id
|
|
|
+ delete this.tableData[item].pid
|
|
|
+ delete this.tableData[item].isDeleted
|
|
|
+ delete this.tableData[item].status
|
|
|
+ delete this.tableData[item].tenantId
|
|
|
+ delete this.tableData[item].updateTime
|
|
|
+ delete this.tableData[item].updateUser
|
|
|
+ delete this.tableData[item].updateUserName
|
|
|
+ this.maxGoodsNum++
|
|
|
+ this.quantityChange(this.tableData[item])
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
|
+ })
|
|
|
+ // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
|
|
|
+ })
|
|
|
}
|
|
|
+ this.dialogVisible = false
|
|
|
},
|
|
|
closeGoods() {
|
|
|
this.treeDataGoods = [];
|
|
@@ -2246,14 +2320,14 @@ export default {
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
- this.contactsData.splice(index, 1);
|
|
|
+ this.goodsShowData.splice(index, 1);
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
- this.contactsData.splice(index, 1);
|
|
|
+ this.goodsShowData.splice(index, 1);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -2292,7 +2366,6 @@ export default {
|
|
|
},
|
|
|
//商品列表查询
|
|
|
onLoad(page, params = {}) {
|
|
|
- console.log(params)
|
|
|
this.loading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
|
|
|
const data = res.data.data;
|
|
@@ -2427,8 +2500,17 @@ export default {
|
|
|
this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
|
|
|
}
|
|
|
//商品信息
|
|
|
- this.form.orderItemsList = this.contactsData.concat(this.giftData)
|
|
|
- console.log(this.form.orderItemsList)
|
|
|
+ if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)
|
|
|
+ } else {
|
|
|
+ this.form.orderItemsList = this.goodsShowData.concat(this.giftData)
|
|
|
+ }
|
|
|
+ // 判断订货数量不能小于等于0
|
|
|
+ for (let item in this.form.orderItemsList) {
|
|
|
+ if (Number(this.form.orderItemsList[item].orderQuantity) <= 0) {
|
|
|
+ return this.$message.error('订货数量不能小于等于0')
|
|
|
+ }
|
|
|
+ }
|
|
|
this.form.orderFeesList = this.advantageProjectData
|
|
|
this.form.orderFilesList = this.bankOfDepositData
|
|
|
if (typeof this.form.corpsTypeId == 'object') {
|
|
@@ -2458,7 +2540,7 @@ export default {
|
|
|
this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
|
|
|
this.$router.push({
|
|
|
path: "/businessManagement/deliveryNotice/index",
|
|
|
- query: {form: JSON.stringify(res.data.data)},
|
|
|
+ query: {form: JSON.stringify(res.data.data),pageType: "Generate",},
|
|
|
});
|
|
|
})
|
|
|
} else if (type == '采购') {
|
|
@@ -2509,6 +2591,23 @@ export default {
|
|
|
// row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
|
|
|
row.amount = (row.price * row.orderQuantity).toFixed(2)
|
|
|
}
|
|
|
+ if (!row.integralMultiples) {
|
|
|
+ row.integralMultiples = 0
|
|
|
+ }
|
|
|
+ row.integral = (Number(row.orderQuantity) * Number(row.integralMultiples)).toFixed(2)
|
|
|
+
|
|
|
+
|
|
|
+ if (this.goodsActives == 'goods') {
|
|
|
+ this.$set(this.form, 'presenterIntegral' , 0)
|
|
|
+ this.goodsShowData.forEach(item => {
|
|
|
+ this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, 'convertIntegral' , 0)
|
|
|
+ this.goodsShowData.forEach(item => {
|
|
|
+ this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
priceChange(row) {
|
|
|
console.log(row.price)
|
|
@@ -2604,16 +2703,19 @@ export default {
|
|
|
if (
|
|
|
item.property == "amount" ||
|
|
|
item.property == "orderQuantity" ||
|
|
|
- item.property == "actualQuantity"
|
|
|
+ item.property == "actualQuantity" ||
|
|
|
+ item.property == "integral"
|
|
|
) {
|
|
|
let amountSum = 0;
|
|
|
let orderQuantitySum = 0;
|
|
|
let actualQuantitySum = 0;
|
|
|
+ let integralSum = 0;
|
|
|
if (this.selection.length > 0) {
|
|
|
this.selection.forEach(e => {
|
|
|
amountSum = _.add(amountSum, Number(e.amount));
|
|
|
orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
|
|
|
actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
|
|
|
+ integralSum = _.add(integralSum, Number(e.integral));
|
|
|
})
|
|
|
};
|
|
|
// 订货数量合计
|
|
@@ -2628,6 +2730,10 @@ export default {
|
|
|
if (item.property == "amount") {
|
|
|
sums[index] = amountSum ? amountSum.toFixed(2) : "0.00";
|
|
|
}
|
|
|
+ // 积分合计
|
|
|
+ if (item.property == "integral") {
|
|
|
+ sums[index] = integralSum ? integralSum.toFixed(2) : "0.00";
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -2656,39 +2762,61 @@ export default {
|
|
|
this.giftData = this.goodsShowData
|
|
|
// 显示
|
|
|
this.customerContact.column.forEach(item => {
|
|
|
- if (item.prop == 'amount') item.label = '金额'
|
|
|
+ if (item.prop == 'integralMultiples') item.label = '积分倍数'
|
|
|
+ if (item.prop == 'integral') item.label = '赠送积分'
|
|
|
+ if (item.prop == 'orderQuantity') item.label = '订货数量'
|
|
|
if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
|
|
|
- || item.prop == 'orderQuantity' || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
|
|
|
- || item.prop == 'purchaseAmount' || item.prop == 'price'
|
|
|
+ || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
|
|
|
+ || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
|
|
|
) {
|
|
|
item.hide = false;
|
|
|
item.showColumn = true;
|
|
|
}
|
|
|
})
|
|
|
- this.goodsShowData = this.contactsData;
|
|
|
+ // contactsData它是商品的数组 giftData它是赠品的数组 goodsShowData它是展示页面的数组一共三个
|
|
|
+ this.goodsShowData = this.deepClone(this.contactsData);
|
|
|
setTimeout(() => {
|
|
|
this.goodsDisabled = false
|
|
|
},500)
|
|
|
} else {
|
|
|
// 隐藏字段
|
|
|
- this.contactsData = this.goodsShowData
|
|
|
+ this.contactsData = this.deepClone(this.goodsShowData)
|
|
|
+ // this.contactsData=this.goodsShowData.filter(e=>e.typegood==0)
|
|
|
+ console.log(this.contactsData)
|
|
|
this.customerContact.column.forEach(item => {
|
|
|
- if (item.prop == 'amount') item.label = '积分'
|
|
|
+ if (item.prop == 'deliveryAmount') item.label = '积分'
|
|
|
+ if (item.prop == 'actualQuantity') item.label = '数量'
|
|
|
+ if (item.prop == 'integralMultiples') item.label = '积分'
|
|
|
+ if (item.prop == 'integral') item.label = '兑换积分'
|
|
|
+ if (item.prop == 'orderQuantity') item.label = '数量'
|
|
|
if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
|
|
|
- || item.prop == 'orderQuantity' || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
|
|
|
- || item.prop == 'purchaseAmount' || item.prop == 'price'
|
|
|
+ || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
|
|
|
+ || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
|
|
|
) {
|
|
|
item.hide = true;
|
|
|
item.showColumn = false;
|
|
|
}
|
|
|
})
|
|
|
- this.goodsShowData = this.giftData;
|
|
|
+ // this.giftData=this.goodsShowData.filter(e=>e.typegood==1)
|
|
|
+ this.goodsShowData = this.deepClone(this.giftData);
|
|
|
setTimeout(() => {
|
|
|
this.goodsDisabled = false
|
|
|
},500)
|
|
|
}
|
|
|
},
|
|
|
- }
|
|
|
+ // 切换之前
|
|
|
+ beforeLeave(activeName, oldActiveName) {
|
|
|
+ },
|
|
|
+ // 查看账单
|
|
|
+ // 查看申请记录
|
|
|
+ openApplicationDialog(){
|
|
|
+ this.applicationDialog = true
|
|
|
+ },
|
|
|
+ //关闭记录
|
|
|
+ choceApplication(){
|
|
|
+ this.applicationDialog = false
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|