| | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block v-for="(item, index) in list" :key="index"> |
| | | <view class="cu-list det menu " @click="clickTaskItem(index)"> |
| | | |
| | | |
| | | <view class="cu-bar bg-white solid-bottom margin-top-sm"> |
| | | <view class="action"> |
| | |
| | | }
|
| | | return new Promise((resolve, reject) => {
|
| | | const token = uni.getStorageSync('token');
|
| | | // const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
|
| | | // const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
|
| | | // const URL = 'http://192.168.4.34:8085/rsf-server/pda' + url;
|
| | | const URL = 'http://127.0.0.1:8085/rsf-server/pda' + url;
|
| | | uni.request({
|
| | | url: URL,
|
| | |
| | | <view class="cu-form-group"> |
| | | <view class="title">票号</view> |
| | | <input placeholder="请扫描现品票号" v-model="fieldsIndex" @input="search()" focus></input> |
| | | <text class='cuIcon-close text-gray margin-right-xs' v-show="fieldsIndex!==''" |
| | | @click="clearCode"></text> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | |
| | | } |
| | | that.getDetl(param); |
| | | }, |
| | | |
| | | clearCode() { |
| | | this.fieldsIndex = '' |
| | | }, |
| | | async getDetl(req) { |
| | | let that = this; |
| | | |
| | | const { code, data, msg } = await request('/asnOrderItem/trackCode', { |
| | | uni.showLoading({ |
| | | title: "加载中...", |
| | | mask: true |
| | | }) |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/asnOrderItem/trackCode', { |
| | | matnrCode: that.matnrCode, |
| | | asnCode: that.asnCode, |
| | | code: that.asnCode, |
| | |
| | | position: 'top' |
| | | }) |
| | | } |
| | | // uni.hideLoading(); |
| | | uni.hideLoading(); |
| | | }, |
| | | |
| | | async getList() { |
| | |
| | | }; |
| | | }); |
| | | |
| | | const { code, data, msg } = await request('/waitPakin/merge', { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/waitPakin/merge', { |
| | | items: newArr, |
| | | isHalf: this.isHalf, |
| | | barcode: this.container, |
| | |
| | | <view class="cu-form-group" v-show="!isconfirm"> |
| | | <view class="title">票号:</view> |
| | | <input placeholder="请扫描票号" v-model="fieldsIndex" focus @input="search()"></input> |
| | | <text class='cuIcon-close text-gray margin-right-xs' v-show="fieldsIndex!==''" @click="clearCode"></text> |
| | | <text class='cuIcon-close text-gray margin-right-xs' v-show="fieldsIndex!==''" |
| | | @click="clearCode"></text> |
| | | </view> |
| | | </form> |
| | | </view> |
| | | <view class="cu-list det menu sm-border"> |
| | | <view class="cu-list det menu noMargin cyan" v-for="(item2,index2) in list" > |
| | | <view class="cu-list det menu noMargin cyan" v-for="(item2,index2) in list"> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-gray">{{index2+1}}.</text> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item" v-show="item2.anfme !== item2.qty"> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <view class="cu-form-group padding-lr-0"> |
| | | <view class="title text-blue"><text class="text-red text-xl vertical-middle">*</text>拣: |
| | |
| | | <view class="cu-bar btn-group foot" v-show="!isconfirm"> |
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">拣货完成</button> |
| | | </view> |
| | | <view> |
| | | <!-- 提示窗示例 --> |
| | | <uni-popup ref="alertDialog" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" title="警告" :content="dialogMsg" |
| | | @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | list: [], |
| | | isconfirm: false, |
| | | fieldsIndex: '', |
| | | dialogMsg: '', |
| | | msgType: 'warn', |
| | | max: 99999999, |
| | | orderDetl: {}, |
| | | repeatClick: false, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | dialogConfirm() { |
| | | let that = this |
| | | if (that.barcode === '' || that.barcode === null) { |
| | | uni.showToast({ |
| | | title: "容器号为空", |
| | | icon: "error", |
| | | }) |
| | | return; |
| | | } |
| | | if (that.list === [] || that.list.length === 0) { |
| | | uni.showToast({ |
| | | title: "拣货明细为空", |
| | | icon: "error", |
| | | }) |
| | | return; |
| | | } |
| | | this.commpletePick() |
| | | }, |
| | | |
| | | async commpletePick() { |
| | | let that = this |
| | | uni.showLoading({ |
| | | title: "拣货中...", |
| | | mask: true |
| | | }) |
| | | this.repeatClick = true |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/wave/pick/item', { |
| | | barcode: that.orderDetl.barcode, |
| | | orderId: that.orderDetl.orderId, |
| | | taskItems: that.list |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | uni.navigateBack() |
| | | that.clear() |
| | | uni.hideLoading(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | uni.hideLoading(); |
| | | } |
| | | this.repeatClick = false |
| | | }, |
| | | |
| | | dialogClose() { |
| | | console.log('点击关闭') |
| | | }, |
| | | clear() { |
| | | this.fieldsIndex = '' |
| | | this.list = [] |
| | |
| | | }, |
| | | async search() { |
| | | let that = this; |
| | | // if(this.fieldsIndex === '' || this.fieldsIndex.length < 30){ |
| | | // if(this.fieldsIndex === '' || this.fieldsIndex.length < 29){ |
| | | // return ; |
| | | // } |
| | | const { code, data, msg } = await request('/wave/order/items', { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/wave/order/items', { |
| | | barcode: this.orderDetl.barcode, |
| | | orderId: that.orderDetl.orderId, |
| | | fieldsIndex: that.fieldsIndex |
| | |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | async complete() { |
| | | complete() { |
| | | let that = this |
| | | if (that.barcode === '' || that.barcode === null) { |
| | | uni.showToast({ |
| | |
| | | }) |
| | | return; |
| | | } |
| | | this.repeatClick = true |
| | | const { code, data, msg } = await request('/wave/pick/item', { |
| | | barcode: that.orderDetl.barcode, |
| | | orderId: that.orderDetl.orderId, |
| | | taskItems: that.list |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | that.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | if (that.orderDetl.qty >= that.orderDetl.anfme) { |
| | | this.dialogMsg = "单据:" + that.orderDetl.orderCode + ",已超出单据需求,是否确认超出拣料!!" |
| | | this.$refs.alertDialog.open() |
| | | return; |
| | | } |
| | | this.repeatClick = false |
| | | this.commpletePick() |
| | | }, |
| | | } |
| | | } |
| | |
| | | }) |
| | | |
| | | }, |
| | | onShow() { |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | //点击事件 |
| | | clickTaskItem(index) { |
| | |
| | | async search() { |
| | | let that = this; |
| | | this.list = [] |
| | | // if(this.barcode === '' || this.barcode ===null){ |
| | | // return ; |
| | | // } |
| | | if (that.barcode == null || that.barcode.length < 1 ) { |
| | | return; |
| | | } |
| | | const { |
| | | code, |
| | | data, |
| | |
| | | }, |
| | | async complete() { |
| | | let that = this |
| | | if (that.barcode === '' || that.barcode === null) { |
| | | uni.showToast({ |
| | | title: "容器号为空", |
| | | icon: "error", |
| | | }) |
| | | return; |
| | | } |
| | | if (that.list === [] || that.list.length === 0) { |
| | | uni.showToast({ |
| | | title: "拣货明细为空", |