扫码异常接口缓存线接口
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="material-item-wrap">
|
||||
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][Number(e.status) - 1]" @tap="toInfo(e)">
|
||||
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red', 'bg-none'][Number(e.vehicle_status) - 1]" @tap="toInfo(e)">
|
||||
<view class="material-title">{{e.vehicle_code}}</view>
|
||||
<view class="material-spec">{{e.material_spec}}</view>
|
||||
</view>
|
||||
@@ -102,7 +102,7 @@
|
||||
<view class="search-item">
|
||||
<label class="search-label">位置</label>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="search-input-l" v-model="obj.positionOrder_no" disabled>
|
||||
<input type="text" class="search-input-l" v-model="obj.seat_order_num" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -129,7 +129,7 @@
|
||||
data() {
|
||||
return {
|
||||
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
|
||||
index1: '',
|
||||
index1: 'A1',
|
||||
options2: [],
|
||||
index2: '',
|
||||
options3: [],
|
||||
@@ -151,21 +151,21 @@
|
||||
};
|
||||
},
|
||||
created () {
|
||||
for(let i = 1; i < 16; i++) {
|
||||
this.dataList.push({vehicle_code: i + '', material_spec: 'a', status: '4'})
|
||||
}
|
||||
// for(let i = 1; i < 16; i++) {
|
||||
// this.dataList.push({vehicle_code: i + '', material_spec: 'a', status: '4'})
|
||||
// }
|
||||
this._getCacheLine('A1')
|
||||
this._workprocedureQuery()
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
mounted () {
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.val2 = this.$store.getters.publicObj.material_code
|
||||
this.val3 = this.$store.getters.publicObj.material_name
|
||||
this.val4 = this.$store.getters.publicObj.material_spec
|
||||
this.val5 = this.$store.getters.publicObj.material_uuid
|
||||
this.val5 = this.$store.getters.publicObj.material_id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -187,11 +187,11 @@
|
||||
/** 缓存线 */
|
||||
async _getCacheLine (id) {
|
||||
let res = await getCacheLine(id)
|
||||
this.options2 = [...res.result]
|
||||
this.options2 = [...res]
|
||||
},
|
||||
async _getCacheLineMaterialInfo () {
|
||||
let res = await getCacheLineMaterialInfo(this.index1, this.index2)
|
||||
this.dataList = [...res.result]
|
||||
this.dataList = [...res]
|
||||
},
|
||||
/** 选择器3 */
|
||||
selectChange3(e) {
|
||||
@@ -200,9 +200,20 @@
|
||||
/** 工序 */
|
||||
async _workprocedureQuery () {
|
||||
let res = await workprocedureQuery()
|
||||
this.options3 = [...res.result]
|
||||
this.options3 = [...res]
|
||||
},
|
||||
toSearch () {
|
||||
this.val1 = ''
|
||||
this.index3 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
this.val5 = ''
|
||||
this.val6 = ''
|
||||
this.val7 = ''
|
||||
this.obj = {}
|
||||
this.active = false
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
this._getCacheLineMaterialInfo()
|
||||
},
|
||||
toInfo(e) {
|
||||
@@ -210,14 +221,14 @@
|
||||
this.obj = e
|
||||
this.val1 = this.obj.vehicle_code
|
||||
this.options3.map(el => {
|
||||
if (el.value === e.workprocedure_code) {
|
||||
if (Number(el.workprocedure_code) === Number(e.workprocedure_code)) {
|
||||
this.index3 = el.value
|
||||
}
|
||||
})
|
||||
this.val2 = this.obj.material_code
|
||||
this.val3 = this.obj.material_name
|
||||
this.val4 = this.obj.material_spec
|
||||
this.val5 = this.obj.material_uuid
|
||||
this.val5 = this.obj.material_id
|
||||
this.val6 = this.obj.quantity
|
||||
this.val7 = this.obj.weight
|
||||
},
|
||||
@@ -229,7 +240,7 @@
|
||||
closePop () {
|
||||
this.active = false
|
||||
},
|
||||
async __setfullBox () {
|
||||
async _setfullBox () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1 || !this.index3 || !this.val6 || !this.val7) {
|
||||
this.disabled1 = false
|
||||
@@ -241,7 +252,7 @@
|
||||
this.$set(this.obj, 'material_code', this.val2)
|
||||
this.$set(this.obj, 'material_name', this.val3)
|
||||
this.$set(this.obj, 'material_spec', this.val4)
|
||||
this.$set(this.obj, 'material_uuid', this.val5)
|
||||
this.$set(this.obj, 'material_id', this.val5)
|
||||
this.$set(this.obj, 'quantity', this.val6)
|
||||
this.$set(this.obj, 'weight', this.val7)
|
||||
let res = await setfullBox(this.obj)
|
||||
@@ -263,8 +274,8 @@
|
||||
}
|
||||
try {
|
||||
let obj = {}
|
||||
this.$set(this.obj, 'vehicle_code', this.val1)
|
||||
this.$set(this.obj, 'workprocedure_code', this.index3)
|
||||
this.$set(obj, 'vehicle_code', this.val1)
|
||||
this.$set(obj, 'workprocedure_code', this.index3)
|
||||
let res = await setEmptyBox(obj)
|
||||
this.disabled2 = false
|
||||
this.toSearch()
|
||||
@@ -284,7 +295,7 @@
|
||||
}
|
||||
try {
|
||||
let obj = {}
|
||||
this.$set(this.obj, 'vehicle_code', this.val1)
|
||||
this.$set(obj, 'vehicle_code', this.val1)
|
||||
let res = await deleteBox(obj)
|
||||
this.disabled3 = false
|
||||
this.toSearch()
|
||||
|
||||
Reference in New Issue
Block a user