wtt
2026-03-30 c89544954db0254978c1fabcb175d622db28551c
pages/MJGL/shangmudan/MouldUpperBill.vue
@@ -2,9 +2,10 @@
   <view>
      <view class="form">
         <view class="form-item">
            <view class="title">条码</view>
            <view class="title">{{ $t("MouldUpperBill.HBarCode") == "MouldUpperBill.HBarCode" ? "条码" : $t("MouldUpperBill.HBarCode") }}</view>
            <view class="right" style="width: 350rpx;">
               <input type="text" :focus="HBarCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码"
               <input type="text" :focus="HBarCodeFocus" v-model="hform.HBarCode"
                  :placeholder="$t('MouldUpperBill.HBarCode_Placeholder') == 'MouldUpperBill.HBarCode_Placeholder' ? '请扫描(或输入)条码' : $t('MouldUpperBill.HBarCode_Placeholder')"
                  @confirm="getHBarCodeData(hform.HBarCode)" />
            </view>
            <uni-icons type="scan"
@@ -12,78 +13,80 @@
               size="20" @click="toScanCode"></uni-icons>
         </view>
         <view class="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="() => { tabs = 0; reFocusBarCode(); }">单据信息</view>
            <view :class="tabs == 1 ? 'on':''" @tap="() => { tabs = 1; reFocusBarCode(); }">模具信息</view>
            <view :class="tabs == 2 ? 'on':''" @tap="() => { tabs = 2; reFocusBarCode(); }">制单信息</view>
            <view :class="tabs == 0 ? 'on':''" @tap="() => { tabs = 0; reFocusBarCode(); }">
               {{ $t("MouldUpperBill.tabBillInfo") == "MouldUpperBill.tabBillInfo" ? "单据信息" : $t("MouldUpperBill.tabBillInfo") }}
            </view>
            <view :class="tabs == 1 ? 'on':''" @tap="() => { tabs = 1; reFocusBarCode(); }">
               {{ $t("MouldUpperBill.tabMouldInfo") == "MouldUpperBill.tabMouldInfo" ? "模具信息" : $t("MouldUpperBill.tabMouldInfo") }}
            </view>
            <view :class="tabs == 2 ? 'on':''" @tap="() => { tabs = 2; reFocusBarCode(); }">
               {{ $t("MouldUpperBill.tabMakerInfo") == "MouldUpperBill.tabMakerInfo" ? "制单信息" : $t("MouldUpperBill.tabMakerInfo") }}
            </view>
         </view>
         <!-- 单据信息 -->
         <view v-if="tabs == 0">
            <view class="form-item">
               <view class="title">单据号:</view>
               <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号:" : $t("Gy.HBillNo") }}</view>
               <view class="righton">
                  <input name="HBillNo" disabled v-model="hform.HBillNo" />
               </view>
            </view>
            <view class="form-item">
               <view class="title">单据日期:</view>
               <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期:" : $t("Gy.HDate") }}</view>
               <view class="right">
                  <picker mode="date" v-model="hform.HDate" @change="HDateChange">
                     <input disabled v-model="hform.HDate" placeholder="请选择日期" />
                     <input disabled v-model="hform.HDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择日期' : $t('Gy.HDate_Placeholder')" />
                  </picker>
               </view>
            </view>
            <view class="form-item">
               <view class="title"><text>*</text>使用部门:</view>
               <view class="title"><text>*</text>{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "使用部门:" : $t("Gy.HDeptName") }}</view>
               <view class="right">
                  <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName"
                     @input="HDeptNameChange"></uni-combox>
                  <uni-combox :candidates="arrayHDeptName" :placeholder="$t('Gy.HDeptName_Placeholder') == 'Gy.HDeptName_Placeholder' ? '请选择部门' : $t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" @input="HDeptNameChange"></uni-combox>
               </view>
            </view>
            <view class="form-item">
               <view class="title"><text>*</text>操作员:</view>
               <view class="title"><text>*</text>{{ $t("MouldUpperBill.HEmpName") == "MouldUpperBill.HEmpName" ? "操作员:" : $t("MouldUpperBill.HEmpName") }}</view>
               <view class="right">
                  <uni-combox :candidates="arrayHEmpName" placeholder="请选择操作员" v-model="hform.HEmpName"
                     @input="HEmpNameChange"></uni-combox>
                  <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldUpperBill.HEmpName_Placeholder') == 'MouldUpperBill.HEmpName_Placeholder' ? '请选择操作员' : $t('MouldUpperBill.HEmpName_Placeholder')" v-model="hform.HEmpName" @input="HEmpNameChange"></uni-combox>
               </view>
            </view>
            <view class="form-item">
               <view class="title"><text>*</text>负责人:</view>
               <view class="title"><text>*</text>{{ $t("MouldUpperBill.HManagerName") == "MouldUpperBill.HManagerName" ? "负责人:" : $t("MouldUpperBill.HManagerName") }}</view>
               <view class="right">
                  <uni-combox :candidates="arrayHEmpName" placeholder="请选择负责人" v-model="hform.HMangerName"
                     @input="HManagerNameChange"></uni-combox>
                  <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldUpperBill.HManagerName_Placeholder') == 'MouldUpperBill.HManagerName_Placeholder' ? '请选择负责人' : $t('MouldUpperBill.HManagerName_Placeholder')" v-model="hform.HMangerName" @input="HManagerNameChange"></uni-combox>
               </view>
            </view>
            <view class="form-item">
               <view class="title"><text>*</text>生产资源:</view>
               <view class="title"><text>*</text>{{ $t("MouldUpperBill.HSourceName") == "MouldUpperBill.HSourceName" ? "生产资源:" : $t("MouldUpperBill.HSourceName") }}</view>
               <view class="right">
                  <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName"
                     @input="HSourceNameChange"></uni-combox>
                  <uni-combox :candidates="arrayHSourceName" :placeholder="$t('MouldUpperBill.HSourceName_Placeholder') == 'MouldUpperBill.HSourceName_Placeholder' ? '请选择生产资源' : $t('MouldUpperBill.HSourceName_Placeholder')" v-model="hform.HSourceName" @input="HSourceNameChange"></uni-combox>
               </view>
            </view>
            <view class="form-item">
               <view class="title">上模时间:</view>
               <view class="title">{{ $t("MouldUpperBill.HScanDate") == "MouldUpperBill.HScanDate" ? "上模时间:" : $t("MouldUpperBill.HScanDate") }}</view>
               <view class="righton">
                  <input name="HScanDate" disabled v-model="hform.HScanDate" placeholder="请选择" />
                  <input name="HScanDate" disabled v-model="hform.HScanDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择' : $t('Gy.HDate_Placeholder')" />
               </view>
            </view>
            <view class="form-item">
               <view class="title">生产订单:</view>
               <view class="title">{{ $t("MouldUpperBill.HICMOBillNo") == "MouldUpperBill.HICMOBillNo" ? "生产订单:" : $t("MouldUpperBill.HICMOBillNo") }}</view>
               <view class="righton">
                  <input name="HICMOBillNo" disabled v-model="hform.HICMOBillNo" />
               </view>
            </view>
            <view class="form-item">
               <view class="title">流转卡:</view>
               <view class="title">{{ $t("MouldUpperBill.HProcExchBillNo") == "MouldUpperBill.HProcExchBillNo" ? "流转卡:" : $t("MouldUpperBill.HProcExchBillNo") }}</view>
               <view class="righton">
                  <input disabled v-model="hform.HProcExchBillNo" />
               </view>
            </view>
            <view class="form-item">
               <view class="title">备注:</view>
               <view class="title">{{ $t("Gy.HRemark") == "Gy.HRemark" ? "备注:" : $t("Gy.HRemark") }}</view>
               <view class="right">
                  <textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="请输入备注"></textarea>
                  <textarea name="HRemark" v-model="hform.HRemark" auto-height :placeholder="$t('Gy.HRemark_Placeholder') == 'Gy.HRemark_Placeholder' ? '请输入备注' : $t('Gy.HRemark_Placeholder')"></textarea>
               </view>
            </view>
@@ -96,72 +99,72 @@
                  <uni-card style="margin: 10rpx 0;">
                     <view class="card-content">
                        <view class="card-row">
                           <text class="label">序号:</text>
                           <text class="label">{{ $t("MouldUpperBill.table_SerialNo") == "MouldUpperBill.table_SerialNo" ? "序号:" : $t("MouldUpperBill.table_SerialNo") }}</text>
                           <text class="value">{{ index + 1 }}</text>
                        </view>
                        <view class="card-row">
                           <text class="label">器具编码:</text>
                           <text class="label">{{ $t("MouldUpperBill.table_MouldCode") == "MouldUpperBill.table_MouldCode" ? "器具编码:" : $t("MouldUpperBill.table_MouldCode") }}</text>
                           <text class="value">{{ item.器具编码 }}</text>
                        </view>
                        <view class="card-row">
                           <text class="label">器具名称:</text>
                           <text class="label">{{ $t("MouldUpperBill.table_MouldName") == "MouldUpperBill.table_MouldName" ? "器具名称:" : $t("MouldUpperBill.table_MouldName") }}</text>
                           <text class="value">{{ item.器具名称 }}</text>
                        </view>
                        <view class="card-row">
                           <text class="label">器具型号:</text>
                           <text class="label">{{ $t("MouldUpperBill.table_MouldModel") == "MouldUpperBill.table_MouldModel" ? "器具型号:" : $t("MouldUpperBill.table_MouldModel") }}</text>
                           <text class="value">{{ item.器具型号 }}</text>
                        </view>
                        <view class="card-row">
                           <text class="label">器具条码:</text>
                           <text class="label">{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "器具条码:" : $t("Gy.HBarCode") }}</text>
                           <text class="value">{{ item.器具条码 }}</text>
                        </view>
                        <view class="card-row">
                           <text class="label">器具数量:</text>
                           <text class="label">{{ $t("Gy.HQty") == "Gy.HQty" ? "器具数量:" : $t("Gy.HQty") }}</text>
                           <text class="value">{{ item.器具数量 }}</text>
                        </view>
                     </view>
                  </uni-card>
               </view>
               <view class="over" v-if="listData.length == 0">暂无模具数据</view>
               <view class="over" v-if="listData.length == 0">{{ $t("MouldUpperBill.noMouldData") == "MouldUpperBill.noMouldData" ? "暂无模具数据" : $t("MouldUpperBill.noMouldData") }}</view>
            </view>
         </view>
         <view v-if="tabs == 2">
            <view class="form-item">
               <view class="title">制单人:</view>
               <view class="title">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}</view>
               <view class="righton">
                  <input v-model="hform.HMaker" disabled />
               </view>
            </view>
            <view class="form-item">
               <view class="title">制单日期:</view>
               <view class="title">{{ $t("Gy.HMakeDate") == "Gy.HMakeDate" ? "制单日期:" : $t("Gy.HMakeDate") }}</view>
               <view class="righton">
                  <input v-if="hform.HMakeDate" v-model="hform.HMakeDate.substr(0,10)" disabled />
                  <input v-else v-model="hform.HMakeDate" disabled />
               </view>
            </view>
            <view class="form-item">
               <view class="title">修改人:</view>
               <view class="title">{{ $t("Gy.HUpDater") == "Gy.HUpDater" ? "修改人:" : $t("Gy.HUpDater") }}</view>
               <view class="righton">
                  <input v-model="hform.HUpDater" disabled />
               </view>
            </view>
            <view class="form-item">
               <view class="title">修改日期:</view>
               <view class="title">{{ $t("Gy.HUpDateDate") == "Gy.HUpDateDate" ? "修改日期:" : $t("Gy.HUpDateDate") }}</view>
               <view class="righton">
                  <input v-if="hform.HUpDateDate" v-model="hform.HUpDateDate.substr(0,10)" disabled />
                  <input v-else v-model="hform.HUpDateDate" disabled />
               </view>
            </view>
            <view class="form-item">
               <view class="title">审核人:</view>
               <view class="title">{{ $t("Gy.HChecker") == "Gy.HChecker" ? "审核人:" : $t("Gy.HChecker") }}</view>
               <view class="righton">
                  <input v-model="hform.HChecker" disabled />
               </view>
            </view>
            <view class="form-item">
               <view class="title">审核日期:</view>
               <view class="title">{{ $t("Gy.HCheckDate") == "Gy.HCheckDate" ? "审核日期:" : $t("Gy.HCheckDate") }}</view>
               <view class="righton">
                  <input v-if="hform.HCheckDate" v-model="hform.HCheckDate.substr(0,10)" disabled />
                  <input v-else v-model="hform.HCheckDate" disabled />
@@ -171,10 +174,10 @@
         </view>
         <view class="bottom-btn">
            <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
            <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button>
            <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
            <button class="btn-c" size="mini" @tap="goBack">退出</button>
            <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldUpperBill.submit") == "MouldUpperBill.submit" ? "提交" : $t("MouldUpperBill.submit") }}</button>
            <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">{{ $t("MouldUpperBill.modify") == "MouldUpperBill.modify" ? "修改" : $t("MouldUpperBill.modify") }}</button>
            <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldUpperBill.submit") == "MouldUpperBill.submit" ? "提交" : $t("MouldUpperBill.submit") }}</button>
            <button class="btn-c" size="mini" @tap="goBack">{{ $t("MouldUpperBill.goBack") == "MouldUpperBill.goBack" ? "退出" : $t("MouldUpperBill.goBack") }}</button>
         </view>
      </view>
@@ -256,6 +259,10 @@
         }
      },
      onLoad(e) {
uni.setNavigationBarTitle({
                title: this.$t("MouldUpperBill.title") == 'MouldUpperBill.title' ? '上模单' : this.$t("MouldUpperBill.title")
            })
         this.HBarCodeFocus = true
         this.getHDeptList()
         this.getHEmpList()
@@ -289,7 +296,7 @@
            mpaasScanModule.mpaasScan({
               'hideAlbum': true,
               'timeoutInterval': '10', //超时时间
               'timeoutText': '未识别到二维码' //超时提醒
               'timeoutText': this.$t('MouldUpperBill.scanTimeoutText') == 'MouldUpperBill.scanTimeoutText' ? '未识别到二维码' : this.$t('MouldUpperBill.scanTimeoutText') //超时提醒
            }, (ret) => {
               console.log(ret.resp_result)
               this.hform.HBarCode = ret.resp_result
@@ -320,7 +327,7 @@
            if (uni.getStorageSync('Organization') == "杭州斯莫尔磁性材料有限公司") {
               if (!this.hform.HSourceName) {
                  uni.showToast({
                     title: '请先选择或扫描生产资源',
                     title: this.$t('MouldUpperBill.selectSourceFirst') == 'MouldUpperBill.selectSourceFirst' ? '请先选择或扫描生产资源' : this.$t('MouldUpperBill.selectSourceFirst'),
                     icon: 'none'
                  });
                  return;
@@ -388,7 +395,7 @@
                        case 3:
                           if (!this.hform.HICMOBillNo && !this.hform.HProcExchBillNo) {
                              uni.showToast({
                                 title: '请先扫描生产工单',
                                 title: this.$t('MouldUpperBill.scanWorkOrderFirst') == 'MouldUpperBill.scanWorkOrderFirst' ? '请先扫描生产工单' : this.$t('MouldUpperBill.scanWorkOrderFirst'),
                                 icon: 'none'
                              });
                              return;
@@ -435,7 +442,7 @@
                           break;
                        default:
                           uni.showToast({
                              title: '未知的返回类型',
                              title: this.$t('MouldUpperBill.unknownType') == 'MouldUpperBill.unknownType' ? '未知的返回类型' : this.$t('MouldUpperBill.unknownType'),
                              icon: 'none',
                           });
                           break;
@@ -451,7 +458,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -472,7 +479,7 @@
               if (existingIndex === -1) {
                  // 如果不存在,说明不在当前物料的检具清单中
                  uni.showToast({
                     title: '当前检具不在当前物料的检具清单中',
                     title: this.$t('MouldUpperBill.mouldNotInList') == 'MouldUpperBill.mouldNotInList' ? '当前检具不在当前物料的检具清单中' : this.$t('MouldUpperBill.mouldNotInList'),
                     icon: 'none',
                     duration: 1500
                  });
@@ -484,7 +491,7 @@
                     this.listData[existingIndex].器具条码 = this.hform.HBarCode;
                     this.listData[existingIndex].器具数量 = 1;
                     uni.showToast({
                        title: '扫描成功',
                        title: this.$t('MouldUpperBill.scanSuccess') == 'MouldUpperBill.scanSuccess' ? '扫描成功' : this.$t('MouldUpperBill.scanSuccess'),
                        icon: 'success',
                        duration: 1500
                     });
@@ -492,7 +499,7 @@
                  } else {
                     // 器具数量已为1,提示不允许重复扫描
                     uni.showToast({
                        title: '该模具已扫描,不允许重复扫描',
                        title: this.$t('MouldUpperBill.mouldAlreadyScanned') == 'MouldUpperBill.mouldAlreadyScanned' ? '该模具已扫描,不允许重复扫描' : this.$t('MouldUpperBill.mouldAlreadyScanned'),
                        icon: 'none',
                        duration: 1500
                     });
@@ -515,7 +522,7 @@
                  };
                  this.listData.push(newRow);
                  uni.showToast({
                     title: '扫描成功',
                     title: this.$t('MouldUpperBill.scanSuccess') == 'MouldUpperBill.scanSuccess' ? '扫描成功' : this.$t('MouldUpperBill.scanSuccess'),
                     icon: 'success',
                     duration: 1500
                  });
@@ -523,7 +530,7 @@
               } else {
                  // 如果已存在,提示用户
                  uni.showToast({
                     title: '该模具已扫描',
                     title: this.$t('MouldUpperBill.mouldAlreadyScanned') == 'MouldUpperBill.mouldAlreadyScanned' ? '该模具已扫描' : this.$t('MouldUpperBill.mouldAlreadyScanned'),
                     icon: 'none',
                     duration: 1500
                  });
@@ -556,7 +563,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -596,7 +603,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -642,7 +649,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -718,7 +725,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -811,7 +818,7 @@
                     } else {
                        // 校验不通过,显示错误信息
                        uni.showToast({
                           title: res.data.Message || '模具档案校验失败',
                           title: res.data.Message || this.$t('MouldUpperBill.mouldCheckFailed') == 'MouldUpperBill.mouldCheckFailed' ? '模具档案校验失败' : this.$t('MouldUpperBill.mouldCheckFailed'),
                           icon: 'none'
                        });
                        resolve(false);
@@ -820,7 +827,7 @@
                  fail: (res) => {
                     console.log('获取模具条码失败:', res);
                     uni.showToast({
                        title: '校验失败,请检查网络',
                        title: this.$t('MouldUpperBill.checkNetworkFailed') == 'MouldUpperBill.checkNetworkFailed' ? '校验失败,请检查网络' : this.$t('MouldUpperBill.checkNetworkFailed'),
                        icon: 'none'
                     });
                     resolve(false);
@@ -852,7 +859,7 @@
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title: '接口请求失败',
                     title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                     icon: 'none'
                  })
               },
@@ -862,7 +869,7 @@
            if (uni.getStorageSync('Organization') == "杭州斯莫尔磁性材料有限公司") {
               if (!this.hform.HSourceName) {
                  uni.showToast({
                     title: '请先选择生产资源',
                     title: this.$t('MouldUpperBill.selectSourceFirst') == 'MouldUpperBill.selectSourceFirst' ? '请先选择生产资源' : this.$t('MouldUpperBill.selectSourceFirst'),
                     icon: 'none'
                  });
                  return;
@@ -870,7 +877,7 @@
            }
            if (this.listData.length === 0) {
               uni.showToast({
                  title: '请至少添加一个模具',
                  title: this.$t('MouldUpperBill.addAtLeastOneMould') == 'MouldUpperBill.addAtLeastOneMould' ? '请至少添加一个模具' : this.$t('MouldUpperBill.addAtLeastOneMould'),
                  icon: 'none'
               })
            }
@@ -885,9 +892,9 @@
               if (zeroQtyItem) {
                  // 找到第一个数量异常项的位置(索引+1)
                  const index = this.listData.indexOf(zeroQtyItem) + 1;
                  const code = zeroQtyItem.器具编码 || '未知编码';
                  const code = zeroQtyItem.器具编码 || this.$t('MouldUpperBill.unknownCode') == 'MouldUpperBill.unknownCode' ? '未知编码' : this.$t('MouldUpperBill.unknownCode');
                  uni.showToast({
                     title: `第${index}行【${code}】器具数量为0,请检查`,
                     title: this.$t('MouldUpperBill.qtyZeroError') == 'MouldUpperBill.qtyZeroError' ? '第{index}行【{code}】器具数量为0,请检查' : this.$t('MouldUpperBill.qtyZeroError').replace('{index}', index).replace('{code}', code),
                     icon: 'none',
                     duration: 3000
                  });
@@ -896,22 +903,22 @@
            }
            if (!this.hform.HEmpName) {
               uni.showToast({
                  title: '请选择操作员',
                  title: this.$t('MouldUpperBill.selectOperator') == 'MouldUpperBill.selectOperator' ? '请选择操作员' : this.$t('MouldUpperBill.selectOperator'),
                  icon: 'none'
               })
            } else if (!this.hform.HMangerName) {
               uni.showToast({
                  title: '请选择负责人',
                  title: this.$t('MouldUpperBill.selectManager') == 'MouldUpperBill.selectManager' ? '请选择负责人' : this.$t('MouldUpperBill.selectManager'),
                  icon: 'none'
               })
            } else if (!this.hform.HDeptName) {
               uni.showToast({
                  title: '请选择部门',
                  title: this.$t('MouldUpperBill.selectDept') == 'MouldUpperBill.selectDept' ? '请选择部门' : this.$t('MouldUpperBill.selectDept'),
                  icon: 'none'
               })
            } else {
               uni.showLoading({
                  title: '请稍候'
                  title: this.$t('MouldUpperBill.pleaseWait') == 'MouldUpperBill.pleaseWait' ? '请稍候' : this.$t('MouldUpperBill.pleaseWait')
               })
               // ========== 第一步:构建主表数据 ==========
               const mainData = {
@@ -987,8 +994,8 @@
                        let prePage = pages[pages.length - 2];
                                uni.showModal({
                                    title: "提示",
                                    content: res.data.Message + "。是否继续新增?",
                                    title: this.$t('MouldUpperBill.confirmTitle') == 'MouldUpperBill.confirmTitle' ? '提示' : this.$t('MouldUpperBill.confirmTitle'),
                                    content: res.data.Message + (this.$t('MouldUpperBill.continueAdd') == 'MouldUpperBill.continueAdd' ? '。是否继续新增?' : this.$t('MouldUpperBill.continueAdd')),
                                    success: (res) => {
                                        if (res.confirm) {
                                            console.log("用户点击确定");
@@ -1012,7 +1019,7 @@
                  fail: (res) => {
                     console.log(res);
                     uni.showToast({
                        title: '接口请求失败',
                        title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                        icon: 'none'
                     })
                  },
@@ -1021,8 +1028,8 @@
         },
         goBack() {
            uni.showModal({
               title: '提示',
               content: '确认要退出当前页面吗?',
               title: this.$t('MouldUpperBill.confirmTitle') == 'MouldUpperBill.confirmTitle' ? '提示' : this.$t('MouldUpperBill.confirmTitle'),
               content: this.$t('MouldUpperBill.exitConfirm') == 'MouldUpperBill.exitConfirm' ? '确认要退出当前页面吗?' : this.$t('MouldUpperBill.exitConfirm'),
               success: (res) => {
                  if (res.confirm) {
                     console.log('用户点击确定');
@@ -1038,6 +1045,7 @@
</script>
<style lang="scss" scoped>
   /* 样式保持不变 */
   .form {
      width: 668rpx;
      margin: 20rpx auto;
@@ -1160,5 +1168,4 @@
         border-bottom: 3px solid #3a78ff;
      }
   }
</style>