|
@@ -73,6 +73,11 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
@click="commoditySelection">新增
|
|
@click="commoditySelection">新增
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="primary"
|
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="policy">政策
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
</basic-container>
|
|
@@ -161,6 +166,54 @@
|
|
|
:disabled="tableData.length !== 1">导入</el-button>
|
|
:disabled="tableData.length !== 1">导入</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="导入"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ class="el-dialogDeep"
|
|
|
|
|
+ :visible.sync="policyDialog"
|
|
|
|
|
+ width="80%"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
|
+ :close-on-press-escape="false">
|
|
|
|
|
+ <el-row style="height: 0;">
|
|
|
|
|
+ <el-col :span="5">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-scrollbar>
|
|
|
|
|
+ <basic-container>
|
|
|
|
|
+ <avue-tree :option="policyOption" :data="treeDataPolicy" @node-click="policyNodeClick"/>
|
|
|
|
|
+ </basic-container>
|
|
|
|
|
+ </el-scrollbar>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="19">
|
|
|
|
|
+ <containerTitle title="特价促销"></containerTitle>
|
|
|
|
|
+ <basic-container style="margin-bottom: 10px">
|
|
|
|
|
+ <avue-crud :option="optionPolicy"
|
|
|
|
|
+ :table-loading="loadingPolicy"
|
|
|
|
|
+ :data="dataPolicy"
|
|
|
|
|
+ ref="crud"
|
|
|
|
|
+ @selection-change="selectionChangePolicy"
|
|
|
|
|
+ :page.sync="pagePolicy">
|
|
|
|
|
+ </avue-crud>
|
|
|
|
|
+ </basic-container>
|
|
|
|
|
+ <containerTitle title="买赠促销"></containerTitle>
|
|
|
|
|
+ <basic-container>
|
|
|
|
|
+ <avue-crud
|
|
|
|
|
+ :option="customerBuyFree"
|
|
|
|
|
+ :data="contactsDataBuyFree"
|
|
|
|
|
+ @selection-change="selectionChangePolicyTwo"
|
|
|
|
|
+ ref="crudContactE">
|
|
|
|
|
+ </avue-crud>
|
|
|
|
|
+ </basic-container>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="policyDialog = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="importPolicy">导入</el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
title="导入费用"
|
|
title="导入费用"
|
|
|
append-to-body
|
|
append-to-body
|
|
@@ -344,14 +397,17 @@ import {
|
|
|
corpsbank,
|
|
corpsbank,
|
|
|
corpsfiles,
|
|
corpsfiles,
|
|
|
corpsitem,
|
|
corpsitem,
|
|
|
- getList
|
|
|
|
|
|
|
+ getList,
|
|
|
|
|
+ detailList
|
|
|
} from "@/api/basicData/configuration"
|
|
} from "@/api/basicData/configuration"
|
|
|
import customerContact from "./configuration/customerContact.json"
|
|
import customerContact from "./configuration/customerContact.json"
|
|
|
import advantageProject from "./configuration/advantageProject.json"
|
|
import advantageProject from "./configuration/advantageProject.json"
|
|
|
import bankOfDeposit from "./configuration/bankOfDeposit.json"
|
|
import bankOfDeposit from "./configuration/bankOfDeposit.json"
|
|
|
import commodity from "./configuration/commodity.json"
|
|
import commodity from "./configuration/commodity.json"
|
|
|
import optionTwoCost from "./configuration/mainListCost.json"
|
|
import optionTwoCost from "./configuration/mainListCost.json"
|
|
|
-import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
|
|
|
|
|
|
|
+import optionPolicy from "./configuration/optionPolicy.json"
|
|
|
|
|
+import BuyFree from "./configuration/BuyFree.json"
|
|
|
|
|
+import {getDeptLazyTree,getDeptLazyTreeTwo, customerList,policyList,policyColumn} from "@/api/basicData/basicFeesDesc";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "detailsPage",
|
|
name: "detailsPage",
|
|
@@ -359,10 +415,13 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
form: {},
|
|
form: {},
|
|
|
data: [],
|
|
data: [],
|
|
|
|
|
+ dataPolicy: [],
|
|
|
|
|
+ contactsDataBuyFree: [],
|
|
|
loadingCost: false,
|
|
loadingCost: false,
|
|
|
choiceData: false,
|
|
choiceData: false,
|
|
|
commodityData: false,
|
|
commodityData: false,
|
|
|
dataCost: [],
|
|
dataCost: [],
|
|
|
|
|
+ treeDataPolicy: [],
|
|
|
choiceIndex: '',
|
|
choiceIndex: '',
|
|
|
dialogCost: false,
|
|
dialogCost: false,
|
|
|
treeDeptId: '',
|
|
treeDeptId: '',
|
|
@@ -377,10 +436,42 @@ export default {
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
total: 0
|
|
total: 0
|
|
|
},
|
|
},
|
|
|
|
|
+ pagePolicy: {
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ total: 0
|
|
|
|
|
+ },
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
+ loadingPolicy: false,
|
|
|
contactsForm: {},
|
|
contactsForm: {},
|
|
|
|
|
+ optionPolicy: optionPolicy,
|
|
|
optionTwo: commodity,
|
|
optionTwo: commodity,
|
|
|
optionTwoCost: optionTwoCost,
|
|
optionTwoCost: optionTwoCost,
|
|
|
|
|
+ customerBuyFree: BuyFree,
|
|
|
|
|
+ policyOption: {
|
|
|
|
|
+ nodeKey: 'id',
|
|
|
|
|
+ lazy: true,
|
|
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
|
|
+ const parentId = (node.level === 0) ? 0 : node.data.id;
|
|
|
|
|
+ policyColumn(parentId).then(res => {
|
|
|
|
|
+ resolve(res.data.data.map(item => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ leaf: !item.hasChildren
|
|
|
|
|
+ }
|
|
|
|
|
+ }))
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ addBtn: false,
|
|
|
|
|
+ menu: false,
|
|
|
|
|
+ size: 'small',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ labelText: '标题',
|
|
|
|
|
+ label: 'title',
|
|
|
|
|
+ value: 'value',
|
|
|
|
|
+ children: 'children'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
treeOptionCost: {
|
|
treeOptionCost: {
|
|
|
nodeKey: 'id',
|
|
nodeKey: 'id',
|
|
|
lazy: true,
|
|
lazy: true,
|
|
@@ -430,6 +521,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
|
|
+ policyDialog: false,
|
|
|
advantageProjectForm: {},
|
|
advantageProjectForm: {},
|
|
|
bankOfDepositForm: {},
|
|
bankOfDepositForm: {},
|
|
|
contactsData: [],
|
|
contactsData: [],
|
|
@@ -439,6 +531,8 @@ export default {
|
|
|
tableDataCost: [],
|
|
tableDataCost: [],
|
|
|
dic: [],
|
|
dic: [],
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
|
+ policyData: [],
|
|
|
|
|
+ policyDataTwo: [],
|
|
|
customerContact: customerContact,
|
|
customerContact: customerContact,
|
|
|
advantageProject: advantageProject,
|
|
advantageProject: advantageProject,
|
|
|
bankOfDeposit: bankOfDeposit,
|
|
bankOfDeposit: bankOfDeposit,
|
|
@@ -746,7 +840,7 @@ export default {
|
|
|
]
|
|
]
|
|
|
}, {
|
|
}, {
|
|
|
label: '运费',
|
|
label: '运费',
|
|
|
- prop: 'packageRemarks',
|
|
|
|
|
|
|
+ prop: 'oceanFreight',
|
|
|
rules: [
|
|
rules: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
@@ -874,6 +968,10 @@ export default {
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
this.commodityData = false
|
|
this.commodityData = false
|
|
|
},
|
|
},
|
|
|
|
|
+ //政策价格导入
|
|
|
|
|
+ policy(){
|
|
|
|
|
+ this.policyDialog = !this.policyDialog
|
|
|
|
|
+ },
|
|
|
//点击费用明细选择触发
|
|
//点击费用明细选择触发
|
|
|
choice(row) {
|
|
choice(row) {
|
|
|
this.dialogCost = !this.dialogCost
|
|
this.dialogCost = !this.dialogCost
|
|
@@ -896,6 +994,7 @@ export default {
|
|
|
this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
|
|
this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
|
|
|
this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
|
|
this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
|
|
|
this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
|
|
this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
|
|
|
|
|
+ this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
|
|
|
}
|
|
}
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
this.commodityData = false
|
|
this.commodityData = false
|
|
@@ -934,6 +1033,8 @@ export default {
|
|
|
if (this.tableData.length > 0) {
|
|
if (this.tableData.length > 0) {
|
|
|
for (let item in this.tableData) {
|
|
for (let item in this.tableData) {
|
|
|
console.log(this.tableData[item])
|
|
console.log(this.tableData[item])
|
|
|
|
|
+ this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
|
|
|
|
|
+ delete this.tableData[item].goodsTypeName
|
|
|
this.tableData[item].itemId = this.tableData[item].id
|
|
this.tableData[item].itemId = this.tableData[item].id
|
|
|
delete this.tableData[item].id
|
|
delete this.tableData[item].id
|
|
|
this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
@@ -959,6 +1060,17 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page);
|
|
this.onLoad(this.page);
|
|
|
},
|
|
},
|
|
|
|
|
+ //导入页销售政策查询
|
|
|
|
|
+ policyNodeClick(data){
|
|
|
|
|
+ console.log(data.id)
|
|
|
|
|
+ detailList(data.id).then(res=>{
|
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
|
+ //特价促销
|
|
|
|
|
+ this.dataPolicy = res.data.data.specialItemList
|
|
|
|
|
+ //买赠促销
|
|
|
|
|
+ this.contactsDataBuyFree = res.data.data.presentItemList
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//导入页左费用类型查询
|
|
//导入页左费用类型查询
|
|
|
nodeClickCost(data) {
|
|
nodeClickCost(data) {
|
|
|
this.treeDeptIdCost = data.id;
|
|
this.treeDeptIdCost = data.id;
|
|
@@ -967,10 +1079,28 @@ export default {
|
|
|
},
|
|
},
|
|
|
//刷新触发
|
|
//刷新触发
|
|
|
refreshChange() {
|
|
refreshChange() {
|
|
|
- this.treeDeptId = '';
|
|
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page);
|
|
this.onLoad(this.page);
|
|
|
},
|
|
},
|
|
|
|
|
+ //销售政策特价促销选中触发
|
|
|
|
|
+ selectionChangePolicy(list){
|
|
|
|
|
+ this.policyData = list
|
|
|
|
|
+ },
|
|
|
|
|
+ //销售政策买赠促销选中触发
|
|
|
|
|
+ selectionChangePolicyTwo(list){
|
|
|
|
|
+ this.policyDataTwo = list
|
|
|
|
|
+ },
|
|
|
|
|
+ //导入商品政策
|
|
|
|
|
+ importPolicy(){
|
|
|
|
|
+ let list = this.policyData.concat(this.policyDataTwo)
|
|
|
|
|
+ console.log(list)
|
|
|
|
|
+ for (let item in list) {
|
|
|
|
|
+ console.log(list[item])
|
|
|
|
|
+ this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
|
|
+ this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.policyDialog = false
|
|
|
|
|
+ },
|
|
|
//费用刷新触发
|
|
//费用刷新触发
|
|
|
refreshChangeCost() {
|
|
refreshChangeCost() {
|
|
|
this.treeDeptIdCost = '';
|
|
this.treeDeptIdCost = '';
|