| .hbuilderx/launch.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| components/BillListPopup/BillListPopup.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| components/ZLGL/BadReasonPopup.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| main.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/caigouruku/POStockInBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/index/login.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/index/tab2.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/zhijiediaobo/MoveStockBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| utils/i18n.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.hbuilderx/launch.json
@@ -21,11 +21,11 @@ "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" } ] components/BillListPopup/BillListPopup.vue
@@ -25,7 +25,7 @@ <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> @@ -143,12 +143,22 @@ 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][ components/ZLGL/BadReasonPopup.vue
New file @@ -0,0 +1,309 @@ <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> main.js
@@ -2,6 +2,7 @@ import en from "./locale/en.json" import ZhCN from "./locale/zh-Hans.json" // 加载本地语言包 const messages = { "zh-Hans":ZhCN, en, @@ -11,6 +12,8 @@ locale: uni.getLocale(),// 获取已设置的语言 messages } import App from './App' import Printer from './plugins/printer' @@ -31,6 +34,7 @@ // #ifndef VUE3 import Vue from 'vue' import VueI18n from 'vue-i18n' Vue.use(VueI18n) const i18n = new VueI18n(i18nConfig) Vue.config.productionTip = false @@ -40,6 +44,7 @@ ...App }) app.$mount() export default i18n // #endif // #ifdef VUE3 @@ -53,6 +58,7 @@ app } } export default i18n // #endif // main.js uni.showToast 实现全局拦截设置默认提示时间为3.5秒 const originalShowToast = uni.showToast; pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue
Diff too large pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -27,29 +27,33 @@ </uni-datetime-picker> </view> </view> <view class="form-item"> <view class="form-item"> <view class="left">源单单号</view> <view class="right" :class="!hasSourceBill?'':'disabled'"> <input type="text" :disabled="hasSourceBill" placeholder="请输入或扫描源单号" 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"> <view class="left">任务单号</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> @@ -57,7 +61,8 @@ <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> @@ -65,7 +70,9 @@ <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"> @@ -87,10 +94,10 @@ <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> <view class="form-item"> <view class="left">判断结论</view> <view class="right none-border"> @@ -113,9 +120,10 @@ <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="bill-main-content" v-if="mainTabSelected == 2"> @@ -314,10 +322,11 @@ <text>单位:</text>{{ checkItem.HUnit }} </view> <!-- 只有定量分析才启用检验值 --> <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2"> <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"> <text>检验记录:</text>{{ checkItem.HQCNote }} @@ -351,8 +360,58 @@ </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"> @@ -456,6 +515,10 @@ :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> @@ -479,6 +542,8 @@ import { MpaasScan } from "../../../utils/mpaasScan"; import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue"; import BadReasonPopupVue from "../../../components/ZLGL/BadReasonPopup.vue"; export default { components: { InspectValueTemplateVue, @@ -490,6 +555,8 @@ ProcExchBillPopupVue, ProcessPopupVue, CheckProjectPopupVue, BillListPopupVue, BadReasonPopupVue }, computed: { judgeConclusion: { @@ -500,13 +567,13 @@ }, data() { return { operationType: 1, billList: null, operationType: 1, mainTabSelected: 1, subTabSelected: 1, // 源单状态控制 hasSourceBill: false, // 控制当前显示的弹窗模块 enablePopupModule: "", @@ -520,6 +587,7 @@ "ProcExchBill", "QCScheme", "Process", "BadReason" ], // 当前操作的检验单ID缓存 currentChechItemIDCache: -1, @@ -558,22 +626,28 @@ }, 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", @@ -625,6 +699,8 @@ HMainSourceInterID: "0", HMainSourceEntryID: "1", HMainSourceBillNo: "", HStockOrgID: uni.getStorageSync('OrganizationID') }, // 检验项目和抽样检验 值 checkItems: {}, @@ -632,22 +708,97 @@ 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){ calcHResult(item) { // 非抽检条件下判断结论 console.log('item: ',item); if(item.HSampleSchemeID) { console.log('item: ', item); if (item.HSampleSchemeID) { return } if(item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit){ if (item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit) { this.checkItems[item.num].HResult = true return } this.checkItems[item.num].HResult = false }, // 源单类型选择 @@ -662,61 +813,110 @@ } }); }, // 根据源单类型选择单据 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) { @@ -944,6 +1144,7 @@ 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; @@ -1124,6 +1325,12 @@ } 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); @@ -1411,6 +1618,18 @@ 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; @@ -1546,6 +1765,8 @@ data: { CheckProjectID: this.hform.HQCSchemeID || 0, HBatchQty: this.hform.HProcExchQty || 0, HMaterID: this.hform.HMaterID, HBillType: '来料检方案' }, }); @@ -1754,13 +1975,14 @@ 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, }, @@ -1784,7 +2006,7 @@ 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("用户点击取消"); @@ -1797,19 +2019,19 @@ } 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() { @@ -1952,6 +2174,23 @@ 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 @@ -2168,6 +2407,7 @@ justify-content: space-between; align-items: center; line-height: 120%; padding: 20rpx 10rpx; gap: 10rpx 0; input { @@ -2222,7 +2462,6 @@ } .icon-wrapper-big { background-color: #3a78ff; border-radius: 100%; width: 50rpx; height: 50rpx; @@ -2259,4 +2498,19 @@ 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> pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
Diff too large pages/caigouruku/POStockInBill.vue
@@ -20,19 +20,19 @@ <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"> @@ -424,6 +424,7 @@ }, methods: { async HWHNameScan(e) { return // 扫描仓库码 console.log('仓库码: ', e); let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) @@ -438,20 +439,38 @@ }, 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') }, }) } else { this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) if (res.data.count == 1) { this.hform.HStockPlaceID = res.data.data[0].HMainID this.hform.HStockPlaceName = res.data.data[0].仓位名称 this.hform.HWHID = res.data.data[0].HWHID this.hform.HWHName = res.data.data[0].所属仓库 } else { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } } catch (err) { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } }, async qrCodeDisplay() { @@ -777,14 +796,12 @@ 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 } } } } }, pages/index/login.vue
@@ -103,7 +103,7 @@ "杭州凯贝奈特": '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/', // 小卫内外网 @@ -143,6 +143,7 @@ }, methods: { onLanguageChangeHandler(e) { //TODO: 动态获取后端的语言包文件,并将语言包应用到全局 console.log('e: ', e.detail.value); if (e.detail.value == 0) { this.Language = '中文' pages/index/tab2.vue
@@ -447,7 +447,7 @@ }, { "img": "../../static/icon/icon8.png", "text": "生产校验单", "text": "生产入库校验单", "url": "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2", "id": 53, "hidden": false pages/zhijiediaobo/MoveStockBill.vue
@@ -26,14 +26,16 @@ </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"> @@ -165,14 +167,15 @@ </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> @@ -655,6 +658,7 @@ }) }, async HWHNameOutScan(e) { return // 扫描仓库码 console.log('仓库码: ', e); let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) @@ -670,23 +674,41 @@ async HStockPlaceOutNameScan(e) { // 扫描仓位码 console.log('仓位码: ', e); let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) console.log('index: ', index); // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 this.hform.HStockPlaceID = 0 this.hform.HStockPlaceName = '' await this.$nextTick() if (index == -1) { uni.showToast({ icon: 'none', title: '扫描仓位条码对应的仓位不存在...' // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 this.hform.HOutStockPlaceID = 0 this.hform.HOutStockPlaceName = '' try { let res = await CommonUtils.doRequest2Async({ url: '/Gy_StockPlace/list', data: { sWhere: ` and 条码编号 = '${e}'`, user: uni.getStorageSync('HUserName'), Organization: uni.getStorageSync('Organization') }, }) this.HOutStockPlaceNameChange('') } else { this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) if (res.data.count == 1) { this.hform.HOutStockPlaceID = res.data.data[0].HMainID this.hform.HOutStockPlaceName = res.data.data[0].仓位名称 this.hform.HSCWHID = res.data.data[0].HWHID this.hform.HSCWHName = res.data.data[0].所属仓库 } else { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } } catch (err) { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } }, async HWHNameInScan(e) { return; // 扫描仓库码 console.log('仓库码: ', e); let index = this.HWHInNameList.findIndex(elem => elem['条码编号'] == e) @@ -702,16 +724,37 @@ async HStockPlaceNameInScan(e) { // 扫描仓位码 console.log('仓位码: ', e); let index = this.HStockPlaceInNameList.findIndex(elem => elem['条码编号'] == e) console.log('index: ', index); if (index == -1) { this.HStockPlaceNameChange('') uni.showToast({ icon: 'none', title: '扫描仓位条码对应的仓位不存在...' // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 this.hform.HStockPlaceID = 0 this.hform.HStockPlaceName = '' try { let res = await CommonUtils.doRequest2Async({ url: '/Gy_StockPlace/list', data: { sWhere: ` and 条码编号 = '${e}'`, user: uni.getStorageSync('HUserName'), Organization: uni.getStorageSync('Organization') }, }) } else { this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['仓位名称']) if (res.data.count == 1) { this.hform.HStockPlaceID = res.data.data[0].HMainID this.hform.HStockPlaceName = res.data.data[0].仓位名称 this.hform.HWHID = res.data.data[0].HWHID this.hform.HWHName = res.data.data[0].所属仓库 } else { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } } catch (err) { uni.showToast({ title: '仓位数据请求失败', icon: 'none' }) } }, async qrCodeDisplay() { @@ -749,10 +792,10 @@ }, // 调入仓位修改 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 } } }, @@ -765,9 +808,10 @@ 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 @@ -1004,34 +1048,34 @@ } }); 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({ @@ -1068,34 +1112,34 @@ }, }); 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() }, @@ -1249,7 +1293,7 @@ }); }, //选择仓库 //选择调入仓库 HWHNameChange(e) { // var name = e.split("(") for (var i = 0; i < this.HWHNameList.length; i++) { @@ -1274,15 +1318,59 @@ 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) { @@ -1293,23 +1381,32 @@ } } }, //选择仓位 //选择调入仓位 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) { @@ -1323,14 +1420,12 @@ }, //选择源单类型 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) }, //获取供应商数据 @@ -2024,6 +2119,9 @@ 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: '单据内码获取失败,错误的单据内码!', utils/i18n.js
New file @@ -0,0 +1,4 @@ // 远程获取语言包并加载 import i18n from "@/main"; import { CommonUtils } from "./common.js"