判断
This commit is contained in:
@@ -116,7 +116,7 @@ export default {
|
|||||||
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||||
options2: [],
|
options2: [],
|
||||||
value2: '',
|
value2: '',
|
||||||
dataList: [{bill_code: '030301010031'}],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
disabled1: false
|
disabled1: false
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_2 flexend">
|
<div class="search-item_2 flexend">
|
||||||
<button class="button button--primary" @click="toInConfirm">确认入库</button>
|
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': this.value1 === '' || this.value2 === '' || this.value3 === '' || this.remark === '' || this.dataList === []}" @click="toSure">确认入库</button>
|
||||||
<button class="button button--primary" @click="toSearch">作业查询</button>
|
<button class="button button--primary" @click="toSearch">作业查询</button>
|
||||||
<button class="button button--primary" @click="toAddBillMater">添加单据物料</button>
|
<button class="button button--primary" @click="toAddBillMater">添加单据物料</button>
|
||||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">删除一行</button>
|
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">删除一行</button>
|
||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
disabled1: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave (to, from, next) {
|
beforeRouteLeave (to, from, next) {
|
||||||
@@ -141,14 +141,32 @@ export default {
|
|||||||
let res = await getPoint()
|
let res = await getPoint()
|
||||||
this.options3 = [...res.data]
|
this.options3 = [...res.data]
|
||||||
},
|
},
|
||||||
toInConfirm () {
|
// 确认入库
|
||||||
this._confirmIn()
|
async toSure () {
|
||||||
},
|
this.disabled2 = true
|
||||||
async _confirmIn () {
|
if (this.value1 === '' || this.value2 === '' || this.value3 === '' || this.remark === '' || this.dataList === []) {
|
||||||
|
this.disabled2 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let res = await confirmIn(this.value1, this.value2, this.value3, this.remark, this.dataList)
|
let from = {
|
||||||
|
stor_id: this.value1,
|
||||||
|
bill_type: this.value2,
|
||||||
|
point_code: this.value3,
|
||||||
|
remark: this.remark,
|
||||||
|
rows: this.dataList
|
||||||
|
}
|
||||||
|
let res = await confirmIn(from)
|
||||||
this.toast(res.message)
|
this.toast(res.message)
|
||||||
|
this.value1 = ''
|
||||||
|
this.value2 = ''
|
||||||
|
this.value3 = ''
|
||||||
|
this.remark = ''
|
||||||
|
this.dataList = []
|
||||||
|
this.disabled2 = false
|
||||||
|
this.$store.dispatch('setMaterObj', '')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.disabled2 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toAddBillMater () {
|
toAddBillMater () {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||||
dataList: [{sale_code: '030301010037', checked: false}, {sale_code: '030301010038', checked: false}],
|
dataList: [],
|
||||||
checkArr: []
|
checkArr: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -130,8 +130,13 @@ export default {
|
|||||||
if (this.checkArr.length === 0) {
|
if (this.checkArr.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.dispatch('setMaterArr', this.checkArr)
|
// 添加的物料订单号必须一样
|
||||||
this.colseUp()
|
if (this.checkArr.every(e => e.sale_code === this.checkArr[0].sale_code)) {
|
||||||
|
this.$store.dispatch('setMaterArr', this.checkArr)
|
||||||
|
this.colseUp()
|
||||||
|
} else {
|
||||||
|
this.toast('添加的物料订单号必须一样')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.checkArr = []
|
this.checkArr = []
|
||||||
|
|||||||
Reference in New Issue
Block a user