This commit is contained in:
cun-nan 2024-10-31 17:53:24 +08:00
parent 6ea3834783
commit ca88835387
2 changed files with 36 additions and 18 deletions

View File

@ -100,12 +100,12 @@
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="25%"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-form :model="gunForm" :rules="rules" ref="gunForm" label-width="100px" class="demo-ruleForm">
<el-form :model="gunForm" :rules="rules" ref="gunForm" label-width="110px" class="demo-ruleForm">
<el-form-item label="油枪名称" prop="gunName">
<el-input style="width: 300px" placeholder="请输入内容" v-model="gunForm.gunName" class="input-with-select">
<el-input placeholder="请输入内容" v-model="gunForm.gunName" class="input-with-select">
<el-select style="width: 110px" v-model="gunForm.select" slot="append" placeholder="选择油枪"
@change="chooseName">
<el-option
@ -117,18 +117,18 @@
</el-select>
</el-input>
</el-form-item>
<el-form-item label="关联油品油号" prop="tankId">
<el-select style="width: 300px" v-model="gunForm.tankId" placeholder="请选择所属油罐">
<el-form-item label="关联油品油号" prop="numberId">
<el-select v-model="gunForm.numberId" style="width: 100%" placeholder="请选择油品油号" @change="changeNumber(gunForm.numberId)">
<el-option
v-for="option in tankList"
:key="option.id"
:label="option.tankName"
:value="option.id"
v-for="option in selectOilTypeByPrice"
:key="option.numberId"
:label="option.oilType +' '+option.oilName"
:value="option.numberId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属油罐" prop="tankId">
<el-select style="width: 300px" v-model="gunForm.tankId" placeholder="请选择所属油罐">
<el-select style="width: 100%" v-model="gunForm.tankId" placeholder="请选择所属油罐" @change="changeTank">
<el-option
v-for="option in tankList"
:key="option.id"
@ -145,8 +145,8 @@
<el-select
v-model="staffIds"
clearable
placeholder=""
style="width: 300px"
placeholder="请选择员工(多选)"
style="width: 100%"
multiple
collapse-tags
>
@ -172,22 +172,22 @@
v-model="gunForm.deviceId"
clearable
placeholder=""
style="width: 300px"
style="width: 100%"
>
<el-option v-for="item in youjiList" :key="item.id" :label="item.deviceName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备枪号" prop="name">
<el-input style="width: 300px" v-model="gunForm.oilMachineGunNumber"></el-input>
<div style="font-size: 12px;width: 300px; color: #999999">
<el-input v-model="gunForm.oilMachineGunNumber"></el-input>
<div style="font-size: 12px;width: 100%; color: #999999;line-height: 22px">
请确保输入的集线器正确的枪号否则出现设备显示屏与一件加油页面显示数据不一致例如00010002···
</div>
</el-form-item>
<el-form-item>
<div style="text-align: center">
<el-button @click="dialogVisible = false,getList()"> </el-button>
<el-button type="primary" @click="submitForm()"></el-button>
</el-form-item>
<el-button type="primary" @click="submitForm()"></el-button>
</div>
</el-form>
</el-dialog>
</div>
@ -278,6 +278,9 @@ export default {
tankId: [
{required: true, message: '请选择所属油罐', trigger: 'change'}
],
numberId: [
{required: true, message: '请选择关联油品油号', trigger: 'change'}
],
}
}
},
@ -297,6 +300,18 @@ export default {
}
},
methods: {
changeTank(){
// numberId
for (let tankListKey in this.tankList) {
if (parseInt(this.gunForm.tankId) === parseInt(this.tankList[tankListKey].id)) {
this.gunForm.numberId = parseInt(this.tankList[tankListKey].numberId);
}
}
},
changeNumber(numberId){
this.gunForm.tankId = ''
this.selectTankByNumber(numberId)
},
getOilNameList() {
var this_ = this
getOilNameListApi().then(response => {

View File

@ -67,6 +67,9 @@ public class FleetLinesChange implements Serializable {
@ApiModelProperty(value = "被调整额度的用户id")
private Integer userId;
@ApiModelProperty(value = "订单号")
private String orderNo;
}