From c104a0c4a325eaf845d1c29695df2692be8301b3 Mon Sep 17 00:00:00 2001 From: shenhailong <939224067@qq.com> Date: Thu, 26 Mar 2020 18:15:06 +0800 Subject: [PATCH] 主单新增分单问题 --- src/views/nmms/ExitPre.vue | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/views/nmms/ExitPre.vue b/src/views/nmms/ExitPre.vue index 42b6ee6..c80033a 100644 --- a/src/views/nmms/ExitPre.vue +++ b/src/views/nmms/ExitPre.vue @@ -63,8 +63,10 @@ </el-table-column> <el-table-column label="运单号" width="120" align="center"> <template slot-scope="scope"> - <p class="tableInline">{{scope.row.awba}}</p> - <p class="tableInline" v-if="scope.row.awbh !==null">{{scope.row.awbh}}</p> + + + <p class="tableInline" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</p> + <p class="tableInline" v-else>{{scope.row.awba}}</p> </template> </el-table-column> <el-table-column label="运单件数/重量" width="100" align="center"> @@ -119,13 +121,13 @@ <el-table-column prop="receipt" label="回执信息" align="center"> <template slot-scope="scope"> {{scope.row.ext5}} - <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> </template> </el-table-column> <el-table-column label="操作" width="450"> <template slot-scope="scope"> + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> <el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑</el-button> - <el-button size="mini" type="success" v-if="scope.row.awbh ===null" + <el-button size="mini" type="success" v-if="scope.row.awbh ===''" @click="handleAddAwbh(scope.row)">新增分单 </el-button> <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" @@ -167,7 +169,7 @@ <el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/> </el-form-item> </el-col> - <el-col :span="7.5" v-if="dialogStatus === 'addAwbh'"> + <el-col :span="7.5" v-if="fenStatus === 'addAwbh'"> <el-form-item label="分单号" prop="awbh"> <el-input v-model="awbh" clearable/> </el-form-item> @@ -179,17 +181,17 @@ <el-row> <el-col :span="7.5"> <el-form-item label="承运人" prop="carrier"> - <el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/> + <el-input v-model="carrier" :disabled="fenStatus === 'addAwbh'" clearable/> </el-form-item> </el-col> <el-col :span="7.5"> <el-form-item label="航班号" prop="flightno"> - <el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/> + <el-input v-model="flightno" :disabled="fenStatus === 'addAwbh'" clearable/> </el-form-item> </el-col> <el-col :span="7.5"> <el-form-item label="航班日期" prop="flightdate"> - <el-date-picker :disabled="dialogStatus === 'addAwbh'" + <el-date-picker :disabled="fenStatus === 'addAwbh'" value-format="yyyy-MM-dd" v-model="preModel.flightdate" align="right" type="date" placeholder="请输入航班日期" clearable/> @@ -210,7 +212,7 @@ :loading="airportLoading"> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" - :value="item.airportid" :disabled="dialogStatus === 'addAwbh'"> + :value="item.airportid" :disabled="fenStatus === 'addAwbh'"> <span style="float: left">{{ item.airportdescchn }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span> </el-option> @@ -223,7 +225,7 @@ v-model="destinationstation" :remote-method="remoteMethodAirport"> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" - :value="item.airportid" :disabled="dialogStatus === 'addAwbh'" > + :value="item.airportid" :disabled="fenStatus === 'addAwbh'" > <span style="float: left">{{ item.airportdescchn }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span> </el-option> @@ -294,12 +296,12 @@ </el-col> </el-row> <el-row> - <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'"> + <el-col :span="7.5" v-if="fenStatus !=='addAwbh'"> <el-form-item label="预配件数" prop="piece"> <el-input v-model="preModel.piece" clearable/> </el-form-item> </el-col> - <el-col :span="8" v-if="dialogStatus ==='addAwbh'"> + <el-col :span="8" v-if="fenStatus ==='addAwbh'"> <el-col :span="13"> <el-form-item label="预配件数" prop="piece"> <el-input v-model="preModel.piece" clearable/> @@ -309,12 +311,12 @@ <span>剩余件数:{{awbPiece}}</span> </el-col> </el-col> - <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'"> + <el-col :span="7.5" v-if="fenStatus !=='addAwbh'"> <el-form-item label="预配重量" prop="weight"> <el-input v-model="preModel.weight" clearable/> </el-form-item> </el-col> - <el-col :span="8" v-if="dialogStatus ==='addAwbh'"> + <el-col :span="8" v-if="fenStatus ==='addAwbh'"> <el-col :span="13"> <el-form-item label="预配重量" prop="weight"> <el-input v-model="preModel.weight" clearable/> @@ -338,7 +340,7 @@ <el-form-item label="关区代码" prop="customcode"> <el-select v-model="preModel.customcode" placeholder="请选择关区代码" filterable clearable :remote-method="remoteMethodCustomCode" :loading="customLoading" remote - :disabled="dialogStatus === 'addAwbh'"> + :disabled="fenStatus === 'addAwbh'"> <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode" :value="item.customcode"> <span style="float: left">{{ item.customcode }}</span> @@ -741,6 +743,7 @@ customCodeList: [], airportCode:[], dialogStatus: undefined, + fenStatus:undefined, dialogTableVisible: false, dialogDeleteVisble: false, listLoading: false, @@ -784,6 +787,7 @@ 'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}], }, preModel: { + uuid: undefined, awba: undefined, awbh: undefined, customcode: undefined, @@ -1483,6 +1487,7 @@ handleAddAwbh(row) { this.restModel() const template = Object.assign({}, row) // copy obj + this.preModel.uuid = template.uuid this.preModel.awba = template.awba this.preModel.flightdate = template.flightdate this.preModel.flightno = template.flightno @@ -1520,7 +1525,8 @@ this.awbWeight = res.data.dataList[0].weight - residueWeight } }) - this.dialogStatus = 'addAwbh' + this.dialogStatus = 'create' + this.fenStatus = 'addAwbh' this.dialogFormVisible = true this.$nextTick(() => { this.$refs.preFormData.clearValidate() -- libgit2 0.24.0