| | |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">票号</view> |
| | | <input placeholder="请扫描现品票号" v-model="fieldsIndex"></input> |
| | | <text class='cuIcon-search text-blue' @click="search"></text> |
| | | <input placeholder="请扫描现品票号" v-model="fieldsIndex" @input="search()" focus></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">ASN单号</view> |
| | |
| | | </form> |
| | | <view class="flex solid-bottom padding-sm justify-between"> |
| | | <view class="text-blue">物料总类:{{list.length}}</view> |
| | | <view class="content"> |
| | | <uni-data-checkbox mode="button" multiple v-model="isHalf" :localdata="boxs"></uni-data-checkbox> |
| | | </view> |
| | | <view class="text-blue">组盘总数:{{allCount}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="text-black">票号:<text class="text-grey ">{{item.crushNo}}</text></text> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text> |
| | |
| | | <view class="content"> |
| | | <text class="text-black">收货数量: <text class="text-grey ">{{item.anfme}}</text></text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-black">已上架数量: <text |
| | | class="text-grey ">{{item.workQty + item.qty}}</text></text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">可组盘数量:<text |
| | | class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-black">已上架数量: <text |
| | | class="text-grey ">{{item.workQty + item.qty}}</text></text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | |
| | | barcode: '', |
| | | container: '', |
| | | megreQty: '', |
| | | isHalf: 0, |
| | | boxs: [{ |
| | | text: '半箱', |
| | | value: 1 |
| | | }], |
| | | list: [], |
| | | range: [], |
| | | asnCode: '', |
| | |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']), |
| | | allCount() { |
| | | return this.list.reduce((acc, row) => + (row.anfme + acc).toFixed(2), 0) || 0 |
| | | return this.list.reduce((acc, row) => +(row.anfme + acc).toFixed(2), 0) || 0 |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | async search() { |
| | | // if (this.fieldsIndex.length < 25) { |
| | | // return; |
| | | // } |
| | | const find = this.list.find(el => el.trackCode === this.barcode); |
| | | find ? this.scrollTo() : this.getDet(); |
| | | }, |
| | |
| | | |
| | | async getDetl(req) { |
| | | let that = this; |
| | | // uni.showLoading({ |
| | | // title: '加载中...' |
| | | // }) |
| | | const { code, data, msg } = await request('/asnOrderItem/trackCode', { |
| | | |
| | | const { code, data, msg } = await request('/asnOrderItem/trackCode', { |
| | | matnrCode: that.matnrCode, |
| | | asnCode: that.asnCode, |
| | | code: that.asnCode, |
| | |
| | | }, |
| | | |
| | | async getList() { |
| | | let that = this |
| | | if (this.container === '' || this.container === null) { |
| | | uni.showToast({ |
| | | title: "容器码为空", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | const { code, data, msg } = await request('/asnOrderItem/container', { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/asnOrderItem/container', { |
| | | barcode: this.container |
| | | }) |
| | | if (code === 200) { |
| | |
| | | icon: "success", |
| | | position: 'top' |
| | | }) |
| | | that.list.push(...data) |
| | | |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | |
| | | } |
| | | this.repeatClick = true |
| | | const newArr = this.list.map(item => { |
| | | |
| | | return { |
| | | ...item, |
| | | anfme: item.anfme === null ? 0 : +item.anfme, |
| | | }; |
| | | }); |
| | | |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/waitPakin/merge', { |
| | | const { code, data, msg } = await request('/waitPakin/merge', { |
| | | items: newArr, |
| | | isHalf: this.isHalf, |
| | | barcode: this.container, |
| | | }) |
| | | if (code === 200) { |