|
@@ -153,37 +153,18 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- </ws-info-table>
|
|
|
|
- <ws-info-table>
|
|
|
|
- <div
|
|
|
|
- style="width: 100%"
|
|
|
|
- class="flex position carnum"
|
|
|
|
- v-for="(item1, index) in freightspace"
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
- <!--车厢号-->
|
|
|
|
- <ws-form-item
|
|
|
|
- :label="'车厢号-' + (index + 1)"
|
|
|
|
|
|
+ <ws-form-item
|
|
|
|
+ :label="'车厢号' "
|
|
span="1"
|
|
span="1"
|
|
prop="boxNo"
|
|
prop="boxNo"
|
|
>
|
|
>
|
|
<ws-input
|
|
<ws-input
|
|
- v-model="item1.trainNo"
|
|
|
|
|
|
+ v-model="item.boxNo"
|
|
placeholder="请输入车厢号"
|
|
placeholder="请输入车厢号"
|
|
maxlength="20"
|
|
maxlength="20"
|
|
size="small"
|
|
size="small"
|
|
/>
|
|
/>
|
|
- <span
|
|
|
|
- width="22"
|
|
|
|
- height="22"
|
|
|
|
- class="del"
|
|
|
|
- @click="del(index)"
|
|
|
|
- src="../../../public/img/del.png"
|
|
|
|
- alt=""
|
|
|
|
- >×</span
|
|
|
|
- >
|
|
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- </div>
|
|
|
|
</ws-info-table>
|
|
</ws-info-table>
|
|
</div>
|
|
</div>
|
|
<el-button class="add bg-bottom" type="primary" size="small" @click="add">
|
|
<el-button class="add bg-bottom" type="primary" size="small" @click="add">
|
|
@@ -197,7 +178,7 @@
|
|
class="bg-bottom"
|
|
class="bg-bottom"
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
- @click="submit(deptBudgetList)"
|
|
|
|
|
|
+ @click="submit()"
|
|
>提交</el-button
|
|
>提交</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -253,7 +234,6 @@ export default {
|
|
},
|
|
},
|
|
size: 10,
|
|
size: 10,
|
|
unitList: [],
|
|
unitList: [],
|
|
- freightspace: [],
|
|
|
|
name: '',
|
|
name: '',
|
|
list: [],
|
|
list: [],
|
|
staffList: [],
|
|
staffList: [],
|
|
@@ -315,8 +295,14 @@ export default {
|
|
// this.dialogViewSpareMoney = false
|
|
// this.dialogViewSpareMoney = false
|
|
// },
|
|
// },
|
|
add() {
|
|
add() {
|
|
- this.freightspace.push({
|
|
|
|
- trainNo: '',
|
|
|
|
|
|
+ this.deptBudgetList.tranCarInfoList.push({
|
|
|
|
+ driver:this.deptBudgetList.tranCarInfoList[0].driver,
|
|
|
|
+ driverPhone:this.deptBudgetList.tranCarInfoList[0].driverPhone,
|
|
|
|
+ sendDateStart:this.deptBudgetList.tranCarInfoList[0].sendDateStart,
|
|
|
|
+ receiveDateEnd:this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
|
|
|
|
+ carModel:this.deptBudgetList.tranCarInfoList[0].carModel,
|
|
|
|
+ boxNo: '',
|
|
|
|
+ tranType: "2"
|
|
})
|
|
})
|
|
},
|
|
},
|
|
del(index) {
|
|
del(index) {
|
|
@@ -338,7 +324,7 @@ export default {
|
|
uploadSuccess(data, files, url) {
|
|
uploadSuccess(data, files, url) {
|
|
console.log(data, files, url)
|
|
console.log(data, files, url)
|
|
},
|
|
},
|
|
- submit(deptBudgetList) {
|
|
|
|
|
|
+ submit() {
|
|
for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
|
|
for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
|
|
if (!this.deptBudgetList.tranCarInfoList[i].driver) {
|
|
if (!this.deptBudgetList.tranCarInfoList[i].driver) {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -388,10 +374,8 @@ export default {
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (var j = 0; j < this.freightspace.length; j++) {
|
|
|
|
- if (!this.freightspace[j].trainNo) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.tranCarInfoList[i].boxNo) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '车厢号不能为空',
|
|
message: '车厢号不能为空',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
@@ -399,7 +383,6 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
|
|
this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -408,31 +391,10 @@ export default {
|
|
.then(() => {
|
|
.then(() => {
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- for (var i = 0; i < this.freightspace.length; i++) {
|
|
|
|
- var num = this.freightspace[i].trainNo
|
|
|
|
- this.arr.push(num)
|
|
|
|
- }
|
|
|
|
- this.deptBudgetList.totalStorage = this.totalStorage
|
|
|
|
- this.tranCarInfoList.driver =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].driver
|
|
|
|
- this.tranCarInfoList.driverPhone =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].driverPhone
|
|
|
|
- this.tranCarInfoList.sendDateStart =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].sendDateStart
|
|
|
|
- this.tranCarInfoList.receiveDateEnd =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
|
|
|
|
- this.tranCarInfoList.carModel =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].carModel.toString()
|
|
|
|
- this.tranCarInfoList.id =
|
|
|
|
- this.deptBudgetList.tranCarInfoList[0].id
|
|
|
|
- this.tranCarInfoList.tranType = this.tranType
|
|
|
|
- this.tranCarInfoList.boxNo = this.arr.toString()
|
|
|
|
var tranCarInfo = {}
|
|
var tranCarInfo = {}
|
|
- var tranList = [this.tranCarInfoList]
|
|
|
|
tranCarInfo.id = this.deptBudgetList.id
|
|
tranCarInfo.id = this.deptBudgetList.id
|
|
tranCarInfo.infoId = this.deptBudgetList.infoId
|
|
tranCarInfo.infoId = this.deptBudgetList.infoId
|
|
- tranCarInfo.tranCarInfoList = tranList
|
|
|
|
- // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
|
|
|
|
|
|
+ tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
|
|
dispatchCat(tranCarInfo)
|
|
dispatchCat(tranCarInfo)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
@@ -458,15 +420,6 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.deptBudgetList = response
|
|
this.deptBudgetList = response
|
|
if (response.tranCarInfoList.length > 0) {
|
|
if (response.tranCarInfoList.length > 0) {
|
|
- if (response.tranCarInfoList[0].boxNo) {
|
|
|
|
- this.list = response.tranCarInfoList[0].boxNo.split(',')
|
|
|
|
- for (var i = 0; i < this.list.length; i++) {
|
|
|
|
- var num = this.list[i]
|
|
|
|
- this.freightspace.push({
|
|
|
|
- trainNo: num,
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
} else {
|
|
} else {
|
|
this.deptBudgetList.tranCarInfoList = [
|
|
this.deptBudgetList.tranCarInfoList = [
|
|
{
|
|
{
|
|
@@ -475,13 +428,7 @@ export default {
|
|
sendDateStart: '',
|
|
sendDateStart: '',
|
|
receiveDateEnd: '',
|
|
receiveDateEnd: '',
|
|
carModel: '',
|
|
carModel: '',
|
|
- },
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- if (!this.deptBudgetList.tranCarInfoList[0].boxNo) {
|
|
|
|
- this.freightspace = [
|
|
|
|
- {
|
|
|
|
- trainNo: '',
|
|
|
|
|
|
+ boxNo: '',
|
|
},
|
|
},
|
|
]
|
|
]
|
|
}
|
|
}
|