来料校验单 生产入库校验单 出厂校验单 添加 不良原因 页签 添加 扫源单后 单据信息填写控制
| | |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <view class="card-item" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['名称']" :extra="`代码: ${bill['代码']}`" |
| | | @tap="clickCard(bill, index)"> |
| | | <view class="item"> |
| | | <view class="left">检验项目类别: </view> |
| | | <view class="right">{{bill['检验项目类别']}}</view> |
| | | v-for="(bill, index) in HBillList[curPage-1]" :key="index" @tap="clickCard(bill, index)"> |
| | | <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(0,10)" :key="index"> |
| | | <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}:</text>{{ bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template> |
| | | <template v-else><text>{{ HBillField.ColmCols }}:</text>{{ bill[HBillField.ColmCols] }}</template> |
| | | </view> |
| | | <view class="card-detail" v-if="showDetail == index"> |
| | | <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(10,-1)" :key="index"> |
| | | <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}:</text>{{ bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template> |
| | | <template v-else><text>{{ HBillField.ColmCols }}:</text>{{ bill[HBillField.ColmCols] }}</template> |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail == index && operations != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = -1"> |
| | | <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14" ></uni-icons>收起 |
| | | </view> |
| | | <!-- <view class="part" @tap.stop="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>操作 |
| | | </view> --> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">等级: </view> |
| | | <view class="right">{{bill['等级']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">禁用标记: </view> |
| | | <view class="right">{{bill['禁用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">备注: </view> |
| | | <view class="right">{{bill['备注']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用标记: </view> |
| | | <view class="right">{{bill['使用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用组织: </view> |
| | | <view class="right">{{bill['使用组织名称']}}</view> |
| | | <view class="more" v-if="showDetail != index && operations != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = index"> |
| | | <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息 |
| | | </view> |
| | | <!-- <view class="part" @tap.stop="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>操作 |
| | | </view> --> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" |
| | | :total="length"></uni-pagination> |
| | | </view> |
| | | |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | showDetail: -1, |
| | | operations: -1, |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | HBillList: [], // 表单数据集合 |
| | | HBillFieldsList: [], // 表单字段集合 |
| | | panelHeight: 0, |
| | | |
| | | refTargetKey: 0, |
| | | multiSouceBillList: [] |
| | | multiSouceBillList: [], |
| | | |
| | | }; |
| | | }, |
| | | props: { |
| | |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | retVal[0] = bill |
| | | this.$emit("update", { |
| | | retVal: retVal, |
| | | index: index |
| | | index: this.refTargetKey |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = ` and 禁用标记 !='Y' and ISNULL(审核人,'')!='' and HUSEORGID = '${ uni.getStorageSync("OrganizationID")}'` |
| | | let sWhere = |
| | | ` and 禁用标记 !='Y' and ISNULL(审核人,'')!='' and HUSEORGID = '${ uni.getStorageSync("OrganizationID")}'` |
| | | |
| | | if (this.HCode) { |
| | | swhere += ` and 不良原因代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | swhere += ` and 不良原因名称 like '%${this.HName}%'` |
| | | } |
| | | if (this.HCode) { |
| | | swhere += ` and 不良原因代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | swhere += ` and 不良原因名称 like '%${this.HName}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | |
| | | let { |
| | | data, |
| | | count, |
| | | list, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | |
| | | result.push(data.slice(i, i + this.size)); |
| | | } |
| | | this.HBillList = result |
| | | // 过滤不需要显示的字段 |
| | | this.HBillFieldsList = Array.from(list) |
| | | .filter(e => this.shouldShowField(e.ColmCols) == true) |
| | | this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | |
| | | } |
| | | ) |
| | | }, |
| | | // 判断哪些字段需要显示 |
| | | shouldShowField(key) { |
| | | // 排除不需要显示的字段 |
| | | const excludeKeys = ['单据号', '日期']; // 这些字段已经在其他地方显示了 |
| | | |
| | | // 判断key是否全英文(不包含中文) |
| | | const isAllEnglish = /^[a-zA-Z]+$/.test(key); |
| | | |
| | | // 判断key是否包含"ID"(不区分大小写) |
| | | const containsID = key.toUpperCase().includes('ID'); |
| | | |
| | | return !excludeKeys.includes(key) && |
| | | !isAllEnglish && // 排除全英文的key |
| | | !containsID // 排除包含ID的key |
| | | }, |
| | | emptyValueFilter(item, fieldList){ |
| | | return fieldList.filter(e => item[e.ColmCols]) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx 15rpx 0 0; |
| | |
| | | .search-condition { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | align-s: center; |
| | | gap: 20rpx; |
| | | font-size: 30rpx; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: grid; |
| | | grid-template-columns: repeat(1, 1fr); |
| | | gap: 20rpx; |
| | | .card-item { |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | >view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | .left { |
| | | display: inline-block; |
| | | width: 6rem; |
| | | } |
| | | |
| | | .right { |
| | | display: inline-block; |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="scan" style=" |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | <uni-icons class="right-icon" type="scan" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="search" style=" |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%;" size="20" @click="toBillSelector"></uni-icons> |
| | | <uni-icons class="right-icon" type="search" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="right disabled"> |
| | | <input type="text" :value="hform.HICMOBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 5)"></uni-icons></view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="showSelectorModule(hform, 5)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">流转卡号</view> |
| | |
| | | <input type="text" :value="hform.HProcExchBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 6)"></uni-icons></view> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 6)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">产品代码</view> |
| | |
| | | <input type="text" disabled :value="hform.HMaterNumber" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons> |
| | | <uni-icons type="search" size="20" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 4)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="this.hform.HQCSchemeName" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" class='enable-icon-button' |
| | | @click="showSelectorModule(hform, 7)"></uni-icons></view> |
| | | </view> |
| | | |
| | |
| | | <input type="text" disabled :value="hform.HProcName" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 8)"></uni-icons></view> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 8)"></uni-icons></view> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | <view class="list" v-else> |
| | | <uni-card v-for="(br, index) in badReasons" :key="index"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> <text>序号:</text>{{ index+1 }} </view> |
| | | <view class="detail" style="min-width: 14em;"> |
| | | <view class="detail editable"> <text>序号:</text>{{ index+1 }} </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>不良原因代码:</text></view> |
| | | <text>{{ br.HBadReasonNumber }} </text> |
| | | <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>不良原因:</text></view> |
| | | <text>{{ br.HBadReasonName }} </text> |
| | | <view style="flex: 1;"><text>{{ br.HBadReasonName }} </text></view> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showSelectorModule_BadReason(index, 9)"></uni-icons> |
| | | </view> |
| | |
| | | subTabSelected: 1, |
| | | |
| | | // 源单状态控制 |
| | | hasSourceBill: false, |
| | | |
| | | // 控制当前显示的弹窗模块 |
| | | enablePopupModule: "", |
| | |
| | | "采购订单", |
| | | "采购入库单", |
| | | ], |
| | | hasSourceBill: false, |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: '7503', |
| | |
| | | this.badReasons.push({ |
| | | 'HBadReasonNumber': 0, |
| | | 'HBadReasonNumber': "", |
| | | 'HBadReasonHName': "", |
| | | 'HCheckMan': this.hform.HFirstCheckEmp, |
| | | 'HBadReasonName': "", |
| | | 'HCheckMan': this.hform.HFirstCheckEmpName, |
| | | 'HQty': 0, |
| | | 'HGroupName': this.hform.HGroupName || "", |
| | | 'HSourceName': this.hform.HSourceName |
| | |
| | | } |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('获取源单:', data) |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['HMaterName'] |
| | | this.hform.HMaterNumber = data[0]['HMaterNumber'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | |
| | | this.get_CheckItem(); |
| | | this.hasSourceBill = true |
| | | this.$refs['billList'].exit() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | this.hform.HMaterName = data[0]['HMaterName'] |
| | | this.hform.HMaterNumber = data[0]['HMaterNumber'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | this.hform.HMaterID = data[0].HMaterID; |
| | | this.hform.HMaterName = data[0].产品名称; |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HSourceBillNo = data[0].单据号 |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 1; |
| | |
| | | |
| | | this.$refs.listPopup.showPopup(); |
| | | }, |
| | | async showSelectorModule_BadReason(item, index){ |
| | | this.enablePopupModule = this.PopupModuleNameList[index]; |
| | | async showSelectorModule_BadReason(itemIndex, Moduleindex) { |
| | | this.enablePopupModule = this.PopupModuleNameList[Moduleindex]; |
| | | console.log("this.$refs: ", this.$refs); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.showPopup(index); |
| | | this.$refs.listPopup.showPopup(itemIndex); |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log("AnalysisMethod: ", val); |
| | |
| | | }, |
| | | // 不良原因回调 |
| | | async HBadReasonComplete(e) { |
| | | console.log('e: ',e); |
| | | console.log('e: ', e); |
| | | Object.assign(this.badReasons[e.index], { |
| | | HBadReasonName: e.retVal[0]['不良原因名称'], |
| | | HBadReasonNumber: e.retVal[0]['不良原因代码'], |
| | | HBadReasonID: e.retVal[0]['HItemID'] |
| | | }) |
| | | |
| | | this.$refs['listPopup'].exit() |
| | | |
| | | }, |
| | | async get_QC_TakeSampleCheckBillList() { |
| | | // 取样单查询 |
| | |
| | | checkItemsArray.push(checkItem); |
| | | } |
| | | console.log('checkItemsArray: ', checkItemsArray); |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | let sMainSub = |
| | | `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | checkItemsArray |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0] || '[]'};${JSON.stringify(this.badReasons)}`; |
| | | console.log("this.checkItems: ", this.checkItems); |
| | | |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/QC_FirstPieceCheckBill/set_SaveBill", |
| | | url: "/QC_POStockInCheckBill/set_SaveBill", |
| | | data: { |
| | | sMainSub: sMainSub, |
| | | }, |
| | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${Message}`, |
| | | message: `来料检验单保存错误: ${Message}`, |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${err}`, |
| | | message: `来料检验单保存错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | |
| | | HStrictness: data[i].严格度, |
| | | HInspectResultToSee: data[i].检验结果 |
| | | }); |
| | | } |
| | | this.hasSourceBill = true |
| | | |
| | | let resBadReason = await CommonUtils.doRequest2Async({ |
| | | url: '/QC_POStockInCheckBill_BadReason/getBadReasonList', |
| | | data: { |
| | | HInterID: data[0].hmainid, |
| | | user: getUserInfo()["Czymc"], |
| | | } |
| | | }) |
| | | |
| | | ({ |
| | | count, |
| | | data |
| | | } = resBadReason.data) |
| | | if (count == 1) { |
| | | this.badReasons.push(...data) |
| | | } |
| | | |
| | | this.hasSourceBill = true |
| | |
| | | } |
| | | |
| | | .icon-wrapper-big { |
| | | background-color: #3a78ff; |
| | | border-radius: 100%; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | |
| | | background-color: #f0d6e3; |
| | | border: none; |
| | | } |
| | | |
| | | .enable-icon-button { |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | .disable-icon-button { |
| | | background-color: lightgray; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | pointer-events: none; |
| | | } |
| | | </style> |
| | |
| | | v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="scan" style=" |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | <uni-icons class="right-icon" type="scan" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="search" style=" |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%;" size="20" @click="toBillSelector"></uni-icons> |
| | | <uni-icons class="right-icon" type="search" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-if="false"> |
| | |
| | | <input type="text" :value="hform.HICMOBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 5)"></uni-icons></view> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 5)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item" v-if="false"> |
| | | <view class="left">流转卡号</view> |
| | |
| | | <input type="text" :value="hform.HProcExchBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 6)"></uni-icons></view> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 6)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">产品代码</view> |
| | |
| | | <input type="text" disabled :value="hform.HMaterNumber" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons> |
| | | <uni-icons type="search" size="20" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 4)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="this.hform.HQCSchemeName" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" class="enable-icon-button" |
| | | @click="showSelectorModule(hform, 7)"></uni-icons></view> |
| | | </view> |
| | | |
| | |
| | | <input type="text" disabled :value="hform.HProcName" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 8)"></uni-icons></view> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" @click="showSelectorModule(hform, 8)"></uni-icons></view> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | <!-- 抽样检验 呈现 --> |
| | | |
| | | <view v-if="subTabSelected == 2"> |
| | | <view class="buttons" @tap="addBadReason()"> |
| | | <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>新增 |
| | | </view> |
| | | <view class="over" v-if="badReasons.length == 0">暂无数据</view> |
| | | <view class="list" v-else> |
| | | <uni-card v-for="(br, index) in badReasons" :key="index"> |
| | | <view class="card-detail"> |
| | | <view class="detail editable"> <text>序号:</text>{{ index+1 }} </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>不良原因代码:</text></view> |
| | | <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>不良原因:</text></view> |
| | | <view style="flex: 1;"><text>{{ br.HBadReasonName }} </text></view> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showSelectorModule_BadReason(index, 9)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>数量:</text></view> |
| | | <view class="editable-input"> |
| | | <input type="number" v-model="br.HQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>检验员:</text></view> |
| | | <text>{{ br.HCheckMan }} </text> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>生产班组:</text></view> |
| | | <text>{{ br.HGroupName }} </text> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>生产资源:</text></view> |
| | | <text>{{ br.HSourceName }} </text> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="more"> |
| | | <view class="part" style="color: #da0000" @tap.stop="delBadReason(br, index)"> |
| | | <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx" |
| | | size="18"></uni-icons>删除 |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 抽样检验 呈现 --> |
| | | <view v-if="subTabSelected == 3"> |
| | | <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">暂无数据</view> |
| | | <view class="list" v-else> |
| | | <uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num"> |
| | |
| | | @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue> |
| | | <BadReasonPopupVue v-if="enablePopupModule == PopupModuleNameList[9]" ref="listPopup" |
| | | @update="HBadReasonComplete"></BadReasonPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | MpaasScan |
| | | } from "../../../utils/mpaasScan"; |
| | | import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue"; |
| | | import BadReasonPopupVue from "../../../components/ZLGL/BadReasonPopup.vue"; |
| | | export default { |
| | | components: { |
| | | InspectValueTemplateVue, |
| | |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue, |
| | | CheckProjectPopupVue, |
| | | BillListPopupVue |
| | | BillListPopupVue, |
| | | BadReasonPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | "ProcExchBill", |
| | | "QCScheme", |
| | | "Process", |
| | | "BadReason" |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | |
| | | }, |
| | | 2: { |
| | | id: "2", |
| | | name: "不良原因", |
| | | }, |
| | | 3: { |
| | | id: "3", |
| | | name: "抽样检验", |
| | | }, |
| | | }, |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | |
| | | InspectModules: {}, |
| | | // 检测值 |
| | | InspectValues: {}, |
| | | // 不良原因 |
| | | badReasons: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 新增不良原因 |
| | | addBadReason() { |
| | | this.badReasons.push({ |
| | | 'HBadReasonNumber': 0, |
| | | 'HBadReasonNumber': "", |
| | | 'HBadReasonName': "", |
| | | 'HCheckMan': this.hform.HFirstCheckEmpName, |
| | | 'HQty': 0, |
| | | 'HGroupName': this.hform.HGroupName || "", |
| | | 'HSourceName': this.hform.HSourceName |
| | | }) |
| | | }, |
| | | delBadReason(badReason, index) { |
| | | console.log('badReason: ', badReason); |
| | | this.badReasons.splice(index, 1) |
| | | }, |
| | | // 根据源单类型选择单据 |
| | | toBillSelector() { |
| | | this.$refs['billList'].showPopup() |
| | | }, |
| | | // 显示不良原因弹窗 (调用方式和原有弹窗调用方式不同) |
| | | async showSelectorModule_BadReason(itemIndex, Moduleindex) { |
| | | this.enablePopupModule = this.PopupModuleNameList[Moduleindex]; |
| | | console.log("this.$refs: ", this.$refs); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.showPopup(itemIndex); |
| | | }, |
| | | async HandleBillSelectComplete(e) { |
| | | try { |
| | |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HProcID = data[0]['HProcID'] |
| | | this.hform.HProcName = data[0]['当前工序'] |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | this.$refs['billList'].exit() |
| | | } else { |
| | |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HProcID = data[0]['HProcID'] |
| | | this.hform.HProcName = data[0]['当前工序'] |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | await this.get_QC_TakeSampleCheckBillList(); |
| | | } |
| | | }, |
| | | // 不良原因回调 |
| | | async HBadReasonComplete(e) { |
| | | console.log('e: ', e); |
| | | Object.assign(this.badReasons[e.index], { |
| | | HBadReasonName: e.retVal[0]['不良原因名称'], |
| | | HBadReasonNumber: e.retVal[0]['不良原因代码'], |
| | | HBadReasonID: e.retVal[0]['HItemID'] |
| | | }) |
| | | |
| | | this.$refs['listPopup'].exit() |
| | | |
| | | }, |
| | | // |
| | | async get_QC_TakeSampleCheckBillList() { |
| | | // 取样单查询 |
| | |
| | | checkItemsArray.push(checkItem); |
| | | } |
| | | console.log('checkItemsArray: ', checkItemsArray); |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | let sMainSub = |
| | | `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | checkItemsArray |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0] || '[]'};${JSON.stringify(this.badReasons)}`; |
| | | console.log("this.checkItems: ", this.checkItems); |
| | | |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/firstCheckBillList?operationType=1", |
| | | url: "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1", |
| | | }); |
| | | }, |
| | | goBack() { |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | this.hasSourceBill = true |
| | | let resBadReason = await CommonUtils.doRequest2Async({ |
| | | url: '/QC_LastPieceCheckBill_BadReason/getBadReasonList', |
| | | data: { |
| | | HInterID: data[0].hmainid, |
| | | user: getUserInfo()["Czymc"], |
| | | } |
| | | }) |
| | | |
| | | ({ |
| | | count, |
| | | data |
| | | } = resBadReason.data) |
| | | if (count == 1) { |
| | | this.badReasons.push(...data) |
| | | } |
| | | |
| | | this.hasSourceBill = true |
| | | } else { |
| | |
| | | background-color: #f0d6e3; |
| | | border: none; |
| | | } |
| | | |
| | | .enable-icon-button { |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | .disable-icon-button { |
| | | background-color: lightgray; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | pointer-events: none; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | methods: { |
| | | async HWHNameScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | "杭州凯贝奈特": 'http://192.168.50.253:8080/API/', |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.123:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调出仓位:</view> |
| | | <view class="right" v-show="HSCIsStockMgr"> |
| | | <!-- TODO: 四维尔需要扫仓位码 带出仓库仓位信息,根据公司判断是否需要禁用仓位 --> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HOutStockPlaceName" @input="HOutStockPlaceNameChange" |
| | | @confirm="HStockPlaceOutNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HSCIsStockMgr"> |
| | | |
| | | <!-- <view class="righton" v-show="!HSCIsStockMgr"> |
| | | <input v-model="hform.HOutStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调入仓位:</view> |
| | | <view class="right" v-show="HIsStockMgr"> |
| | | <!-- TODO: 添加公司判断,四维尔清除仓位扫码限制,其他照旧 --> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceInNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange" |
| | | @confirm="HStockPlaceNameInScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HIsStockMgr"> |
| | | <!-- <view class="righton" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保管:</view> |
| | |
| | | }) |
| | | }, |
| | | async HWHNameOutScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | async HStockPlaceOutNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HOutStockPlaceID = 0 |
| | | this.hform.HOutStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | this.HOutStockPlaceNameChange('') |
| | | } else { |
| | | this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HOutStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HOutStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HSCWHID = res.data.data[0].HWHID |
| | | this.hform.HSCWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HWHNameInScan(e) { |
| | | return; |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHInNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | async HStockPlaceNameInScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceInNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | if (index == -1) { |
| | | this.HStockPlaceNameChange('') |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | } else { |
| | | this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async qrCodeDisplay() { |
| | |
| | | }, |
| | | // 调入仓位修改 |
| | | HStockPlaceInNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i].仓位名称 == e) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HMainID |
| | | for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceInNameList[i].HMainID |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (this.HWHInNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHInNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHInNameList[i].HItemID |
| | | |
| | | this.HStockPlaceNameChange(null) |
| | | if (this.HWHInNameList[i]['启用仓位'] == 'Y') { |
| | | this.HIsStockMgr = true |
| | | this.getStockPlaceRemote(this.HWHInNameList[i]["HSPGroupID"], 1) // 修改调入仓库 |
| | | } else { |
| | | // this.hform.HStockPlaceName = '' |
| | | this.HIsStockMgr = false |
| | |
| | | } |
| | | }); |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: Organizaiton |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | //uni.request({ |
| | | // url: this.serverUrl + '/Gy_StockPlace/list', |
| | | // data: { |
| | | // sWhere: "", |
| | | // user: uni.getStorageSync('HUserName'), |
| | | // Organization: Organizaiton |
| | | // }, |
| | | // success: (res) => { |
| | | // if (res.data.count == 1) { |
| | | // this.HStockPlaceInNameList = res.data.data |
| | | // for (var i = 0; i < res.data.data.length; i++) { |
| | | // this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | // } |
| | | // } else { |
| | | // uni.showToast({ |
| | | // title: '仓位数据请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | //}); |
| | | }, |
| | | //基础仓库资料 |
| | | getHBaseList({ |
| | |
| | | }, |
| | | }); |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_StockPlace/list', |
| | | // data: { |
| | | // sWhere: "", |
| | | // user: uni.getStorageSync('HUserName'), |
| | | // Organization: uni.getStorageSync('Organization') |
| | | // }, |
| | | // success: (res) => { |
| | | // if (res.data.count == 1) { |
| | | // this.HStockPlaceNameList = res.data.data |
| | | // for (var i = 0; i < res.data.data.length; i++) { |
| | | // this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | // } |
| | | // } else { |
| | | // uni.showToast({ |
| | | // title: '仓位数据请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | |
| | | // this.getHYDList() |
| | | }, |
| | |
| | | }); |
| | | |
| | | }, |
| | | //选择仓库 |
| | | //选择调入仓库 |
| | | HWHNameChange(e) { |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HSCWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HSCWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.HOutStockPlaceNameChange(null) |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.HSCIsStockMgr = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"], 2) // 修改调出仓库 |
| | | // 查询仓位数据 |
| | | } else { |
| | | this.hform.HOutStockPlaceName = '' |
| | | this.hform.HOutStockPlaceID = '' |
| | | |
| | | this.HSCIsStockMgr = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID, Mode) { |
| | | // Mode=1 -> 调入仓位数据获取; Mode=2 -> 调出仓位数据获取 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | if(Mode == 1){ |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | if(Mode == 2) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | HFIFOWHNameChange(e) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | //选择仓位 |
| | | //选择调入仓位 |
| | | HStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i].仓位名称 == e) { |
| | | console.log(this.HStockPlaceNameList[i]); |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HMainID |
| | | } |
| | | let index = this.HStockPlaceInNameList.findIndex(elem => elem['仓位名称'] == e) |
| | | this.hform.HStockPlaceName = '' |
| | | this.hform.HStockPlaceID = 0 |
| | | if (index != -1) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceInNameList[index].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceInNameList[index].HMainID |
| | | } |
| | | }, |
| | | // 选择调出仓位 |
| | | HOutStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | this.hform.HOutStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | this.hform.HOutStockPlaceID = this.HStockPlaceInNameList[i].HMainID |
| | | } |
| | | } |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['仓位名称'] == e) |
| | | this.hform.HOutStockPlaceName = '' |
| | | this.hform.HOutStockPlaceID = 0 |
| | | if (index != -1) { |
| | | this.hform.HOutStockPlaceName = this.HStockPlaceNameList[index].仓位名称 |
| | | this.hform.HOutStockPlaceID = this.HStockPlaceNameList[index].HMainID |
| | | } |
| | | |
| | | // for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | // if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | // this.hform.HOutStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | // this.hform.HOutStockPlaceID = this.HStockPlaceInNameList[i].HMainID |
| | | // } |
| | | // } |
| | | }, |
| | | //选择源单 |
| | | HSourceBillNoChange(e) { |
| | |
| | | }, |
| | | //选择源单类型 |
| | | HMainSourceBillTypeChange(e) { |
| | | this.HMainSourceBillType = e.detail.value |
| | | let index = this.arrayHMainSourceBillType.findIndex(elem => elem == this.HMainSourceBillType) |
| | | console.log(e) |
| | | let index = e.detail.value |
| | | if (index != -1) { |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[index] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index] |
| | | // this.getHYDList() |
| | | } |
| | | |
| | | console.log(this.HMainSourceBillType, this.hform.HMainSourceBillType) |
| | | }, |
| | | |
| | | //获取供应商数据 |
| | |
| | | if (!this.hform.HSupName) { |
| | | this.hform.HSupID = 0 |
| | | } |
| | | if (!this.hform.HCusName) { |
| | | this.hform.HCusID = 0 |
| | | } |
| | | if (this.hform.HInterID == 0 || !this.hform.HInterID) { |
| | | uni.showToast({ |
| | | title: '单据内码获取失败,错误的单据内码!', |