|
@@ -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
|
|
@@ -487,7 +508,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,6 +524,7 @@ export default {
|
|
|
activeIndex: '1',
|
|
|
KeyBox: 0,
|
|
|
KeyBoxTwo: 0,
|
|
|
+ typeTwo:false,
|
|
|
type: false,
|
|
|
enclosure: false,
|
|
|
orderList:[],
|
|
@@ -1611,7 +1633,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 +1721,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 +1729,39 @@ 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(){
|
|
|
+ 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()
|
|
|
+ })
|
|
|
+ },
|
|
|
//提交委托
|
|
|
submit(type) {
|
|
|
if (type) {
|