|
@@ -13,10 +13,19 @@
|
|
|
<div>
|
|
|
<el-button
|
|
|
class="el-button--small-yh add-customer-btn"
|
|
|
+ type="warning"
|
|
|
+ size="small"
|
|
|
+ v-if="goodsForm.status > 0"
|
|
|
+ :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
|
|
|
+ @click="confirmChange"
|
|
|
+ >变更
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh add-customer-btn"
|
|
|
type="success"
|
|
|
- v-if="goodsForm.status === 0"
|
|
|
+ v-if="goodsForm.status === 0 && typeTwo === false"
|
|
|
size="small"
|
|
|
- style="margin-right: 70px;"
|
|
|
+ style="margin-right: 80px;"
|
|
|
@click="submit(true)"
|
|
|
>提交
|
|
|
</el-button>
|
|
@@ -25,18 +34,30 @@
|
|
|
type="success"
|
|
|
v-if="goodsForm.status === 1"
|
|
|
size="small"
|
|
|
- style="margin-right: 70px;"
|
|
|
+ style="margin-right: 80px;"
|
|
|
@click="submit(false)"
|
|
|
>取消提交
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
- type="primary"
|
|
|
- :disabled="goodsForm.status === 1 || type"
|
|
|
- size="small"
|
|
|
- @click="editCustomer"
|
|
|
- >保存
|
|
|
- </el-button>
|
|
|
+ <div class="el-button--small-yh add-customer-btn">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :disabled="goodsForm.status > 1"
|
|
|
+ size="small"
|
|
|
+ :loading="type"
|
|
|
+ v-if="!typeTwo"
|
|
|
+ @click="editCustomer"
|
|
|
+ >保存
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :disabled="goodsForm.status === 1"
|
|
|
+ size="small"
|
|
|
+ v-else
|
|
|
+ :loading="type"
|
|
|
+ @click="changeSaving"
|
|
|
+ >变更保存
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<containerTitle
|
|
@@ -168,9 +189,9 @@
|
|
|
<!-- <template slot="landWeightHeader" slot-scope="{column}">-->
|
|
|
<!-- {{ column.label }}<span style="color:#F56C6C">*</span>-->
|
|
|
<!-- </template>-->
|
|
|
-<!-- <template slot="landAmountDHeader" slot-scope="{column}">-->
|
|
|
-<!-- {{ column.label }}<span style="color:#F56C6C">*</span>-->
|
|
|
-<!-- </template>-->
|
|
|
+ <!-- <template slot="landAmountDHeader" slot-scope="{column}">-->
|
|
|
+ <!-- {{ column.label }}<span style="color:#F56C6C">*</span>-->
|
|
|
+ <!-- </template>-->
|
|
|
<template slot="arrivalTimeHeader" slot-scope="{column}">
|
|
|
{{ column.label }}<span style="color:#F56C6C">*</span>
|
|
|
</template>
|
|
@@ -328,7 +349,7 @@
|
|
|
<basic-container>
|
|
|
<el-tabs v-model="activeIndex" @tab-click="handleSelect">
|
|
|
<el-tab-pane label="应收" name="1"></el-tab-pane>
|
|
|
-<!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
|
|
|
+ <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
|
|
|
</el-tabs>
|
|
|
<avue-crud
|
|
|
v-if="activeIndex === '1'"
|
|
@@ -361,21 +382,21 @@
|
|
|
<span v-else>{{ row.feeName }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="text"-->
|
|
|
-<!-- size="small"-->
|
|
|
-<!-- :disabled="goodsForm.status === 1"-->
|
|
|
-<!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
|
|
|
-<!-- @click="rowCell(row,index)"-->
|
|
|
-<!-- >{{ row.$cellEdit ? '保存' : '编辑' }}-->
|
|
|
-<!-- </el-button>-->
|
|
|
-<!-- <el-button type="text"-->
|
|
|
-<!-- icon="el-icon-delete"-->
|
|
|
-<!-- size="small"-->
|
|
|
-<!-- :disabled="goodsForm.status === 1"-->
|
|
|
-<!-- @click="$refs.collection.rowDel(row,index)"-->
|
|
|
-<!-- >删除-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- size="small"-->
|
|
|
+ <!-- :disabled="goodsForm.status === 1"-->
|
|
|
+ <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
|
|
|
+ <!-- @click="rowCell(row,index)"-->
|
|
|
+ <!-- >{{ row.$cellEdit ? '保存' : '编辑' }}-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!-- <el-button type="text"-->
|
|
|
+ <!-- icon="el-icon-delete"-->
|
|
|
+ <!-- size="small"-->
|
|
|
+ <!-- :disabled="goodsForm.status === 1"-->
|
|
|
+ <!-- @click="$refs.collection.rowDel(row,index)"-->
|
|
|
+ <!-- >删除-->
|
|
|
+ <!-- </el-button>-->
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="text"
|
|
@@ -385,12 +406,12 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- icon="el-icon-plus"-->
|
|
|
-<!-- :disabled="goodsForm.status !== 0"-->
|
|
|
-<!-- @click="addRowCollection"-->
|
|
|
-<!-- size="small">录入明细</el-button>-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- icon="el-icon-plus"-->
|
|
|
+ <!-- :disabled="goodsForm.status !== 0"-->
|
|
|
+ <!-- @click="addRowCollection"-->
|
|
|
+ <!-- size="small">录入明细</el-button>-->
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<avue-crud
|
|
@@ -447,7 +468,8 @@
|
|
|
icon="el-icon-plus"
|
|
|
:disabled="goodsForm.status === 1"
|
|
|
@click="addRowPayment"
|
|
|
- size="small">录入明细</el-button>
|
|
|
+ size="small">录入明细
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -487,7 +509,7 @@ import {
|
|
|
detailDelegationList,
|
|
|
removeCollection,
|
|
|
saveSaveList,
|
|
|
- addressList, cancelSubmission, getCorp, getSalesman, getFee
|
|
|
+ addressList, cancelSubmission, getCorp, getSalesman, getFee, changeSubmission, validChange
|
|
|
} from "@/api/landTransportation";
|
|
|
import {getDeptTree} from "@/api/system/dept";
|
|
|
import website from "@/config/website";
|
|
@@ -503,9 +525,10 @@ export default {
|
|
|
activeIndex: '1',
|
|
|
KeyBox: 0,
|
|
|
KeyBoxTwo: 0,
|
|
|
+ typeTwo: false,
|
|
|
type: false,
|
|
|
enclosure: false,
|
|
|
- orderList:[],
|
|
|
+ orderList: [],
|
|
|
goodsForm: {},
|
|
|
modelKey: 1,
|
|
|
orderFilesList: [],
|
|
@@ -626,22 +649,22 @@ export default {
|
|
|
defaultTime: ['00:00:00', '23:59:59'],
|
|
|
format: "yyyy-MM-dd HH:mm:ss",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- index:3,
|
|
|
+ index: 3,
|
|
|
width: 140,
|
|
|
}, {
|
|
|
label: '车号',
|
|
|
width: 150,
|
|
|
- index:4,
|
|
|
+ index: 4,
|
|
|
prop: 'plateNo'
|
|
|
}, {
|
|
|
label: '司机',
|
|
|
width: 115,
|
|
|
- index:5,
|
|
|
+ index: 5,
|
|
|
prop: 'driverName'
|
|
|
}, {
|
|
|
label: '电话',
|
|
|
width: 160,
|
|
|
- index:6,
|
|
|
+ index: 6,
|
|
|
prop: 'tel'
|
|
|
}, {
|
|
|
label: '完工日期',
|
|
@@ -1611,7 +1634,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status === 1
|
|
|
+
|
|
|
+
|
|
|
+ this.goodsOptionFormC.disabled = true
|
|
|
+ this.goodsOptionForm.disabled = true
|
|
|
+ this.goodsOptionFormTwo.disabled = true
|
|
|
+ this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status >= 1
|
|
|
delete this.goodsForm.orderAddressList
|
|
|
delete this.goodsForm.itemList
|
|
|
delete this.goodsForm.orderFeeList
|
|
@@ -1694,7 +1722,6 @@ export default {
|
|
|
orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
}).then(res => {
|
|
|
this.$message.success('保存成功');
|
|
|
- this.goodsForm = {}
|
|
|
if (!this.goodsForm.id) {
|
|
|
this.id = res.data.data
|
|
|
this.refreshData()
|
|
@@ -1703,6 +1730,53 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //确认变更
|
|
|
+ confirmChange() {
|
|
|
+ validChange().then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.goodsForm.status = 0
|
|
|
+ this.goodsOptionFormC.disabled = false
|
|
|
+ this.goodsOptionForm.disabled = false
|
|
|
+ this.goodsOptionFormTwo.disabled = false
|
|
|
+ this.typeTwo = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //变更保存
|
|
|
+ changeSaving() {
|
|
|
+ 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
|
|
|
+ })
|
|
|
+ this.type = true
|
|
|
+ delete this.goodsForm.status
|
|
|
+ changeSubmission({
|
|
|
+ ...this.goodsForm,
|
|
|
+ kind: '1',
|
|
|
+ orderAddressList: data,
|
|
|
+ fileList: this.orderFilesList,
|
|
|
+ itemList: this.entrustList,
|
|
|
+ orderItemList: this.vehicleList,
|
|
|
+ orderFeeList: this.collectionList.concat(this.paymentList)
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success('保存成功');
|
|
|
+ this.typeTwo = false
|
|
|
+ this.refreshData()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//提交委托
|
|
|
submit(type) {
|
|
|
if (type) {
|
|
@@ -1778,7 +1852,8 @@ export default {
|
|
|
this.refreshData()
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//收费新增
|
|
|
addRowCollection() {
|
|
|
this.$refs.collection.rowCellAdd({
|
|
@@ -1786,14 +1861,16 @@ export default {
|
|
|
type: '1',
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//打开附件
|
|
|
- annexOpen(row, index){
|
|
|
+ annexOpen(row, index) {
|
|
|
this.enclosure = true
|
|
|
- getFee({id:row.id}).then(res=>{
|
|
|
+ getFee({id: row.id}).then(res => {
|
|
|
this.orderList = res.data.data
|
|
|
})
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//付费新增
|
|
|
addRowPayment() {
|
|
|
this.$refs.payment.rowCellAdd({
|
|
@@ -1801,15 +1878,18 @@ export default {
|
|
|
type: '2',
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//选择费用
|
|
|
selectValue(value, row) {
|
|
|
this.$set(row, 'feeName', value.cname)
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//选择客户信息触发
|
|
|
getfleetId(data, row) {
|
|
|
this.$set(row, 'corpName', data.cname)
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//收款信息移除
|
|
|
makeDel(row, index) {
|
|
|
this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
|
|
@@ -1825,7 +1905,8 @@ export default {
|
|
|
message: '已取消删除'
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//付款信息移除
|
|
|
feeDel(row, index) {
|
|
|
this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
|
|
@@ -1841,24 +1922,26 @@ export default {
|
|
|
message: '已取消删除'
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//选择公司名称带出所属公司
|
|
|
getCorpData(row) {
|
|
|
this.goodsForm.belongCompany = row.belongCompany
|
|
|
this.goodsForm.salesman = ''
|
|
|
//查询业务员
|
|
|
this.salesmanQuery()
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//选择地址客户带出地址
|
|
|
withAddress(row, scope) {
|
|
|
- this.$set(this.tableData[scope.$index],'contacts',row.attn)
|
|
|
- this.$set(this.tableData[scope.$index],'tel',row.tel)
|
|
|
- this.$set(this.tableData[scope.$index],'address',row.storageAddr)
|
|
|
+ this.$set(this.tableData[scope.$index], 'contacts', row.attn)
|
|
|
+ this.$set(this.tableData[scope.$index], 'tel', row.tel)
|
|
|
+ this.$set(this.tableData[scope.$index], 'address', row.storageAddr)
|
|
|
// this.tableData[scope.$index].contacts = row.attn
|
|
|
// this.tableData[scope.$index].tel = row.tel
|
|
|
// this.tableData[scope.$index].address = row.storageAddr
|
|
|
if (!scope.row.key) scope.row.key = 0
|
|
|
- this.$set(this.tableData[scope.$index],'corpName',row.cname)
|
|
|
+ this.$set(this.tableData[scope.$index], 'corpName', row.cname)
|
|
|
// this.tableData[scope.$index].corpName = row.cname
|
|
|
if (row.belongtoarea) {
|
|
|
addressList(row.belongtoarea.split(',')[0]).then(res => {
|
|
@@ -1866,7 +1949,8 @@ export default {
|
|
|
scope.row.key++
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//自定义表头
|
|
|
renderHeader(h) {
|
|
|
return (
|
|
@@ -1877,7 +1961,8 @@ export default {
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
)
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
//自定义表头
|
|
|
customTitle(h, {column, $index}) {
|
|
|
let text = column.label
|