|
@@ -937,6 +937,9 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(this.endflag){
|
|
|
|
+
|
|
|
|
+
|
|
this.$confirm(`运输任务提交成功后将派发到物流部门,是否确定提交?`, {
|
|
this.$confirm(`运输任务提交成功后将派发到物流部门,是否确定提交?`, {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -1027,6 +1030,98 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
return false
|
|
return false
|
|
})
|
|
})
|
|
|
|
+ }else{
|
|
|
|
+ this.$confirm(`您还未选择最终阶段,是否确定提交??`, {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.deptBudgetList.compId =
|
|
|
|
+ sessionStorage.getItem('ws-pf_compId')
|
|
|
|
+ this.deptBudgetList.tranType = this.checkList.toString()
|
|
|
|
+ this.deptBudgetList.startPrivate =
|
|
|
|
+ CodeToText[this.selectedOptions[0]]
|
|
|
|
+ this.deptBudgetList.startCity =
|
|
|
|
+ CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.deptBudgetList.startArea =
|
|
|
|
+ CodeToText[this.selectedOptions[2]]
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].sendPrivate =
|
|
|
|
+ CodeToText[this.selectedOptions[0]]
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].sendCity =
|
|
|
|
+ CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].sendArea =
|
|
|
|
+ CodeToText[this.selectedOptions[2]]
|
|
|
|
+ if (this.endflag) {
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].receivePrivate = CodeToText[this.selectedOptions1[0]]
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].receiveCity = CodeToText[this.selectedOptions1[1]]
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].receiveArea = CodeToText[this.selectedOptions1[2]]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (
|
|
|
|
+ var i = 0;
|
|
|
|
+ i < this.deptBudgetList.tranProcessInfoList.length;
|
|
|
|
+ i++
|
|
|
|
+ ) {
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[i].sort = i
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ addtrantask(this.deptBudgetList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('添加成功')
|
|
|
|
+ this.deptBudgetList = {
|
|
|
|
+ taskNo: '',
|
|
|
|
+ totalStorage: 0,
|
|
|
|
+ goodsName: '玉米',
|
|
|
|
+ goodsNameKey: 1,
|
|
|
|
+ warehouseType: '1',
|
|
|
|
+ tranProcessInfoList: [
|
|
|
|
+ {
|
|
|
|
+ processNo: '',
|
|
|
|
+ tranType: '汽运',
|
|
|
|
+ deliveryDateStart: '',
|
|
|
|
+ deliveryDateEnd: '',
|
|
|
|
+ weight: '',
|
|
|
|
+ selectedOptions: [],
|
|
|
|
+ selectedOptions1: [],
|
|
|
|
+ sendPrivate: '',
|
|
|
|
+ sendCity: '',
|
|
|
|
+ sendArea: '',
|
|
|
|
+ receivePrivate: '',
|
|
|
|
+ receiveCity: '',
|
|
|
|
+ receiveArea: '',
|
|
|
|
+ sendDetailedAddress: '',
|
|
|
|
+ receiveDetailedAddress: '',
|
|
|
|
+ sender: '',
|
|
|
|
+ receiver: '',
|
|
|
|
+ senderPhone: '',
|
|
|
|
+ receiverPhone: '',
|
|
|
|
+ contractNo: '',
|
|
|
|
+ receiveWarehouse: '',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ this.$router.push({ path: 'tranManagementTransport' })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
resetForm(deptBudgetList) {
|
|
resetForm(deptBudgetList) {
|
|
this.$refs[deptBudgetList].resetFields()
|
|
this.$refs[deptBudgetList].resetFields()
|