| | |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <!-- <view class="righton" v-show="!showHStockPlaceName"> |
| | | <!-- <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> --> |
| | | </view> |
| | |
| | | HRedBlueFlag: false, |
| | | |
| | | HBarCode: '', |
| | | HQty: '', |
| | | HQty: '', // 数量 |
| | | HWHName: getUserInfo().HWHName, |
| | | HWHID: getUserInfo().HWhID, |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | async onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | | await this.GetSourceBillType() |
| | | |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | |
| | | this.GetSourceBillType() |
| | | this.getRelationStore() |
| | | |
| | | uni.$on('BillSelectComplete', (e) => { |
| | |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | |
| | | }, |
| | | // 通过单据类型获取源单类型 |
| | | async GetSourceBillType() { |
| | | CommonUtils.doRequest2({ |
| | | url: '/Web/GetHSourceBillTypeByBillType', |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | Num: 2 |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.arrayHMainSourceBillType = [] |
| | | this.arrayHMainSourceBillValue = [] |
| | | Array.from(data).forEach(e => { |
| | | this.arrayHMainSourceBillType.push(e['HSourceBillTypeName']) |
| | | this.arrayHMainSourceBillValue.push(e['HSourceBillType']) |
| | | }) |
| | | |
| | | this.arrayHMainSourceBillType.push('手工录入') |
| | | this.arrayHMainSourceBillValue.push('-1') |
| | | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[0] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0] |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetHSourceBillTypeByBillType', |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | Num: 2 |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.arrayHMainSourceBillType = [] |
| | | this.arrayHMainSourceBillValue = [] |
| | | Array.from(data).forEach(e => { |
| | | this.arrayHMainSourceBillType.push(e['HSourceBillTypeName']) |
| | | this.arrayHMainSourceBillValue.push(e['HSourceBillType']) |
| | | }) |
| | | |
| | | this.arrayHMainSourceBillType.push('手工录入') |
| | | this.arrayHMainSourceBillValue.push('-1') |
| | | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[0] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0] |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //源单资料 |
| | | getHYDList() { |
| | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | async getStockPlaceRemote(HSPGroupID){ |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | |
| | | }, |
| | | //修改回填数据 |
| | | RoadBillMain(HInterID) { |
| | | console.log('HInterID: ', HInterID); |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json', |
| | | data: { |
| | |
| | | console.log(33, res.data.data[0]); |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data[0] |
| | | console.log('data: ', data); |
| | | this.hform.HInterID = data.HInterID |
| | | this.hform.HBillNo = data.HBillNo |
| | | this.hform.HMainSourceBillType = data.HSourceBillType |