放货确认

This commit is contained in:
2024-08-07 17:59:31 +08:00
parent b18d5834c9
commit 9f94350422
5 changed files with 29 additions and 24 deletions

View File

@@ -57,5 +57,5 @@
"regenerate": "Regenerate", "regenerate": "Regenerate",
"forced-completion": "Forced completion", "forced-completion": "Forced completion",
"take-and-place": "Take and place", "take-and-place": "Take and place",
"allow-to-leave": "Allow to leave" "filter.point": "Point"
} }

View File

@@ -57,5 +57,5 @@
"regenerate": "재생성", "regenerate": "재생성",
"forced-completion": "강제 완료", "forced-completion": "강제 완료",
"take-and-place": "픽업 허용", "take-and-place": "픽업 허용",
"allow-to-leave": "떠날 것을 허락하다" "filter.point": "포인트"
} }

View File

@@ -57,5 +57,5 @@
"regenerate": "重新生成", "regenerate": "重新生成",
"forced-completion": "强制完成", "forced-completion": "强制完成",
"take-and-place": "允许取放", "take-and-place": "允许取放",
"allow-to-leave": "允许离开" "filter.point": "点位"
} }

View File

@@ -3,25 +3,19 @@
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row mgb20 border-bottom"> <view class="zd-row border-bottom">
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons> <view class="zd-col-7">
<view class="zd-col-6 filter_label">{{$t('call.sp')}}</view> <span class="filter_label">{{$t('filter.point')}}</span>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="sCode" disabled>
</view> </view>
</view> <view class="zd-col-24 filter_select">
<view class="zd-row"> <uni-data-select :placeholder="placeholder" v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
<view class="zd-col-6 filter_label">{{$t('call.ep')}}</view>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="nCode" disabled>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_updateTask('1')">{{$t('take-and-place')}}</button> <button class="zd-col-11 button-default" @click="cancle">{{$t('button.cancel')}}</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_updateTask('2')">{{$t('allow-to-leave')}}</button> <button class="zd-col-11 button-primary" :class="{'button-info': index === ''}" :disabled="disabled" @tap="_updateTask('1')">{{$t('take-and-place')}}</button>
</view> </view>
</view> </view>
</template> </template>
@@ -35,21 +29,33 @@
}, },
data() { data() {
return { return {
placeholder: this.$t('uni.dataSelect.placeholder'),
title: '', title: '',
disabled: false, options: [{text:'QFQ_2', value:'QFQ_2'},{text:'QFQ_4',value: 'QFQ_4'}],
sCode: 'QFQ_2', index: '',
nCode: 'QFQ_4' disabled: false
}; };
}, },
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
}, },
methods: { methods: {
selectChange (e) {
this.index = e
this.disabled = false
},
cancle () {
this.index = ''
},
async _updateTask (type) { async _updateTask (type) {
this.disabled = true this.disabled = true
try { if (!this.index) {
let res = await updateTask(this.sCode, this.nCode, type)
this.disabled = false this.disabled = false
return
}
try {
let res = await updateTask(this.index, type)
this.cancle()
uni.showToast({ uni.showToast({
title: res.desc, title: res.desc,
icon: 'none' icon: 'none'

View File

@@ -88,11 +88,10 @@ export const handTaskoperation = (type, id) => request({
/** /**
* 放货确认 * 放货确认
*/ */
export const updateTask = (code1,code2,type) => request({ export const updateTask = (code,type) => request({
url:'api/wms/updateTask', url:'api/wms/updateTask',
data: { data: {
device_code: code1, device_code: code,
task_code: code2,
option: type option: type
} }
}) })