From 12c64fd30867081a01a00ef8a8efd7e71ca83daa Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 15 九月 2025 11:22:34 +0800
Subject: [PATCH] 所有 校验单据模块 添加 条码扫码 数量填写 仓库选择和仓位选择
---
pages/shengchanruku/form.vue | 363 +++++++++++++++++++++++++
pages/qitachukujiaoyan/detail.vue | 4
pages/xiaoshouchukujiaoyan/form.vue | 4
pages/weiwailingliaojiaoyan/form.vue | 4
manifest.json | 4
pages.json | 2
pages/index/tab2.vue | 31 +
pages/shengchanbuliaojiaoyan/form.vue | 6
pages/shengchandiaobo/form.vue | 368 ++++++++++++++++++++++++++
9 files changed, 754 insertions(+), 32 deletions(-)
diff --git a/manifest.json b/manifest.json
index 7cf27c4..3ccca1f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "鏅轰簯LMES",
"appid" : "__UNI__B002F49",
"description" : "",
- "versionName" : "1.0.77",
- "versionCode" : 177,
+ "versionName" : "1.0.78",
+ "versionCode" : 178,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
diff --git a/pages.json b/pages.json
index 82e66ac..f35caa3 100644
--- a/pages.json
+++ b/pages.json
@@ -597,7 +597,7 @@
"path": "pages/caigourukujiaoyan/form",
"style": {
"navigationBarTitleText": "閲囪喘鍏ュ簱鍗曟牎楠�",
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": false
}
},
{
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index 0587bf4..f88e214 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -160,75 +160,82 @@
url: '/pages/baoyangjilu/table',
id: 20,
hidden: false,
- }, {
+ },
+ {
+ img: '../../static/icon/icon30.png',
+ text: '閲囪喘鍏ュ簱鏍¢獙鏆傚瓨鍒楄〃',
+ url: '/pages/caigourukujiaoyan/table',
+ id: 21,
+ hidden: false,
+ },{
img: '../../static/icon/icon5.png',
text: '璁惧鐐规璁板綍鍗�',
url: '',
- id: 21,
+ id: 22,
hidden: false,
}, {
img: '../../static/icon/icon6.png',
text: '璁惧鏁呴殰鐧昏琛�',
url: '/pages/guzhangdengji/table',
- id: 22,
+ id: 23,
hidden: false,
}, {
img: '../../static/icon/icon7.png',
text: '璁惧缁翠慨璁板綍鍗�',
url: '/pages/shebeiweixiu/table',
- id: 23,
+ id: 24,
hidden: false,
}, {
img: '../../static/icon/icon15.png',
text: '寮傚父鍙嶉鍗�',
url: '/pages/yichang/table',
- id: 24,
+ id: 25,
hidden: false,
}, {
img: '../../static/icon/icon16.png',
text: '寮傚父鍙嶉澶勭悊鍗�',
url: '/pages/yichang/list',
- id: 25,
+ id: 26,
hidden: false,
}, {
img: '../../static/icon/icon21.png',
text: '鏍囩鎵撳嵃',
url: '/pages/labelPrinter/index',
- id: 26,
+ id: 27,
hidden: false,
}, {
img: '../../static/icon/icon21.png',
text: '鏉$爜鎷嗙爜',
url: '/pages/tiaomachaima/tiaomachaima',
- id: 27,
+ id: 28,
hidden: false,
},
{
img: '../../static/icon/icon18.png',
text: 'ERP鍙婃椂搴撳瓨鏌ヨ',
url: '/pages/jishikucunchaxun/table',
- id: 28,
+ id: 29,
hidden: false,
},
{
img: '../../static/icon/icon21.png',
text: '鏉$爜鎷嗙爜2',
url: '/pages/tiaomachaima/tiaomachaima2',
- id: 29,
+ id: 30,
hidden: false,
},
{
img: '../../static/icon/icon8.png',
text: '鍙栨牱鍗�',
url: '/pages/quyangdan/table',
- id: 30,
+ id: 31,
hidden: !this.judgeHidden(),
},
{
img: '../../static/icon/icon8.png',
text: '杩樻牱鍗�',
url: '/pages/huanyangdan/table',
- id: 31,
+ id: 32,
hidden: !this.judgeHidden(),
},
// {
diff --git a/pages/qitachukujiaoyan/detail.vue b/pages/qitachukujiaoyan/detail.vue
index f293e6f..50a63a3 100644
--- a/pages/qitachukujiaoyan/detail.vue
+++ b/pages/qitachukujiaoyan/detail.vue
@@ -1,7 +1,7 @@
<template>
<view>
<view class="form">
- <!-- <view class="form-item">
+ <view class="form-item">
<view class="title">鏉$爜:</view>
<view class="right">
<input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
@@ -33,7 +33,7 @@
<view class="righton" v-show="!showHStockPlaceName">
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view>
- </view> -->
+ </view>
<view class="tabs">
<!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view> -->
diff --git a/pages/shengchanbuliaojiaoyan/form.vue b/pages/shengchanbuliaojiaoyan/form.vue
index 1ed21cf..f29fc3c 100644
--- a/pages/shengchanbuliaojiaoyan/form.vue
+++ b/pages/shengchanbuliaojiaoyan/form.vue
@@ -1,7 +1,7 @@
<template>
<view>
<view class="form">
- <!-- <view class="form-item">
+ <view class="form-item">
<view class="title">鏉$爜:</view>
<view class="right">
<input :focus="BarCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
@@ -33,7 +33,7 @@
<view class="righton" v-show="!showHStockPlaceName">
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view>
- </view> -->
+ </view>
<view class="tabs">
<!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view> -->
@@ -226,7 +226,7 @@
HMaker: uni.getStorageSync('HUserName'),
HStockOrgName: uni.getStorageSync('Organization'),
HStockOrgID: uni.getStorageSync('OrganizationID'),
- HSourceBarCodeCtl: "Y", //鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ HSourceBarCodeCtl: "N", //鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
chkHBarflag: false,
HBarflag: 'Y',
diff --git a/pages/shengchandiaobo/form.vue b/pages/shengchandiaobo/form.vue
index c72b4fe..e004653 100644
--- a/pages/shengchandiaobo/form.vue
+++ b/pages/shengchandiaobo/form.vue
@@ -1,6 +1,39 @@
<template>
<view>
<view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right">
+ <input :focus="BarCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="getCode(hform.HBarCode)" />
+ </view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanHBarCode"></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="right">
+ <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <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">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
+ </view>
+ </view>
<view class="tabs">
<view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
@@ -184,6 +217,7 @@
import {
getUserInfo
} from "@/utils/auth.js";
+ import { CommonUtils } from '../../utils/common';
export default {
data() {
return {
@@ -194,11 +228,19 @@
HModName: 'Kf_MoveStockBill_Check_PDA',
ModRightName: 'CE_MoveStockCheck',
OperationType: 1,
-
+
+ showHStockPlaceName: false,
+ HBillNoFocus: false,
+ BarCodeFocus: false,
showHBillNo: true,
tabs: 1,
linterid: '',
HBillNo: '',
+
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
Materlist: [],
hform: {
@@ -248,8 +290,110 @@
} else {
this.refreshHBillNoFocus()
}
+
+ this.getHBaseList()
},
methods: {
+ async refreshHBillState() {
+ this.HBillNoFocus = false
+ await this.$nextTick(() => {
+ this.hform.HBillNo = ""
+ this.HBillNoFocus = true
+
+ })
+ },
+ async refreshBarCodeState() {
+ this.BarCodeFocus = false
+ await this.$nextTick(() => {
+ this.hform.HBarCode = ""
+ this.BarCodeFocus = true
+ })
+ },
+ getHBaseList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Warehouse/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HWHNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHWHName[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'
+ })
+ },
+ });
+ },
+ //閫夋嫨浠撳簱
+ HWHNameChange(e) {
+ // var name = e.split("(")
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HWHID = this.HWHNameList[i].HItemID
+
+ if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
+ this.showHStockPlaceName = true
+ } else {
+ this.hform.HStockPlaceName = ''
+ this.showHStockPlaceName = false
+ }
+ }
+ }
+ },
+ //閫夋嫨浠撲綅
+ HStockPlaceNameChange(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].HItemID
+ }
+ }
+ },
async refreshHBillNoFocus() {
this.HBillNoFocus = false
await this.$nextTick(() => {
@@ -265,6 +409,23 @@
innerAudioContext.src = '/static/jingbao.wav';
}
innerAudioContext.play(); // 鎾斁闊抽
+ },
+ toScanHBarCode() {
+ 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.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ this.getCode(this.hform.HBarCode)
+ })
},
//鎵爜
toScanCode() {
@@ -330,6 +491,203 @@
},
});
},
+ getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sOldBarCode = HBarCode
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sHQty = this.hform.HQty
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType = this.hform.HMainSourceBillType
+ var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
+ console.log(this.hform.HSourceBillNo, HSourceFlag)
+ if (HDeleteFlag == "*") {
+ if (sBarCode == "") {
+ uni.showToast({
+ title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ })
+ } else {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ success: (res) => {
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ CommonUtils.playSound(1)
+ } else {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ this.refreshBarCodeState()
+ CommonUtils.playSound(0)
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ } else {
+ var sBarCode = this.hform.HBarCode
+ if (sHQty == "") {
+ sHQty = 0;
+ }
+ uni.request({
+ url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ success: (res) => {
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1)
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ if (!this.hform.HSourceBillNo) {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ }
+ }
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ },
//鐗╂枡淇℃伅
DisBillEntryList() {
uni.request({
@@ -346,6 +704,7 @@
var data = res.data.data
this.Materlist = data.Materlist
if (!data.BarCodeDetailslist[0].HBarCode) {
+ this.hform.HBarCode_B = ''
this.hform.HMaterName_B = ''
this.hform.HMaterModel_B = ''
this.hform.HBatchNo_B = ''
@@ -357,6 +716,7 @@
this.hform.HSCWHName_B = ''
this.hform.HSCSPName_B = ''
} else {
+ this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode
this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
@@ -546,20 +906,20 @@
}
.right {
- width: 450rpx;
+ flex: 1;
border-radius: 22rpx;
border: 1px solid #acacac;
}
.righton {
- width: 450rpx;
+ flex: 1;
border-radius: 22rpx;
border: 1px solid #e4e4e4;
background-color: #e4e4e4;
}
input {
- width: 100%;
+ width: inherit;
padding: 8rpx 20rpx;
font-size: 30rpx;
}
diff --git a/pages/shengchanruku/form.vue b/pages/shengchanruku/form.vue
index 288b376..bd1e3d1 100644
--- a/pages/shengchanruku/form.vue
+++ b/pages/shengchanruku/form.vue
@@ -1,6 +1,41 @@
<template>
<view>
<view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right">
+ <input class="" :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="getCode(hform.HBarCode)" />
+ </view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanHBarCode()"></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="right">
+ <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <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">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
+ </view>
+ </view>
+
+
<view class="tabs">
<view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
@@ -169,11 +204,18 @@
ModRightName: 'CE_ProductInCheck',
OperationType: 1,
+ barCodeFocus: false,
+ showHStockPlaceName: false,
HBillNoFocus: false,
showHBillNo: true,
tabs: 1,
linterid: '',
HBillNo: '',
+
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
Materlist: [],
hform: {
@@ -218,8 +260,101 @@
} else {
this.refreshHBillState()
}
+ this.getHBaseList()
},
methods: {
+ getHBaseList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Warehouse/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HWHNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHWHName[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'
+ })
+ },
+ });
+ },
+ //閫夋嫨浠撳簱
+ HWHNameChange(e) {
+ // var name = e.split("(")
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HWHID = this.HWHNameList[i].HItemID
+
+ if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
+ this.showHStockPlaceName = true
+ } else {
+ this.hform.HStockPlaceName = ''
+ this.showHStockPlaceName = false
+ }
+ }
+ }
+ },
+ //閫夋嫨浠撲綅
+ HStockPlaceNameChange(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].HItemID
+ }
+ }
+ },
+ async refreshBarCodeState() {
+ this.barCodeFocus = false
+ await this.$nextTick(() => {
+ this.hform.HBarCode = ""
+ this.barCodeFocus = true
+ })
+ },
async refreshHBillState() {
this.HBillNoFocus = false
await this.$nextTick(() => {
@@ -238,6 +373,24 @@
innerAudioContext.play(); // 鎾斁闊抽
},
//鎵爜
+ toScanHBarCode() {
+ 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.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
+ },
toScanCode() {
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
mpaasScanModule.mpaasScan({
@@ -296,6 +449,205 @@
})
},
});
+ },
+ getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sOldBarCode = HBarCode
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sHQty = this.hform.HQty
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType = this.hform.HMainSourceBillType
+ var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
+ console.log(this.hform.HSourceBillNo, HSourceFlag)
+ if (HDeleteFlag == "*") {
+ if (sBarCode == "") {
+ CommonUtils.playSound(0)
+ uni.showToast({
+ title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ })
+ } else {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ success: (res) => {
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ CommonUtils.playSound(1)
+ } else {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ } else {
+ var sBarCode = this.hform.HBarCode
+ if (sHQty == "") {
+ sHQty = 0;
+ }
+
+ uni.request({
+ url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ success: (res) => {
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ // if (data.hSPFlagField == 0) {
+ // this.showHStockPlaceName = false
+ // } else {
+ // this.showHStockPlaceName = true
+ // }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ if (!this.hform.HSourceBillNo) {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ }
+ }
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
},
//鐗╂枡淇℃伅
DisBillEntryList() {
@@ -479,7 +831,8 @@
margin: 20rpx 0;
view {
- width: 25%;
+ // width: 25%;
+ flex: 1;
font-size: 30rpx;
color: #555;
text-align: center;
@@ -509,20 +862,22 @@
}
.right {
- width: 450rpx;
+ // width: 450rpx;
+ flex: 1;
border-radius: 22rpx;
border: 1px solid #acacac;
}
.righton {
- width: 450rpx;
+ // width: 450rpx;
+ flex: 1;
border-radius: 22rpx;
border: 1px solid #e4e4e4;
background-color: #e4e4e4;
}
input {
- width: 100%;
+ width: inherit;
padding: 8rpx 20rpx;
font-size: 30rpx;
}
diff --git a/pages/weiwailingliaojiaoyan/form.vue b/pages/weiwailingliaojiaoyan/form.vue
index 17f5309..9707142 100644
--- a/pages/weiwailingliaojiaoyan/form.vue
+++ b/pages/weiwailingliaojiaoyan/form.vue
@@ -1,7 +1,7 @@
<template>
<view>
<view class="form">
- <!-- <view class="form-item">
+ <view class="form-item">
<view class="title">鏉$爜:</view>
<view class="right">
<input class="" :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
@@ -33,7 +33,7 @@
<view class="righton" v-show="!showHStockPlaceName">
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view>
- </view> -->
+ </view>
<view class="tabs">
<!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view> -->
diff --git a/pages/xiaoshouchukujiaoyan/form.vue b/pages/xiaoshouchukujiaoyan/form.vue
index 0febcaa..05c7b63 100644
--- a/pages/xiaoshouchukujiaoyan/form.vue
+++ b/pages/xiaoshouchukujiaoyan/form.vue
@@ -1,7 +1,7 @@
<template>
<view>
<view class="form">
- <!-- <view class="form-item">
+ <view class="form-item">
<view class="title">鏉$爜:</view>
<view class="right">
<input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
@@ -33,7 +33,7 @@
<view class="righton" v-show="!showHStockPlaceName">
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view>
- </view> -->
+ </view>
<view class="tabs">
<!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view> -->
--
Gitblit v1.9.1