所有 校验单据模块 添加 条码扫码 数量填写 仓库选择和仓位选择
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "1.0.77", |
| | | "versionCode" : 177, |
| | | "versionName" : "1.0.78", |
| | | "versionCode" : 178, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | "path": "pages/caigourukujiaoyan/form", |
| | | "style": { |
| | | "navigationBarTitleText": "采购入库单校验", |
| | | "enablePullDownRefresh": true |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | |
| | | 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(), |
| | | }, |
| | | // { |
| | |
| | | <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="请扫描(或输入)条码" |
| | |
| | | <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> --> |
| | |
| | | <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="请扫描(或输入)条码" |
| | |
| | | <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> --> |
| | |
| | | HMaker: uni.getStorageSync('HUserName'), |
| | | HStockOrgName: uni.getStorageSync('Organization'), |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | HSourceBarCodeCtl: "Y", //是否进行源单对应条码核对('Y'为核对) |
| | | HSourceBarCodeCtl: "N", //是否进行源单对应条码核对('Y'为核对) |
| | | chkHBarflag: false, |
| | | HBarflag: 'Y', |
| | | |
| | |
| | | <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> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { CommonUtils } from '../../utils/common'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | 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: { |
| | |
| | | } 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(() => { |
| | |
| | | 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() { |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | 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({ |
| | |
| | | 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 = '' |
| | |
| | | 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 |
| | |
| | | } |
| | | |
| | | .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; |
| | | } |
| | |
| | | <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> |
| | |
| | | ModRightName: 'CE_ProductInCheck', |
| | | OperationType: 1, |
| | | |
| | | barCodeFocus: false, |
| | | showHStockPlaceName: false, |
| | | HBillNoFocus: false, |
| | | showHBillNo: true, |
| | | tabs: 1, |
| | | linterid: '', |
| | | HBillNo: '', |
| | | |
| | | arrayHWHName: [], //仓库 |
| | | HWHNameList: [], |
| | | arrayHStockPlaceName: [], //仓位 |
| | | HStockPlaceNameList: [], |
| | | |
| | | Materlist: [], |
| | | hform: { |
| | |
| | | } 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(() => { |
| | |
| | | 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({ |
| | |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | 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() { |
| | |
| | | margin: 20rpx 0; |
| | | |
| | | view { |
| | | width: 25%; |
| | | // width: 25%; |
| | | flex: 1; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | |
| | | } |
| | | |
| | | .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; |
| | | } |
| | |
| | | <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="请扫描(或输入)条码" |
| | |
| | | <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> --> |
| | |
| | | <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="请扫描(或输入)条码" |
| | |
| | | <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> --> |