| | |
| | | <view class="page-container"> |
| | | <!-- 头部导航 --> |
| | | <u-navbar |
| | | title="组托" |
| | | :title="$t('container.title')" |
| | | :fixed="true" |
| | | :placeholder="true" |
| | | bgColor="#ffffff" |
| | |
| | | color="#409eff" |
| | | customStyle="margin-right: 10rpx;" |
| | | ></u-icon> |
| | | <text class="label-text">托盘码</text> |
| | | <text class="label-text">{{ $t('container.palletCode') }}</text> |
| | | </view> |
| | | </template> |
| | | <view class="input-wrap"> |
| | | <u--input |
| | | v-model="barcode" |
| | | placeholder="扫码 / 输入托盘码" |
| | | :placeholder="$t('container.scanPallet')" |
| | | clearable |
| | | border="none" |
| | | :focus="barcodeFocus" |
| | |
| | | color="#409eff" |
| | | customStyle="margin-right: 10rpx;" |
| | | ></u-icon> |
| | | <text class="label-text">物料码</text> |
| | | <text class="label-text">{{ $t('container.matCode') }}</text> |
| | | </view> |
| | | </template> |
| | | <view class="input-wrap"> |
| | | <u--input |
| | | v-model="matnr" |
| | | placeholder="扫码 / 输入物料码" |
| | | :placeholder="$t('container.scanMat')" |
| | | clearable |
| | | border="none" |
| | | :focus="matFocus" |
| | |
| | | <view class="list-header"> |
| | | <view class="title-indicator"></view> |
| | | <text class="header-title"> |
| | | 商品列表 ({{ dataList.length }}) |
| | | {{ $t('container.matList') }} ({{ dataList.length }}) |
| | | </text> |
| | | </view> |
| | | |
| | |
| | | |
| | | <view class="card-content"> |
| | | <view class="info-row"> |
| | | <text class="info-label">品名</text> |
| | | <text class="info-label">{{ $t('container.matName') }}</text> |
| | | <text class="info-value"> |
| | | {{ item.maktx || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-col"> |
| | | <text class="info-label">规格</text> |
| | | <text class="info-label">{{ $t('container.matSpec') }}</text> |
| | | <text class="info-value"> |
| | | {{ item.specs || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="info-col"> |
| | | <text class="info-label">批号</text> |
| | | <text class="info-label">{{ $t('container.matBatch') }}</text> |
| | | <text class="info-value highlight"> |
| | | {{ item.batch || '-' }} |
| | | </text> |
| | |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-col"> |
| | | <text class="info-label">数量</text> |
| | | <text class="info-label">{{ $t('container.matQty') }}</text> |
| | | <text class="info-value qty"> |
| | | {{ item.anfme }} |
| | | </text> |
| | |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | text="修改" |
| | | :text="$t('container.modify')" |
| | | @click="revise(item, i)" |
| | | customStyle="width: 140rpx; margin: 0;" |
| | | ></u-button> |
| | |
| | | type="error" |
| | | size="small" |
| | | plain |
| | | text="移除" |
| | | :text="$t('container.remove')" |
| | | @click="remove(item, i)" |
| | | customStyle="width: 140rpx; margin: 0;" |
| | | ></u-button> |
| | |
| | | <u-empty |
| | | v-if="dataList.length === 0" |
| | | mode="list" |
| | | text="暂无商品,请扫描物料码添加" |
| | | :text="$t('container.emptyList')" |
| | | marginTop="40" |
| | | ></u-empty> |
| | | </view> |
| | |
| | | <view class="btn-wrap"> |
| | | <u-button |
| | | type="info" |
| | | text="重置" |
| | | :text="$t('container.reset')" |
| | | @click="resetConfirmBtn" |
| | | ></u-button> |
| | | </view> |
| | |
| | | > |
| | | <u-button |
| | | type="primary" |
| | | text="确认组托" |
| | | :text="$t('container.confirmComb')" |
| | | @click="combConfirmBtn" |
| | | :disabled="dataList.length === 0" |
| | | :throttleTime="1500" |
| | |
| | | @close="showRevise = false" |
| | | > |
| | | <view class="popup-card"> |
| | | <view class="popup-header"><text>修改信息</text></view> |
| | | <view class="popup-header"><text>{{ $t('container.modifyInfo') }}</text></view> |
| | | <view class="popup-body"> |
| | | <u--form |
| | | labelWidth="80" |
| | | labelPosition="left" |
| | | > |
| | | <u-form-item label="编码"> |
| | | <u-form-item :label="$t('container.code')"> |
| | | <text class="popup-text-val">{{ editMatnr }}</text> |
| | | </u-form-item> |
| | | <u-form-item label="批号"> |
| | | <u-form-item :label="$t('container.matBatch')"> |
| | | <u--input |
| | | v-model="batch" |
| | | placeholder="输入批号" |
| | | :placeholder="$t('matSelected.inputBatch')" |
| | | border="surround" |
| | | ></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="数量"> |
| | | <u-form-item :label="$t('container.matQty')"> |
| | | <u-number-box |
| | | v-model="count" |
| | | :step="0.01" |
| | |
| | | </view> |
| | | <view class="popup-footer"> |
| | | <u-button |
| | | text="取消" |
| | | :text="$t('common.cancel')" |
| | | @click="showRevise = false" |
| | | customStyle="margin-right: 20rpx; flex: 1;" |
| | | ></u-button> |
| | | <u-button |
| | | type="primary" |
| | | text="确认" |
| | | :text="$t('common.confirm')" |
| | | @click="reviseConfirm" |
| | | customStyle="flex: 1;" |
| | | ></u-button> |
| | |
| | | <!-- 模态框 --> |
| | | <u-modal |
| | | :show="showRemove" |
| | | title="确认移除" |
| | | content="是否移除该商品?" |
| | | :title="$t('container.confirmRemove')" |
| | | :content="$t('container.removeMsg')" |
| | | showCancelButton |
| | | @confirm="removeConfirm" |
| | | @cancel="showRemove = false" |
| | | ></u-modal> |
| | | <u-modal |
| | | :show="showComb" |
| | | title="确认组托" |
| | | content="确认将商品组托入库?" |
| | | :title="$t('container.confirmComb')" |
| | | :content="$t('container.combMsg')" |
| | | showCancelButton |
| | | @confirm="comb" |
| | | @cancel="showComb = false" |
| | | ></u-modal> |
| | | <u-modal |
| | | :show="showReset" |
| | | title="确认重置" |
| | | content="是否清空所有商品?" |
| | | :title="$t('container.confirmReset')" |
| | | :content="$t('container.resetMsg')" |
| | | showCancelButton |
| | | @confirm="resetConfirm" |
| | | @cancel="showReset = false" |
| | |
| | | if (len > 0 && len !== 8 && len !== 9) { |
| | | this.$showToast({ |
| | | type: 'error', |
| | | message: '托盘码有误请重试' |
| | | message: this.$t('toast.palletError') |
| | | }) |
| | | this.barcodeFocuss() |
| | | return |
| | |
| | | if (!data && data !== null) { |
| | | this.$showToast({ |
| | | type: 'error', |
| | | message: msg || '查询失败' |
| | | message: msg || this.$t('toast.queryFail') |
| | | }) |
| | | } |
| | | } |
| | |
| | | this.dataList[this.rowNum].batch = this.batch |
| | | this.dataList[this.rowNum].weight = this.weight |
| | | this.editMatnr = '' |
| | | this.$showToast({ type: 'success', message: '修改成功' }) |
| | | this.$showToast({ type: 'success', message: this.$t('toast.modifySuccess') }) |
| | | this.showRevise = false |
| | | }, |
| | | remove(item, i) { |
| | |
| | | }, |
| | | removeConfirm() { |
| | | this.dataList.splice(this.removeNum, 1) |
| | | this.$showToast({ type: 'success', message: '移除成功' }) |
| | | this.$showToast({ type: 'success', message: this.$t('toast.removeSuccess') }) |
| | | this.showRemove = false |
| | | }, |
| | | combConfirmBtn() { |
| | |
| | | }, |
| | | async comb() { |
| | | if (this.barcode === '') { |
| | | this.$showToast({ type: 'error', message: '请扫描托盘条码' }) |
| | | this.$showToast({ type: 'error', message: this.$t('toast.scanPalletCode') }) |
| | | this.showComb = false |
| | | return |
| | | } |
| | |
| | | ) { |
| | | this.$showToast({ |
| | | type: 'error', |
| | | message: this.dataList[i].matnr + '组托数量不能为0' |
| | | message: this.$t('toast.qtyNotZeroMat').replace('{0}', this.dataList[i].matnr) |
| | | }) |
| | | this.showComb = false |
| | | return |
| | |
| | | |
| | | if (code === 200) { |
| | | this.resst() |
| | | this.$showToast({ type: 'success', message: '组托成功' }) |
| | | this.$showToast({ type: 'success', message: this.$t('toast.combSuccess') }) |
| | | } else if (code === 403) { |
| | | this.$showToast({ type: 'error', message: msg }) |
| | | setTimeout(() => { |
| | |
| | | } else { |
| | | this.$showToast({ |
| | | type: 'error', |
| | | message: msg || '组托失败' |
| | | message: msg || this.$t('toast.combFail') |
| | | }) |
| | | } |
| | | } catch (err) { |
| | |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this.$showToast({ type: 'success', message: '重置完成' }) |
| | | this.$showToast({ type: 'success', message: this.$t('toast.resetComplete') }) |
| | | this.showReset = false |
| | | }, |
| | | resst() { |