|
@@ -32,7 +32,7 @@
|
|
|
<el-button
|
|
|
class="el-button--small-yh add-customer-btn"
|
|
|
type="primary"
|
|
|
- :disabled="goodsForm.status === 1"
|
|
|
+ :disabled="goodsForm.status === 1 || type"
|
|
|
size="small"
|
|
|
@click="editCustomer"
|
|
|
>保存
|
|
@@ -104,7 +104,6 @@
|
|
|
property="province"
|
|
|
label="省市区"
|
|
|
align="center"
|
|
|
- :render-header="customTitle"
|
|
|
width="280">
|
|
|
<template slot-scope="scope">
|
|
|
<el-cascader
|
|
@@ -122,8 +121,7 @@
|
|
|
:render-header="customTitle"
|
|
|
label="详细地址">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.address" :disabled="goodsForm.status === 1" size="small"
|
|
|
- placeholder="请输入内容"></el-input>
|
|
|
+ <el-input v-model="scope.row.address" :disabled="goodsForm.status === 1" size="small" placeholder="请输入内容"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -136,16 +134,16 @@
|
|
|
@row-update="rowSave"
|
|
|
@row-del="rowDel">
|
|
|
<template slot="ctnTypeHeader" slot-scope="{column}">
|
|
|
- {{column.label}}<span style="color:#F56C6C">*</span>
|
|
|
+ {{ column.label }}<span style="color:#F56C6C">*</span>
|
|
|
</template>
|
|
|
<template slot="ctnQuantityHeader" slot-scope="{column}">
|
|
|
- {{column.label}}<span style="color:#F56C6C">*</span>
|
|
|
+ {{ column.label }}<span style="color:#F56C6C">*</span>
|
|
|
</template>
|
|
|
<template slot="landWeightHeader" slot-scope="{column}">
|
|
|
- {{column.label}}<span style="color:#F56C6C">*</span>
|
|
|
+ {{ column.label }}<span style="color:#F56C6C">*</span>
|
|
|
</template>
|
|
|
<template slot="landAmountDHeader" slot-scope="{column}">
|
|
|
- {{column.label}}<span style="color:#F56C6C">*</span>
|
|
|
+ {{ column.label }}<span style="color:#F56C6C">*</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -175,8 +173,27 @@
|
|
|
:disabled="goodsForm.status === 1"
|
|
|
v-model="goodsForm.corpId"
|
|
|
@getCorpData="getCorpData"
|
|
|
+ :corpType="'KH'"
|
|
|
+ ></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="agentId">
|
|
|
+ <crop-select
|
|
|
+ :disabled="goodsForm.status === 1"
|
|
|
+ v-model="goodsForm.agentId"
|
|
|
></crop-select>
|
|
|
</template>
|
|
|
+ <template slot-scope="scope" slot="polId">
|
|
|
+ <port-info
|
|
|
+ v-model="goodsForm.polId"
|
|
|
+ :disabled="goodsForm.status === 1"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="podId">
|
|
|
+ <port-info
|
|
|
+ v-model="goodsForm.podId"
|
|
|
+ :disabled="goodsForm.status === 1"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</avue-form>
|
|
|
</basic-container>
|
|
|
<containerTitle title="费用明细"></containerTitle>
|
|
@@ -305,6 +322,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeIndex: '1',
|
|
|
+ type:false,
|
|
|
goodsForm: {},
|
|
|
modelKey: 1,
|
|
|
orderFilesList: [],
|
|
@@ -397,6 +415,7 @@ export default {
|
|
|
goodsOptionForm: {
|
|
|
menuBtn: false,
|
|
|
disabled: false,
|
|
|
+ span: 8,
|
|
|
column: [{
|
|
|
label: '客户名称',
|
|
|
formslot: true,
|
|
@@ -411,7 +430,7 @@ export default {
|
|
|
formslot: true,
|
|
|
prop: 'belongCompany',
|
|
|
rules: [{
|
|
|
- required: true,
|
|
|
+ required: false,
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}],
|
|
@@ -463,10 +482,30 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}],
|
|
|
}, {
|
|
|
+ label: '订舱代理',
|
|
|
+ prop: 'agentId'
|
|
|
+ }, {
|
|
|
+ label: '起运港',
|
|
|
+ prop: 'polId'
|
|
|
+ },{
|
|
|
+ label: '目的港',
|
|
|
+ prop: 'podId'
|
|
|
+ },{
|
|
|
+ label: '开船日期',
|
|
|
+ prop: 'etd',
|
|
|
+ type: 'date'
|
|
|
+ },{
|
|
|
+ label: '截关日期',
|
|
|
+ prop: 'etc',
|
|
|
+ type: 'date'
|
|
|
+ },{
|
|
|
+ label: '截单日期',
|
|
|
+ prop: 'siCutoffDate',
|
|
|
+ type: 'date'
|
|
|
+ }, {
|
|
|
label: '备注',
|
|
|
prop: 'remarks'
|
|
|
- }
|
|
|
- ]
|
|
|
+ }]
|
|
|
},
|
|
|
entrustOptionTwo: {
|
|
|
align: 'center',
|
|
@@ -511,8 +550,8 @@ export default {
|
|
|
controls: false,
|
|
|
precision: 0,
|
|
|
width: 100,
|
|
|
- maxRows:999,
|
|
|
- minRows:1,
|
|
|
+ maxRows: 999,
|
|
|
+ minRows: 1,
|
|
|
type: 'number'
|
|
|
}, {
|
|
|
label: '总重量(吨)',
|
|
@@ -730,6 +769,8 @@ export default {
|
|
|
this.entrustList = res.data.data.orderItemList
|
|
|
this.goodsList = res.data.data.orderItemList
|
|
|
if (res.data.data.orderFeeList.length > 0) {
|
|
|
+ this.collectionList = []
|
|
|
+ this.paymentList = []
|
|
|
res.data.data.orderFeeList.forEach(item => {
|
|
|
if (item.type == 1) {
|
|
|
this.collectionList.push(item)
|
|
@@ -745,18 +786,19 @@ export default {
|
|
|
this.tableData.forEach(item => {
|
|
|
if (item.region) item.region = item.region.split(',')
|
|
|
})
|
|
|
+ this.type = false
|
|
|
})
|
|
|
},
|
|
|
//提交委托
|
|
|
submit(type) {
|
|
|
- if (type){
|
|
|
+ if (type) {
|
|
|
saveDelegationList({
|
|
|
id: this.goodsForm.id
|
|
|
}).then(res => {
|
|
|
this.$message.success('提交成功');
|
|
|
this.refreshData()
|
|
|
})
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
cancelSubmission({
|
|
|
id: this.goodsForm.id
|
|
|
}).then(res => {
|
|
@@ -819,18 +861,21 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
editCustomer() {
|
|
|
- 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) +'行详细地址');
|
|
|
+ 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) +'陆运费');
|
|
|
+ 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) + '陆运费');
|
|
|
}
|
|
|
- this.$refs['goodsForm'].validate((valid,done) => {
|
|
|
+ if (this.entrustList.length === 0) return this.$message.error('箱信息不能为空')
|
|
|
+ this.$refs['goodsForm'].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
let data = JSON.parse(JSON.stringify(this.tableData))
|
|
@@ -838,6 +883,7 @@ export default {
|
|
|
item.sort = index + 1
|
|
|
if (item.region.length !== 0) item.region = item.region.join(',')
|
|
|
})
|
|
|
+ this.type = true
|
|
|
saveSaveList({
|
|
|
...this.goodsForm,
|
|
|
kind: '1',
|
|
@@ -939,7 +985,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (row.belongtoarea) {
|
|
|
- addressList(row.belongtoarea).then(res => {
|
|
|
+ addressList(row.belongtoarea.split(',')[0]).then(res => {
|
|
|
this.tableData[scope.$index].region = [res.data.data.provinceCode, res.data.data.parentId, res.data.data.districtCode]
|
|
|
scope.row.key++
|
|
|
})
|
|
@@ -957,7 +1003,7 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
//自定义表头
|
|
|
- customTitle(h, { column, $index }) {
|
|
|
+ customTitle(h, {column, $index}) {
|
|
|
let text = column.label
|
|
|
return (
|
|
|
<div>
|
|
@@ -969,5 +1015,4 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|