扫码异常接口缓存线接口

This commit is contained in:
2023-03-30 10:45:00 +08:00
parent 5315ea7016
commit 76e762e84e
10 changed files with 68 additions and 49 deletions

View File

@@ -52,12 +52,19 @@
content: '\e607'; content: '\e607';
} }
.icon-check { .icon-check {
width: 30px; width: 24px;
height: 30px; height: 24px;
background-color: #fff; font-size: 20px;
line-height: 24px;
color: #bbb;
background-color: #bbb;
border-radius: 50%; border-radius: 50%;
margin: 0 auto; margin: 0 auto;
} }
.icon-checked { .icon-checked {
color: #fff;
background-color: #D7592F; background-color: #D7592F;
} }
.icon-check::after {
content: '\e608'
}

View File

@@ -181,6 +181,9 @@ uni-button:after {
.bg-red { .bg-red {
background-color: #ff6a00; background-color: #ff6a00;
} }
.bg-none {
display: none;
}
.material-wrap { .material-wrap {
width: calc(100% - 30px); width: calc(100% - 30px);
height: calc(100% - 152px);/** 42+15*5+35 */ height: calc(100% - 152px);/** 42+15*5+35 */

View File

@@ -19,12 +19,12 @@
<view class="nav-item"> <view class="nav-item">
<text class="nav-text" @click="toJump('/pages/management/hcxcheck')">缓存线盘点</text> <text class="nav-text" @click="toJump('/pages/management/hcxcheck')">缓存线盘点</text>
</view> </view>
<view class="nav-item"> <!-- <view class="nav-item">
<text class="nav-text" @click="toJump('/pages/management/agvinerror')">AGV入箱异常</text> <text class="nav-text" @click="toJump('/pages/management/agvinerror')">AGV入箱异常</text>
</view> </view>
<view class="nav-item"> <view class="nav-item">
<text class="nav-text" @click="toJump('/pages/management/AgvOutError')">AGV出箱异常</text> <text class="nav-text" @click="toJump('/pages/management/AgvOutError')">AGV出箱异常</text>
</view> </view> -->
<view class="nav-item"> <view class="nav-item">
<text class="nav-text" @click="toJump('/pages/management/HcxOutError')">缓存线出箱异常</text> <text class="nav-text" @click="toJump('/pages/management/HcxOutError')">缓存线出箱异常</text>
</view> </view>

View File

@@ -40,7 +40,7 @@
</view> </view>
</view> </view>
<view class="material-item-wrap"> <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-title">{{e.vehicle_code}}</view>
<view class="material-spec">{{e.material_spec}}</view> <view class="material-spec">{{e.material_spec}}</view>
</view> </view>
@@ -102,7 +102,7 @@
<view class="search-item"> <view class="search-item">
<label class="search-label">位置</label> <label class="search-label">位置</label>
<view class="filter_input_wraper"> <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> </view>
</view> </view>
@@ -129,7 +129,7 @@
data() { data() {
return { return {
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}], options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index1: '', index1: 'A1',
options2: [], options2: [],
index2: '', index2: '',
options3: [], options3: [],
@@ -151,21 +151,21 @@
}; };
}, },
created () { created () {
for(let i = 1; i < 16; i++) { // 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', status: '4'})
} // }
this._getCacheLine('A1') this._getCacheLine('A1')
this._workprocedureQuery() this._workprocedureQuery()
}, },
destroyed () { destroyed () {
this.$store.dispatch('setPublicObj', '') this.$store.dispatch('setPublicObj', '')
}, },
mounted () { onShow () {
if (this.$store.getters.publicObj !== '') { if (this.$store.getters.publicObj !== '') {
this.val2 = this.$store.getters.publicObj.material_code this.val2 = this.$store.getters.publicObj.material_code
this.val3 = this.$store.getters.publicObj.material_name this.val3 = this.$store.getters.publicObj.material_name
this.val4 = this.$store.getters.publicObj.material_spec 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: { methods: {
@@ -187,11 +187,11 @@
/** 缓存线 */ /** 缓存线 */
async _getCacheLine (id) { async _getCacheLine (id) {
let res = await getCacheLine(id) let res = await getCacheLine(id)
this.options2 = [...res.result] this.options2 = [...res]
}, },
async _getCacheLineMaterialInfo () { async _getCacheLineMaterialInfo () {
let res = await getCacheLineMaterialInfo(this.index1, this.index2) let res = await getCacheLineMaterialInfo(this.index1, this.index2)
this.dataList = [...res.result] this.dataList = [...res]
}, },
/** 选择器3 */ /** 选择器3 */
selectChange3(e) { selectChange3(e) {
@@ -200,9 +200,20 @@
/** 工序 */ /** 工序 */
async _workprocedureQuery () { async _workprocedureQuery () {
let res = await workprocedureQuery() let res = await workprocedureQuery()
this.options3 = [...res.result] this.options3 = [...res]
}, },
toSearch () { 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() this._getCacheLineMaterialInfo()
}, },
toInfo(e) { toInfo(e) {
@@ -210,14 +221,14 @@
this.obj = e this.obj = e
this.val1 = this.obj.vehicle_code this.val1 = this.obj.vehicle_code
this.options3.map(el => { this.options3.map(el => {
if (el.value === e.workprocedure_code) { if (Number(el.workprocedure_code) === Number(e.workprocedure_code)) {
this.index3 = el.value this.index3 = el.value
} }
}) })
this.val2 = this.obj.material_code this.val2 = this.obj.material_code
this.val3 = this.obj.material_name this.val3 = this.obj.material_name
this.val4 = this.obj.material_spec this.val4 = this.obj.material_spec
this.val5 = this.obj.material_uuid this.val5 = this.obj.material_id
this.val6 = this.obj.quantity this.val6 = this.obj.quantity
this.val7 = this.obj.weight this.val7 = this.obj.weight
}, },
@@ -229,7 +240,7 @@
closePop () { closePop () {
this.active = false this.active = false
}, },
async __setfullBox () { async _setfullBox () {
this.disabled1 = true this.disabled1 = true
if (!this.val1 || !this.index3 || !this.val6 || !this.val7) { if (!this.val1 || !this.index3 || !this.val6 || !this.val7) {
this.disabled1 = false this.disabled1 = false
@@ -241,7 +252,7 @@
this.$set(this.obj, 'material_code', this.val2) this.$set(this.obj, 'material_code', this.val2)
this.$set(this.obj, 'material_name', this.val3) this.$set(this.obj, 'material_name', this.val3)
this.$set(this.obj, 'material_spec', this.val4) 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, 'quantity', this.val6)
this.$set(this.obj, 'weight', this.val7) this.$set(this.obj, 'weight', this.val7)
let res = await setfullBox(this.obj) let res = await setfullBox(this.obj)
@@ -263,8 +274,8 @@
} }
try { try {
let obj = {} let obj = {}
this.$set(this.obj, 'vehicle_code', this.val1) this.$set(obj, 'vehicle_code', this.val1)
this.$set(this.obj, 'workprocedure_code', this.index3) this.$set(obj, 'workprocedure_code', this.index3)
let res = await setEmptyBox(obj) let res = await setEmptyBox(obj)
this.disabled2 = false this.disabled2 = false
this.toSearch() this.toSearch()
@@ -284,7 +295,7 @@
} }
try { try {
let obj = {} let obj = {}
this.$set(this.obj, 'vehicle_code', this.val1) this.$set(obj, 'vehicle_code', this.val1)
let res = await deleteBox(obj) let res = await deleteBox(obj)
this.disabled3 = false this.disabled3 = false
this.toSearch() this.toSearch()

View File

@@ -25,7 +25,7 @@
</view> </view>
<view class="search-item search-item-btns"> <view class="search-item search-item-btns">
<button class="confirm-button" @tap="toSearch">查询</button> <button class="confirm-button" @tap="toSearch">查询</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure">确认</button> <button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button>
</view> </view>
</view> </view>
<!-- <view class="confirm-button-wrap"> <!-- <view class="confirm-button-wrap">
@@ -93,8 +93,8 @@
this.index1 = e this.index1 = e
if (this.index1) { if (this.index1) {
this._getCacheLine(e) this._getCacheLine(e)
this.index2 = ''
} }
this.index2 = ''
}, },
/** 选择器2 */ /** 选择器2 */
selectChange2(e) { selectChange2(e) {
@@ -108,11 +108,11 @@
}, },
async _getCacheLine (id) { async _getCacheLine (id) {
let res = await getCacheLine(id) let res = await getCacheLine(id)
this.options2 = [...res.result] this.options2 = [...res]
}, },
async _inOutExceptionInstQuery () { async _inOutExceptionInstQuery () {
let res = await inOutExceptionInstQuery('1',this.index2,this.val1) let res = await inOutExceptionInstQuery('1',this.index2,this.val1)
this.dataList = [...res.result] this.dataList = [...res]
}, },
async toSure () { async toSure () {
this.disabled = true this.disabled = true

View File

@@ -25,7 +25,7 @@
</view> </view>
<view class="search-item search-item-btns"> <view class="search-item search-item-btns">
<button class="confirm-button" @tap="toSearch">查询</button> <button class="confirm-button" @tap="toSearch">查询</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure">确认</button> <button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button>
</view> </view>
</view> </view>
<!-- <view class="confirm-button-wrap"> <!-- <view class="confirm-button-wrap">
@@ -95,8 +95,8 @@
this.index1 = e this.index1 = e
if (this.index1) { if (this.index1) {
this._getCacheLine(e) this._getCacheLine(e)
this.index2 = ''
} }
this.index2 = ''
}, },
/** 选择器2 */ /** 选择器2 */
selectChange2(e) { selectChange2(e) {
@@ -110,11 +110,11 @@
}, },
async _getCacheLine (id) { async _getCacheLine (id) {
let res = await getCacheLine(id) let res = await getCacheLine(id)
this.options2 = [...res.result] this.options2 = [...res]
}, },
async _inOutExceptionInstQuery () { async _inOutExceptionInstQuery () {
let res = await inOutExceptionInstQuery('2',this.index2,this.val1) let res = await inOutExceptionInstQuery('2',this.index2,this.val1)
this.dataList = [...res.result] this.dataList = [...res]
}, },
async toSure () { async toSure () {
this.disabled = true this.disabled = true

View File

@@ -11,7 +11,7 @@
</view> </view>
<view class="search-item search-item-btns"> <view class="search-item search-item-btns">
<button class="confirm-button" @tap="_materialQuery">查询</button> <button class="confirm-button" @tap="_materialQuery">查询</button>
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button> <button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" @tap="toSure">确认</button>
</view> </view>
</view> </view>
</view> </view>
@@ -29,7 +29,7 @@
<tbody> <tbody>
<tr v-for="e in dataList" :key="e.material_uuid" @click="toRadio(e)"> <tr v-for="e in dataList" :key="e.material_uuid" @click="toRadio(e)">
<td> <td>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_uuid}"></view> <view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_id}"></view>
</td> </td>
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.material_name}}</td> <td>{{e.material_name}}</td>
@@ -53,7 +53,6 @@
return { return {
val1: '', val1: '',
dataList: [], dataList: [],
disabled: false,
pkId: '', pkId: '',
pkObj: {} pkObj: {}
}; };
@@ -66,13 +65,16 @@
}, },
async _materialQuery () { async _materialQuery () {
let res = await materialQuery(this.val1) let res = await materialQuery(this.val1)
this.dataList = [...res.result] this.dataList = [...res]
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.material_uuid ? '' : e.material_uuid this.pkId = this.pkId === e.material_id ? '' : e.material_id
this.pkObj = this.pkId === material_uuid ? e : {} this.pkObj = this.pkId === e.material_id ? e : {}
}, },
toSure () { toSure () {
if (!this.pkId) {
return
}
this.$store.dispatch('setPublicObj', this.pkObj) this.$store.dispatch('setPublicObj', this.pkObj)
uni.navigateBack() uni.navigateBack()
} }

View File

@@ -21,19 +21,15 @@ export const getCacheLine = (area) => request({
export const inOutExceptionInstQuery = (type, wcode, vcode) => request({ export const inOutExceptionInstQuery = (type, wcode, vcode) => request({
url:'api/cacheLineHand/inOutExceptionInstQuery', url:'api/cacheLineHand/inOutExceptionInstQuery',
data: { data: {
form: {
inOut_type: type, inOut_type: type,
wcsdevice_code: wcode, wcsdevice_code: wcode,
vehicle_code: vcode vehicle_code: vcode
} }
}
}) })
// 1.3确认 // 1.3确认
export const inOutExceptionInstConfirm = (obj) => request({ export const inOutExceptionInstConfirm = (obj) => request({
url:'api/cacheLineHand/inOutExceptionInstConfirm', url:'api/cacheLineHand/inOutExceptionInstConfirm',
data: { data: obj
form: obj
}
}) })
/** 缓存线盘点 */ /** 缓存线盘点 */

View File

@@ -55,13 +55,13 @@ const request = (params) => {
reject('request:fail') reject('request:fail')
} else if (res[1] && res[1].statusCode === 400) { } else if (res[1] && res[1].statusCode === 400) {
uni.showModal({ uni.showModal({
content: res[1].data.message, content: `${res[1].data.message}`,
showCancel: false showCancel: false
}) })
reject(res[1].data.message) reject(res[1].data.message)
} else if (res[1] && res[1].statusCode === 401) { } else if (res[1] && res[1].statusCode === 401) {
uni.showModal({ uni.showModal({
content: res[1].data.message, content: `${res[1].data.message}`,
showCancel: false showCancel: false
}) })
store.dispatch('delUserInfo') store.dispatch('delUserInfo')
@@ -110,7 +110,7 @@ const request = (params) => {
// } // }
}else { }else {
uni.showModal({ uni.showModal({
content: res[1].data.message, content: `${res[1].data.message}`,
showCancel: false showCancel: false
}) })
reject(res[1].data.message) reject(res[1].data.message)

View File

@@ -1,6 +1,6 @@
import * as types from '../types' import * as types from '../types'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.252:8010' : 'http://192.168.81.252:8010' const baseUrl = process.env.NODE_ENV === 'development' ? 'http://43.139.166.161:8011' : 'http://192.168.81.252:8010'
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.252:8010' : 'http://192.168.81.252:8010' const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.252:8010' : 'http://192.168.81.252:8010'
const state = { const state = {
baseUrl: uni.getStorageSync('baseUrl') || baseUrl, baseUrl: uni.getStorageSync('baseUrl') || baseUrl,