|
|
|
@ -294,7 +294,12 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 第二列 -->
|
|
|
|
|
<el-col :offset="1" :span="9">
|
|
|
|
|
<el-form-item label-width="100px" label="订单车数" prop="carNum">
|
|
|
|
|
|
|
|
|
|
<el-form-item label-width="100px" label="单位" prop="unit">
|
|
|
|
|
<el-input v-model="form.unit" placeholder="请输入单位"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item v-if="false" label-width="100px" label="订单车数" prop="carNum">
|
|
|
|
|
<el-input @change="changeCarNum" type="number" v-model="form.carNum" placeholder="请输入车数"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -315,7 +320,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 第二列 -->
|
|
|
|
|
<el-col :offset="1" :span="9">
|
|
|
|
|
<el-form-item label-width="100px" label="单位" prop="unit">
|
|
|
|
|
<el-form-item v-if="false" label-width="100px" label="单位" prop="unit">
|
|
|
|
|
<el-input v-model="form.unit" placeholder="请输入单位"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -372,6 +377,13 @@
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
|
|
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 第二行 -->
|
|
|
|
|
<el-row>
|
|
|
|
@ -391,11 +403,10 @@
|
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="1" :span="5">
|
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
|
|
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<!-- 车数 -->
|
|
|
|
|
<el-form-item size="small" label="分配车数:">
|
|
|
|
|
<el-input required type="number" @input="changeCarNum" v-model="splitForm.carNum"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -458,7 +469,14 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getSplitInfo,listWhiteOrder, getWhiteOrder, delWhiteOrder, addWhiteOrder, updateWhiteOrder} from "@/api/plan/whiteOrder";
|
|
|
|
|
import {
|
|
|
|
|
getSplitInfo,
|
|
|
|
|
listWhiteOrder,
|
|
|
|
|
getWhiteOrder,
|
|
|
|
|
delWhiteOrder,
|
|
|
|
|
addWhiteOrder,
|
|
|
|
|
updateWhiteOrder
|
|
|
|
|
} from "@/api/plan/whiteOrder";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
import moment from "moment";
|
|
|
|
@ -473,7 +491,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 拆分-班次
|
|
|
|
|
workShift:[],
|
|
|
|
|
workShift: [],
|
|
|
|
|
// 拆分工艺
|
|
|
|
|
routes: [],
|
|
|
|
|
// 拆分-尾-工单列表加载
|
|
|
|
@ -494,7 +512,8 @@ export default {
|
|
|
|
|
productDate: null,
|
|
|
|
|
shiftId: null,
|
|
|
|
|
routeCode: null,
|
|
|
|
|
formFields: []
|
|
|
|
|
formFields: [],
|
|
|
|
|
carNum: null
|
|
|
|
|
},
|
|
|
|
|
// 拆分-拆分订单列表加载
|
|
|
|
|
refreshProTable: true,
|
|
|
|
@ -976,21 +995,21 @@ export default {
|
|
|
|
|
changeCarNum(num) {
|
|
|
|
|
console.log("车数数量改变")
|
|
|
|
|
// 请先输入订单数量
|
|
|
|
|
if (this.form.quantity == null) {
|
|
|
|
|
if (this.splitForm.splitNum == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请先输入订单数量!',
|
|
|
|
|
message: '请先输入拆分数量!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.carNum = null;
|
|
|
|
|
this.splitForm.carNum = null;
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// 车数不能超过订单数量
|
|
|
|
|
if (Number(this.form.quantity) - Number(num) < 0) {
|
|
|
|
|
// 车数不能超过拆分数量
|
|
|
|
|
if (Number(this.splitForm.splitNum) - Number(num) < 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '车数不能超过订单数量!',
|
|
|
|
|
message: '车数不能超过拆分数量!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.carNum = this.form.quantity;
|
|
|
|
|
this.splitForm.carNum = this.splitForm.splitNum;
|
|
|
|
|
}
|
|
|
|
|
// 不能为负数
|
|
|
|
|
if (num <= 0) {
|
|
|
|
@ -998,7 +1017,7 @@ export default {
|
|
|
|
|
message: '车数数量不能小于0!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.carNum = 1;
|
|
|
|
|
this.splitForm.carNum = 1;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 新增-订单数量校验
|
|
|
|
@ -1072,13 +1091,13 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.form.carNum == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请输入订单车数!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// if (this.form.carNum == null) {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: '请输入订单车数!',
|
|
|
|
|
// type: 'warning'
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if (this.form.unit == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请输入单位!',
|
|
|
|
|