|
@@ -45,9 +45,10 @@
|
|
|
v-if="goodsForm.status !== 1"
|
|
|
width="40">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tooltip className="item" v-if="scope.$index === tableData.length-1" effect="dark" content="增加途径地址" placement="top">
|
|
|
+ <el-tooltip className="item" v-if="scope.$index === tableData.length-1" effect="dark" content="增加途径地址"
|
|
|
+ placement="top">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" circle @click="addAddress"
|
|
|
- style="margin-right: 1.25rem;"></el-button>
|
|
|
+ style="margin-right: 1.25rem;"></el-button>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -65,7 +66,8 @@
|
|
|
<span v-else>
|
|
|
<el-button v-if="goodsForm.status === 1" type="success" size="mini" circle>途</el-button>
|
|
|
<el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
|
|
|
- <el-button type="danger" icon="el-icon-delete" size="mini" circle @click="deleteAddress(scope)"></el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-delete" size="mini" circle
|
|
|
+ @click="deleteAddress(scope)"></el-button>
|
|
|
</el-tooltip>
|
|
|
</span>
|
|
|
</template>
|
|
@@ -95,7 +97,8 @@
|
|
|
align="center"
|
|
|
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>
|
|
@@ -130,6 +133,7 @@
|
|
|
<avue-form :option="goodsOptionForm" v-model="goodsForm">
|
|
|
<template slot-scope="scope" slot="corpId">
|
|
|
<crop-select
|
|
|
+ :disabled="goodsForm.status === 1"
|
|
|
v-model="goodsForm.corpId"
|
|
|
></crop-select>
|
|
|
</template>
|
|
@@ -155,7 +159,7 @@
|
|
|
v-model="row.corpId"
|
|
|
@getCorpData="(data)=>{getfleetId(data,row)}"
|
|
|
></crop-select>
|
|
|
- <span v-else>{{row.corpName}}</span>
|
|
|
+ <span v-else>{{ row.corpName }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{row}" slot="feeId">
|
|
|
<breakdown-select
|
|
@@ -173,12 +177,14 @@
|
|
|
size="small"
|
|
|
:icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
|
|
|
@click="rowCell(row,index)"
|
|
|
- >{{row.$cellEdit?'保存':'编辑'}}</el-button>
|
|
|
+ >{{ row.$cellEdit ? '保存' : '编辑' }}
|
|
|
+ </el-button>
|
|
|
<el-button type="text"
|
|
|
icon="el-icon-delete"
|
|
|
size="small"
|
|
|
@click="$refs.collection.rowDel(row,index)"
|
|
|
- >删除</el-button>
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>
|
|
@@ -199,7 +205,7 @@
|
|
|
v-model="row.corpId"
|
|
|
@getCorpData="(data)=>{getfleetId(data,row)}"
|
|
|
></crop-select>
|
|
|
- <span v-else>{{row.corpName}}</span>
|
|
|
+ <span v-else>{{ row.corpName }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{row}" slot="feeId">
|
|
|
<breakdown-select
|
|
@@ -217,12 +223,14 @@
|
|
|
size="small"
|
|
|
:icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
|
|
|
@click="paymentRowCell(row,index)"
|
|
|
- >{{row.$cellEdit?'保存':'编辑'}}</el-button>
|
|
|
+ >{{ row.$cellEdit ? '保存' : '编辑' }}
|
|
|
+ </el-button>
|
|
|
<el-button type="text"
|
|
|
icon="el-icon-delete"
|
|
|
size="small"
|
|
|
@click="$refs.payment.rowDel(row,index)"
|
|
|
- >删除</el-button>
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>
|
|
@@ -240,7 +248,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {getLazyTree} from "@/api/base/region";
|
|
|
-import {saveDelegationList, detailDelegationList,removeCollection,saveSaveList} from "@/api/landTransportation";
|
|
|
+import {saveDelegationList, detailDelegationList, removeCollection, saveSaveList} from "@/api/landTransportation";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
@@ -250,21 +258,21 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- activeIndex:'1',
|
|
|
+ activeIndex: '1',
|
|
|
goodsForm: {},
|
|
|
- orderFilesList:[],
|
|
|
- roleName:localStorage.getItem("roleName").split(',')[0],
|
|
|
- breakConfiguration:{
|
|
|
- multipleChoices:false,
|
|
|
- multiple:false,
|
|
|
- disabled:false,
|
|
|
- searchShow:true,
|
|
|
- collapseTags:false,
|
|
|
- clearable:true,
|
|
|
- placeholder:'请点击右边按钮选择',
|
|
|
- dicData:[]
|
|
|
+ orderFilesList: [],
|
|
|
+ roleName: localStorage.getItem("roleName").split(',')[0],
|
|
|
+ breakConfiguration: {
|
|
|
+ multipleChoices: false,
|
|
|
+ multiple: false,
|
|
|
+ disabled: false,
|
|
|
+ searchShow: true,
|
|
|
+ collapseTags: false,
|
|
|
+ clearable: true,
|
|
|
+ placeholder: '请点击右边按钮选择',
|
|
|
+ dicData: []
|
|
|
},
|
|
|
- advantageProjectData:[],
|
|
|
+ advantageProjectData: [],
|
|
|
treeOption: {
|
|
|
label: 'title',
|
|
|
value: 'id',
|
|
@@ -288,92 +296,71 @@ export default {
|
|
|
entrustOptionTwoT: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
- index:true,
|
|
|
- cellBtn:true,
|
|
|
- addBtn:false,
|
|
|
- addRowBtn:false,
|
|
|
- delBtn:false,
|
|
|
+ index: true,
|
|
|
+ cellBtn: true,
|
|
|
+ addBtn: false,
|
|
|
+ addRowBtn: false,
|
|
|
+ delBtn: false,
|
|
|
showSummary: true,
|
|
|
summaryText: "合计",
|
|
|
sumColumnList: [
|
|
|
{
|
|
|
name: 'landWeight',
|
|
|
type: 'sum',
|
|
|
- decimals:6
|
|
|
- },{
|
|
|
+ decimals: 6
|
|
|
+ }, {
|
|
|
name: 'landAmountC',
|
|
|
type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
name: 'landAmountD',
|
|
|
type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
name: 'ctnQuantity',
|
|
|
type: 'count'
|
|
|
}],
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '车队',
|
|
|
- width: 200,
|
|
|
- slot:true,
|
|
|
- prop: 'fleetId'
|
|
|
- }, {
|
|
|
- label: '尺寸箱型',
|
|
|
- width: 100,
|
|
|
- prop: 'ctnType'
|
|
|
- }, {
|
|
|
- label: '箱量',
|
|
|
- width: 50,
|
|
|
- prop: 'ctnQuantity'
|
|
|
- }, {
|
|
|
- label: '重量',
|
|
|
- width: 160,
|
|
|
- prop: 'landWeight',
|
|
|
- controls: false,
|
|
|
- precision: 6,
|
|
|
- type: 'number'
|
|
|
- }, {
|
|
|
- label: '车号',
|
|
|
- width: 150,
|
|
|
- prop: 'plateNo'
|
|
|
- }, {
|
|
|
- label: '司机',
|
|
|
- width: 115,
|
|
|
- prop: 'driverId'
|
|
|
- }, {
|
|
|
- label: '电话',
|
|
|
- width: 160,
|
|
|
- prop: 'tel'
|
|
|
- }, {
|
|
|
- label: '陆运费(D)',
|
|
|
- prop: 'landAmountD'
|
|
|
- }, {
|
|
|
- label: '陆运费(C)',
|
|
|
- cell: true,
|
|
|
- prop: 'landAmountC'
|
|
|
- }, {
|
|
|
- label: '备注',
|
|
|
- cell: true,
|
|
|
- prop: 'remarks'
|
|
|
- }
|
|
|
+ column: [{
|
|
|
+ label: '尺寸箱型',
|
|
|
+ width: 100,
|
|
|
+ prop: 'ctnType'
|
|
|
+ }, {
|
|
|
+ label: '箱量',
|
|
|
+ width: 50,
|
|
|
+ prop: 'ctnQuantity'
|
|
|
+ }, {
|
|
|
+ label: '重量',
|
|
|
+ width: 160,
|
|
|
+ prop: 'landWeight',
|
|
|
+ controls: false,
|
|
|
+ precision: 6,
|
|
|
+ type: 'number'
|
|
|
+ }, {
|
|
|
+ label: '陆运费(D)',
|
|
|
+ prop: 'landAmountD'
|
|
|
+ }, {
|
|
|
+ label: '备注',
|
|
|
+ cell: true,
|
|
|
+ prop: 'remarks'
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
entrustList: [],
|
|
|
goodsOptionForm: {
|
|
|
menuBtn: false,
|
|
|
+ disabled: false,
|
|
|
column: [{
|
|
|
label: '客户名称',
|
|
|
formslot: true,
|
|
|
prop: 'corpId'
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '所属公司',
|
|
|
formslot: true,
|
|
|
- prop: 'billNo'
|
|
|
+ prop: 'belongCompany'
|
|
|
}, {
|
|
|
label: '订单号',
|
|
|
prop: 'id',
|
|
|
- disabled:true
|
|
|
+ disabled: true
|
|
|
}, {
|
|
|
label: '提单号',
|
|
|
prop: 'billNo'
|
|
@@ -401,7 +388,7 @@ export default {
|
|
|
entrustOptionTwo: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
- addBtnText:'录入箱信息',
|
|
|
+ addBtnText: '录入箱信息',
|
|
|
index: true,
|
|
|
cellBtn: true,
|
|
|
addBtn: false,
|
|
@@ -412,22 +399,22 @@ export default {
|
|
|
{
|
|
|
name: 'landWeight',
|
|
|
type: 'sum',
|
|
|
- decimals:6
|
|
|
- },{
|
|
|
+ decimals: 6
|
|
|
+ }, {
|
|
|
name: 'landAmountD',
|
|
|
type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
name: 'ctnQuantity',
|
|
|
type: 'sum',
|
|
|
- decimals:1
|
|
|
+ decimals: 1
|
|
|
}],
|
|
|
column: [{
|
|
|
label: '尺寸箱型',
|
|
|
cell: true,
|
|
|
prop: 'ctnType',
|
|
|
type: 'select',
|
|
|
- width:100,
|
|
|
+ width: 100,
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
|
|
|
props: {
|
|
|
label: "dictValue",
|
|
@@ -439,22 +426,22 @@ export default {
|
|
|
prop: 'ctnQuantity',
|
|
|
controls: false,
|
|
|
precision: 0,
|
|
|
- width:100,
|
|
|
+ width: 100,
|
|
|
type: 'number'
|
|
|
}, {
|
|
|
label: '总重量(吨)',
|
|
|
cell: true,
|
|
|
prop: 'landWeight',
|
|
|
controls: false,
|
|
|
- width:200,
|
|
|
+ width: 200,
|
|
|
precision: 6,
|
|
|
type: 'number'
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '陆运费(D)',
|
|
|
cell: true,
|
|
|
prop: 'landAmountD',
|
|
|
controls: false,
|
|
|
- width:200,
|
|
|
+ width: 200,
|
|
|
precision: 2,
|
|
|
type: 'number'
|
|
|
}, {
|
|
@@ -469,35 +456,35 @@ export default {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
index: true,
|
|
|
- cancelBtn:false,
|
|
|
- editBtn:false,
|
|
|
- delBtn:false,
|
|
|
- cellBtn:false,
|
|
|
+ cancelBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ cellBtn: false,
|
|
|
addBtn: false,
|
|
|
addRowBtn: false,
|
|
|
showSummary: true,
|
|
|
- addBtnText:'录入明细',
|
|
|
+ addBtnText: '录入明细',
|
|
|
summaryText: "合计",
|
|
|
sumColumnList: [{
|
|
|
- name: 'price',
|
|
|
- type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
- name: 'amount',
|
|
|
- type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
- name: 'quantity',
|
|
|
- type: 'sum',
|
|
|
- decimals:1
|
|
|
- }],
|
|
|
+ name: 'price',
|
|
|
+ type: 'sum',
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
+ name: 'amount',
|
|
|
+ type: 'sum',
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
+ name: 'quantity',
|
|
|
+ type: 'sum',
|
|
|
+ decimals: 1
|
|
|
+ }],
|
|
|
column: [{
|
|
|
label: '客户名称',
|
|
|
- slot:true,
|
|
|
+ slot: true,
|
|
|
prop: 'corpId'
|
|
|
}, {
|
|
|
label: '费用名称',
|
|
|
- slot:true,
|
|
|
+ slot: true,
|
|
|
prop: 'feeId'
|
|
|
}, {
|
|
|
label: '计价单位',
|
|
@@ -543,35 +530,35 @@ export default {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
index: true,
|
|
|
- cancelBtn:false,
|
|
|
- editBtn:false,
|
|
|
- delBtn:false,
|
|
|
- cellBtn:false,
|
|
|
+ cancelBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ cellBtn: false,
|
|
|
addBtn: false,
|
|
|
addRowBtn: false,
|
|
|
showSummary: true,
|
|
|
- addBtnText:'录入明细',
|
|
|
+ addBtnText: '录入明细',
|
|
|
summaryText: "合计",
|
|
|
sumColumnList: [{
|
|
|
name: 'price',
|
|
|
type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
name: 'amount',
|
|
|
type: 'sum',
|
|
|
- decimals:2
|
|
|
- },{
|
|
|
+ decimals: 2
|
|
|
+ }, {
|
|
|
name: 'quantity',
|
|
|
type: 'sum',
|
|
|
- decimals:1
|
|
|
+ decimals: 1
|
|
|
}],
|
|
|
column: [{
|
|
|
label: '客户名称',
|
|
|
- slot:true,
|
|
|
+ slot: true,
|
|
|
prop: 'corpId'
|
|
|
}, {
|
|
|
label: '费用名称',
|
|
|
- slot:true,
|
|
|
+ slot: true,
|
|
|
prop: 'feeId'
|
|
|
}, {
|
|
|
label: '计价单位',
|
|
@@ -615,64 +602,91 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- if (this.id){
|
|
|
+ if (this.id) {
|
|
|
detailDelegationList({id: this.id, kind: '1'}).then(res => {
|
|
|
this.goodsForm = res.data.data
|
|
|
this.tableData = res.data.data.orderAddressList
|
|
|
this.entrustList = res.data.data.orderItemList
|
|
|
this.goodsList = res.data.data.orderItemList
|
|
|
- if (res.data.data.orderFeeList.length > 0){
|
|
|
- res.data.data.orderFeeList.forEach(item=>{
|
|
|
- if (item.type == 1){
|
|
|
+ if (res.data.data.orderFeeList.length > 0) {
|
|
|
+ res.data.data.orderFeeList.forEach(item => {
|
|
|
+ if (item.type == 1) {
|
|
|
this.collectionList.push(item)
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.paymentList.push(item)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ this.goodsOptionForm.disabled = this.goodsForm.status === 1
|
|
|
delete this.goodsForm.orderAddressList
|
|
|
delete this.goodsForm.orderItemList
|
|
|
delete this.goodsForm.orderFeeList
|
|
|
- this.tableData.forEach(item=>{
|
|
|
+ this.tableData.forEach(item => {
|
|
|
if (item.region) item.region = item.region.split(',')
|
|
|
})
|
|
|
})
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.tableData = [{
|
|
|
- region:[],
|
|
|
- address:''
|
|
|
- },{
|
|
|
- region:[],
|
|
|
- address:''
|
|
|
+ region: [],
|
|
|
+ address: ''
|
|
|
+ }, {
|
|
|
+ region: [],
|
|
|
+ address: ''
|
|
|
}]
|
|
|
- this.entrustList=[{$cellEdit:true}]
|
|
|
+ this.entrustList = [{$cellEdit: true}]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //刷新数据
|
|
|
+ refreshData() {
|
|
|
+ detailDelegationList({id: this.id, kind: '1'}).then(res => {
|
|
|
+ this.goodsForm = res.data.data
|
|
|
+ this.tableData = res.data.data.orderAddressList
|
|
|
+ this.entrustList = res.data.data.orderItemList
|
|
|
+ this.goodsList = res.data.data.orderItemList
|
|
|
+ if (res.data.data.orderFeeList.length > 0) {
|
|
|
+ res.data.data.orderFeeList.forEach(item => {
|
|
|
+ if (item.type == 1) {
|
|
|
+ this.collectionList.push(item)
|
|
|
+ } else {
|
|
|
+ this.paymentList.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.goodsOptionForm.disabled = this.goodsForm.status === 1
|
|
|
+ delete this.goodsForm.orderAddressList
|
|
|
+ delete this.goodsForm.orderItemList
|
|
|
+ delete this.goodsForm.orderFeeList
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ if (item.region) item.region = item.region.split(',')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
//提交委托
|
|
|
- submit(){
|
|
|
+ submit() {
|
|
|
saveDelegationList({
|
|
|
- id:this.goodsForm.id
|
|
|
+ id: this.goodsForm.id
|
|
|
}).then(res => {
|
|
|
this.$message.success('提交成功');
|
|
|
+ this.refreshData()
|
|
|
})
|
|
|
},
|
|
|
//切换收付费
|
|
|
- handleSelect(tab, event){
|
|
|
+ handleSelect(tab, event) {
|
|
|
this.activeIndex = tab.name
|
|
|
},
|
|
|
//箱信息保存
|
|
|
- rowSaveT(row,index,done,loading) {
|
|
|
+ rowSaveT(row, index, done, loading) {
|
|
|
row.$cellEdit = false
|
|
|
done()
|
|
|
},
|
|
|
//箱信息选择车队
|
|
|
- getfleetIdT(data,row){
|
|
|
- this.$set(row,'fleetName',data.cname)
|
|
|
+ getfleetIdT(data, row) {
|
|
|
+ this.$set(row, 'fleetName', data.cname)
|
|
|
},
|
|
|
//地址新增
|
|
|
addAddress() {
|
|
|
- this.tableData.splice(this.tableData.length-1,0,{leas:1111})
|
|
|
+ this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
|
|
|
},
|
|
|
//返回主列表
|
|
|
backToList() {
|
|
@@ -684,7 +698,7 @@ export default {
|
|
|
this.tableData.splice(scope.$index, 1);
|
|
|
},
|
|
|
//箱信息保存
|
|
|
- rowSave(row,index,done,loading) {
|
|
|
+ rowSave(row, index, done, loading) {
|
|
|
row.$cellEdit = false
|
|
|
done()
|
|
|
},
|
|
@@ -720,34 +734,35 @@ export default {
|
|
|
kind: '1',
|
|
|
orderAddressList: data,
|
|
|
orderItemList: this.entrustList,
|
|
|
- orderFeeList:this.collectionList.concat(this.paymentList)
|
|
|
+ orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
}).then(res => {
|
|
|
this.$message.success('保存成功');
|
|
|
+ this.refreshData()
|
|
|
})
|
|
|
},
|
|
|
//收费新增
|
|
|
- addRowCollection(){
|
|
|
- this.$refs.collection.rowCellAdd( {
|
|
|
- currency:'1',
|
|
|
- type:'1',
|
|
|
- $cellEdit:true
|
|
|
+ addRowCollection() {
|
|
|
+ this.$refs.collection.rowCellAdd({
|
|
|
+ currency: '1',
|
|
|
+ type: '1',
|
|
|
+ $cellEdit: true
|
|
|
});
|
|
|
},
|
|
|
//付费新增
|
|
|
- addRowPayment(){
|
|
|
- this.$refs.payment.rowCellAdd( {
|
|
|
- currency:'1',
|
|
|
- type:'2',
|
|
|
- $cellEdit:true
|
|
|
+ addRowPayment() {
|
|
|
+ this.$refs.payment.rowCellAdd({
|
|
|
+ currency: '1',
|
|
|
+ type: '2',
|
|
|
+ $cellEdit: true
|
|
|
});
|
|
|
},
|
|
|
//选择费用
|
|
|
- selectValue(value,row){
|
|
|
- this.$set(row,'feeName',value.cname)
|
|
|
+ selectValue(value, row) {
|
|
|
+ this.$set(row, 'feeName', value.cname)
|
|
|
},
|
|
|
//选择客户信息触发
|
|
|
- getfleetId(data,row){
|
|
|
- this.$set(row,'corpName',data.cname)
|
|
|
+ getfleetId(data, row) {
|
|
|
+ this.$set(row, 'corpName', data.cname)
|
|
|
},
|
|
|
//收款信息移除
|
|
|
makeDel(row, index) {
|