change
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<div class="search-item_2 flexend">
|
||||
<button class="button button--primary" @click="toAddBillMater">添加单据物料</button>
|
||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': this.value1 === '' || this.value2 === '' || this.value3 === '' || this.dataList === []}" @click="showDialog">确认入库</button>
|
||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': this.value1 === '' || this.value2 === '' || this.value3 === '' || this.dataList === [] || flag}" @click="showDialog">确认入库</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">删除一行</button>
|
||||
<button class="button button--primary" @click="toSearch">作业查询</button>
|
||||
</div>
|
||||
@@ -77,6 +77,7 @@
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td><input type="number" class="input" v-model="e.sale_qty"></td>
|
||||
<!-- <td><input type="number" class="input" :min="0" v-model="el.sale_qty" @blur="e => {if (e.target.value === '') {el.sale_qty=0}}" v-enter-number></td> -->
|
||||
<td>{{e.qty_unit_name}}</td>
|
||||
<td>{{e.bucketunique}}</td>
|
||||
<td>{{e.sale_code}}</td>
|
||||
@@ -115,12 +116,25 @@ export default {
|
||||
options3: [],
|
||||
value3: '',
|
||||
remark: '',
|
||||
dataList: [{material_code: '1'}],
|
||||
dataList: [{material_code: '1', sale_qty: '100'}],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled2: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
flag () {
|
||||
let flag = false
|
||||
if (this.dataList.length) {
|
||||
this.dataList.map(el => {
|
||||
if (el.sale_qty === '' || Number(el.sale_qty) < 0) {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
}
|
||||
return flag
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
@@ -142,7 +156,7 @@ export default {
|
||||
this.toSure()
|
||||
},
|
||||
showDialog () {
|
||||
if (this.value1 === '' || this.value2 === '' || this.value3 === '' || this.dataList === []) {
|
||||
if (this.flag || this.value1 === '' || this.value2 === '' || this.value3 === '' || this.dataList === []) {
|
||||
// this.toast('请填写完整')
|
||||
return
|
||||
}
|
||||
@@ -226,5 +240,5 @@ export default {
|
||||
.search-label_1
|
||||
width 45px
|
||||
.filter-table th, .filter-table td
|
||||
line-height 24px
|
||||
line-height 22px
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user