|
@@ -2,9 +2,9 @@
|
|
|
<div>
|
|
|
<el-button :disabled="status !== '新建'" size="small" type="text" @click="onShow">修 改</el-button>
|
|
|
<el-dialog title="修改明细信息" :visible.sync="dialogFormVisible" append-to-body width="400px">
|
|
|
- <el-form :model="form" size="small" label-position="right" label-width="90px">
|
|
|
+ <el-form :model="form" size="small" :rules="rules" ref="form" label-position="right" label-width="90px">
|
|
|
<el-form-item label="含税金额">
|
|
|
- <el-input v-model="form.invoiceamount" autocomplete="off"></el-input>
|
|
|
+ <el-input v-model="form.invoiceamount" disabled autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="含税单价">
|
|
|
<el-input v-model="form.price" autocomplete="off"></el-input>
|
|
@@ -30,7 +30,18 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
dialogFormVisible:false,
|
|
|
- form:{}
|
|
|
+ form:{},
|
|
|
+ rules: {
|
|
|
+ price: [
|
|
|
+ { required: true, message: '含税单价不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ invoiceaqty: [
|
|
|
+ { required: true, message: '数量不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ taxrate: [
|
|
|
+ { required: true, message: '税率不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -44,7 +55,8 @@ export default {
|
|
|
"spec": this.data.spec,
|
|
|
"price": this.data.price,
|
|
|
"invoiceaqty": this.data.num,
|
|
|
- "invoiceamount": this.data.invoiceamount
|
|
|
+ "invoiceamount": this.data.price * this.data.num,
|
|
|
+ "taxrate":this.data.taxrate
|
|
|
}
|
|
|
this.dialogFormVisible = true
|
|
|
}
|