Compare commits
3 Commits
704f3f56d9
...
caolc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38fd12cb33 | ||
|
|
f56dc7bde9 | ||
|
|
865abd6b3e |
@@ -110,7 +110,7 @@
|
|||||||
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd">
|
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd">
|
||||||
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules">
|
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules">
|
||||||
<el-form-item label="预约提货量" prop="preDeliveryQuantity">
|
<el-form-item label="预约提货量" prop="preDeliveryQuantity">
|
||||||
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>元/吨
|
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>吨
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提货人" prop="driverName">
|
<el-form-item label="提货人" prop="driverName">
|
||||||
<el-input v-model="billAddData.driverName"></el-input>
|
<el-input v-model="billAddData.driverName"></el-input>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
元/吨
|
元/吨
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预约提货量">
|
<el-form-item prop="preQuantity" label="预约提货量">
|
||||||
<el-input
|
<el-input
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
v-model="form.preQuantity"
|
v-model="form.preQuantity"
|
||||||
@@ -132,6 +132,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"form.productId": {
|
||||||
|
handler(n, o) {
|
||||||
|
if (n) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
"form.preQuantity": {
|
"form.preQuantity": {
|
||||||
handler(n, o) {
|
handler(n, o) {
|
||||||
if (n) {
|
if (n) {
|
||||||
@@ -148,6 +155,13 @@ export default {
|
|||||||
if (this.form.refineryId) callback();
|
if (this.form.refineryId) callback();
|
||||||
else callback("请选择炼厂");
|
else callback("请选择炼厂");
|
||||||
};
|
};
|
||||||
|
var validatePass = (rule, value, callback) => {
|
||||||
|
if (value==''||Number(value)<=0) {
|
||||||
|
callback(new Error('预约提货量不能为空或零'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
customList: [],
|
customList: [],
|
||||||
form: {
|
form: {
|
||||||
@@ -184,6 +198,9 @@ export default {
|
|||||||
enableMark: [
|
enableMark: [
|
||||||
{ required: true, message: "请选择启用状态", trigger: "change" },
|
{ required: true, message: "请选择启用状态", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
preQuantity:[
|
||||||
|
{ required: true, validator:validatePass, trigger: "blur" }
|
||||||
|
],
|
||||||
productType: [
|
productType: [
|
||||||
{ required: true, message: "请选择产品类型", trigger: "change" },
|
{ required: true, message: "请选择产品类型", trigger: "change" },
|
||||||
],
|
],
|
||||||
@@ -209,6 +226,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
productDataList(e) {
|
productDataList(e) {
|
||||||
|
console.log(e,'******************')
|
||||||
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
||||||
this.form.salePrice = this.productRowData[0].salePrice2company;
|
this.form.salePrice = this.productRowData[0].salePrice2company;
|
||||||
this.form.floorPrice = this.productRowData[0].floorPrice;
|
this.form.floorPrice = this.productRowData[0].floorPrice;
|
||||||
@@ -245,7 +263,9 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.productDataList(this.form.productId);
|
||||||
this.form.productMeasurement = this.productRowData[0].measurement;
|
this.form.productMeasurement = this.productRowData[0].measurement;
|
||||||
|
delete this.form.id;
|
||||||
this.judgeInterface(this.form).then((res) => {
|
this.judgeInterface(this.form).then((res) => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.$message.success(res.msg);
|
this.$message.success(res.msg);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd">
|
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd">
|
||||||
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules">
|
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules">
|
||||||
<el-form-item label="预约提货量" prop="preDeliveryQuantity">
|
<el-form-item label="预约提货量" prop="preDeliveryQuantity">
|
||||||
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>元/吨
|
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>吨
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提货人" prop="driverName">
|
<el-form-item label="提货人" prop="driverName">
|
||||||
<el-input v-model="billAddData.driverName"></el-input>
|
<el-input v-model="billAddData.driverName"></el-input>
|
||||||
|
|||||||
Reference in New Issue
Block a user