| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调拨类型:</view> |
| | | <!-- <view class="right" v-show="showHMainSourceBillType"> |
| | | <!-- <view class="right" v-show="showHMainSourceBillType"> |
| | | <uni-combox :candidates="HStockStyleArray" placeholder="请选择" v-model="hform.HStockStyle" |
| | | @input="HStockStyleChange"></uni-combox> |
| | | </view> --> |
| | | <view class="righton" > |
| | | <input name="HStockStyle" disabled v-model="hform.HStockStyle" |
| | | placeholder="请选择调拨类型" /> |
| | | </view> --> |
| | | <view class="righton"> |
| | | <input name="HStockStyle" disabled v-model="hform.HStockStyle" placeholder="请选择调拨类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <uni-combox :candidates="arrayHTransferDirect" placeholder="请选择" v-model="hform.HTransferDirect" |
| | | @input="HTransferDirectChange"></uni-combox> |
| | | </view> --> |
| | | <view class="righton" > |
| | | <input name="HTransferDirect" disabled v-model="hform.HTransferDirect" |
| | | placeholder="请选择调拨方向" /> |
| | | <view class="righton"> |
| | | <input name="HTransferDirect" disabled v-model="hform.HTransferDirect" placeholder="请选择调拨方向" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <view class="form-item"> |
| | | <view class="title">调入仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | <uni-combox :candidates="arrayHWHInName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHInNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调入仓位:</view> |
| | | <view class="right" v-show="HIsStockMgr"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <uni-combox :candidates="arrayHStockPlaceInName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | |
| | | } from "@/utils/auth.js"; |
| | | import elemIterator from '../../utils/elemIterator'; |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import { getUserStockRelation } from '../../utils/userRelationManager'; |
| | | import { |
| | | getUserStockRelation |
| | | } from '../../utils/userRelationManager'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | arrayHShipType: [], // 出货类型 |
| | | arrayHOrgName: [], // 组织 |
| | | arrayHOrgValue: [], // 组织对应ID |
| | | |
| | | arrayHWHInName: [], // 调入仓库 |
| | | HHWHInNameList: [], |
| | | arrayHStockPlaceInName: [], //调入仓位 |
| | | HStockPlaceInNameList: [], |
| | | |
| | | arrayHBillSubType: [], |
| | | arrayHBillSubTypeValue: [], |
| | | HBillSubType: '', |
| | |
| | | HBillSubType: "", |
| | | HBillerID: uni.getStorageSync('HBillerID'), |
| | | HRedBlueFlag: false, |
| | | |
| | | |
| | | HStockOutOrgName: uni.getStorageSync('Organization'), |
| | | HStockInOrgName: uni.getStorageSync('Organization'), |
| | | HStockInOrgID: uni.getStorageSync('OrganizationID'), |
| | |
| | | this.HSourcebillNoFocus = true |
| | | this.getNewData() |
| | | } |
| | | |
| | | this.getHBaseList() |
| | | |
| | | this.getHWarehouseInList() |
| | | // this.getHBaseList() |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | |
| | | this.InitTransferDirect() |
| | | this.InitShipType() |
| | | |
| | | this.getRelationStore() |
| | | this.GetSourceBillType() |
| | | |
| | | uni.$on('BillSelectComplete', (e) => { |
| | |
| | | computed: { |
| | | HIsStockInner: { |
| | | get: function() { |
| | | if(this.hform.HStockStyle == '组织内调拨') { |
| | | if (this.hform.HStockStyle == '组织内调拨') { |
| | | return true |
| | | } |
| | | return false |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | async getRelationStore() { |
| | | let { |
| | | data, |
| | | count |
| | | } = await getUserStockRelation() |
| | | if (count == 1) { |
| | | let WHIDList = [] |
| | | console.log('WHIDList: ',data); |
| | | Array.from(data).forEach(elem => { |
| | | WHIDList.push(elem.HItemID) |
| | | }) |
| | | |
| | | let sWhere = ` and HItemID in (${WHIDList.join(",")})` |
| | | this.getHBaseList({ |
| | | sWhere: sWhere |
| | | }) |
| | | |
| | | } else { |
| | | this.getHBaseList() |
| | | } |
| | | }, |
| | | HStockPlaceInNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i].仓位名称 == e) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | HWHInNameChange(e) { |
| | | console.log('e: ', e); |
| | | for (var i = 0; i < this.HWHInNameList.length; i++) { |
| | | if (this.HWHInNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHInNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHInNameList[i].HItemID |
| | | |
| | | if (this.HWHInNameList[i]['启用仓位'] == 'Y') { |
| | | this.HIsStockMgr = true |
| | | } else { |
| | | // this.hform.HStockPlaceName = '' |
| | | this.HIsStockMgr = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | getOrganization() { |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | url: '/Web/GetOrganizations', |
| | | resFunction: (res) => { |
| | | console.log("Organizations: ", res.data) |
| | | let {data, count, Message} = res.data |
| | | if(count == 1) { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.arrayHOrgName = [] |
| | | this.arrayHOrgValue = [] |
| | | Array.from(data).forEach(e => { |
| | |
| | | this.arrayHOrgValue.push(e.ID) |
| | | }) |
| | | resolve() |
| | | }else { |
| | | } else { |
| | | uni.showToast({ |
| | | icon:'none', |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | reject() |
| | | } |
| | | |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | HStockInOrgNameChange(e) { |
| | | let index = this.arrayHOrgName.findIndex(elem => elem == e) |
| | | if(index != -1) { |
| | | if (index != -1) { |
| | | this.hform.HStockInOrgID = this.arrayHOrgValue[index] |
| | | } |
| | | // 更新调入仓库 |
| | | this.getHWarehouseInList(e) |
| | | this.hform.HWHID = '', |
| | | this.hform.HWHName = '' |
| | | }, |
| | | set_InitBillSubType() { // 初始化单据子类型 |
| | | this.arrayHBillSubType = [] |
| | |
| | | HStockStyleChange(e) { |
| | | this.hform.HStockStyle = e |
| | | }, |
| | | // 调入仓库资料 |
| | | getHWarehouseInList(Organizaiton) { |
| | | Organizaiton = Organizaiton || uni.getStorageSync("Organization") |
| | | CommonUtils.doRequest2({ |
| | | url: '/Gy_Warehouse/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: Organizaiton |
| | | }, |
| | | resFunction: (res) => { |
| | | console.log('调入仓库 res: ', res.data.data); |
| | | if (res.data.count == 1) { |
| | | this.HWHInNameList = [] |
| | | this.arrayHWHInName = [] |
| | | |
| | | this.HWHInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHWHInName[i] = res.data.data[i].仓库名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: Organizaiton |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //基础仓库资料 |
| | | getHBaseList() { |
| | | getHBaseList({sWhere=''} = {}) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Warehouse/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: sWhere, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | |
| | | this.arrayHShipType = Array.from(data).map(e => { |
| | | return e.HName |
| | | }) |
| | | |
| | | |
| | | this.hform.HShipType = this.arrayHShipType[0] |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | } |
| | | }, |
| | | HOutStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i].仓位名称 == e) { |
| | | this.hform.HOutStockPlaceName = this.HStockPlaceNameList[i].仓位名称 |
| | | this.hform.HOutStockPlaceID = this.HStockPlaceNameList[i].HItemID |
| | | for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceInNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.hform.HSupID = data.HCusID |
| | | this.hform.HSupName = data.HCusName |
| | | this.hform.HStockStyle = data.HStockStyle |
| | | |
| | | |
| | | let HStockInOrgIndex = this.arrayHOrgValue.findIndex(e => e == data.HStockInOrgID) |
| | | let HStockOutOrgIndex = this.arrayHOrgValue.findIndex(e => e == data.HStockOutOrgID) |
| | | let HStockOutOrgIndex = this.arrayHOrgValue.findIndex(e => e == data |
| | | .HStockOutOrgID) |
| | | this.hform.HStockInOrgID = data.HStockInOrgID |
| | | this.hform.HStockOutOrgID = data.HStockOutOrgID |
| | | if(HStockInOrgIndex != -1) { |
| | | if (HStockInOrgIndex != -1) { |
| | | this.hform.HStockInOrgName = this.arrayHOrgName[HStockInOrgIndex] |
| | | } |
| | | |
| | | if(HStockOutOrgIndex != -1) { |
| | | |
| | | if (HStockOutOrgIndex != -1) { |
| | | this.hform.HStockOutOrgName = this.arrayHOrgName[HStockOutOrgIndex] |
| | | } |
| | | this.tabs = 2 |