Commit 337114dd authored by renjintao's avatar renjintao

split

parent ddf941b3
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="分解数量" style="width:100%" prop="splitQuantity"> <FormItem label="分解数量" style="width:100%" prop="splitQuantity">
<InputNumber :min="1" v-model="orderForm.splitQuantity" :step="1" style="width:180px"></InputNumber> <InputNumber :min="0" v-model="orderForm.splitQuantity" style="width:180px"></InputNumber>
<Button type="primary" @click="addSplitOrder">确定</Button> <Button type="primary" @click="addSplitOrder">确定</Button>
</FormItem> </FormItem>
</Col> </Col>
...@@ -177,6 +177,11 @@ export default { ...@@ -177,6 +177,11 @@ export default {
}, },
//确定增加数量 //确定增加数量
addSplitOrder() { addSplitOrder() {
if (this.orderForm.splitQuantity < 2||this.orderForm.splitQuantity==undefined) {
this.dataList = [];
return;
}
if (this.orderForm.quantity >= this.orderForm.splitQuantity) { if (this.orderForm.quantity >= this.orderForm.splitQuantity) {
this.dataListRetrun.items = []; this.dataListRetrun.items = [];
this.$refs["formValidate"].validate(valid => { this.$refs["formValidate"].validate(valid => {
...@@ -267,7 +272,7 @@ export default { ...@@ -267,7 +272,7 @@ export default {
this.orderForm = this.$u.clone(this.row); this.orderForm = this.$u.clone(this.row);
this.orderForm.planStartTime = this.orderForm.demandStartDate; this.orderForm.planStartTime = this.orderForm.demandStartDate;
this.orderForm.planEndTime = this.orderForm.demandFinishDate; this.orderForm.planEndTime = this.orderForm.demandFinishDate;
this.orderForm.splitQuantity = 2; //this.orderForm.splitQuantity = 2;
this.dataListRetrun.id = this.orderForm.id; this.dataListRetrun.id = this.orderForm.id;
this.dataListRetrun.quantity = this.orderForm.quantity; this.dataListRetrun.quantity = this.orderForm.quantity;
this.dataListRetrun.mesCode = this.orderForm.mesCode; this.dataListRetrun.mesCode = this.orderForm.mesCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment