来料检验单 生产入库检验单 出厂检验单 添加 选单功能 扫码功能修改为通用接口 添加 不良原因选择弹窗
| | |
| | | "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="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, index)"> |
| | | <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> |
| | | <view class="item"> |
| | | <view class="left">使用组织: </view> |
| | | <view class="right">{{bill['使用组织名称']}}</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 { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | refTargetKey: 0, |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | 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[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal, |
| | | index: index |
| | | }) |
| | | }, |
| | | 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, |
| | | 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.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .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-items: 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; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: grid; |
| | | grid-template-columns: repeat(1, 1fr); |
| | | gap: 20rpx; |
| | | |
| | | >view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | .left { |
| | | display: inline-block; |
| | | width: 6rem; |
| | | } |
| | | |
| | | .right { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </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; |
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | |
| | | "versionName" : "2.0.35", |
| | | "versionCode" : 235, |
| | | |
| | | "versionName" : "2.0.36", |
| | | "versionCode" : 236, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | }, |
| | | "icons" : { |
| | | "android" : { |
| | | |
| | | "hdpi" : "unpackage/res/icons/72x72.png", |
| | | "xhdpi" : "unpackage/res/icons/96x96.png", |
| | | "xxhdpi" : "unpackage/res/icons/144x144.png", |
| | |
| | | "ios" : { |
| | | "appstore" : "unpackage/res/icons/1024x1024.png", |
| | | "ipad" : { |
| | | |
| | | "app" : "unpackage/res/icons/76x76.png", |
| | | "app@2x" : "unpackage/res/icons/152x152.png", |
| | | "notification" : "unpackage/res/icons/20x20.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | | |
| | | "proapp@2x" : "unpackage/res/icons/167x167.png", |
| | | "settings" : "unpackage/res/icons/29x29.png", |
| | | "settings@2x" : "unpackage/res/icons/58x58.png", |
| | | |
| | | "spotlight" : "unpackage/res/icons/40x40.png", |
| | | "spotlight@2x" : "unpackage/res/icons/80x80.png" |
| | | }, |
| | | "iphone" : { |
| | | |
| | | "app@2x" : "unpackage/res/icons/120x120.png", |
| | | "app@3x" : "unpackage/res/icons/180x180.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | |
| | | "landscape-secondary", |
| | | //自然方向 |
| | | "default" |
| | | |
| | | ], |
| | | "locale" : "zh-Hans" |
| | | } |
| | |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | " size="20" @click="toScanCode"></uni-icons> |
| | | border-radius: 100%;" 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> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-if="false"> |
| | |
| | | :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> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "../../../utils/mpaasScan"; |
| | | import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue"; |
| | | export default { |
| | | components: { |
| | | InspectValueTemplateVue, |
| | |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue, |
| | | CheckProjectPopupVue, |
| | | BillListPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: "7504", |
| | | HSourceBillType: "1401", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | 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.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.$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){ |
| | | // 非抽检条件下判断结论 |
| | |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '出厂检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | 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() { |
| | |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | " size="20" @click="toScanCode"></uni-icons> |
| | | border-radius: 100%;" 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> |
| | | </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"> <text>序号:</text>{{ index+1 }} </view> |
| | | <view class="detail" style="min-width: 14em;"> |
| | | <view style="flex-shrink: 0"><text>不良原因代码:</text></view> |
| | | <text>{{ br.HBadReasonNumber }} </text> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0"><text>不良原因:</text></view> |
| | | <text>{{ br.HBadReasonName }} </text> |
| | | <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, |
| | | |
| | |
| | | "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: [ |
| | | "工序进站接收单", |
| | | "工序委外接收单", |
| | | "生产订单", |
| | | "工序流转卡", |
| | | "收料通知单", |
| | | "采购订单", |
| | | "采购入库单", |
| | | ], |
| | | // 主表属性 |
| | | 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': "", |
| | | 'HBadReasonHName': "", |
| | | 'HCheckMan': this.hform.HFirstCheckEmp, |
| | | '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 //选单模式 |
| | | } |
| | | }) |
| | | |
| | | 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.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.$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.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | |
| | | 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.$refs.listPopup.showPopup(); |
| | | }, |
| | | async showSelectorModule_BadReason(item, index){ |
| | | this.enablePopupModule = this.PopupModuleNameList[index]; |
| | | console.log("this.$refs: ", this.$refs); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.showPopup(index); |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log("AnalysisMethod: ", val); |
| | | if (val) { |
| | |
| | | await this.get_QC_TakeSampleCheckBillList(); |
| | | } |
| | | }, |
| | | // 不良原因回调 |
| | | async HBadReasonComplete(e) { |
| | | console.log('e: ',e); |
| | | }, |
| | | 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: '来料检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | 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("用户点击取消"); |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1", |
| | | url: "/pages/ZLGL/lailiaojianyan/POStockInCheckBill?operationType=1", |
| | | }); |
| | | }, |
| | | goBack() { |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | line-height: 120%; |
| | | padding: 20rpx 10rpx; |
| | | gap: 10rpx 0; |
| | | |
| | | input { |
| | |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | " size="20" @click="toScanCode"></uni-icons> |
| | | border-radius: 100%;" 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> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-if="false"> |
| | |
| | | <!-- 只有定量分析才启用检验值 --> |
| | | <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"> |
| | |
| | | :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> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "../../../utils/mpaasScan"; |
| | | import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue"; |
| | | export default { |
| | | components: { |
| | | InspectValueTemplateVue, |
| | |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue, |
| | | CheckProjectPopupVue, |
| | | BillListPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | |
| | | // 源单类型 |
| | | HSourceBillType: "生产汇报单", |
| | | HSourceBillTypeValueList: ["3771"], |
| | | HSourceBillTypeValueList: ["3711", "3772"], |
| | | HSourceBillTypeNameList: [ |
| | | "生产汇报单" |
| | | "生产汇报单", '工序流转卡' |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: "7501", |
| | | HSourceBillType: "3711", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 根据源单类型选择单据 |
| | | 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]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = 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.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.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.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) { |
| | |
| | | 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(); |
| | |
| | | <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"> |
| | |
| | | }, |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | 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 |
| New file |
| | |
| | | // 远程获取语言包并加载 |
| | | import i18n from "@/main"; |
| | | import { CommonUtils } from "./common.js" |
| | | |