Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
| | |
| | | "type" : "uni-app:app-ios" |
| | | }, |
| | | { |
| | | "customPlaygroundType" : "device", |
| | | "customPlaygroundType" : "local", |
| | | "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug", |
| | | "openVueDevtools" : true, |
| | | "packageName" : "com.shebeiguanli.www", |
| | | "playground" : "standard", |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | } |
| | | ] |
| | |
| | | <view class="options-wrapper" 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['HSourceInterID'], bill['单据号'], index)"> |
| | | :extra="`数量: ${bill['数量']}`" @tap="clickCard(bill['HSourceInterID'], bill['单据号'], index, bill['HSourceEntryID'])"> |
| | | <view class="item"> |
| | | <view class="left">单据号: </view> |
| | | <view class="right">{{bill['单据号']}}</view> |
| | |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(interid, billno, index) { |
| | | clickCard(interid, billno, index, entryid) { |
| | | if (this.MultiSourceBill == false) { // 非多源单模式 |
| | | // 总线方式传递数据 (可跨组件传递) |
| | | uni.$emit('BillSelectComplete', { |
| | | HInterID: interid, |
| | | HBillNo: billno, |
| | | enableMultiSourceBill: this.MultiSourceBill |
| | | enableMultiSourceBill: this.MultiSourceBill, |
| | | HEntryID: entryid || 0 |
| | | }) |
| | | |
| | | // 父子组件之间传递数据 |
| | | this.$emit("BillSelectComplete", { |
| | | HInterID: interid, |
| | | HBillNo: billno, |
| | | enableMultiSourceBill: this.MultiSourceBill, |
| | | HEntryID: entryid || 0 |
| | | }) |
| | | } else { |
| | | this.$set(this.HBillList[this.curPage - 1][index], 'isActive', !this.HBillList[this.curPage - 1][ |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <uni-popup ref="popup" type="bottom" @change="popupChangeHandler"> |
| | | <view class="content"> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>代码: </text></view> |
| | | <view class="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <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" @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="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> |
| | | <view class="over" v-show="HBillList.length == 0">暂无数据</view> |
| | | </scroll-view> |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" |
| | | :total="length"></uni-pagination> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs'; |
| | | import { |
| | | CommonUtils |
| | | } from '@/utils/common'; |
| | | import { |
| | | getUserInfo |
| | | } from '@/utils/auth'; |
| | | export default { |
| | | name: "BadReasonPopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | showDetail: -1, |
| | | operations: -1, |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], // 表单数据集合 |
| | | HBillFieldsList: [], // 表单字段集合 |
| | | panelHeight: 0, |
| | | |
| | | refTargetKey: 0, |
| | | multiSouceBillList: [], |
| | | |
| | | }; |
| | | }, |
| | | props: { |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup(index) { |
| | | this.$refs.popup.open(); |
| | | this.refTargetKey = index |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[0] = bill |
| | | this.$emit("update", { |
| | | retVal: retVal, |
| | | index: this.refTargetKey |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | 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}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.curPage = 1 |
| | | CommonUtils.doRequest( |
| | | "/Gy_BadReason/list", { |
| | | sWhere: this.getsWhere(), |
| | | user: getUserInfo()['Czymc'] |
| | | }, |
| | | (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | list, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.length = Array.from(data).length |
| | | const result = []; |
| | | for (let i = 0; i < data.length; i += this.size) { |
| | | 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 |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | // 判断哪些字段需要显示 |
| | | 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" scoped> |
| | | .content { |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx 15rpx 0 0; |
| | | padding: 20rpx 20rpx 40rpx 20rpx; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | |
| | | .search-condition { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-s: center; |
| | | gap: 20rpx; |
| | | font-size: 30rpx; |
| | | |
| | | .title { |
| | | width: 5rem; |
| | | text-align: right; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | height: auto; |
| | | padding: 8rpx 16rpx; |
| | | |
| | | input { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .card-item { |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uni-card--is-active { |
| | | background-color: rgba(0, 122, 255, 0.2); |
| | | } |
| | | |
| | | .daterange { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | import en from "./locale/en.json" |
| | | import ZhCN from "./locale/zh-Hans.json" |
| | | |
| | | // 加载本地语言包 |
| | | const messages = { |
| | | "zh-Hans":ZhCN, |
| | | en, |
| | |
| | | locale: uni.getLocale(),// 获取已设置的语言 |
| | | messages |
| | | } |
| | | |
| | | |
| | | |
| | | import App from './App' |
| | | import Printer from './plugins/printer' |
| | |
| | | // #ifndef VUE3 |
| | | import Vue from 'vue' |
| | | import VueI18n from 'vue-i18n' |
| | | |
| | | Vue.use(VueI18n) |
| | | const i18n = new VueI18n(i18nConfig) |
| | | Vue.config.productionTip = false |
| | |
| | | ...App |
| | | }) |
| | | app.$mount() |
| | | export default i18n |
| | | // #endif |
| | | |
| | | // #ifdef VUE3 |
| | |
| | | app |
| | | } |
| | | } |
| | | export default i18n |
| | | // #endif |
| | | // main.js uni.showToast 实现全局拦截设置默认提示时间为3.5秒 |
| | | const originalShowToast = uni.showToast; |
| | |
| | | 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" |
| | | :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"> |
| | |
| | | <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="detail editable" v-show="checkItem.HAnalysisMethod == 2"> |
| | | <text>检验值:</text> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" /> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" |
| | | v-model="checkItem.HInspectValQ" /> |
| | | </view> |
| | | |
| | | <view class="detail" v-if="checkItem.HQCNote"> |
| | |
| | | </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"> |
| | |
| | | :bindKey="0"></ProcessPopupVue> |
| | | <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup" |
| | | @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> |
| | | |
| | |
| | | import { |
| | | 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, |
| | | BadReasonPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | "ProcExchBill", |
| | | "QCScheme", |
| | | "Process", |
| | | "BadReason" |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | |
| | | }, |
| | | 2: { |
| | | id: "2", |
| | | name: "不良原因", |
| | | }, |
| | | 3: { |
| | | id: "3", |
| | | name: "抽样检验", |
| | | }, |
| | | }, |
| | |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: "7504", |
| | | HSourceBillType: "1401", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | 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 HandleBillSelectComplete(e) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: "", |
| | | HInterID: e?.HInterID, |
| | | HEntryID: e?.HEntryID, |
| | | Mode: 2 //选单模式 |
| | | } |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | 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({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: "源单下推错误: " + err |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // 检验值 计算是否合格 |
| | | calcHResult(item){ |
| | | // 非抽检条件下判断结论 |
| | |
| | | |
| | | this.$refs.listPopup.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); |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log("AnalysisMethodVal: ", val); |
| | | if (val) { |
| | |
| | | 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() { |
| | | // 取样单查询 |
| | |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '出厂检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | try { |
| | | console.log('this.$refs: ', this.$refs); |
| | | // 检查是否有未切换的检验值模块(是否包含set_SaveValue方法),如果有,则运行一次保存检验值的方法,根据检验值是否保存成功再执行下一步 |
| | | if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length > |
| | | if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules |
| | | .length > |
| | | 0) { |
| | | // 加载有检验值模块 |
| | | await this.$refs.InspectValueModules[0].set_SaveValue(); |
| | |
| | | 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({ |
| | |
| | | if (res.confirm) { |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: "/pages/JIAOYAN/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1", |
| | | url: "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log("用户点击取消"); |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/firstCheckBillList?operationType=1", |
| | | url: "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill?operationType=1", |
| | | }); |
| | | }, |
| | | goBack() { |
| | |
| | | |
| | | } |
| | | |
| | | 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 |
| | | } 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> |
| | |
| | | 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" |
| | | :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="detail editable" v-show="checkItem.HAnalysisMethod == 2"> |
| | | <text>检验值:</text> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" /> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" |
| | | v-model="checkItem.HInspectValQ" /> |
| | | |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HQCNote"> |
| | |
| | | </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"> |
| | |
| | | :bindKey="0"></ProcessPopupVue> |
| | | <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup" |
| | | @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> |
| | | |
| | |
| | | import { |
| | | 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, |
| | | BadReasonPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | operationType: 1, |
| | | billList: null, |
| | | |
| | | operationType: 1, |
| | | mainTabSelected: 1, |
| | | subTabSelected: 1, |
| | | |
| | | // 源单状态控制 |
| | | hasSourceBill: false, |
| | | |
| | | // 控制当前显示的弹窗模块 |
| | | enablePopupModule: "", |
| | |
| | | "ProcExchBill", |
| | | "QCScheme", |
| | | "Process", |
| | | "BadReason" |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | |
| | | }, |
| | | 2: { |
| | | id: "2", |
| | | name: "不良原因", |
| | | }, |
| | | 3: { |
| | | id: "3", |
| | | name: "抽样检验", |
| | | }, |
| | | |
| | | }, |
| | | |
| | | // 源单类型 |
| | | HSourceBillType: "工序进站接收单", |
| | | HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"], |
| | | HSourceBillType: "收料通知单", |
| | | HSourceBillTypeValueList: ["1103", "1102", "1201"], |
| | | HSourceBillTypeNameList: [ |
| | | "工序进站接收单", |
| | | "工序委外接收单", |
| | | "生产订单", |
| | | "工序流转卡", |
| | | "收料通知单", |
| | | "采购订单", |
| | | "采购入库单", |
| | | ], |
| | | hasSourceBill: false, |
| | | // 主表属性 |
| | | hform: { |
| | | HSourceBillType: "3790", |
| | | HBillType: '7503', |
| | | HSourceBillType: "1103", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | | HInterID: "0", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | 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) |
| | | }, |
| | | async HandleBillSelectComplete(e) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: "", |
| | | HInterID: e?.HInterID, |
| | | HEntryID: e?.HEntryID, |
| | | Mode: 2 //选单模式 |
| | | } |
| | | }) |
| | | |
| | | 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({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: "源单下推错误: " + err |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // 检验值 计算是否合格 |
| | | calcHResult(item){ |
| | | // 非抽检条件下判断结论 |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 根据源单类型选择单据 |
| | | toBillSelector() { |
| | | this.$refs['billList'].showPopup() |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | console.log('HBarCode: ', HBarCode); |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: HBarCode, |
| | | HInterID: 0, |
| | | HEntryID: 0, |
| | | Mode: 1 //扫码模式 |
| | | } |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | 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.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | // 根据单据类型,调用不同的下推函数 |
| | | if (this.hform.HSourceBillType == 3790) { |
| | | // 工序进站接收单列表首检 |
| | | await this.LoadingInformation_StationInBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3793) { |
| | | // 工序委外接收单列表首检 |
| | | await this.LoadingInformation_StationEntrustOutBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3710) { |
| | | // 生产订单列表首检 |
| | | await this.LoadingInformation_ICMO(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3772) { |
| | | // 工序流转卡列表首检 |
| | | await this.LoadingInformation_ProcExchange(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | //if (this.hform.HSourceBillType == 3790) { |
| | | // // 工序进站接收单列表首检 |
| | | // await this.LoadingInformation_StationInBill(HBarCode); |
| | | // if ( |
| | | // (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | // uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | // (uni.getStorageSync("OrganizationID") == "100199" && |
| | | // uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | // ) { |
| | | // await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | // } |
| | | // return; |
| | | //} |
| | | //if (this.hform.HSourceBillType == 3793) { |
| | | // // 工序委外接收单列表首检 |
| | | // await this.LoadingInformation_StationEntrustOutBill(HBarCode); |
| | | // if ( |
| | | // (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | // uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | // (uni.getStorageSync("OrganizationID") == "100199" && |
| | | // uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | // ) { |
| | | // await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | // } |
| | | // return; |
| | | //} |
| | | //if (this.hform.HSourceBillType == 3710) { |
| | | // // 生产订单列表首检 |
| | | // await this.LoadingInformation_ICMO(HBarCode); |
| | | // if ( |
| | | // (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | // uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | // (uni.getStorageSync("OrganizationID") == "100199" && |
| | | // uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | // ) { |
| | | // await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | // } |
| | | // return; |
| | | //} |
| | | //if (this.hform.HSourceBillType == 3772) { |
| | | // // 工序流转卡列表首检 |
| | | // await this.LoadingInformation_ProcExchange(HBarCode); |
| | | // if ( |
| | | // (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | // uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | // (uni.getStorageSync("OrganizationID") == "100199" && |
| | | // uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | // ) { |
| | | // await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | // } |
| | | // return; |
| | | //} |
| | | }, |
| | | async GetCheckItemID() { |
| | | if (!this.hform.HMaterName && !this.hform.HProcName) { |
| | |
| | | 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(itemIndex, Moduleindex) { |
| | | this.enablePopupModule = this.PopupModuleNameList[Moduleindex]; |
| | | console.log("this.$refs: ", this.$refs); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.showPopup(itemIndex); |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log("AnalysisMethod: ", val); |
| | |
| | | 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() { |
| | | // 取样单查询 |
| | | let HProcID = this.hform.HProcID; |
| | |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '来料检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | 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, |
| | | }, |
| | |
| | | if (res.confirm) { |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | url: "/pages/ZLGL/lailiaojianyan/POStockInCheckBill?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log("用户点击取消"); |
| | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${Message}`, |
| | | message: `来料检验单保存错误: ${Message}`, |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${err}`, |
| | | message: `来料检验单保存错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1", |
| | | url: "/pages/ZLGL/lailiaojianyan/POStockInCheckBill?operationType=1", |
| | | }); |
| | | }, |
| | | goBack() { |
| | |
| | | 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 |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | line-height: 120%; |
| | | padding: 20rpx 10rpx; |
| | | gap: 10rpx 0; |
| | | |
| | | input { |
| | |
| | | } |
| | | |
| | | .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" |
| | | :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> |
| | |
| | | <!-- 只有定量分析才启用检验值 --> |
| | | <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2"> |
| | | <text>检验值:</text> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" /> |
| | | <input type="text" class="editable-input" @blur="calcHResult(checkItem)" |
| | | v-model="checkItem.HInspectValQ" /> |
| | | </view> |
| | | |
| | | <view class="detail" v-if="checkItem.HQCNote"> |
| | |
| | | </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"> |
| | |
| | | :bindKey="0"></ProcessPopupVue> |
| | | <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup" |
| | | @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> |
| | | |
| | |
| | | import { |
| | | 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, |
| | | BadReasonPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | "ProcExchBill", |
| | | "QCScheme", |
| | | "Process", |
| | | "BadReason" |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | |
| | | }, |
| | | 2: { |
| | | id: "2", |
| | | name: "不良原因", |
| | | }, |
| | | 3: { |
| | | id: "3", |
| | | name: "抽样检验", |
| | | }, |
| | | }, |
| | | |
| | | // 源单类型 |
| | | HSourceBillType: "生产汇报单", |
| | | HSourceBillTypeValueList: ["3771"], |
| | | HSourceBillTypeValueList: ["3711", "3772"], |
| | | HSourceBillTypeNameList: [ |
| | | "生产汇报单" |
| | | "生产汇报单", '工序流转卡' |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: "7501", |
| | | HSourceBillType: "3711", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | 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 { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: "", |
| | | HInterID: e?.HInterID, |
| | | HEntryID: e?.HEntryID, |
| | | Mode: 2 //选单模式 |
| | | } |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | 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 { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: "源单下推错误: " + err |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // 检验值 计算是否合格 |
| | | calcHResult(item){ |
| | | // 非抽检条件下判断结论 |
| | |
| | | HSourceBillTypeNameChange(e) { |
| | | this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value]; |
| | | this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value]; |
| | | this.hform.HMainSourceBillType = this.HSourceBillTypeValueList[e.detail.value]; |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode((res) => { |
| | |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | console.log('HBarCode: ', HBarCode); |
| | | // 根据单据类型,调用不同的下推函数 |
| | | if (this.hform.HSourceBillType == 3711) { |
| | | // 工序进站接收单列表首检 |
| | | await this.LoadingInformation_ICMOReportBill(HBarCode); |
| | | |
| | | // 调用通用 下推函数 |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: HBarCode, |
| | | HInterID: 0, |
| | | HEntryID: 0, |
| | | Mode: 1 //扫码模式 |
| | | } |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | 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({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | |
| | | // 根据单据类型,调用不同的下推函数 |
| | | // if (this.hform.HSourceBillType == 3711) { |
| | | // // 工序进站接收单列表首检 |
| | | // await this.LoadingInformation_ICMOReportBill(HBarCode); |
| | | // if ( |
| | | // (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | // uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | // (uni.getStorageSync("OrganizationID") == "100199" && |
| | | // uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | // ) { |
| | | // await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | // } |
| | | // return; |
| | | // } |
| | | // if (this.hform.HSourceBillType == 3790) { |
| | | // // 工序进站接收单列表首检 |
| | | // await this.LoadingInformation_StationInBill(HBarCode); |
| | |
| | | // } |
| | | // return; |
| | | // } |
| | | if (this.hform.HSourceBillType == 3793) { |
| | | // 工序委外接收单列表首检 |
| | | await this.LoadingInformation_StationEntrustOutBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3710) { |
| | | // 生产订单列表首检 |
| | | await this.LoadingInformation_ICMO(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3772) { |
| | | // 工序流转卡列表首检 |
| | | await this.LoadingInformation_ProcExchange(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | |
| | | }, |
| | | async GetCheckItemID() { |
| | | if (!this.hform.HMaterName && !this.hform.HProcName) { |
| | |
| | | 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() { |
| | | // 取样单查询 |
| | |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '生产入库检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | try { |
| | | console.log('this.$refs: ', this.$refs); |
| | | // 检查是否有未切换的检验值模块(是否包含set_SaveValue方法),如果有,则运行一次保存检验值的方法,根据检验值是否保存成功再执行下一步 |
| | | if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length > |
| | | if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules |
| | | .length > |
| | | 0) { |
| | | // 加载有检验值模块 |
| | | await this.$refs.InspectValueModules[0].set_SaveValue(); |
| | |
| | | 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> |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange" @confirm="HWHNameScan"></uni-combox> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName" |
| | | placeholder="不可操作" :disabled="!showHStockPlaceName" /></view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | }, |
| | | methods: { |
| | | async HWHNameScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | 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 { |
| | | this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async qrCodeDisplay() { |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | } |
| | | } |
| | |
| | | "杭州凯贝奈特": '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/', |
| | | // 小卫内外网 |
| | |
| | | }, |
| | | methods: { |
| | | onLanguageChangeHandler(e) { |
| | | //TODO: 动态获取后端的语言包文件,并将语言包应用到全局 |
| | | console.log('e: ', e.detail.value); |
| | | if (e.detail.value == 0) { |
| | | this.Language = '中文' |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "生产校验单", |
| | | "text": "生产入库校验单", |
| | | "url": "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2", |
| | | "id": 53, |
| | | "hidden": false |
| | |
| | | </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('') |
| | | |
| | | 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 { |
| | | this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | 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') |
| | | }, |
| | | }) |
| | | |
| | | 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 { |
| | | this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | 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: '单据内码获取失败,错误的单据内码!', |
| New file |
| | |
| | | // 远程获取语言包并加载 |
| | | import i18n from "@/main"; |
| | | import { CommonUtils } from "./common.js" |
| | | |