This commit is contained in:
2023-03-30 16:14:24 +08:00
4 changed files with 47 additions and 37 deletions

View File

@@ -107,5 +107,10 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
"vueVersion" : "2",
"h5" : {
"router" : {
"base" : "./"
}
}
}

View File

@@ -181,27 +181,27 @@
return status;
}
// #endif
,
async checkMpaasScan () {
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
mpaasScanModule.mpaasScan({
// 扫码识别类型参数可多选qrCode、barCode不设置默认识别所有
'scanType': ['qrCode','barCode'],
// 是否隐藏相册默认false不隐藏
'hideAlbum': false
},
(ret) => {
uni.showModal({
title: "弹窗标题",
// 返回值中resp_code 表示返回结果值10用户取消11其他错误1000成功
// 返回值中resp_message 表示返回结果信息
// 返回值中resp_result 表示扫码结果,只有成功才会有返回
content: JSON.stringify(ret),
showCancel: false,
confirmText: "确定"
})
})
}
// ,
// async checkMpaasScan () {
// var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
// mpaasScanModule.mpaasScan({
// // 扫码识别类型参数可多选qrCode、barCode不设置默认识别所有
// 'scanType': ['qrCode','barCode'],
// // 是否隐藏相册默认false不隐藏
// 'hideAlbum': false
// },
// (ret) => {
// uni.showModal({
// title: "弹窗标题",
// // 返回值中resp_code 表示返回结果值10用户取消11其他错误1000成功
// // 返回值中resp_message 表示返回结果信息
// // 返回值中resp_result 表示扫码结果,只有成功才会有返回
// content: JSON.stringify(ret),
// showCancel: false,
// confirmText: "确定"
// })
// })
// }
}
}
</script>

View File

@@ -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', 'bg-none'][Number(e.vehicle_status) - 1]" @tap="toInfo(e)">
<view v-if="Number(e.vehicle_status) !== 5" class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][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>
@@ -152,7 +152,10 @@
},
created () {
// for(let i = 1; i < 16; i++) {
// this.dataList.push({vehicle_code: i + '', material_spec: 'a', status: '4'})
// this.dataList.push({vehicle_code: i + '', material_spec: 'a', vehicle_status: '4'})
// if (i === 5) {
// this.dataList.push({vehicle_code: i + '', material_spec: 'a', vehicle_status: '5'})
// }
// }
this._getCacheLine('A1')
this._workprocedureQuery()
@@ -165,7 +168,7 @@
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_id
this.val5 = this.$store.getters.publicObj.material_uuid
}
},
methods: {
@@ -228,7 +231,7 @@
this.val2 = this.obj.material_code
this.val3 = this.obj.material_name
this.val4 = this.obj.material_spec
this.val5 = this.obj.material_id
this.val5 = this.obj.material_uuid
this.val6 = this.obj.quantity
this.val7 = this.obj.weight
},
@@ -247,14 +250,15 @@
return
}
try {
this.$set(this.obj, 'position_code', this.obj.position_code)
this.$set(this.obj, 'vehicle_code', this.val1)
this.$set(this.obj, 'material_id', this.val5)
this.$set(this.obj, 'workprocedure_code', this.index3)
this.$set(this.obj, 'wcsdevice_code', this.obj.wcsdevice_code)
this.$set(this.obj, 'quantity', this.val6)
this.$set(this.obj, 'weight', this.val7)
let res = await setfullBox(this.obj)
let obj = {}
this.$set(obj, 'position_code', this.obj.position_code)
this.$set(obj, 'vehicle_code', this.val1)
this.$set(obj, 'material_uuid', this.val5)
this.$set(obj, 'workprocedure_code', this.index3)
this.$set(obj, 'wcsdevice_code', this.obj.wcsdevice_code)
this.$set(obj, 'quantity', this.val6)
this.$set(obj, 'weight', this.val7)
let res = await setfullBox(obj)
this.disabled1 = false
this.toSearch()
uni.showToast({
@@ -274,6 +278,7 @@
try {
let obj = {}
this.$set(obj, 'vehicle_code', this.val1)
this.$set(obj, 'wcsdevice_code', this.obj.wcsdevice_code)
this.$set(obj, 'position_code', this.obj.position_code)
let res = await setEmptyBox(obj)
this.disabled2 = false

View File

@@ -29,7 +29,7 @@
<tbody>
<tr v-for="e in dataList" :key="e.material_uuid" @click="toRadio(e)">
<td>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_id}"></view>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_uuid}"></view>
</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
@@ -68,8 +68,8 @@
this.dataList = [...res]
},
toRadio (e) {
this.pkId = this.pkId === e.material_id ? '' : e.material_id
this.pkObj = this.pkId === e.material_id ? e : {}
this.pkId = this.pkId === e.material_uuid ? '' : e.material_uuid
this.pkObj = this.pkId === e.material_uuid ? e : {}
},
toSure () {
if (!this.pkId) {