|
@@ -144,34 +144,26 @@
|
|
|
>
|
|
|
<ws-input v-model="item.boxNumber" placeholder="请输入数量" class="ys"></ws-input>
|
|
|
</ws-form-item>
|
|
|
- <!-- </ws-info-table> -->
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style=" width: 536px;"
|
|
|
- class="xia"
|
|
|
- v-for="(items, index) in freightspace"
|
|
|
- v-show="item.shipType=='散船'"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <ws-info-table>
|
|
|
- <ws-form-item :label="'仓位号-'+ (index +1 )" span="1" prop="impurity" class="bot">
|
|
|
- <el-input v-model="items.impurity"></el-input>
|
|
|
- </ws-form-item>
|
|
|
- <ws-form-item label="重量(吨)" span="1" prop="positionWeight" class="bot">
|
|
|
- <el-input v-model="items.positionWeight"></el-input>
|
|
|
- </ws-form-item>
|
|
|
- <span
|
|
|
- width="22"
|
|
|
- height="22"
|
|
|
- class="del"
|
|
|
- @click="del(index)"
|
|
|
- src="../../../public/img/del.png"
|
|
|
- alt
|
|
|
- >×</span>
|
|
|
- </ws-info-table>
|
|
|
+ <ws-form-item label="仓位号" span="1" prop="binNumber" v-show="item.shipType=='散船'" class="biao6">
|
|
|
+ <ws-input
|
|
|
+ v-model="item.binNumber"
|
|
|
+ placeholder="请输入仓位号"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ style="width: 110px;"
|
|
|
+ ></ws-input>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="重量(吨)" span="1" prop="positionWeight" v-show="item.shipType=='散船'" class="biao7">
|
|
|
+ <ws-input
|
|
|
+ v-model="item.positionWeight"
|
|
|
+ placeholder="请输入重量"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ class="ys"
|
|
|
+ ></ws-input>
|
|
|
+ </ws-form-item>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
class="add bg-bottom"
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -181,7 +173,6 @@
|
|
|
<img width="22" height="22" src="../../../public/img/add.png" alt />
|
|
|
<div class="spans">添加仓位</div>
|
|
|
</el-button>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</ws-form>
|
|
@@ -352,22 +343,22 @@ export default {
|
|
|
.then(response => {
|
|
|
this.deptBudgetList = response
|
|
|
if (response.tranCarInfoList.length > 0) {
|
|
|
- for (
|
|
|
- var i = 0;
|
|
|
- i < this.deptBudgetList.tranCarInfoList.length;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- var num = this.deptBudgetList.tranCarInfoList[
|
|
|
- i
|
|
|
- ].positionWeight.split(',')
|
|
|
- for (var j = 0; j < num.length; j++) {
|
|
|
- var num2 = num[j].split('/')
|
|
|
- this.freightspace.push({
|
|
|
- impurity: num2[i],
|
|
|
- positionWeight: num2[num2.length - 1]
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (
|
|
|
+ // var i = 0;
|
|
|
+ // i < this.deptBudgetList.tranCarInfoList.length;
|
|
|
+ // i++
|
|
|
+ // ) {
|
|
|
+ // var num = this.deptBudgetList.tranCarInfoList[
|
|
|
+ // i
|
|
|
+ // ].positionWeight.split(',')
|
|
|
+ // for (var j = 0; j < num.length; j++) {
|
|
|
+ // var num2 = num[j].split('/')
|
|
|
+ // this.freightspace.push({
|
|
|
+ // impurity: num2[i],
|
|
|
+ // positionWeight: num2[num2.length - 1]
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
} else {
|
|
|
this.deptBudgetList.tranCarInfoList = [
|
|
|
{
|
|
@@ -380,7 +371,7 @@ export default {
|
|
|
shipType: '',
|
|
|
boxNumber: '',
|
|
|
positionWeight: '',
|
|
|
- impurity: '',
|
|
|
+ binNumber: '',
|
|
|
tranType: '3'
|
|
|
}
|
|
|
]
|
|
@@ -398,8 +389,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
add() {
|
|
|
- this.freightspace.push({
|
|
|
- impurity: ''
|
|
|
+ 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,
|
|
|
+ shipNo: this.deptBudgetList.tranCarInfoList[0].shipNo,
|
|
|
+ shipName: this.deptBudgetList.tranCarInfoList[0].shipName,
|
|
|
+ shipType: this.deptBudgetList.tranCarInfoList[0].shipType,
|
|
|
+ binNumber:'',
|
|
|
+ positionWeight: '',
|
|
|
+ tranType: '3'
|
|
|
})
|
|
|
},
|
|
|
selectdriver() {},
|
|
@@ -474,15 +474,15 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// console.log(this.freightspace,"仓位号")
|
|
|
- for (var i = 0; i < this.freightspace.length; i++) {
|
|
|
- if (!this.freightspace[i].impurity) {
|
|
|
+ if (this.deptBudgetList.tranCarInfoList[i].shipType == '散船') {
|
|
|
+ if (!this.deptBudgetList.tranCarInfoList[i].binNumber) {
|
|
|
this.$message({
|
|
|
message: '仓位号不能为空',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.freightspace[i].positionWeight) {
|
|
|
+ if (!this.deptBudgetList.tranCarInfoList[i].positionWeight) {
|
|
|
this.$message({
|
|
|
message: '重量不能为空',
|
|
|
type: 'warning'
|
|
@@ -514,31 +514,11 @@ export default {
|
|
|
.then(() => {
|
|
|
this.$refs.deptBudgetList.validate(valid => {
|
|
|
if (valid) {
|
|
|
- for (var i = 0; i < this.freightspace.length; i++) {
|
|
|
- var num =
|
|
|
- this.freightspace[i].impurity +
|
|
|
- '/' +
|
|
|
- this.freightspace[i].positionWeight
|
|
|
- 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.shipName = this.deptBudgetList.tranCarInfoList[0].shipName
|
|
|
- this.tranCarInfoList.shipNo = this.deptBudgetList.tranCarInfoList[0].shipNo
|
|
|
- this.tranCarInfoList.id = this.deptBudgetList.tranCarInfoList[0].id
|
|
|
- this.tranCarInfoList.tranType = this.deptBudgetList.tranCarInfoList[0].tranType
|
|
|
- this.tranCarInfoList.boxNumber = this.deptBudgetList.tranCarInfoList[0].boxNumber
|
|
|
- this.tranCarInfoList.shipType = this.deptBudgetList.tranCarInfoList[0].shipType
|
|
|
- this.tranCarInfoList.positionWeight = this.arr.toString()
|
|
|
var tranCarInfo = {}
|
|
|
- var tranList = [this.tranCarInfoList]
|
|
|
tranCarInfo.id = this.deptBudgetList.id
|
|
|
tranCarInfo.infoId = this.deptBudgetList.infoId
|
|
|
- tranCarInfo.tranCarInfoList = tranList
|
|
|
+ tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
|
|
|
dispatchCat(tranCarInfo)
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
@@ -811,6 +791,10 @@ export default {
|
|
|
margin-left: 450px;
|
|
|
margin-top: -57px;
|
|
|
}
|
|
|
+.biao7 {
|
|
|
+ margin-left: 700px;
|
|
|
+ margin-top: -57px;
|
|
|
+}
|
|
|
/deep/.totalStorage .el-input__inner {
|
|
|
color: #afb5cb;
|
|
|
background: #f5f7fa;
|