|
@@ -78,7 +78,7 @@
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<el-button v-if="goodsForm.status === 1" type="warning" size="mini" circle>途</el-button>
|
|
|
- <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
|
|
|
+ <el-tooltip v-else class="item" effect="dark" content="删除" placement="left">
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini" circle
|
|
|
@click="deleteAddress(scope)"></el-button>
|
|
|
</el-tooltip>
|
|
@@ -169,6 +169,10 @@
|
|
|
:option="entrustOptionTwo"
|
|
|
@row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
|
|
|
@row-update="rowSave"
|
|
|
+ ref="crudBox"
|
|
|
+ v-if="KeyBox>0"
|
|
|
+ @resetColumn="resetColumnBox"
|
|
|
+ @saveColumn="saveColumnBox"
|
|
|
@row-del="rowDel">
|
|
|
<template slot="ctnTypeHeader" slot-scope="{column}">
|
|
|
{{ column.label }}<span style="color:#F56C6C">*</span>
|
|
@@ -188,7 +192,10 @@
|
|
|
<avue-crud
|
|
|
:data="entrustList"
|
|
|
:option="entrustOptionTwoT"
|
|
|
- ref="entrustTwoT"
|
|
|
+ ref="crudBoxTwo"
|
|
|
+ v-if="KeyBoxTwo>0"
|
|
|
+ @resetColumn="resetColumnBoxTwo"
|
|
|
+ @saveColumn="saveColumnBoxTwo"
|
|
|
@row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
|
|
|
@row-update="rowSaveT">
|
|
|
<template slot="fleetId" slot-scope="{ row, index }">
|
|
@@ -207,6 +214,9 @@
|
|
|
<avue-crud
|
|
|
:data="vehicleList"
|
|
|
ref="crudContact"
|
|
|
+ v-if="keyContact>0"
|
|
|
+ @resetColumn="resetColumnContact"
|
|
|
+ @saveColumn="saveColumnContact"
|
|
|
:option="vehicleOption">
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -221,6 +231,8 @@
|
|
|
:data="collectionList"
|
|
|
:option="collectionOption"
|
|
|
ref="collection"
|
|
|
+ @resetColumn="resetColumnCollection"
|
|
|
+ @saveColumn="saveColumnCollection"
|
|
|
@row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
|
|
|
@row-update="rowSave"
|
|
|
@row-del="makeDel">
|
|
@@ -270,6 +282,8 @@
|
|
|
:data="paymentList"
|
|
|
:option="paymentOption"
|
|
|
ref="payment"
|
|
|
+ @resetColumn="resetColumnPayment"
|
|
|
+ @saveColumn="saveColumnPayment"
|
|
|
@row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
|
|
|
@row-update="rowSave"
|
|
|
@row-del="feeDel"
|
|
@@ -322,7 +336,7 @@
|
|
|
deleteUrl="/api/blade-client/common-file/remove"
|
|
|
:data="orderFilesList"
|
|
|
:disabled="goodsForm.status === 1"
|
|
|
- :enumerationValue="76"
|
|
|
+ :enumerationValue="85.6"
|
|
|
></c-upload>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -346,12 +360,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeIndex: '1',
|
|
|
+ KeyBox:0,
|
|
|
+ KeyBoxTwo:0,
|
|
|
type: false,
|
|
|
goodsForm: {},
|
|
|
modelKey: 1,
|
|
|
orderFilesList: [],
|
|
|
vehicleList: [],
|
|
|
- roleName: localStorage.getItem("roleName").split(',')[0],
|
|
|
breakConfiguration: {
|
|
|
multipleChoices: false,
|
|
|
multiple: false,
|
|
@@ -363,7 +378,8 @@ export default {
|
|
|
dicData: []
|
|
|
},
|
|
|
advantageProjectData: [],
|
|
|
- vehicleOption: {
|
|
|
+ keyContact:0,
|
|
|
+ vehicleOptionTwo: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
refreshBtn:false,
|
|
@@ -585,6 +601,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ vehicleOption:{},
|
|
|
treeOption: {
|
|
|
label: 'title',
|
|
|
value: 'id',
|
|
@@ -605,7 +622,7 @@ export default {
|
|
|
},
|
|
|
tableData: [],
|
|
|
entrustListT: [],
|
|
|
- entrustOptionTwoT: {
|
|
|
+ entrustOptionTwoTBackup: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
index: true,
|
|
@@ -681,6 +698,7 @@ export default {
|
|
|
prop: 'remarks'
|
|
|
}]
|
|
|
},
|
|
|
+ entrustOptionTwoT:{},
|
|
|
entrustList: [],
|
|
|
goodsOptionFormC:{
|
|
|
menuBtn: false,
|
|
@@ -816,7 +834,7 @@ export default {
|
|
|
prop: 'remarks'
|
|
|
}]
|
|
|
},
|
|
|
- entrustOptionTwo: {
|
|
|
+ entrustOptionTwoBackup: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
refreshBtn: false,
|
|
@@ -905,8 +923,9 @@ export default {
|
|
|
prop: 'remarks'
|
|
|
}]
|
|
|
},
|
|
|
+ entrustOptionTwo:{},
|
|
|
collectionList: [],
|
|
|
- collectionOption: {
|
|
|
+ collectionOptionBackup: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
refreshBtn: false,
|
|
@@ -984,7 +1003,9 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
paymentList: [],
|
|
|
- paymentOption: {
|
|
|
+ collectionOption:{},
|
|
|
+ paymentOption:{},
|
|
|
+ paymentOptionBackup: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
index: true,
|
|
@@ -1062,7 +1083,15 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ this.entrustOptionTwo = await this.getColumnData(this.getColumnName(85.1), this.entrustOptionTwoBackup);
|
|
|
+ this.KeyBox++
|
|
|
+ this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(85.2), this.entrustOptionTwoTBackup);
|
|
|
+ this.KeyBoxTwo++
|
|
|
+ this.vehicleOption = await this.getColumnData(this.getColumnName(85.3), this.vehicleOptionTwo);
|
|
|
+ this.keyContact++
|
|
|
+ this.collectionOption = await this.getColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
|
|
|
+ this.paymentOption = await this.getColumnData(this.getColumnName(85.5), this.paymentOptionBackup);
|
|
|
if (this.id) {
|
|
|
detailDelegationList({id: this.id, kind: '1'}).then(res => {
|
|
|
this.goodsForm = res.data.data
|
|
@@ -1097,7 +1126,6 @@ export default {
|
|
|
address: ''
|
|
|
}]
|
|
|
getCorp().then(res=>{
|
|
|
- console.log(res)
|
|
|
this.goodsForm = {
|
|
|
corpId:res.data.data.id,
|
|
|
businessType:"出口",
|
|
@@ -1109,6 +1137,121 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnCollection() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85.4), this.collectionOption);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.collection.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnCollection() {
|
|
|
+ this.collectionOption = this.collectionOptionBackup;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.collection.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnPayment() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85.5), this.paymentOption);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.payment.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnPayment() {
|
|
|
+ this.paymentOption = this.paymentOptionBackup;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85.5), this.paymentOptionBackup);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.payment.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnBox() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85.1), this.entrustOptionTwo);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crudBox.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnBox() {
|
|
|
+ this.entrustOptionTwo = this.entrustOptionTwoBackup;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85.1), this.entrustOptionTwoBackup);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crudBox.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnBoxTwo() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85.2), this.entrustOptionTwoT);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnBoxTwo() {
|
|
|
+ this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85.2), this.entrustOptionTwoTBackup);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnContact() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85.3), this.vehicleOption);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnContact() {
|
|
|
+ this.vehicleOption = this.vehicleOptionTwo;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85.3), this.vehicleOptionTwo);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
//刷新数据
|
|
|
refreshData() {
|
|
|
detailDelegationList({id: this.id, kind: '1'}).then(res => {
|
|
@@ -1139,24 +1282,6 @@ export default {
|
|
|
this.type = false
|
|
|
})
|
|
|
},
|
|
|
- //提交委托
|
|
|
- submit(type) {
|
|
|
- if (type) {
|
|
|
- saveDelegationList({
|
|
|
- id: this.goodsForm.id
|
|
|
- }).then(res => {
|
|
|
- this.$message.success('提交成功');
|
|
|
- this.refreshData()
|
|
|
- })
|
|
|
- } else {
|
|
|
- cancelSubmission({
|
|
|
- id: this.goodsForm.id
|
|
|
- }).then(res => {
|
|
|
- this.$message.success('取消成功');
|
|
|
- this.refreshData()
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
//切换收付费
|
|
|
handleSelect(tab, event) {
|
|
|
this.activeIndex = tab.name
|
|
@@ -1211,61 +1336,101 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
editCustomer() {
|
|
|
- this.$refs['goodsFormE'].validate((valid, done) => {
|
|
|
- done()
|
|
|
- })
|
|
|
- this.$refs['goodsForm'].validate((valid, done) => {
|
|
|
- done()
|
|
|
+ let data = JSON.parse(JSON.stringify(this.tableData))
|
|
|
+ data.forEach((item, index) => {
|
|
|
+ item.sort = index + 1
|
|
|
+ if (item.region.length !== 0) {
|
|
|
+ item.region = item.region.join(',')
|
|
|
+ }else {
|
|
|
+ item.region = ''
|
|
|
+ }
|
|
|
})
|
|
|
- for (let item in this.tableData) {
|
|
|
- if (!this.tableData[item].corpId) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行发货工厂');
|
|
|
- if (!this.tableData[item].address) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行详细地址');
|
|
|
- }
|
|
|
- for (let item in this.entrustList) {
|
|
|
- if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行尺寸箱型');
|
|
|
- if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行箱量');
|
|
|
- if (!this.entrustList[item].landWeight) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行总重量');
|
|
|
- if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '陆运费');
|
|
|
- }
|
|
|
- if (this.entrustList.length === 0) return this.$message.error('箱信息不能为空')
|
|
|
- this.$refs['goodsFormE'].validate((valid, doneE) => {
|
|
|
- doneE()
|
|
|
- if (valid){
|
|
|
- this.$refs['goodsForm'].validate((valid, done) => {
|
|
|
- done();
|
|
|
- if (valid) {
|
|
|
- let data = JSON.parse(JSON.stringify(this.tableData))
|
|
|
- data.forEach((item, index) => {
|
|
|
- item.sort = index + 1
|
|
|
- if (item.region.length !== 0) item.region = item.region.join(',')
|
|
|
- })
|
|
|
- this.type = true
|
|
|
- saveSaveList({
|
|
|
- ...this.goodsForm,
|
|
|
- kind: '1',
|
|
|
- orderAddressList: data,
|
|
|
- fileList: this.orderFilesList,
|
|
|
- itemList: this.entrustList,
|
|
|
- orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
- }).then(res => {
|
|
|
- this.$message.success('保存成功');
|
|
|
- this.goodsForm = {}
|
|
|
- if (!this.goodsForm.id) {
|
|
|
- this.id = res.data.data
|
|
|
- this.refreshData()
|
|
|
- } else {
|
|
|
- this.refreshData()
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.type = true
|
|
|
+ saveSaveList({
|
|
|
+ ...this.goodsForm,
|
|
|
+ kind: '1',
|
|
|
+ orderAddressList: data,
|
|
|
+ fileList: this.orderFilesList,
|
|
|
+ itemList: this.entrustList,
|
|
|
+ orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success('保存成功');
|
|
|
+ this.goodsForm = {}
|
|
|
+ if (!this.goodsForm.id) {
|
|
|
+ this.id = res.data.data
|
|
|
+ this.refreshData()
|
|
|
} else {
|
|
|
- return false;
|
|
|
+ this.refreshData()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //提交委托
|
|
|
+ submit(type) {
|
|
|
+ if (type) {
|
|
|
+ this.$refs['goodsFormE'].validate((valid, done) => {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ this.$refs['goodsForm'].validate((valid, done) => {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ for (let item in this.tableData) {
|
|
|
+ if (!this.tableData[item].corpId) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行发货工厂');
|
|
|
+ if (!this.tableData[item].address) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行详细地址');
|
|
|
+ }
|
|
|
+ for (let item in this.entrustList) {
|
|
|
+ if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行尺寸箱型');
|
|
|
+ if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行箱量');
|
|
|
+ if (!this.entrustList[item].landWeight) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行总重量');
|
|
|
+ if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '单柜运费');
|
|
|
+ }
|
|
|
+ if (this.entrustList.length === 0) return this.$message.error('箱信息不能为空')
|
|
|
+ this.$refs['goodsFormE'].validate((valid, doneE) => {
|
|
|
+ doneE()
|
|
|
+ if (valid){
|
|
|
+ this.$refs['goodsForm'].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ let data = JSON.parse(JSON.stringify(this.tableData))
|
|
|
+ data.forEach((item, index) => {
|
|
|
+ item.sort = index + 1
|
|
|
+ if (item.region.length !== 0) {
|
|
|
+ item.region = item.region.join(',')
|
|
|
+ }else {
|
|
|
+ item.region = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ saveSaveList({
|
|
|
+ ...this.goodsForm,
|
|
|
+ kind: '1',
|
|
|
+ orderAddressList: data,
|
|
|
+ fileList: this.orderFilesList,
|
|
|
+ itemList: this.entrustList,
|
|
|
+ orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
+ }).then(res => {
|
|
|
+ saveDelegationList({
|
|
|
+ id: this.goodsForm.id
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success('提交成功');
|
|
|
+ this.refreshData()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ cancelSubmission({
|
|
|
+ id: this.goodsForm.id
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success('取消成功');
|
|
|
+ this.refreshData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//收费新增
|
|
|
addRowCollection() {
|
|
|
this.$refs.collection.rowCellAdd({
|