From 9ce82fa742e869ae00ebf748e9d8ef5fae421e02 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 19 一月 2026 12:08:05 +0800
Subject: [PATCH] 取样换样文件存放位置优化
---
/dev/null | 830 -------------------
pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBill.vue | 819 +++++++++++++++++++
pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList.vue | 2
pages/index/tab3.vue | 17
pages.json | 8
pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue | 831 +++++++++++++++++++
pages/index/tab2.vue | 11
pages/index/tab4.vue | 21
pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList.vue | 2
9 files changed, 1,681 insertions(+), 860 deletions(-)
diff --git a/pages.json b/pages.json
index 1ea2118..bf4b719 100644
--- a/pages.json
+++ b/pages.json
@@ -1005,26 +1005,26 @@
}
},
{
- "path": "pages/quyangdan/TakeSampleCheckBillList",
+ "path": "pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList",
"style": {
"navigationBarTitleText": "鍙栨牱鍗�"
}
},
{
- "path": "pages/quyangdan/TakeSampleCheckBill",
+ "path": "pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill",
"style": {
"navigationBarTitleText": "鍙栨牱鍗�"
}
},
{
- "path": "pages/huanyangdan/BackSampleCheckBillList",
+ "path": "pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList",
"style": {
"navigationBarTitleText": "杩樻牱鍗�",
"enablePullDownRefresh": true
}
},
{
- "path": "pages/huanyangdan/BackSampleCheckBill",
+ "path": "pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBill",
"style": {
"navigationBarTitleText": "杩樻牱鍗�",
"enablePullDownRefresh": true
diff --git a/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBill.vue b/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBill.vue
new file mode 100644
index 0000000..a0529d6
--- /dev/null
+++ b/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBill.vue
@@ -0,0 +1,819 @@
+<template>
+ <view>
+ <scroll-view scroll-y id="scroll-content" class="scroll-content" :style="{height: scrollContentHeight + 'px'}">
+ <view class="form-item">
+ <view class="title">鏉″舰鐮�:</view>
+ <view class="right">
+ <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" />
+ </view>
+ <view class="right-icon" @click="toScanCode">
+ <uni-icons color="#fff" type="scan" size="24"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">杩樻牱鏁伴噺:</view>
+ <view class="right">
+ <input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">杩樻牱鍐呭:</view>
+ <view class="right">
+ <input type="text" name="HRemark" id="HRemark" v-model="hform.HRemark" />
+ </view>
+ </view>
+
+
+ <view class="form-item">
+ <view class="title">杩樻牱鍛�:</view>
+ <view class="right">
+ <uni-combox :candidates="HCheckEmpNameArray" name="HCheckEmpName" id="HCheckEmpName"
+ placeholder="璇烽�夋嫨杩樻牱鍛�" v-model="hform.HCheckEmpName"
+ @input="HCheckEmpNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="right">
+ <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬"
+ v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇鐝:</view>
+ <view class="right">
+ <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝"
+ v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="right disabled">
+ <input disabled type="text" name="HDate" id="HDate" v-model="hform.HDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right disabled">
+ <input disabled type="text" name="HBillNo" id="HBillNo" v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇璁㈠崟:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HProcExchBillNo" name="HProcExchBillNo"
+ id="HProcExchBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡浠g爜:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterCode" name="HMaterCode" id="HMaterCode" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡鍚嶇О:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterName" name="HMaterName" id="HMaterName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸鍨嬪彿:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterSpec" name="HMaterSpec" id="HMaterSpec" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁¢噺鍗曚綅:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HUnitName" name="HUnitName" id="HUnitName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">宸ュ簭:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HProcName" name="HProcName" id="HProcName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗℃壒鍙�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HBatchNo" name="HBatchNo" id="HBatchNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗℃暟閲�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HProcExchQty" name="HProcExchQty" id="HProcExchQty" />
+ </view>
+ </view>
+ </scroll-view>
+ <view class="bottom-btn" id="bottom-btn">
+ <view><button class="btn-a" size="mini" @tap="submit">鎻愪氦</button></view>
+ <view><button class="btn-b" size="mini" @tap="onAddNewHandler">鏂板</button></view>
+ <view class="placeholder__view"></view>
+ <view><button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button></view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ getUserInfo
+ } from '../../../../utils/auth'
+
+
+
+ export default {
+ data() {
+ return {
+ pageMeta: {
+ scrollContentTop: 0,
+ bottomBtnTop: 0,
+ },
+ refSav: 'Add',
+ showMask: true,
+ TestTypeArray: ["棣栨", "宸℃", "鏈", "瀹為獙"],
+
+ HBillType: '7522',
+ HProcNameArray: [],
+ HProcNameArraySource: [],
+
+ HDeptNameArray: [],
+ HDeptNameArraySource: [],
+
+ HShiftsNameArray: [],
+ HShiftsNameArraySource: [],
+
+ HGroupNameArray: [],
+ HGroupNameArraySource: [],
+
+ HCheckEmpNameArray: [],
+ HCheckEmpNameSource: [],
+
+ HSourceNameArray: [],
+ HSourceNameSource: [],
+
+ HBarCode: '',
+ hform: {
+ HBarCode: '',
+ HQty: '',
+ HRemark: '',
+ HEmpName: getUserInfo()['HEmpName'],
+ HEmp: getUserInfo()['HEmpID'],
+ HDeptName: '',
+ HDeptID: 0,
+ HWorkShiftName: '',
+ HWorkShiftID: 0,
+ HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HBillNo: '',
+ HInterID: '',
+ HICMOBillNo: '',
+ HICMOInterID: '',
+ HICMOEntryID: '',
+ HProcExchBillNo: '',
+ HProcExchInterID: '',
+ HProcExchEntryID: '',
+ HMaterNumber: '',
+ HMaterID: 0,
+ HMaterName: '',
+ HModel: '',
+ HUnitName: '',
+ HUnitID: '',
+ HProcName: '',
+ HProcID: '',
+ HBatchNo: '',
+ HProcExchQty: '',
+ HICMOQty: '',
+ HMaker: getUserInfo()['Czymc'],
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"),
+ HUpDater: '',
+ HUpDateDate: '',
+ HChecker: '',
+ HCheckDate: '',
+ HDeleteMan: '',
+ HDeleteDate: '',
+ }
+ }
+ },
+ computed: {
+ scrollContentHeight: {
+ get() {
+ return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
+ }
+ }
+ },
+ onReady() {
+ // #ifndef MP-WEIXIN
+ let query = uni.createSelectorQuery().in(this)
+ query.select("#scroll-content").boundingClientRect((data) => {
+ this.pageMeta.scrollContentTop = data.top
+ }).exec()
+ query.select("#bottom-btn").boundingClientRect((data) => {
+ this.pageMeta.bottomBtnTop = data.top
+ }).exec()
+ // #endif
+ // #ifdef MP-WEIXIN
+ // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
+ // #endif
+
+ },
+ async onLoad(e) {
+ let {
+ operationType
+ } = e
+ if (operationType == 0) {
+ this.getMaxNum()
+ this.refSav = 'Add'
+ } else {
+ this.refSav = 'Update'
+ }
+
+ this.getProcessList()
+ this.get_Gy_WorkShiftList()
+ this.GetGroupList()
+ this.GetEmployeeList()
+ this.getSourceList()
+ this.GetDepartmentList()
+ },
+ methods: {
+ HDeptNameChangeHandler() {
+ let index = this.HDeptNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HDeptID = this.HDeptNameArraySource[index]["HItemID"]
+ this.hform.HDeptName = this.HDeptNameArraySource[index]["HName"]
+ }
+ },
+ GetDepartmentList() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetDepartmentList_Json',
+ data: {
+ Department: '',
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message,
+ code
+ } = res.data
+ if (count == 1) {
+ this.HDeptNameArray = Array.from(data).map(item => item['HName'])
+ this.HDeptNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HSourceNameChangeHandler(e) {
+ let index = this.HSourceNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HSourceID = this.HSourceNameArraySource[index]["HItemID"]
+ this.hform.HSourceName = this.HSourceNameArraySource[index]["鐢熶骇璧勬簮"]
+ }
+
+ console.log('this.hform: ', this.hform);
+ },
+ // 鑾峰彇鐢熶骇璧勬簮
+ getSourceList() {
+ CommonUtils.doRequest2({
+ url: '/api/newBill/getSourceList',
+ data: {
+ sWhere: '',
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ msg,
+ code
+ } = res.data
+ if (code == 1) {
+ let data1 = data.Gy_Source
+ this.HSourceNameArray = Array.from(data1).map(item => item['鐢熶骇璧勬簮'])
+ this.HSourceNameArraySource = data1
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HCheckEmpNameChangeHandler(e) {
+ let index = this.HCheckEmpNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HCheckEmp = this.HCheckEmpNameArraySource[index]["HItemID"]
+ this.hform.HCheckEmpName = this.HCheckEmpNameArraySource[index]["HName"]
+ }
+ },
+ // 鑾峰彇鑱屽憳淇℃伅
+ GetEmployeeList() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: 0
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HCheckEmpNameArray = Array.from(data).map(item => item['HName'])
+ this.HCheckEmpNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HGroupNameChangeHandler(e) {
+ let index = this.HGroupNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HGroupID = this.HGroupNameArraySource[index]["HItemID"]
+ this.hform.HGroupName = this.HGroupNameArraySource[index]["HName"]
+ }
+ },
+ // 鑾峰彇鐢熶骇鐝粍
+ GetGroupList() {
+ CommonUtils.doRequest2({
+ url: '/WEBSController/GetGroupList_Json',
+ data: {
+ Group: '',
+ HStockOrgID: uni.getStorageSync('OrganizationID')
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HGroupNameArray = Array.from(data).map(item => item['HName'])
+ this.HGroupNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+
+ // 鑾峰彇鏈�鏂板崟鎹彿鍜孒InterID
+ getMaxNum() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetMAXNum',
+ data: {
+ HBillType: this.HBillType
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ data,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.hform.HBillNo = data[0].HBillNo
+ this.hform.HInterID = data[0].HInterID
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HShiftsNameChangeHandler(e) {
+ let index = this.HShiftsNameArray.findIndex(item => item == e)
+ if (index != -1) {
+ this.hform.HShiftsID = this.HShiftsNameArraySource[index]['HInterID']
+ this.hform.HShiftsName = this.HShiftsNameArraySource[index]['鐝鍚嶇О']
+ }
+ },
+ // 鍒濆鍖栫彮娆′俊鎭�
+ get_Gy_WorkShiftList() {
+ CommonUtils.doRequest2({
+ url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
+ data: {
+ sWhere: ` and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync('Organization')}' and 绂佺敤鏍囪='' and ISNULL(瀹℃牳浜� ,'') !=''`,
+ HMaker: getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HShiftsNameArray = Array.from(data).map(item => item['鐝鍚嶇О'])
+ this.HShiftsNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ // 鑾峰彇鐝
+ get_HWorkShift() {
+ CommonUtils.doRequest2({
+ url: '/Gy_ShiftsController/Get_HWorkShift',
+ data: {
+ "HDeptID": this.hform.HDeptID,
+ "HCenterID": this.hform.HCenterID
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+
+ this.hform.HShiftsID = data[0]['HInterID']
+ this.hform.HShiftsName = data[0]['鐝']
+ }
+ })
+ },
+ ProcessExchangeBillQuerySub() {
+ let HProcID = this.hform.HProcID
+ let HBarCode = this.hform.HProcExchInterID
+ let sWhere = ` ${HBarCode} and HProcID = ${HProcID} `
+ CommonUtils.doRequest2({
+ url: '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
+ data: {
+ sWhere: sWhere
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1 && data.length > 0) {
+ this.hform = Object.assign(this.hform, {
+ HProcID: data[0]['HProcID'],
+ HProcName: data[0]['宸ュ簭鍚嶇О'],
+ HSourceID: data[0]['HSourceID'] || 0,
+ HSourceName: data[0]['鐢熶骇璧勬簮'] || '',
+ HMainSourceEntryID: data[0]['hsubid'],
+ HProcExchEntryID: data[0]['hsubid'],
+ HProcExchQty: data[0]['娴佽浆鍗℃暟閲�'],
+ HCenterID: data[0]['HCenterID'] || getUserInfo()['HWorkCenterID'],
+ })
+
+ }
+ }
+ })
+ },
+ onHProcNameChangeHandler(e) {
+ let index = this.HProcNameArray.findIndex(item => item == e)
+ if (index != -1) {
+ this.hform.HProcName = this.HProcNameArraySource[index]['HName']
+ this.hform.HProcID = this.HProcNameArraySource[index]['HItemID']
+ this.ProcessExchangeBillQuerySub()
+ }
+ },
+ getProcessList() {
+ CommonUtils.doRequest2({
+ url: '/WEBSController/GetProcessList_Json',
+ data: {
+ Process: '',
+ HStockOrgID: uni.getStorageSync("OrganizationID")
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HProcNameArray = Array.from(data).map(item => item.HName)
+ this.HProcNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ TestTypeChange(e) {
+ console.log('e: ', e);
+ },
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.HBarCode = ret.resp_result
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ getCode(HBarCode) {
+ console.log('HBarCode: ', HBarCode);
+ if (!HBarCode) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鏉″舰鐮佷笉鑳戒负绌�'
+ })
+ }
+ let sWhere = " and 宸ュ簭娴佽浆鍗″彿='" + HBarCode + "'";
+ CommonUtils.doRequest2({
+ url: '/QC_TakeSampleCheckBill/Get_BackSampleList',
+ data: {
+ "sWhere": sWhere
+ },
+ resFunction: (res) => {
+ let {
+ code,
+ Message,
+ count,
+ data
+ } = res.data
+ if (count == 1) {
+ this.hform = Object.assign(this.hform, {
+ "HMaterID": data[0].HMaterID, //浜у搧ID
+ "HMaterNumber": data[0].浜у搧缂栫爜, //浜у搧浠g爜
+ "HMaterName": data[0].浜у搧鍚嶇О, //浜у搧鍚嶇О
+ "HModel": data[0].瑙勬牸鍨嬪彿, //浜у搧瑙勬牸
+ "HUnitID": data[0].HUnitID, //璁¢噺鍗曚綅id
+ "HUnitName": data[0].璁¢噺鍗曚綅, //璁¢噺鍗曚綅
+ "HProcExchBillNo": data[0].宸ュ簭娴佽浆鍗″彿, //娴佽浆鍗″彿
+ "HProcExchInterID": data[0].宸ュ簭娴佽浆鍗′富鍐呯爜, //娴佽浆鍗′富鍐呯爜(鍙栧�糎InterID)
+ "HBatchNo": data[0].宸ュ簭娴佽浆鍗℃壒娆″彿, //娴佽浆鍗℃壒娆�
+ "HICMOInterID": data[0].浠诲姟鍗曞唴鐮�, //鐢熶骇璁㈠崟ID
+ "HICMOEntryID": data[0].浠诲姟鍗曞瓙鍐呯爜, //鐢熶骇璁㈠崟瀛怚D
+ "HICMOBillNo": data[0].浠诲姟鍗曞彿, //鐢熶骇璁㈠崟
+ "HDeptID": data[0].HDeptID, //杞﹂棿ID
+ "HDeptName": data[0].閮ㄩ棬, //杞﹂棿
+ "HProcID": data[0].HProcID, //褰撳墠宸ュ簭ID
+ "HProcName": data[0].宸ュ簭, //褰撳墠宸ュ簭
+ "HProcExchEntryID": data[0].宸ュ簭娴佽浆鍗″瓙鍐呯爜, //娴佽浆鍗″瓙鍐呯爜(婧愬崟琛屽彿)
+ "HProcExchQty": data[0].宸ュ簭娴佽浆鍗℃暟閲�, //娴佽浆鍗℃暟閲�
+ "HICMOQty": data[0].浠诲姟鍗曟暟閲�,
+ "WorkShiftName": data[0].鐢熶骇鐝,
+ "HWorkShiftID": data[0].HShiftsID,
+ "HBarCode": "",
+ })
+
+ console.log('this.hform: ', this.hform);
+ uni.showToast({
+ icon: 'none',
+ title: '鑾峰彇鎴愬姛!'
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ submit() {
+ if (this.hform.HProcID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '宸ュ簭娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HQty == '') {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍙栨牱鏁伴噺涓虹┖'
+ })
+ }
+ if (this.hform.HProcID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '宸ュ簭娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HDeptID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '閮ㄩ棬娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HShiftsID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐝鏈�夋嫨'
+ })
+ }
+ if (this.hform.HGroupID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐢熶骇鐝粍鏈�夋嫨'
+ })
+ }
+ if (this.hform.HCheckEmp == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍙栨牱鍛樻湭閫夋嫨'
+ })
+ }
+ if (this.hform.HSourceID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐢熶骇璧勬簮鏈�夋嫨'
+ })
+ }
+
+ console.log('this.hform: ', this.hform);
+ let sMainStr = JSON.stringify(this.hform)
+ let numData = [{
+ "HMaterID": this.hform.HMaterID,
+ "HUnitID": this.hform.HUnitID,
+ "HProcExchBillNo": this.hform.HProcExchBillNo,
+ "HProcExchInterID": this.hform.HProcExchInterID,
+ "HProcExchEntryID": this.hform.HProcExchEntryID,
+ "HICMOInterID": this.hform.HICMOInterID,
+ "HICMOEntryID": this.hform.HICMOEntryID,
+ "HICMOBillNo": this.hform.HICMOBillNo,
+ "HDeptID": this.hform.HDeptID,
+ "HProcID": this.hform.HProcID,
+ "HProcExchQty": this.hform.HProcExchQty,
+ "HWorkShiftID": this.hform.HWorkShiftID,
+ "HBatchNo": this.hform.HBatchNo,
+ "HICMOQty": this.hform.HICMOQty,
+ "HQty": this.hform.HQty
+ }]
+ let sSubStr = JSON.stringify(numData)
+ let sMainSub = sMainStr + ';' + sSubStr + ';' + this.refSav + ';' + getUserInfo()['Czymc'];
+ CommonUtils.doRequest2({
+ method: 'POST',
+ url: '/QC_TakeSampleCheckBill/SaveQC_BackSampleCheckBillMain',
+ data: {
+ msg: sMainSub
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ return uni.showToast({
+ icon: 'none',
+ title: "鎻愪氦鎴愬姛!"
+ })
+ } else {
+ return uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ onAddNewHandler() {
+ uni.redirectTo({
+ url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0"
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .scroll-content {
+ box-sizing: border-box;
+ padding: 20rpx;
+
+ ::v-deep .uni-scroll-view-content {
+ box-sizing: border-box;
+ padding: 0 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ }
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20rpx;
+
+ input {
+ width: inherit;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .title {
+ width: 5em;
+ font-size: 30rpx;
+ flex-shrink: 0;
+ text-align: right;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .right-icon {
+ width: 54rpx;
+ height: 54rpx;
+ border-radius: 50%;
+ background-color: #3A78FF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+
+ }
+
+ .disabled {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .bottom-btn {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ }
+ }
+
+ .placeholder__view {
+ flex: 1;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/huanyangdan/BackSampleCheckBillList.vue b/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList.vue
similarity index 99%
rename from pages/huanyangdan/BackSampleCheckBillList.vue
rename to pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList.vue
index 227ce5a..48e8290 100644
--- a/pages/huanyangdan/BackSampleCheckBillList.vue
+++ b/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList.vue
@@ -192,7 +192,7 @@
} from '@/utils/common.js'
import {
getUserInfo
- } from '../../utils/auth'
+ } from '../../../../utils/auth'
export default {
data() {
return {
diff --git a/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
new file mode 100644
index 0000000..74c82a2
--- /dev/null
+++ b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
@@ -0,0 +1,831 @@
+<template>
+ <view>
+ <scroll-view scroll-y id="scroll-content" class="scroll-content" :style="{height: scrollContentHeight + 'px'}">
+ <view class="form-item">
+ <view class="title">鏉″舰鐮�:</view>
+ <view class="right">
+ <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" />
+ </view>
+ <view class="right-icon" @click="toScanCode">
+ <uni-icons color="#fff" type="scan" size="24"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">宸ュ簭:</view>
+ <view class="right">
+ <uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" placeholder="璇烽�夋嫨宸ュ簭鍙�"
+ v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍙栨牱鏁伴噺:</view>
+ <view class="right">
+ <input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐮村潖鎬у疄楠屾暟閲�:</view>
+ <view class="right">
+ <input type="number" name="HSampleDamageQty" id="HSampleDamageQty"
+ v-model="hform.HSampleDamageQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閫佹祴绫诲瀷:</view>
+ <view class="right">
+ <uni-combox :candidates="TestTypeArray" v-model="hform.TestType"
+ @input="TestTypeChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閫佹祴鍐呭:</view>
+ <view class="right">
+ <input type="text" name="HBadNote" id="HBadNote" v-model="hform.HBadNote" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="right">
+ <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬"
+ v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇鐝:</view>
+ <view class="right">
+ <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝"
+ v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇鐝粍:</view>
+ <view class="right">
+ <uni-combox :candidates="HGroupNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝粍"
+ v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍙栨牱鍛�:</view>
+ <view class="right">
+ <uni-combox :candidates="HCheckEmpNameArray" name="HCheckEmpName" id="HCheckEmpName"
+ placeholder="璇烽�夋嫨鍙栨牱鍛�" v-model="hform.HCheckEmpName"
+ @input="HCheckEmpNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇璧勬簮:</view>
+ <view class="right">
+ <uni-combox :candidates="HSourceNameArray" name="HSourceName" id="HSourceName" placeholder="璇烽�夋嫨鐢熶骇璧勬枡"
+ v-model="hform.HSourceName" @input="HSourceNameChangeHandler"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="right disabled">
+ <input disabled type="text" name="HDate" id="HDate" v-model="hform.HDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right disabled">
+ <input disabled type="text" name="HBillNo" id="HBillNo" v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇璁㈠崟:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HProcExchBillNo" name="HProcExchBillNo"
+ id="HProcExchBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡浠g爜:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterCode" name="HMaterCode" id="HMaterCode" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡鍚嶇О:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterName" name="HMaterName" id="HMaterName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸鍨嬪彿:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HMaterSpec" name="HMaterSpec" id="HMaterSpec" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁¢噺鍗曚綅:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HUnitName" name="HUnitName" id="HUnitName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗℃壒鍙�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HBatchNo" name="HBatchNo" id="HBatchNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">娴佽浆鍗℃暟閲�:</view>
+ <view class="right disabled">
+ <input disabled type="text" v-model="hform.HProcExchQty" name="HProcExchQty" id="HProcExchQty" />
+ </view>
+ </view>
+ </scroll-view>
+ <view class="bottom-btn" id="bottom-btn">
+ <view><button class="btn-a" size="mini" @tap="submit">鎻愪氦</button></view>
+ <view><button class="btn-b" size="mini" @tap="onAddNewHandler">鏂板</button></view>
+ <view class="placeholder__view"></view>
+ <view><button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button></view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ getUserInfo
+ } from '../../../../utils/auth'
+
+
+ export default {
+ data() {
+ return {
+ pageMeta: {
+ scrollContentTop: 0,
+ bottomBtnTop: 0,
+ },
+ refSav: 'Add',
+ showMask: true,
+ TestTypeArray: ["棣栨", "宸℃", "鏈", "瀹為獙"],
+
+ HBillType: '7521',
+ HProcNameArray: [],
+ HProcNameArraySource: [],
+
+ HDeptNameArray: [],
+ HDeptNameArraySource: [],
+
+ HShiftsNameArray: [],
+ HShiftsNameArraySource: [],
+
+ HGroupNameArray: [],
+ HGroupNameArraySource: [],
+
+ HCheckEmpNameArray: [],
+ HCheckEmpNameSource: [],
+
+ HSourceNameArray: [],
+ HSourceNameSource: [],
+
+ HBarCode: '',
+ hform: {
+ HBarCode: '',
+ HProcName: '',
+ HProcID: 0,
+ HQty: '',
+ HSampleDamageQty: 0,
+ TestType: '棣栨',
+ HBadNote: '',
+ HDeptName: '',
+ HDeptID: 0,
+ HCenterID: 0,
+ HShiftsName: '',
+ HShiftsID: 0,
+ HGroupName: '',
+ HGroupID: 0,
+ HCheckEmpName: '',
+ HCheckEmp: '',
+ HSourceName: '',
+ HSourceID: 0,
+ HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HBillNo: '',
+ HInterID: 0,
+ HICMOBillNo: '',
+ HICMOInterID: 0,
+ HICMOEntryID: 0,
+ HProcExchBillNo: '',
+ HProcExchInterID: 0,
+ HProcExchEntryID: 0,
+ HMainSourceBillNo: '',
+ HMainSourceInterID: 0,
+ HMainSourceBillType: '',
+ HMainSourceEntryID: 0,
+ HMaterCode: '',
+ HMaterID: 0,
+ HMaterName: '',
+ HMaterSpec: '',
+ HUnitName: '',
+ HUnitID: 0,
+ HBatchNo: '',
+ HProcExchQty: '',
+ HMaker: getUserInfo()['Czymc'],
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"),
+ HUpDater: '',
+ HUpDateDate: '',
+ HChecker: '',
+ HCheckDate: '',
+ HDeleteMan: '',
+ HDeleteDate: '',
+ }
+ }
+ },
+ computed: {
+ scrollContentHeight: {
+ get() {
+ return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
+ }
+ }
+ },
+ onReady() {
+ // #ifndef MP-WEIXIN
+ let query = uni.createSelectorQuery().in(this)
+ query.select("#scroll-content").boundingClientRect((data) => {
+ this.pageMeta.scrollContentTop = data.top
+ }).exec()
+ query.select("#bottom-btn").boundingClientRect((data) => {
+ this.pageMeta.bottomBtnTop = data.top
+ }).exec()
+ // #endif
+ // #ifdef MP-WEIXIN
+ // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
+ // #endif
+
+ },
+ async onLoad(e) {
+ let {
+ operationType
+ } = e
+ if (operationType == 0) {
+ this.getMaxNum()
+ this.refSav = 'Add'
+ } else {
+ this.refSav = 'Update'
+ }
+
+ this.getProcessList()
+ this.get_Gy_WorkShiftList()
+ this.GetGroupList()
+ this.GetEmployeeList()
+ this.getSourceList()
+ this.GetDepartmentList()
+ },
+ methods: {
+ HDeptNameChangeHandler() {
+ let index = this.HDeptNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HDeptID = this.HDeptNameArraySource[index]["HItemID"]
+ this.hform.HDeptName = this.HDeptNameArraySource[index]["HName"]
+ }
+ },
+ GetDepartmentList() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetDepartmentList_Json',
+ data: {
+ Department: '',
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message,
+ code
+ } = res.data
+ if (count == 1) {
+ this.HDeptNameArray = Array.from(data).map(item => item['HName'])
+ this.HDeptNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HSourceNameChangeHandler(e) {
+ let index = this.HSourceNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HSourceID = this.HSourceNameArraySource[index]["HItemID"]
+ this.hform.HSourceName = this.HSourceNameArraySource[index]["鐢熶骇璧勬簮"]
+ }
+
+ console.log('this.hform: ', this.hform);
+ },
+ // 鑾峰彇鐢熶骇璧勬簮
+ getSourceList() {
+ CommonUtils.doRequest2({
+ url: '/api/newBill/getSourceList',
+ data: {
+ sWhere: '',
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ msg,
+ code
+ } = res.data
+ if (code == 1) {
+ let data1 = data.Gy_Source
+ this.HSourceNameArray = Array.from(data1).map(item => item['鐢熶骇璧勬簮'])
+ this.HSourceNameArraySource = data1
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HCheckEmpNameChangeHandler(e) {
+ let index = this.HCheckEmpNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HCheckEmp = this.HCheckEmpNameArraySource[index]["HItemID"]
+ this.hform.HCheckEmpName = this.HCheckEmpNameArraySource[index]["HName"]
+ }
+ },
+ // 鑾峰彇鑱屽憳淇℃伅
+ GetEmployeeList() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: this.hform.HGroupID
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HCheckEmpNameArray = Array.from(data).map(item => item['HName'])
+ this.HCheckEmpNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HGroupNameChangeHandler(e) {
+ let index = this.HGroupNameArray.findIndex(item => item == e)
+
+ if (index != -1) {
+ this.hform.HGroupID = this.HGroupNameArraySource[index]["HItemID"]
+ this.hform.HGroupName = this.HGroupNameArraySource[index]["HName"]
+ }
+ },
+ // 鑾峰彇鐢熶骇鐝粍
+ GetGroupList() {
+ CommonUtils.doRequest2({
+ url: '/WEBSController/GetGroupList_Json',
+ data: {
+ Group: '',
+ HStockOrgID: uni.getStorageSync('OrganizationID')
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HGroupNameArray = Array.from(data).map(item => item['HName'])
+ this.HGroupNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+
+ // 鑾峰彇鏈�鏂板崟鎹彿鍜孒InterID
+ getMaxNum() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetMAXNum',
+ data: {
+ HBillType: this.HBillType
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ data,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.hform.HBillNo = data[0].HBillNo
+ this.hform.HInterID = data[0].HInterID
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ HShiftsNameChangeHandler(e) {
+ let index = this.HShiftsNameArray.findIndex(item => item == e)
+ if (index != -1) {
+ this.hform.HShiftsID = this.HShiftsNameArraySource[index]['HInterID']
+ this.hform.HShiftsName = this.HShiftsNameArraySource[index]['鐝鍚嶇О']
+ }
+ },
+ // 鍒濆鍖栫彮娆′俊鎭�
+ get_Gy_WorkShiftList() {
+ CommonUtils.doRequest2({
+ url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
+ data: {
+ sWhere: ` and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync('Organization')}' and 绂佺敤鏍囪='' and ISNULL(瀹℃牳浜� ,'') !=''`,
+ HMaker: getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HShiftsNameArray = Array.from(data).map(item => item['鐝鍚嶇О'])
+ this.HShiftsNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ // 鑾峰彇鐝
+ get_HWorkShift() {
+ CommonUtils.doRequest2({
+ url: '/Gy_ShiftsController/Get_HWorkShift',
+ data: {
+ "HDeptID": this.hform.HDeptID,
+ "HCenterID": this.hform.HCenterID
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+
+ this.hform.HShiftsID = data[0]['HInterID']
+ this.hform.HShiftsName = data[0]['鐝']
+ }
+ })
+ },
+ ProcessExchangeBillQuerySub() {
+ let HProcID = this.hform.HProcID
+ let HBarCode = this.hform.HProcExchInterID
+ let sWhere = ` ${HBarCode} and HProcID = ${HProcID} `
+ CommonUtils.doRequest2({
+ url: '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
+ data: {
+ sWhere: sWhere
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1 && data.length > 0) {
+ this.hform = Object.assign(this.hform, {
+ HProcID: data[0]['HProcID'],
+ HProcName: data[0]['宸ュ簭鍚嶇О'],
+ HSourceID: data[0]['HSourceID'] || 0,
+ HSourceName: data[0]['鐢熶骇璧勬簮'] || '',
+ HMainSourceEntryID: data[0]['hsubid'],
+ HProcExchEntryID: data[0]['hsubid'],
+ HProcExchQty: data[0]['娴佽浆鍗℃暟閲�'],
+ HCenterID: data[0]['HCenterID'] || getUserInfo()['HWorkCenterID'],
+ })
+
+ }
+ }
+ })
+ },
+ onHProcNameChangeHandler(e) {
+ let index = this.HProcNameArray.findIndex(item => item == e)
+ if (index != -1) {
+ this.hform.HProcName = this.HProcNameArraySource[index]['HName']
+ this.hform.HProcID = this.HProcNameArraySource[index]['HItemID']
+ this.ProcessExchangeBillQuerySub()
+ }
+ },
+ getProcessList() {
+ CommonUtils.doRequest2({
+ url: '/WEBSController/GetProcessList_Json',
+ data: {
+ Process: '',
+ HStockOrgID: uni.getStorageSync("OrganizationID")
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HProcNameArray = Array.from(data).map(item => item.HName)
+ this.HProcNameArraySource = data
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ TestTypeChange(e) {
+ console.log('e: ', e);
+ },
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.HBarCode = ret.resp_result
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ getCode(HBarCode) {
+ if (!HBarCode) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鏉″舰鐮佷笉鑳戒负绌�'
+ })
+ }
+ CommonUtils.doRequest2({
+ url: '/api/newBill/getHbarCodeDetail',
+ data: {
+ "sBillBarCode": HBarCode
+ },
+ resFunction: (res) => {
+ let {
+ code,
+ msg,
+ count,
+ data
+ } = res.data
+ if (code == 1) {
+ this.HBarCode = ''
+ let data1 = data.h_v_Sc_ProcessExchangeBillList
+ this.hform = Object.assign(this.hform, {
+ "HMaterID": data1[0].HMaterID, //浜у搧ID
+ "HMaterCode": data1[0].浜у搧浠g爜, //浜у搧浠g爜
+ "HMaterName": data1[0].浜у搧, //浜у搧鍚嶇О
+ "HMaterSpec": data1[0].瑙勬牸鍨嬪彿, //浜у搧瑙勬牸
+ "HUnitID": data1[0].HUnitID, //璁¢噺鍗曚綅id
+ "HUnitName": data1[0].鍗曚綅, //璁¢噺鍗曚綅
+ "HMainSourceBillNo": data1[0].鍗曟嵁鍙�, //婧愬崟鍗曞彿
+ "HMainSourceInterID": data1[0].hmainid, //婧愬崟涓诲唴鐮�
+ "HMainSourceBillType": 3772, //婧愬崟绫诲瀷
+ "HProcExchBillNo": data1[0].鍗曟嵁鍙�, //娴佽浆鍗″彿
+ "HProcExchInterID": data1[0].hmainid, //娴佽浆鍗′富鍐呯爜(鍙栧�糎InterID)
+ "HBatchNo": data1[0].鎵瑰彿, //娴佽浆鍗℃壒娆�
+ "HICMOInterID": data1[0].hicmointerid, //鐢熶骇璁㈠崟ID
+ "HICMOEntryID": data1[0].HICMOEntryID, //鐢熶骇璁㈠崟瀛怚D
+ "HICMOBillNo": data1[0].浠诲姟鍗曞彿, //鐢熶骇璁㈠崟
+ "HDeptID": data1[0].HWorkShopID, //杞﹂棿ID
+ "HDeptName": data1[0].鐢熶骇杞﹂棿, //杞﹂棿
+ })
+
+ uni.showToast({
+ icon: 'none',
+ title: msg
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: msg
+ })
+ }
+ }
+ })
+ },
+ submit() {
+ if (this.hform.HProcID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '宸ュ簭娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HQty == '') {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍙栨牱鏁伴噺涓虹┖'
+ })
+ }
+ if (this.hform.HProcID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '宸ュ簭娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HDeptID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '閮ㄩ棬娌℃湁閫夋嫨'
+ })
+ }
+ if (this.hform.HShiftsID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐝鏈�夋嫨'
+ })
+ }
+ if (this.hform.HGroupID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐢熶骇鐝粍鏈�夋嫨'
+ })
+ }
+ if (this.hform.HCheckEmp == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍙栨牱鍛樻湭閫夋嫨'
+ })
+ }
+ if (this.hform.HSourceID == 0) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鐢熶骇璧勬簮鏈�夋嫨'
+ })
+ }
+
+ console.log('this.hform: ', this.hform);
+ let sMainStr = JSON.stringify(this.hform)
+ console.log('sMainStr: ', sMainStr);
+ let sMainSub = sMainStr + ';' + this.refSav + ';' + getUserInfo()['Czymc'];
+ CommonUtils.doRequest2({
+ method: 'POST',
+ url: '/QC_TakeSampleCheckBill/SaveQC_TakeSampleCheckBillMain',
+ data: {
+ msg: sMainSub
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ return uni.showToast({
+ icon: 'none',
+ title: "鎻愪氦鎴愬姛!"
+ })
+ } else {
+ return uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ onAddNewHandler() {
+ uni.redirectTo({
+ url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0"
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .scroll-content {
+ box-sizing: border-box;
+ padding: 20rpx;
+
+ ::v-deep .uni-scroll-view-content {
+ box-sizing: border-box;
+ padding: 0 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ }
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20rpx;
+
+ input {
+ width: inherit;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .title {
+ width: 5em;
+ font-size: 30rpx;
+ flex-shrink: 0;
+ text-align: right;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .right-icon {
+ width: 54rpx;
+ height: 54rpx;
+ border-radius: 50%;
+ background-color: #3A78FF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+
+ }
+
+ .disabled {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .bottom-btn {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ }
+ }
+
+ .placeholder__view {
+ flex: 1;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/quyangdan/TakeSampleCheckBillList.vue b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList.vue
similarity index 99%
rename from pages/quyangdan/TakeSampleCheckBillList.vue
rename to pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList.vue
index 99f0dfa..edcaf01 100644
--- a/pages/quyangdan/TakeSampleCheckBillList.vue
+++ b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList.vue
@@ -198,7 +198,7 @@
} from '@/utils/common.js'
import {
getUserInfo
- } from '../../utils/auth'
+ } from '../../../../utils/auth'
export default {
data() {
return {
diff --git a/pages/huanyangdan/BackSampleCheckBill.vue b/pages/huanyangdan/BackSampleCheckBill.vue
deleted file mode 100644
index 21f870a..0000000
--- a/pages/huanyangdan/BackSampleCheckBill.vue
+++ /dev/null
@@ -1,817 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y id="scroll-content" class="scroll-content" :style="{height: scrollContentHeight + 'px'}">
- <view class="form-item">
- <view class="title">鏉″舰鐮�:</view>
- <view class="right">
- <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" />
- </view>
- <view class="right-icon" @click="toScanCode">
- <uni-icons color="#fff" type="scan" size="24"></uni-icons>
- </view>
- </view>
- <view class="form-item">
- <view class="title">杩樻牱鏁伴噺:</view>
- <view class="right">
- <input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">杩樻牱鍐呭:</view>
- <view class="right">
- <input type="text" name="HRemark" id="HRemark" v-model="hform.HRemark" />
- </view>
- </view>
-
-
- <view class="form-item">
- <view class="title">杩樻牱鍛�:</view>
- <view class="right">
- <uni-combox :candidates="HCheckEmpNameArray" name="HCheckEmpName" id="HCheckEmpName"
- placeholder="璇烽�夋嫨杩樻牱鍛�" v-model="hform.HCheckEmpName"
- @input="HCheckEmpNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">閮ㄩ棬:</view>
- <view class="right">
- <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬"
- v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇鐝:</view>
- <view class="right">
- <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝"
- v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
- </view>
- </view>
-
- <view class="form-item">
- <view class="title">鍗曟嵁鏃ユ湡:</view>
- <view class="right disabled">
- <input disabled type="text" name="HDate" id="HDate" v-model="hform.HDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="right disabled">
- <input disabled type="text" name="HBillNo" id="HBillNo" v-model="hform.HBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇璁㈠崟:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HProcExchBillNo" name="HProcExchBillNo"
- id="HProcExchBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡浠g爜:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterCode" name="HMaterCode" id="HMaterCode" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡鍚嶇О:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterName" name="HMaterName" id="HMaterName" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瑙勬牸鍨嬪彿:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterSpec" name="HMaterSpec" id="HMaterSpec" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">璁¢噺鍗曚綅:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HUnitName" name="HUnitName" id="HUnitName" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">宸ュ簭:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HProcName" name="HProcName" id="HProcName" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗℃壒鍙�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HBatchNo" name="HBatchNo" id="HBatchNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗℃暟閲�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HProcExchQty" name="HProcExchQty" id="HProcExchQty" />
- </view>
- </view>
- </scroll-view>
- <view class="bottom-btn" id="bottom-btn">
- <view><button class="btn-a" size="mini" @tap="submit">鎻愪氦</button></view>
- <view><button class="btn-b" size="mini" @tap="onAddNewHandler">鏂板</button></view>
- <view class="placeholder__view"></view>
- <view><button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button></view>
- </view>
- </view>
-</template>
-
-<script>
- import dayjs from 'dayjs'
- import {
- getUserInfo
- } from '../../utils/auth'
- import {
- CommonUtils
- } from '../../utils/common'
-
- export default {
- data() {
- return {
- pageMeta: {
- scrollContentTop: 0,
- bottomBtnTop: 0,
- },
- refSav: 'Add',
- showMask: true,
- TestTypeArray: ["棣栨", "宸℃", "鏈", "瀹為獙"],
-
- HBillType: '7522',
- HProcNameArray: [],
- HProcNameArraySource: [],
-
- HDeptNameArray: [],
- HDeptNameArraySource: [],
-
- HShiftsNameArray: [],
- HShiftsNameArraySource: [],
-
- HGroupNameArray: [],
- HGroupNameArraySource: [],
-
- HCheckEmpNameArray: [],
- HCheckEmpNameSource: [],
-
- HSourceNameArray: [],
- HSourceNameSource: [],
-
- HBarCode: '',
- hform: {
- HBarCode: '',
- HQty: '',
- HRemark: '',
- HEmpName: getUserInfo()['HEmpName'],
- HEmp: getUserInfo()['HEmpID'],
- HDeptName: '',
- HDeptID: 0,
- HWorkShiftName: '',
- HWorkShiftID: 0,
- HDate: dayjs(new Date()).format("YYYY-MM-DD"),
- HBillNo: '',
- HInterID: '',
- HICMOBillNo: '',
- HICMOInterID: '',
- HICMOEntryID: '',
- HProcExchBillNo: '',
- HProcExchInterID: '',
- HProcExchEntryID: '',
- HMaterNumber: '',
- HMaterID: 0,
- HMaterName: '',
- HModel: '',
- HUnitName: '',
- HUnitID: '',
- HProcName: '',
- HProcID: '',
- HBatchNo: '',
- HProcExchQty: '',
- HICMOQty: '',
- HMaker: getUserInfo()['Czymc'],
- HMakeDate: dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"),
- HUpDater: '',
- HUpDateDate: '',
- HChecker: '',
- HCheckDate: '',
- HDeleteMan: '',
- HDeleteDate: '',
- }
- }
- },
- computed: {
- scrollContentHeight: {
- get() {
- return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
- }
- }
- },
- onReady() {
- // #ifndef MP-WEIXIN
- let query = uni.createSelectorQuery().in(this)
- query.select("#scroll-content").boundingClientRect((data) => {
- this.pageMeta.scrollContentTop = data.top
- }).exec()
- query.select("#bottom-btn").boundingClientRect((data) => {
- this.pageMeta.bottomBtnTop = data.top
- }).exec()
- // #endif
- // #ifdef MP-WEIXIN
- // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
- // #endif
-
- },
- async onLoad(e) {
- let {
- operationType
- } = e
- if (operationType == 0) {
- this.getMaxNum()
- this.refSav = 'Add'
- } else {
- this.refSav = 'Update'
- }
-
- this.getProcessList()
- this.get_Gy_WorkShiftList()
- this.GetGroupList()
- this.GetEmployeeList()
- this.getSourceList()
- this.GetDepartmentList()
- },
- methods: {
- HDeptNameChangeHandler() {
- let index = this.HDeptNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HDeptID = this.HDeptNameArraySource[index]["HItemID"]
- this.hform.HDeptName = this.HDeptNameArraySource[index]["HName"]
- }
- },
- GetDepartmentList() {
- CommonUtils.doRequest2({
- url: '/Web/GetDepartmentList_Json',
- data: {
- Department: '',
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message,
- code
- } = res.data
- if (count == 1) {
- this.HDeptNameArray = Array.from(data).map(item => item['HName'])
- this.HDeptNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HSourceNameChangeHandler(e) {
- let index = this.HSourceNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HSourceID = this.HSourceNameArraySource[index]["HItemID"]
- this.hform.HSourceName = this.HSourceNameArraySource[index]["鐢熶骇璧勬簮"]
- }
-
- console.log('this.hform: ', this.hform);
- },
- // 鑾峰彇鐢熶骇璧勬簮
- getSourceList() {
- CommonUtils.doRequest2({
- url: '/api/newBill/getSourceList',
- data: {
- sWhere: '',
- },
- resFunction: (res) => {
- let {
- data,
- count,
- msg,
- code
- } = res.data
- if (code == 1) {
- let data1 = data.Gy_Source
- this.HSourceNameArray = Array.from(data1).map(item => item['鐢熶骇璧勬簮'])
- this.HSourceNameArraySource = data1
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HCheckEmpNameChangeHandler(e) {
- let index = this.HCheckEmpNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HCheckEmp = this.HCheckEmpNameArraySource[index]["HItemID"]
- this.hform.HCheckEmpName = this.HCheckEmpNameArraySource[index]["HName"]
- }
- },
- // 鑾峰彇鑱屽憳淇℃伅
- GetEmployeeList() {
- CommonUtils.doRequest2({
- url: '/Web/GetEmployeeList_Json',
- data: {
- Employee: '',
- HGroupID: 0
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HCheckEmpNameArray = Array.from(data).map(item => item['HName'])
- this.HCheckEmpNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HGroupNameChangeHandler(e) {
- let index = this.HGroupNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HGroupID = this.HGroupNameArraySource[index]["HItemID"]
- this.hform.HGroupName = this.HGroupNameArraySource[index]["HName"]
- }
- },
- // 鑾峰彇鐢熶骇鐝粍
- GetGroupList() {
- CommonUtils.doRequest2({
- url: '/WEBSController/GetGroupList_Json',
- data: {
- Group: '',
- HStockOrgID: uni.getStorageSync('OrganizationID')
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HGroupNameArray = Array.from(data).map(item => item['HName'])
- this.HGroupNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
-
- // 鑾峰彇鏈�鏂板崟鎹彿鍜孒InterID
- getMaxNum() {
- CommonUtils.doRequest2({
- url: '/Web/GetMAXNum',
- data: {
- HBillType: this.HBillType
- },
- resFunction: (res) => {
- let {
- count,
- data,
- Message
- } = res.data
- if (count == 1) {
- this.hform.HBillNo = data[0].HBillNo
- this.hform.HInterID = data[0].HInterID
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HShiftsNameChangeHandler(e) {
- let index = this.HShiftsNameArray.findIndex(item => item == e)
- if (index != -1) {
- this.hform.HShiftsID = this.HShiftsNameArraySource[index]['HInterID']
- this.hform.HShiftsName = this.HShiftsNameArraySource[index]['鐝鍚嶇О']
- }
- },
- // 鍒濆鍖栫彮娆′俊鎭�
- get_Gy_WorkShiftList() {
- CommonUtils.doRequest2({
- url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
- data: {
- sWhere: ` and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync('Organization')}' and 绂佺敤鏍囪='' and ISNULL(瀹℃牳浜� ,'') !=''`,
- HMaker: getUserInfo()['Czymc']
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HShiftsNameArray = Array.from(data).map(item => item['鐝鍚嶇О'])
- this.HShiftsNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- // 鑾峰彇鐝
- get_HWorkShift() {
- CommonUtils.doRequest2({
- url: '/Gy_ShiftsController/Get_HWorkShift',
- data: {
- "HDeptID": this.hform.HDeptID,
- "HCenterID": this.hform.HCenterID
- },
- resFunction: (res) => {
- let {
- data,
- Message,
- count
- } = res.data
-
- this.hform.HShiftsID = data[0]['HInterID']
- this.hform.HShiftsName = data[0]['鐝']
- }
- })
- },
- ProcessExchangeBillQuerySub() {
- let HProcID = this.hform.HProcID
- let HBarCode = this.hform.HProcExchInterID
- let sWhere = ` ${HBarCode} and HProcID = ${HProcID} `
- CommonUtils.doRequest2({
- url: '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
- data: {
- sWhere: sWhere
- },
- resFunction: (res) => {
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1 && data.length > 0) {
- this.hform = Object.assign(this.hform, {
- HProcID: data[0]['HProcID'],
- HProcName: data[0]['宸ュ簭鍚嶇О'],
- HSourceID: data[0]['HSourceID'] || 0,
- HSourceName: data[0]['鐢熶骇璧勬簮'] || '',
- HMainSourceEntryID: data[0]['hsubid'],
- HProcExchEntryID: data[0]['hsubid'],
- HProcExchQty: data[0]['娴佽浆鍗℃暟閲�'],
- HCenterID: data[0]['HCenterID'] || getUserInfo()['HWorkCenterID'],
- })
-
- }
- }
- })
- },
- onHProcNameChangeHandler(e) {
- let index = this.HProcNameArray.findIndex(item => item == e)
- if (index != -1) {
- this.hform.HProcName = this.HProcNameArraySource[index]['HName']
- this.hform.HProcID = this.HProcNameArraySource[index]['HItemID']
- this.ProcessExchangeBillQuerySub()
- }
- },
- getProcessList() {
- CommonUtils.doRequest2({
- url: '/WEBSController/GetProcessList_Json',
- data: {
- Process: '',
- HStockOrgID: uni.getStorageSync("OrganizationID")
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HProcNameArray = Array.from(data).map(item => item.HName)
- this.HProcNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- TestTypeChange(e) {
- console.log('e: ', e);
- },
- toScanCode() {
- var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- mpaasScanModule.mpaasScan({
- 'hideAlbum': true,
- 'timeoutInterval': '10', //瓒呮椂鏃堕棿
- 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
- }, (ret) => {
- console.log(ret.resp_result)
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
- } else {
- this.HBarCode = ret.resp_result
- this.hform.HBarCode = ret.resp_result
- }
-
- this.getCode(this.hform.HBarCode)
- })
- },
- getCode(HBarCode) {
- console.log('HBarCode: ', HBarCode);
- if (!HBarCode) {
- return uni.showToast({
- icon: 'none',
- title: '鏉″舰鐮佷笉鑳戒负绌�'
- })
- }
- let sWhere = " and 宸ュ簭娴佽浆鍗″彿='" + HBarCode + "'";
- CommonUtils.doRequest2({
- url: '/QC_TakeSampleCheckBill/Get_BackSampleList',
- data: {
- "sWhere": sWhere
- },
- resFunction: (res) => {
- let {
- code,
- Message,
- count,
- data
- } = res.data
- if (count == 1) {
- this.hform = Object.assign(this.hform, {
- "HMaterID": data[0].HMaterID, //浜у搧ID
- "HMaterNumber": data[0].浜у搧缂栫爜, //浜у搧浠g爜
- "HMaterName": data[0].浜у搧鍚嶇О, //浜у搧鍚嶇О
- "HModel": data[0].瑙勬牸鍨嬪彿, //浜у搧瑙勬牸
- "HUnitID": data[0].HUnitID, //璁¢噺鍗曚綅id
- "HUnitName": data[0].璁¢噺鍗曚綅, //璁¢噺鍗曚綅
- "HProcExchBillNo": data[0].宸ュ簭娴佽浆鍗″彿, //娴佽浆鍗″彿
- "HProcExchInterID": data[0].宸ュ簭娴佽浆鍗′富鍐呯爜, //娴佽浆鍗′富鍐呯爜(鍙栧�糎InterID)
- "HBatchNo": data[0].宸ュ簭娴佽浆鍗℃壒娆″彿, //娴佽浆鍗℃壒娆�
- "HICMOInterID": data[0].浠诲姟鍗曞唴鐮�, //鐢熶骇璁㈠崟ID
- "HICMOEntryID": data[0].浠诲姟鍗曞瓙鍐呯爜, //鐢熶骇璁㈠崟瀛怚D
- "HICMOBillNo": data[0].浠诲姟鍗曞彿, //鐢熶骇璁㈠崟
- "HDeptID": data[0].HDeptID, //杞﹂棿ID
- "HDeptName": data[0].閮ㄩ棬, //杞﹂棿
- "HProcID": data[0].HProcID, //褰撳墠宸ュ簭ID
- "HProcName": data[0].宸ュ簭, //褰撳墠宸ュ簭
- "HProcExchEntryID": data[0].宸ュ簭娴佽浆鍗″瓙鍐呯爜, //娴佽浆鍗″瓙鍐呯爜(婧愬崟琛屽彿)
- "HProcExchQty": data[0].宸ュ簭娴佽浆鍗℃暟閲�, //娴佽浆鍗℃暟閲�
- "HICMOQty": data[0].浠诲姟鍗曟暟閲�,
- "WorkShiftName": data[0].鐢熶骇鐝,
- "HWorkShiftID": data[0].HShiftsID,
- "HBarCode": "",
- })
-
- console.log('this.hform: ', this.hform);
- uni.showToast({
- icon: 'none',
- title: '鑾峰彇鎴愬姛!'
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- submit() {
- if (this.hform.HProcID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '宸ュ簭娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HQty == '') {
- return uni.showToast({
- icon: 'none',
- title: '鍙栨牱鏁伴噺涓虹┖'
- })
- }
- if (this.hform.HProcID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '宸ュ簭娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HDeptID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '閮ㄩ棬娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HShiftsID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐝鏈�夋嫨'
- })
- }
- if (this.hform.HGroupID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐢熶骇鐝粍鏈�夋嫨'
- })
- }
- if (this.hform.HCheckEmp == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鍙栨牱鍛樻湭閫夋嫨'
- })
- }
- if (this.hform.HSourceID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐢熶骇璧勬簮鏈�夋嫨'
- })
- }
-
- console.log('this.hform: ', this.hform);
- let sMainStr = JSON.stringify(this.hform)
- let numData = [{
- "HMaterID": this.hform.HMaterID,
- "HUnitID": this.hform.HUnitID,
- "HProcExchBillNo": this.hform.HProcExchBillNo,
- "HProcExchInterID": this.hform.HProcExchInterID,
- "HProcExchEntryID": this.hform.HProcExchEntryID,
- "HICMOInterID": this.hform.HICMOInterID,
- "HICMOEntryID": this.hform.HICMOEntryID,
- "HICMOBillNo": this.hform.HICMOBillNo,
- "HDeptID": this.hform.HDeptID,
- "HProcID": this.hform.HProcID,
- "HProcExchQty": this.hform.HProcExchQty,
- "HWorkShiftID": this.hform.HWorkShiftID,
- "HBatchNo": this.hform.HBatchNo,
- "HICMOQty": this.hform.HICMOQty,
- "HQty": this.hform.HQty
- }]
- let sSubStr = JSON.stringify(numData)
- let sMainSub = sMainStr + ';' + sSubStr +';' + this.refSav + ';' + getUserInfo()['Czymc'];
- CommonUtils.doRequest2({
- method: 'POST',
- url: '/QC_TakeSampleCheckBill/SaveQC_BackSampleCheckBillMain',
- data: {
- msg: sMainSub
- },
- resFunction: (res) => {
- let {
- count,
- Message
- } = res.data
- if (count == 1) {
- return uni.showToast({
- icon: 'none',
- title: "鎻愪氦鎴愬姛!"
- })
- } else {
- return uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- onAddNewHandler() {
- uni.redirectTo({
- url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0"
- })
- },
- goBack() {
- uni.navigateBack()
- },
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .scroll-content {
- box-sizing: border-box;
- padding: 20rpx;
-
- ::v-deep .uni-scroll-view-content {
- box-sizing: border-box;
- padding: 0 40rpx;
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- }
-
- .form-item {
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 20rpx;
-
- input {
- width: inherit;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
-
- .title {
- width: 5em;
- font-size: 30rpx;
- flex-shrink: 0;
- text-align: right;
- }
-
- .right {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #acacac;
- }
-
- .right-icon {
- width: 54rpx;
- height: 54rpx;
- border-radius: 50%;
- background-color: #3A78FF;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
-
- }
-
- .disabled {
- border: 1px solid #e4e4e4;
- background-color: #e4e4e4;
- }
- }
- }
-
- .bottom-btn {
- position: fixed;
- bottom: 0;
- box-sizing: border-box;
- background-color: #fff;
- box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
- padding: 30rpx 40rpx 40rpx 40rpx;
- display: flex;
- flex-direction: row;
- gap: 20rpx;
- justify-content: space-between;
- width: 100%;
-
- button {
- border-radius: 50rpx;
- width: 180rpx;
- height: 66rpx;
- line-height: 66rpx;
- font-size: 28rpx;
- }
-
- .btn-a {
- background-color: #3A78FF;
- color: #fff;
- }
-
- .btn-b {
- background-color: #41a863;
- color: #fff;
- }
-
- .btn-c {
- background-color: #acacac;
- color: #fff;
- }
- }
-
- .placeholder__view {
- flex: 1;
- }
-</style>
\ No newline at end of file
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index 18011ea..ea980c2 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -483,14 +483,14 @@
{
"img": "../../static/icon/icon8.png",
"text": "鍙栨牱鍗曞垪琛�",
- "url": "/pages/quyangdan/TakeSampleCheckBillList",
+ "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList",
"id": 60,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
"text": "杩樻牱鍗曞垪琛�",
- "url": "/pages/huanyangdan/BackSampleCheckBillList",
+ "url": "/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList",
"id": 61,
"hidden": false
},
@@ -502,6 +502,13 @@
"id": 62,
"hidden": false
},
+ {
+ "img": "../../static/icon/icon15.png",
+ "text": "宸ヤ綔鑱旂郴鍗曞垪琛�",
+ "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList?OperationType=1",
+ "id": 63,
+ "hidden": false
+ },
]
}
},
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index 46e036b..ed9c2dc 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -194,20 +194,7 @@
"url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
"id": 23,
"hidden": false
- }, {
- "img": "../../static/icon/icon8.png",
- "text": "鍣ㄥ叿缁翠慨娲惧伐鍗�",
- "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill",
- "id": 29,
- "hidden": false
- },
- {
- "img": "../../static/icon/icon8.png",
- "text": "鍣ㄥ叿缁翠慨楠屾敹鍗�",
- "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill",
- "id": 30,
- "hidden": false
- },
+ },
{
"img": "../../static/icon/icon8.png",
"text": "璁惧淇濆吇浠诲姟",
@@ -231,7 +218,7 @@
},
{
"img": "../../static/icon/icon8.png",
- "text": "鍣ㄥ叿缁翠慨浠诲姟",
+ "text": "妯″叿缁翠慨浠诲姟",
"url": "/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport",
"id": 27,
"hidden": false
diff --git a/pages/index/tab4.vue b/pages/index/tab4.vue
index 8ce41ca..928e6a1 100644
--- a/pages/index/tab4.vue
+++ b/pages/index/tab4.vue
@@ -161,13 +161,20 @@
"id": 16,
"hidden": false
},
- {
- "img": "../../static/icon/icon15.png",
- "text": "宸ヤ綔鑱旂郴鍗曞垪琛�",
- "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList?OperationType=1",
- "id": 16,
- "hidden": false
- },
+ {
+ "img": "../../static/icon/icon15.png",
+ "text": "鍙栨牱鍗�",
+ "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill",
+ "id": 17,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon15.png",
+ "text": "杩樻牱鍗�",
+ "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill",
+ "id": 18,
+ "hidden": false
+ },
]
}
diff --git a/pages/quyangdan/TakeSampleCheckBill.vue b/pages/quyangdan/TakeSampleCheckBill.vue
deleted file mode 100644
index d483fd1..0000000
--- a/pages/quyangdan/TakeSampleCheckBill.vue
+++ /dev/null
@@ -1,830 +0,0 @@
-<template>
- <view>
- <scroll-view scroll-y id="scroll-content" class="scroll-content" :style="{height: scrollContentHeight + 'px'}">
- <view class="form-item">
- <view class="title">鏉″舰鐮�:</view>
- <view class="right">
- <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" />
- </view>
- <view class="right-icon" @click="toScanCode">
- <uni-icons color="#fff" type="scan" size="24"></uni-icons>
- </view>
- </view>
- <view class="form-item">
- <view class="title">宸ュ簭:</view>
- <view class="right">
- <uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" placeholder="璇烽�夋嫨宸ュ簭鍙�"
- v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍙栨牱鏁伴噺:</view>
- <view class="right">
- <input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐮村潖鎬у疄楠屾暟閲�:</view>
- <view class="right">
- <input type="number" name="HSampleDamageQty" id="HSampleDamageQty"
- v-model="hform.HSampleDamageQty" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">閫佹祴绫诲瀷:</view>
- <view class="right">
- <uni-combox :candidates="TestTypeArray" v-model="hform.TestType"
- @input="TestTypeChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">閫佹祴鍐呭:</view>
- <view class="right">
- <input type="text" name="HBadNote" id="HBadNote" v-model="hform.HBadNote" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">閮ㄩ棬:</view>
- <view class="right">
- <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬"
- v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇鐝:</view>
- <view class="right">
- <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝"
- v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇鐝粍:</view>
- <view class="right">
- <uni-combox :candidates="HGroupNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝粍"
- v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍙栨牱鍛�:</view>
- <view class="right">
- <uni-combox :candidates="HCheckEmpNameArray" name="HCheckEmpName" id="HCheckEmpName"
- placeholder="璇烽�夋嫨鍙栨牱鍛�" v-model="hform.HCheckEmpName"
- @input="HCheckEmpNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇璧勬簮:</view>
- <view class="right">
- <uni-combox :candidates="HSourceNameArray" name="HSourceName" id="HSourceName" placeholder="璇烽�夋嫨鐢熶骇璧勬枡"
- v-model="hform.HSourceName" @input="HSourceNameChangeHandler"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鏃ユ湡:</view>
- <view class="right disabled">
- <input disabled type="text" name="HDate" id="HDate" v-model="hform.HDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="right disabled">
- <input disabled type="text" name="HBillNo" id="HBillNo" v-model="hform.HBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐢熶骇璁㈠崟:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HProcExchBillNo" name="HProcExchBillNo"
- id="HProcExchBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡浠g爜:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterCode" name="HMaterCode" id="HMaterCode" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡鍚嶇О:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterName" name="HMaterName" id="HMaterName" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瑙勬牸鍨嬪彿:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HMaterSpec" name="HMaterSpec" id="HMaterSpec" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">璁¢噺鍗曚綅:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HUnitName" name="HUnitName" id="HUnitName" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗℃壒鍙�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HBatchNo" name="HBatchNo" id="HBatchNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">娴佽浆鍗℃暟閲�:</view>
- <view class="right disabled">
- <input disabled type="text" v-model="hform.HProcExchQty" name="HProcExchQty" id="HProcExchQty" />
- </view>
- </view>
- </scroll-view>
- <view class="bottom-btn" id="bottom-btn">
- <view><button class="btn-a" size="mini" @tap="submit">鎻愪氦</button></view>
- <view><button class="btn-b" size="mini" @tap="onAddNewHandler">鏂板</button></view>
- <view class="placeholder__view"></view>
- <view><button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button></view>
- </view>
- </view>
-</template>
-
-<script>
- import dayjs from 'dayjs'
- import {
- getUserInfo
- } from '../../utils/auth'
- import {
- CommonUtils
- } from '../../utils/common'
-
- export default {
- data() {
- return {
- pageMeta: {
- scrollContentTop: 0,
- bottomBtnTop: 0,
- },
- refSav: 'Add',
- showMask: true,
- TestTypeArray: ["棣栨", "宸℃", "鏈", "瀹為獙"],
-
- HBillType: '7521',
- HProcNameArray: [],
- HProcNameArraySource: [],
-
- HDeptNameArray: [],
- HDeptNameArraySource: [],
-
- HShiftsNameArray: [],
- HShiftsNameArraySource: [],
-
- HGroupNameArray: [],
- HGroupNameArraySource: [],
-
- HCheckEmpNameArray: [],
- HCheckEmpNameSource: [],
-
- HSourceNameArray: [],
- HSourceNameSource: [],
-
- HBarCode: '',
- hform: {
- HBarCode: '',
- HProcName: '',
- HProcID: 0,
- HQty: '',
- HSampleDamageQty: 0,
- TestType: '棣栨',
- HBadNote: '',
- HDeptName: '',
- HDeptID: 0,
- HCenterID: 0,
- HShiftsName: '',
- HShiftsID: 0,
- HGroupName: '',
- HGroupID: 0,
- HCheckEmpName: '',
- HCheckEmp: '',
- HSourceName: '',
- HSourceID: 0,
- HDate: dayjs(new Date()).format("YYYY-MM-DD"),
- HBillNo: '',
- HInterID: 0,
- HICMOBillNo: '',
- HICMOInterID: 0,
- HICMOEntryID: 0,
- HProcExchBillNo: '',
- HProcExchInterID: 0,
- HProcExchEntryID: 0,
- HMainSourceBillNo: '',
- HMainSourceInterID: 0,
- HMainSourceBillType: '',
- HMainSourceEntryID: 0,
- HMaterCode: '',
- HMaterID: 0,
- HMaterName: '',
- HMaterSpec: '',
- HUnitName: '',
- HUnitID: 0,
- HBatchNo: '',
- HProcExchQty: '',
- HMaker: getUserInfo()['Czymc'],
- HMakeDate: dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"),
- HUpDater: '',
- HUpDateDate: '',
- HChecker: '',
- HCheckDate: '',
- HDeleteMan: '',
- HDeleteDate: '',
- }
- }
- },
- computed: {
- scrollContentHeight: {
- get() {
- return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
- }
- }
- },
- onReady() {
- // #ifndef MP-WEIXIN
- let query = uni.createSelectorQuery().in(this)
- query.select("#scroll-content").boundingClientRect((data) => {
- this.pageMeta.scrollContentTop = data.top
- }).exec()
- query.select("#bottom-btn").boundingClientRect((data) => {
- this.pageMeta.bottomBtnTop = data.top
- }).exec()
- // #endif
- // #ifdef MP-WEIXIN
- // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
- // #endif
-
- },
- async onLoad(e) {
- let {
- operationType
- } = e
- if (operationType == 0) {
- this.getMaxNum()
- this.refSav = 'Add'
- } else {
- this.refSav = 'Update'
- }
-
- this.getProcessList()
- this.get_Gy_WorkShiftList()
- this.GetGroupList()
- this.GetEmployeeList()
- this.getSourceList()
- this.GetDepartmentList()
- },
- methods: {
- HDeptNameChangeHandler() {
- let index = this.HDeptNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HDeptID = this.HDeptNameArraySource[index]["HItemID"]
- this.hform.HDeptName = this.HDeptNameArraySource[index]["HName"]
- }
- },
- GetDepartmentList() {
- CommonUtils.doRequest2({
- url: '/Web/GetDepartmentList_Json',
- data: {
- Department: '',
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message,
- code
- } = res.data
- if (count == 1) {
- this.HDeptNameArray = Array.from(data).map(item => item['HName'])
- this.HDeptNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HSourceNameChangeHandler(e) {
- let index = this.HSourceNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HSourceID = this.HSourceNameArraySource[index]["HItemID"]
- this.hform.HSourceName = this.HSourceNameArraySource[index]["鐢熶骇璧勬簮"]
- }
-
- console.log('this.hform: ', this.hform);
- },
- // 鑾峰彇鐢熶骇璧勬簮
- getSourceList() {
- CommonUtils.doRequest2({
- url: '/api/newBill/getSourceList',
- data: {
- sWhere: '',
- },
- resFunction: (res) => {
- let {
- data,
- count,
- msg,
- code
- } = res.data
- if (code == 1) {
- let data1 = data.Gy_Source
- this.HSourceNameArray = Array.from(data1).map(item => item['鐢熶骇璧勬簮'])
- this.HSourceNameArraySource = data1
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HCheckEmpNameChangeHandler(e) {
- let index = this.HCheckEmpNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HCheckEmp = this.HCheckEmpNameArraySource[index]["HItemID"]
- this.hform.HCheckEmpName = this.HCheckEmpNameArraySource[index]["HName"]
- }
- },
- // 鑾峰彇鑱屽憳淇℃伅
- GetEmployeeList() {
- CommonUtils.doRequest2({
- url: '/Web/GetEmployeeList_Json',
- data: {
- Employee: '',
- HGroupID: this.hform.HGroupID
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HCheckEmpNameArray = Array.from(data).map(item => item['HName'])
- this.HCheckEmpNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HGroupNameChangeHandler(e) {
- let index = this.HGroupNameArray.findIndex(item => item == e)
-
- if (index != -1) {
- this.hform.HGroupID = this.HGroupNameArraySource[index]["HItemID"]
- this.hform.HGroupName = this.HGroupNameArraySource[index]["HName"]
- }
- },
- // 鑾峰彇鐢熶骇鐝粍
- GetGroupList() {
- CommonUtils.doRequest2({
- url: '/WEBSController/GetGroupList_Json',
- data: {
- Group: '',
- HStockOrgID: uni.getStorageSync('OrganizationID')
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HGroupNameArray = Array.from(data).map(item => item['HName'])
- this.HGroupNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
-
- // 鑾峰彇鏈�鏂板崟鎹彿鍜孒InterID
- getMaxNum() {
- CommonUtils.doRequest2({
- url: '/Web/GetMAXNum',
- data: {
- HBillType: this.HBillType
- },
- resFunction: (res) => {
- let {
- count,
- data,
- Message
- } = res.data
- if (count == 1) {
- this.hform.HBillNo = data[0].HBillNo
- this.hform.HInterID = data[0].HInterID
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- HShiftsNameChangeHandler(e) {
- let index = this.HShiftsNameArray.findIndex(item => item == e)
- if (index != -1) {
- this.hform.HShiftsID = this.HShiftsNameArraySource[index]['HInterID']
- this.hform.HShiftsName = this.HShiftsNameArraySource[index]['鐝鍚嶇О']
- }
- },
- // 鍒濆鍖栫彮娆′俊鎭�
- get_Gy_WorkShiftList() {
- CommonUtils.doRequest2({
- url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
- data: {
- sWhere: ` and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync('Organization')}' and 绂佺敤鏍囪='' and ISNULL(瀹℃牳浜� ,'') !=''`,
- HMaker: getUserInfo()['Czymc']
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HShiftsNameArray = Array.from(data).map(item => item['鐝鍚嶇О'])
- this.HShiftsNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- // 鑾峰彇鐝
- get_HWorkShift() {
- CommonUtils.doRequest2({
- url: '/Gy_ShiftsController/Get_HWorkShift',
- data: {
- "HDeptID": this.hform.HDeptID,
- "HCenterID": this.hform.HCenterID
- },
- resFunction: (res) => {
- let {
- data,
- Message,
- count
- } = res.data
-
- this.hform.HShiftsID = data[0]['HInterID']
- this.hform.HShiftsName = data[0]['鐝']
- }
- })
- },
- ProcessExchangeBillQuerySub() {
- let HProcID = this.hform.HProcID
- let HBarCode = this.hform.HProcExchInterID
- let sWhere = ` ${HBarCode} and HProcID = ${HProcID} `
- CommonUtils.doRequest2({
- url: '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
- data: {
- sWhere: sWhere
- },
- resFunction: (res) => {
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1 && data.length > 0) {
- this.hform = Object.assign(this.hform, {
- HProcID: data[0]['HProcID'],
- HProcName: data[0]['宸ュ簭鍚嶇О'],
- HSourceID: data[0]['HSourceID'] || 0,
- HSourceName: data[0]['鐢熶骇璧勬簮'] || '',
- HMainSourceEntryID: data[0]['hsubid'],
- HProcExchEntryID: data[0]['hsubid'],
- HProcExchQty: data[0]['娴佽浆鍗℃暟閲�'],
- HCenterID: data[0]['HCenterID'] || getUserInfo()['HWorkCenterID'],
- })
-
- }
- }
- })
- },
- onHProcNameChangeHandler(e) {
- let index = this.HProcNameArray.findIndex(item => item == e)
- if (index != -1) {
- this.hform.HProcName = this.HProcNameArraySource[index]['HName']
- this.hform.HProcID = this.HProcNameArraySource[index]['HItemID']
- this.ProcessExchangeBillQuerySub()
- }
- },
- getProcessList() {
- CommonUtils.doRequest2({
- url: '/WEBSController/GetProcessList_Json',
- data: {
- Process: '',
- HStockOrgID: uni.getStorageSync("OrganizationID")
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HProcNameArray = Array.from(data).map(item => item.HName)
- this.HProcNameArraySource = data
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- TestTypeChange(e) {
- console.log('e: ', e);
- },
- toScanCode() {
- var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- mpaasScanModule.mpaasScan({
- 'hideAlbum': true,
- 'timeoutInterval': '10', //瓒呮椂鏃堕棿
- 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
- }, (ret) => {
- console.log(ret.resp_result)
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
- } else {
- this.HBarCode = ret.resp_result
- this.hform.HBarCode = ret.resp_result
- }
-
- this.getCode(this.hform.HBarCode)
- })
- },
- getCode(HBarCode) {
- if (!HBarCode) {
- return uni.showToast({
- icon: 'none',
- title: '鏉″舰鐮佷笉鑳戒负绌�'
- })
- }
- CommonUtils.doRequest2({
- url: '/api/newBill/getHbarCodeDetail',
- data: {
- "sBillBarCode": HBarCode
- },
- resFunction: (res) => {
- let {
- code,
- msg,
- count,
- data
- } = res.data
- if (code == 1) {
- this.HBarCode = ''
- let data1 = data.h_v_Sc_ProcessExchangeBillList
- this.hform = Object.assign(this.hform, {
- "HMaterID": data1[0].HMaterID, //浜у搧ID
- "HMaterCode": data1[0].浜у搧浠g爜, //浜у搧浠g爜
- "HMaterName": data1[0].浜у搧, //浜у搧鍚嶇О
- "HMaterSpec": data1[0].瑙勬牸鍨嬪彿, //浜у搧瑙勬牸
- "HUnitID": data1[0].HUnitID, //璁¢噺鍗曚綅id
- "HUnitName": data1[0].鍗曚綅, //璁¢噺鍗曚綅
- "HMainSourceBillNo": data1[0].鍗曟嵁鍙�, //婧愬崟鍗曞彿
- "HMainSourceInterID": data1[0].hmainid, //婧愬崟涓诲唴鐮�
- "HMainSourceBillType": 3772, //婧愬崟绫诲瀷
- "HProcExchBillNo": data1[0].鍗曟嵁鍙�, //娴佽浆鍗″彿
- "HProcExchInterID": data1[0].hmainid, //娴佽浆鍗′富鍐呯爜(鍙栧�糎InterID)
- "HBatchNo": data1[0].鎵瑰彿, //娴佽浆鍗℃壒娆�
- "HICMOInterID": data1[0].hicmointerid, //鐢熶骇璁㈠崟ID
- "HICMOEntryID": data1[0].HICMOEntryID, //鐢熶骇璁㈠崟瀛怚D
- "HICMOBillNo": data1[0].浠诲姟鍗曞彿, //鐢熶骇璁㈠崟
- "HDeptID": data1[0].HWorkShopID, //杞﹂棿ID
- "HDeptName": data1[0].鐢熶骇杞﹂棿, //杞﹂棿
- })
-
- uni.showToast({
- icon: 'none',
- title: msg
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: msg
- })
- }
- }
- })
- },
- submit() {
- if (this.hform.HProcID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '宸ュ簭娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HQty == '') {
- return uni.showToast({
- icon: 'none',
- title: '鍙栨牱鏁伴噺涓虹┖'
- })
- }
- if (this.hform.HProcID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '宸ュ簭娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HDeptID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '閮ㄩ棬娌℃湁閫夋嫨'
- })
- }
- if (this.hform.HShiftsID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐝鏈�夋嫨'
- })
- }
- if (this.hform.HGroupID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐢熶骇鐝粍鏈�夋嫨'
- })
- }
- if (this.hform.HCheckEmp == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鍙栨牱鍛樻湭閫夋嫨'
- })
- }
- if (this.hform.HSourceID == 0) {
- return uni.showToast({
- icon: 'none',
- title: '鐢熶骇璧勬簮鏈�夋嫨'
- })
- }
-
- console.log('this.hform: ', this.hform);
- let sMainStr = JSON.stringify(this.hform)
- console.log('sMainStr: ', sMainStr);
- let sMainSub = sMainStr + ';' + this.refSav + ';' + getUserInfo()['Czymc'];
- CommonUtils.doRequest2({
- method: 'POST',
- url: '/QC_TakeSampleCheckBill/SaveQC_TakeSampleCheckBillMain',
- data: {
- msg: sMainSub
- },
- resFunction: (res) => {
- let {
- count,
- Message
- } = res.data
- if (count == 1) {
- return uni.showToast({
- icon: 'none',
- title: "鎻愪氦鎴愬姛!"
- })
- } else {
- return uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- }
- })
- },
- onAddNewHandler() {
- uni.redirectTo({
- url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0"
- })
- },
- goBack() {
- uni.navigateBack()
- },
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .scroll-content {
- box-sizing: border-box;
- padding: 20rpx;
-
- ::v-deep .uni-scroll-view-content {
- box-sizing: border-box;
- padding: 0 40rpx;
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- }
-
- .form-item {
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 20rpx;
-
- input {
- width: inherit;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
-
- .title {
- width: 5em;
- font-size: 30rpx;
- flex-shrink: 0;
- text-align: right;
- }
-
- .right {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #acacac;
- }
-
- .right-icon {
- width: 54rpx;
- height: 54rpx;
- border-radius: 50%;
- background-color: #3A78FF;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
-
- }
-
- .disabled {
- border: 1px solid #e4e4e4;
- background-color: #e4e4e4;
- }
- }
- }
-
- .bottom-btn {
- position: fixed;
- bottom: 0;
- box-sizing: border-box;
- background-color: #fff;
- box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
- padding: 30rpx 40rpx 40rpx 40rpx;
- display: flex;
- flex-direction: row;
- gap: 20rpx;
- justify-content: space-between;
- width: 100%;
-
- button {
- border-radius: 50rpx;
- width: 180rpx;
- height: 66rpx;
- line-height: 66rpx;
- font-size: 28rpx;
- }
-
- .btn-a {
- background-color: #3A78FF;
- color: #fff;
- }
-
- .btn-b {
- background-color: #41a863;
- color: #fff;
- }
-
- .btn-c {
- background-color: #acacac;
- color: #fff;
- }
- }
-
- .placeholder__view {
- flex: 1;
- }
-</style>
\ No newline at end of file
--
Gitblit v1.9.1