|
@@ -4,11 +4,25 @@
|
|
|
<page-title>返回</page-title>
|
|
|
<div class="form_box" style="margin-right: 10rem">
|
|
|
<dil-form :formId="357" v-model="form1" ref="from1" @change="onchang"></dil-form>
|
|
|
+ <div class="addbtn">
|
|
|
+ <el-button type="primary" @click="dialogVisible = true">新增油品名称</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="button_box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ title="新增油品名称"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-input v-model="input" placeholder="请输入内容"></el-input>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogCancel">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogMakeSure">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -19,6 +33,10 @@ export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isagain:false,
|
|
|
+ loading:false,
|
|
|
+ input:null,
|
|
|
+ dialogVisible:false,
|
|
|
form1: {
|
|
|
priceOilName:'',
|
|
|
priceValue:'',
|
|
@@ -28,13 +46,30 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ dialogCancel(){
|
|
|
+
|
|
|
+ },
|
|
|
onchang(val){
|
|
|
if(val.enableStatus){
|
|
|
this.$message.warning('确认启用后将停用现在正在执行的油品价格')
|
|
|
}
|
|
|
},
|
|
|
+ dialogMakeSure(){
|
|
|
+ // this.loading = true;
|
|
|
+ // if(this.input){
|
|
|
+ // this.axios.post('',{text:this.input}).then((res)=>{
|
|
|
+ // if(res.data.code == "200"){
|
|
|
+ // this.loading = false;
|
|
|
+ // this.$message.success('新增成功')
|
|
|
+ this.dialogVisible = false;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // this.$message.warning('请输入油品名称')
|
|
|
+ // }
|
|
|
+ },
|
|
|
makeSure() {
|
|
|
- console.log(!isNumber(this.form1.priceValue));
|
|
|
+ this.loading = true;
|
|
|
let state = false;
|
|
|
if(!this.form1.priceOilName){
|
|
|
this.$message.warning('请填写油品名称')
|
|
@@ -50,10 +85,13 @@ export default {
|
|
|
this.axios.post("/api/v1/rms/insertOilPrice" , RmsOilPrice)
|
|
|
.then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
+ this.loading = true;
|
|
|
this.$message.success('新增成功');
|
|
|
this.cancel();
|
|
|
}
|
|
|
});
|
|
|
+ }else{
|
|
|
+ this.loading = true;
|
|
|
}
|
|
|
},
|
|
|
// 取消
|
|
@@ -66,9 +104,10 @@ export default {
|
|
|
<style lang='scss'>
|
|
|
.addWagonLoad{
|
|
|
.form_box{
|
|
|
- margin-left: 40%;
|
|
|
+ margin-left: 35%;
|
|
|
padding-top: 30px;
|
|
|
- width: 310px;
|
|
|
+ width: 470px;
|
|
|
+ display: flex;
|
|
|
.el-form{
|
|
|
.el-form-item{
|
|
|
display: flex;
|
|
@@ -83,6 +122,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .addbtn{
|
|
|
+ margin-left: 30px;
|
|
|
+ }
|
|
|
}
|
|
|
.button_box{
|
|
|
margin-left: 40%;
|