|
@@ -72,7 +72,7 @@
|
|
|
<el-button
|
|
|
class="el-button--small-yh"
|
|
|
type="primary"
|
|
|
- :disabled="disabled || detailData.seeDisabled || browse"
|
|
|
+ :disabled="disabled || detailData.seeDisabled"
|
|
|
:loading="saveLoading"
|
|
|
size="small"
|
|
|
@click="editCustomer(false)"
|
|
@@ -316,6 +316,15 @@
|
|
|
{{row.cname}}
|
|
|
</span>
|
|
|
</template>
|
|
|
+ <template slot="shopQuality" slot-scope="{ row, index }">
|
|
|
+ <el-switch
|
|
|
+ v-model="row.shopQuality"
|
|
|
+ :disabled="!row.$cellEdit"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ @change="(val) => shopQualityChange(val, row)"
|
|
|
+ ></el-switch>
|
|
|
+ </template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
<el-button
|
|
|
type="text"
|
|
@@ -412,6 +421,7 @@
|
|
|
optionType="GN"
|
|
|
itemType="销售"
|
|
|
@beforeFinance="beforeFinance"
|
|
|
+ :corpId="form.corpId"
|
|
|
/>
|
|
|
<!-- <containerTitle title="费用明细"></containerTitle>-->
|
|
|
<!-- <basic-container style="margin-bottom: 10px">-->
|
|
@@ -693,8 +703,9 @@
|
|
|
>
|
|
|
<apply-payment
|
|
|
:billType="billType"
|
|
|
- :billData="billData"
|
|
|
+ :billData="{}"
|
|
|
itemType="销售"
|
|
|
+ :arrList="applyPaymentList"
|
|
|
@choceFun="choceFun"
|
|
|
>
|
|
|
</apply-payment>
|
|
@@ -720,7 +731,8 @@
|
|
|
>
|
|
|
<financial-account
|
|
|
:billType="billType"
|
|
|
- :billData="billData"
|
|
|
+ :billData="{}"
|
|
|
+ :arrList="applyPaymentList"
|
|
|
@choceFun="choceFun"
|
|
|
>
|
|
|
</financial-account>
|
|
@@ -840,6 +852,7 @@ import financialAccount from "../../../components/finance/financialAccount";
|
|
|
import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
import check from "@/components/check/check";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
|
+import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -1429,7 +1442,7 @@ export default {
|
|
|
prop: 'packageRemarks',
|
|
|
rules: [
|
|
|
{
|
|
|
- required: false,
|
|
|
+ required: true,
|
|
|
message: ' ',
|
|
|
trigger: 'change'
|
|
|
}
|
|
@@ -1571,12 +1584,14 @@ export default {
|
|
|
browse: false,
|
|
|
roleName: '',
|
|
|
userList: [],
|
|
|
+ feesOption: [],
|
|
|
checkDisabled: false,
|
|
|
checkData: {},
|
|
|
checkDialog: false,
|
|
|
checkScheduleDialog: false,
|
|
|
checkId: '',
|
|
|
batchNo:'',
|
|
|
+ applyPaymentList: [],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1625,6 +1640,9 @@ export default {
|
|
|
gainUser().then(res => {
|
|
|
this.userList = res.data.data;
|
|
|
});
|
|
|
+ feeList().then(res => {
|
|
|
+ this.feesOption = res.data.data.records
|
|
|
+ })
|
|
|
if (this.detailData.seeDisabled) {
|
|
|
// this.bankOfDeposit.column.forEach(item => {
|
|
|
// item.editDisabled = true
|
|
@@ -1737,6 +1755,8 @@ export default {
|
|
|
this.oldUploadList = this.deepClone(this.bankOfDepositData)
|
|
|
if (isCopy) {
|
|
|
this.$set(this.form, 'orderStatus', '录入')
|
|
|
+ this.form.status = 0
|
|
|
+ this.browse = false
|
|
|
delete this.form.id
|
|
|
delete this.form.orgOrderNo
|
|
|
delete this.form.orderNo
|
|
@@ -1814,7 +1834,7 @@ export default {
|
|
|
let getGoodsList = []
|
|
|
let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
getGiftList = this.goodsShowData
|
|
|
getGoodsList = this.contactsData
|
|
|
} else {
|
|
@@ -2004,7 +2024,7 @@ export default {
|
|
|
let getGoodsList = []
|
|
|
let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
getGiftList = this.goodsShowData
|
|
|
getGoodsList = this.contactsData
|
|
|
} else {
|
|
@@ -2056,7 +2076,7 @@ export default {
|
|
|
let getGoodsList = []
|
|
|
let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
getGiftList = this.goodsShowData
|
|
|
getGoodsList = this.contactsData
|
|
|
} else {
|
|
@@ -2084,6 +2104,8 @@ export default {
|
|
|
},
|
|
|
//生成账单 拿到主表信息
|
|
|
beforeBillData(bool,type){
|
|
|
+ this.applyPaymentList = [];
|
|
|
+ let arr = [];
|
|
|
this.billType = type
|
|
|
this.billData = {
|
|
|
srcOrderno:this.form.orgOrderNo,
|
|
@@ -2099,10 +2121,36 @@ export default {
|
|
|
tradeType: 'GN',
|
|
|
optionType: 'GN',
|
|
|
chargeMember: this.form.chargeMember,
|
|
|
- amount: this.form.balanceAmount
|
|
|
+ amount: this.form.balanceAmount,
|
|
|
+ costType: this.feesOption.find(e => e.cname == '货款').id
|
|
|
}
|
|
|
+ arr.push(this.billData)
|
|
|
+ let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
|
|
|
+ getFeeList.forEach(item => {
|
|
|
+ let form = {
|
|
|
+ srcOrderno:this.form.orgOrderNo,
|
|
|
+ itemType:"销售",
|
|
|
+ corpsName:this.form.corpName,
|
|
|
+ corpId:this.form.corpId,
|
|
|
+ srcParentId: this.form.id,
|
|
|
+ currency: 'CNY',
|
|
|
+ exchangeRate: '1',
|
|
|
+ taxRate: '0',
|
|
|
+ accDate: this.form.businesDate,
|
|
|
+ srcType: 2,
|
|
|
+ tradeType: 'GN',
|
|
|
+ optionType: 'GN',
|
|
|
+ chargeMember: this.form.chargeMember,
|
|
|
+ parentId: this.form.id,
|
|
|
+ amount: item.amount,
|
|
|
+ costType: item.itemId,
|
|
|
+ srcFeesId: item.id,
|
|
|
+ }
|
|
|
+ arr.push(form)
|
|
|
+ })
|
|
|
+ this.applyPaymentList = [...arr]
|
|
|
if(bool){ //申请货款
|
|
|
- this.billData.srcId = -1
|
|
|
+ // this.billData.srcId = -1
|
|
|
}
|
|
|
},
|
|
|
//关闭账单
|
|
@@ -2304,6 +2352,7 @@ export default {
|
|
|
this.$set(this.goodsListSave[item], 'orderQuantity', 1)
|
|
|
this.$set(this.goodsListSave[item], 'actualQuantity', 0)
|
|
|
this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
|
|
|
+ this.$set(this.goodsListSave[item], 'shopQuality', 0)
|
|
|
this.goodsListSave[item].amount = 0
|
|
|
if (this.goodsActives == "goods") {
|
|
|
this.$set(this.goodsListSave[item], 'goodType', 0)
|
|
@@ -2366,6 +2415,7 @@ export default {
|
|
|
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], 'shopQuality', 0)
|
|
|
this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
|
|
|
this.tableData[item].amount = 0
|
|
|
if (this.goodsActives == "goods") {
|
|
@@ -2535,6 +2585,7 @@ export default {
|
|
|
// 积分
|
|
|
this.$set(list[item], 'integralMultiples', 0)
|
|
|
this.$set(list[item], 'integral', 0)
|
|
|
+ this.$set(list[item], 'shopQuality', 0)
|
|
|
|
|
|
if (listLength != 0) {
|
|
|
this.$set(buyFree[item], 'actualQuantity', 0)
|
|
@@ -2548,6 +2599,7 @@ export default {
|
|
|
// 积分
|
|
|
this.$set(buyFree[item], 'integralMultiples', 0)
|
|
|
this.$set(buyFree[item], 'integral', 0)
|
|
|
+ this.$set(buyFree[item], 'shopQuality', 0)
|
|
|
this.maxGoodsNum++
|
|
|
delete buyFree[item].id
|
|
|
delete buyFree[item].pid
|
|
@@ -2786,7 +2838,7 @@ export default {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
//商品信息
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)
|
|
|
} else {
|
|
|
this.form.orderItemsList = this.goodsShowData.concat(this.giftData)
|
|
@@ -2945,6 +2997,7 @@ export default {
|
|
|
priceChange(row) {
|
|
|
if (!row.price) {
|
|
|
row.price = 0;
|
|
|
+ row.amount = '0.00'
|
|
|
} else {
|
|
|
row.amount = (row.price * row.orderQuantity).toFixed(2)
|
|
|
}
|
|
@@ -2962,7 +3015,7 @@ export default {
|
|
|
let getGoodsList = []
|
|
|
let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
getGiftList = this.goodsShowData
|
|
|
getGoodsList = this.contactsData
|
|
|
} else {
|
|
@@ -3020,7 +3073,7 @@ export default {
|
|
|
if (inSave) {
|
|
|
this.$message.success("重置成功");
|
|
|
//关闭窗口
|
|
|
- this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
|
|
|
}
|
|
|
},
|
|
|
returnBack(row) {
|
|
@@ -3185,8 +3238,9 @@ export default {
|
|
|
},
|
|
|
// 请核
|
|
|
pleaseCheck() {
|
|
|
+ const giftList = this.goodsActives == 'gift'? this.goodsShowData: this.giftData
|
|
|
if (this.verification()) {
|
|
|
- this.$confirm("您确定提交此次申请吗?", {
|
|
|
+ this.$confirm(giftList.length == 0?"此单没有赠品,确定提交此次审批吗?": "您确定提交此次申请吗?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
@@ -3217,13 +3271,17 @@ export default {
|
|
|
let getGoodsList = []
|
|
|
let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
- if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ // this.goodsShowData.findIndex(item => item.goodType == 0) == -1
|
|
|
+ if (this.goodsActives == 'gift') {
|
|
|
getGiftList = this.goodsShowData
|
|
|
getGoodsList = this.contactsData
|
|
|
} else {
|
|
|
+ console.log(this.giftData)
|
|
|
getGoodsList = this.goodsShowData
|
|
|
getGiftList = this.giftData
|
|
|
}
|
|
|
+ console.log(getGiftList)
|
|
|
+ console.log(this.oldGiftList)
|
|
|
if (contrastObj(this.form, this.oldForm) ||
|
|
|
contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
contrastList(getGiftList, this.oldGiftList) ||
|
|
@@ -3255,6 +3313,10 @@ export default {
|
|
|
choceScheduleFun(){
|
|
|
this.checkScheduleDialog = false
|
|
|
},
|
|
|
+ shopQualityChange(val, row) {
|
|
|
+ (val == 1) && (row.price = 0)
|
|
|
+ this.priceChange(row)
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|