| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">工序:</view> |
| | | <view class="title required">工序:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" placeholder="请选择工序号" |
| | | v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">取样数量:</view> |
| | | <view class="title required">取样数量:</view> |
| | | <view class="right"> |
| | | <input type="number" name="HQty" id="HQty" v-model="hform.HQty" /> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">送测类型:</view> |
| | | <view class="title required">送测类型:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="TestTypeArray" v-model="hform.TestType" |
| | | @input="TestTypeChange"></uni-combox> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班次:</view> |
| | | <view class="title required">生产班次:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="请选择生产班次" |
| | | v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班组:</view> |
| | | <view class="title required">生产班组:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HGroupNameArray" name="HShiftsName" id="HShiftsName" placeholder="请选择生产班组" |
| | | <uni-combox :candidates="HGroupNameArray" name="HGroupName" id="HGroupName" placeholder="请选择生产班组" |
| | | v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox> |
| | | </view> |
| | | </view> |
| | |
| | | HSampleDamageQty: 0, |
| | | TestType: '首检', |
| | | HBadNote: '', |
| | | HDeptName: '', |
| | | HDeptID: 0, |
| | | HCenterID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HCenterID: getUserInfo().HWorkCenterID, |
| | | HShiftsName: '', |
| | | HShiftsID: 0, |
| | | HGroupName: '', |
| | | HGroupID: 0, |
| | | HCheckEmpName: '', |
| | | HCheckEmp: '', |
| | | HSourceName: '', |
| | | HSourceID: 0, |
| | | HGroupName: getUserInfo().HGroupName, |
| | | HGroupID: getUserInfo().HGroupID, |
| | | HCheckEmpName: getUserInfo().HEmpName, |
| | | HCheckEmp: getUserInfo().HEmpID, |
| | | HSourceName: getUserInfo().HSourceName, |
| | | HSourceID: getUserInfo().HSourceID, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HBillNo: '', |
| | | HInterID: 0, |
| | |
| | | let { |
| | | operationType |
| | | } = e |
| | | if (operationType == 0) { |
| | | if (operationType == 0 || operationType == 1) { |
| | | this.getMaxNum() |
| | | this.refSav = 'Add' |
| | | } else { |
| | |
| | | this.GetEmployeeList() |
| | | this.getSourceList() |
| | | this.GetDepartmentList() |
| | | this.get_HWorkShift() |
| | | }, |
| | | methods: { |
| | | HDeptNameChangeHandler() { |
| | |
| | | url: '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: this.hform.HGroupID |
| | | HGroupID: 0 |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | |
| | | Message, |
| | | count |
| | | } = res.data |
| | | |
| | | this.hform.HShiftsID = data[0]['HInterID'] |
| | | this.hform.HShiftsName = data[0]['班次'] |
| | | if (count && data && data.length > 0) { |
| | | this.hform.HShiftsID = data[0]['HInterID'] |
| | | this.hform.HShiftsName = data[0]['班次'] |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | "HICMOBillNo": data1[0].任务单号, //生产订单 |
| | | "HDeptID": data1[0].HWorkShopID, //车间ID |
| | | "HDeptName": data1[0].生产车间, //车间 |
| | | |
| | | }) |
| | | if (data1 && data1.length === 1) { |
| | | // 获取工序ID |
| | | let procId = data1[0].HProcID |
| | | // 在工序数组中查找对应的工序名称 |
| | | let procIndex = this.HProcNameArraySource.findIndex(item => item.HItemID == |
| | | procId) |
| | | |
| | | if (procIndex !== -1) { |
| | | // 自动设置工序 |
| | | this.hform.HProcName = this.HProcNameArraySource[procIndex].HName |
| | | this.hform.HProcID = procId |
| | | this.onHProcNameChangeHandler(this.hform.HProcName) |
| | | } |
| | | } |
| | | |
| | | uni.showToast({ |
| | | icon: 'none', |
| | |
| | | if (this.hform.HQty == '') { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '取样数量为空' |
| | | title: '取样数量不能为空' |
| | | }) |
| | | } |
| | | if (this.hform.HSampleDamageQty == '') { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '破坏性实验数量不能为空' |
| | | }) |
| | | } |
| | | if (this.hform.HProcID == 0) { |
| | |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: "提交成功!" |
| | | }) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | |
| | | }, |
| | | onAddNewHandler() { |
| | | uni.redirectTo({ |
| | | url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0" |
| | | url: "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1" |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | } |
| | | |
| | | .title { |
| | | width: 5em; |
| | | width: 6em; |
| | | font-size: 30rpx; |
| | | flex-shrink: 0; |
| | | text-align: right; |
| | |
| | | .placeholder__view { |
| | | flex: 1; |
| | | } |
| | | |
| | | .required::after{ |
| | | content: "*"; |
| | | color: red; |
| | | margin-left: 4px; |
| | | font-weight: bold; |
| | | } |
| | | </style> |