| | |
| | | <template>
|
| | | <view class="has-foot">
|
| | | <form>
|
| | | <view class="cu-form-group margin-top">
|
| | | <view class="title">ASN单</view>
|
| | | <input placeholder="请扫描ASN单" v-model="asnCode" focus></input>
|
| | | </view>
|
| | |
|
| | | <view class="cu-form-group ">
|
| | | <view class="title">托盘</view>
|
| | | <input placeholder="请扫描托盘" v-model="container"></input>
|
| | | </view>
|
| | |
|
| | | <view class="cu-form-group ">
|
| | | <view class="title">物料码</view>
|
| | | <input placeholder="请扫描物料码" v-model="barcode"></input>
|
| | | <text class='cuIcon-search text-blue' @click="search"></text>
|
| | | </view>
|
| | | <view class="cu-form-group">
|
| | | <view class="title">库位码</view>
|
| | | <input placeholder="请扫描库位码" v-model="locCode"></input>
|
| | | </view>
|
| | | </form>
|
| | | <view class="cu-list det menu sm-border padding">
|
| | |
| | | {{index+1}}
|
| | | </view>
|
| | | <view class="text-blue">
|
| | | {{`${item.maktx}`}}
|
| | | </view>
|
| | | </view>
|
| | | <view class="action">
|
| | | <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
|
| | | 编码:{{`${item.matnrCode}`}}
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | </view>
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">名称:</text>
|
| | | <text class="text-grey ">{{item.maktx}}</text>
|
| | | </view>
|
| | | |
| | | </view>
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">ASN:</text>
|
| | |
| | | <text class="text-grey ">{{item.asnCode}}</text>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">托盘:</text>
|
| | | </view>
|
| | | <view class="action">
|
| | | <text class="text-grey ">{{item.barcode}}</text>
|
| | | </view>
|
| | | </view>
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">供应商批次:</text>
|
| | | </view>
|
| | | <view class="action">
|
| | | <text class="text-grey ">{{item.splrBatch}}</text>
|
| | | </view>
|
| | | </view>
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">库存批次:</text>
|
| | | <text class="text-black">批次:</text>
|
| | | </view>
|
| | | <view class="action">
|
| | | <text class="text-grey ">{{item.batch}}</text>
|
| | |
| | | </view>
|
| | | <view class="cu-item">
|
| | | <view class="content">
|
| | | <text class="text-black">收货数量:</text>
|
| | | <text class="text-black">数量:</text>
|
| | | </view>
|
| | | <view class="action">
|
| | | <text class="text-grey ">{{item.anfme}}</text>
|
| | |
| | | </block>
|
| | | </view>
|
| | |
|
| | | <view class="cu-form-group margin-bottom">
|
| | | <view class="title">库位码</view>
|
| | | <input placeholder="请扫描库位码" v-model="locCode"></input>
|
| | | </view>
|
| | | |
| | | <view class="cu-bar btn-group foot">
|
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
|
| | | <button class="cu-btn bg-blue shadow-blur" @click="confirm">上架</button>
|
| | |
| | | data,
|
| | | msg
|
| | | } = await request('/stock/operate/list', {
|
| | | asnCode: this.asnCode,
|
| | | barcode: this.container,
|
| | | matnrCode: this.barcode
|
| | | })
|
| | | if (code === 200) {
|
| | | // const find = this.list.find(el => el.id === data.id);
|
| | | // !find && |
| | | this.list.push(data)
|
| | | this.list = data
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: msg,
|
| | |
| | | },
|
| | |
|
| | | async confirm() {
|
| | | if (this.locCode !== '') {
|
| | | if (this.locCode === '' || this.locCode === null) {
|
| | | uni.showToast({
|
| | | title: '请输入库位',
|
| | | icon: "none",
|
| | | })
|
| | | return ;
|
| | | }
|
| | | if (this.container === '' || this.container === null) {
|
| | | uni.showToast({
|
| | | title: '请输入托盘码',
|
| | | icon: "none",
|
| | | })
|
| | | return ;
|
| | | }
|
| | | const {
|
| | | code,
|
| | | data,
|
| | | msg
|
| | | } = await request('/stock/operate', {
|
| | | itemList: this.list,
|
| | | locCode: this.locCode
|
| | | locCode: this.locCode,
|
| | | barcode: this.container,
|
| | | |
| | | })
|
| | | if (code === 200) {
|
| | | uni.showToast({
|
| | | title: '上架成功'
|
| | | })
|
| | | this.list = []
|
| | | this.barcode = ''
|
| | | this.locCode = ''
|
| | | this.container = ''
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: msg,
|
| | | icon: "none",
|
| | | })
|
| | | }
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: '请选择库位',
|
| | | icon: "none",
|
| | | })
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | },
|