#
zhou zhou
7 天以前 5fcfb6cf095d5641153688008ee5f88e3d2a737b
pages/InManagement/ContainerBinding/Container_Binding.vue
@@ -2,7 +2,7 @@
   <view class="page-container">
      <!-- 头部导航 -->
      <u-navbar
         title="组托"
         :title="$t('container.title')"
         :fixed="true"
         :placeholder="true"
         bgColor="#ffffff"
@@ -25,13 +25,13 @@
                           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"
@@ -47,13 +47,13 @@
                           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"
@@ -70,7 +70,7 @@
         <view class="list-header">
            <view class="title-indicator"></view>
            <text class="header-title">
               商品列表 ({{ dataList.length }})
               {{ $t('container.matList') }} ({{ dataList.length }})
            </text>
         </view>
@@ -87,20 +87,20 @@
               <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>
@@ -108,7 +108,7 @@
                  </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>
@@ -121,7 +121,7 @@
                     type="primary"
                     size="small"
                     plain
                     text="修改"
                     :text="$t('container.modify')"
                     @click="revise(item, i)"
                     customStyle="width: 140rpx; margin: 0;"
                  ></u-button>
@@ -130,7 +130,7 @@
                     type="error"
                     size="small"
                     plain
                     text="移除"
                     :text="$t('container.remove')"
                     @click="remove(item, i)"
                     customStyle="width: 140rpx; margin: 0;"
                  ></u-button>
@@ -140,7 +140,7 @@
            <u-empty
               v-if="dataList.length === 0"
               mode="list"
               text="暂无商品,请扫描物料码添加"
               :text="$t('container.emptyList')"
               marginTop="40"
            ></u-empty>
         </view>
@@ -151,7 +151,7 @@
         <view class="btn-wrap">
            <u-button
               type="info"
               text="重置"
               :text="$t('container.reset')"
               @click="resetConfirmBtn"
            ></u-button>
         </view>
@@ -161,7 +161,7 @@
         >
            <u-button
               type="primary"
               text="确认组托"
               :text="$t('container.confirmComb')"
               @click="combConfirmBtn"
               :disabled="dataList.length === 0"
               :throttleTime="1500"
@@ -177,23 +177,23 @@
         @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"
@@ -205,13 +205,13 @@
            </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>
@@ -222,24 +222,24 @@
      <!-- 模态框 -->
      <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"
@@ -281,7 +281,7 @@
            if (len > 0 && len !== 8 && len !== 9) {
               this.$showToast({
                  type: 'error',
                  message: '托盘码有误请重试'
                  message: this.$t('toast.palletError')
               })
               this.barcodeFocuss()
               return
@@ -339,7 +339,7 @@
               if (!data && data !== null) {
                  this.$showToast({
                     type: 'error',
                     message: msg || '查询失败'
                     message: msg || this.$t('toast.queryFail')
                  })
               }
            }
@@ -392,7 +392,7 @@
         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) {
@@ -401,7 +401,7 @@
      },
      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() {
@@ -410,7 +410,7 @@
      },
      async comb() {
         if (this.barcode === '') {
            this.$showToast({ type: 'error', message: '请扫描托盘条码' })
            this.$showToast({ type: 'error', message: this.$t('toast.scanPalletCode') })
            this.showComb = false
            return
         }
@@ -421,7 +421,7 @@
            ) {
               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
@@ -442,7 +442,7 @@
            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(() => {
@@ -451,7 +451,7 @@
            } else {
               this.$showToast({
                  type: 'error',
                  message: msg || '组托失败'
                  message: msg || this.$t('toast.combFail')
               })
            }
         } catch (err) {
@@ -464,7 +464,7 @@
      resetConfirm() {
         this.dataList = []
         this.barcode = ''
         this.$showToast({ type: 'success', message: '重置完成' })
         this.$showToast({ type: 'success', message: this.$t('toast.resetComplete') })
         this.showReset = false
      },
      resst() {