修改 直接调拨单、生产入库单、销售出库单、分布式调入单、分布式调出单:仓位默认可以编辑。扫描仓位码带出仓库
| | |
| | | { |
| | | "path": "pages/fenbushidiaorudan/form_test", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调入单", |
| | | "navigationBarTitleText": "分步调入单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/fenbushidiaorudan/table", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调入单缓存", |
| | | "navigationBarTitleText": "分步调入单缓存", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/fenbushidiaochudan/form_out", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调出单", |
| | | "navigationBarTitleText": "分步调出单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | { |
| | | "path": "pages/fenbushidiaorudan/form_test", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调入单", |
| | | "navigationBarTitleText": "分步调入单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/fenbushidiaorudan/table", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调入单缓存", |
| | | "navigationBarTitleText": "分步调入单缓存", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/fenbushidiaochudan/form_out", |
| | | "style": { |
| | | "navigationBarTitleText": "分布调出单", |
| | | "navigationBarTitleText": "分步调出单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调出仓位:</view> |
| | | <view class="right" v-show="HSCIsStockMgr"> |
| | | <view class="right" > |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HOutStockPlaceName" @input="HOutStockPlaceNameChange" |
| | | @confirm="HStockPlaceOutNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HSCIsStockMgr"> |
| | | <!-- <view class="righton" v-show="!HSCIsStockMgr"> |
| | | <input v-model="hform.HOutStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调入仓位:</view> |
| | | <view class="right" v-show="HIsStockMgr"> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceInNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange" |
| | | @confirm="HStockPlaceNameInScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HIsStockMgr"> |
| | | <!-- <view class="righton" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <!-- <view class="form-item"> |
| | | <view class="title">保管:</view> |
| | |
| | | }, |
| | | async HWHNameOutScan(e) { |
| | | // 扫描仓库码 |
| | | return |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | | if (index == -1) { |
| | |
| | | async HStockPlaceOutNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | |
| | | if (index == -1) { |
| | | |
| | | uni.showToast({ |
| | | |
| | | icon: 'none', |
| | | |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | |
| | | this.hform.HOutStockPlaceID = 0 |
| | | this.hform.HOutStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HOutStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HOutStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HSCWHID = res.data.data[0].HWHID |
| | | this.hform.HSCWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | // let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | // console.log('index: ', index); |
| | | /// / 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | // this.hform.HStockPlaceID = 0 |
| | | // this.hform.HStockPlaceName = '' |
| | | // await this.$nextTick() |
| | | // |
| | | // if (index == -1) { |
| | | // |
| | | // uni.showToast({ |
| | | // |
| | | // icon: 'none', |
| | | // |
| | | // title: '扫描仓位条码对应的仓位不存在...' |
| | | // |
| | | // }) |
| | | // } else { |
| | | // this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | // } |
| | | }, |
| | | async HWHNameInScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHInNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceInNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | |
| | | if (index == -1) { |
| | | |
| | | uni.showToast({ |
| | | |
| | | icon: 'none', |
| | | |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | 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 |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | // let index = this.HStockPlaceInNameList.findIndex(elem => elem['条码编号'] == e) |
| | | // console.log('index: ', index); |
| | | // // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | // this.hform.HStockPlaceID = 0 |
| | | // this.hform.HStockPlaceName = '' |
| | | // await this.$nextTick() |
| | | // |
| | | // if (index == -1) { |
| | | // |
| | | // uni.showToast({ |
| | | // |
| | | // icon: 'none', |
| | | // |
| | | // title: '扫描仓位条码对应的仓位不存在...' |
| | | // |
| | | // }) |
| | | // } else { |
| | | // this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | // } |
| | | }, |
| | | async qrCodeDisplay() { |
| | | try { |
| | |
| | | } |
| | | } |
| | | }, |
| | | // 调入仓位修改 |
| | | // 调入仓库修改 |
| | | 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 |
| | | } |
| | | const warehouse = this.HWHInNameList.find(item => item.仓库名称 == e) |
| | | if (warehouse) { |
| | | this.hform.HWHName = warehouse.仓库名称 |
| | | this.hform.HWHID = warehouse.HItemID |
| | | this.HIsStockMgr = warehouse['启用仓位'] == 'Y' |
| | | this.hform.HStockPlaceName = '' |
| | | this.hform.HStockPlaceID = 0 |
| | | if (this.HIsStockMgr) { |
| | | this.getStockPlaceRemote(warehouse["HSPGroupID"], 1) // 修改调入仓库 |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | }); |
| | | |
| | | 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' |
| | | }) |
| | | }, |
| | | }); |
| | | // 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' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | |
| | | // this.getHYDList() |
| | | }, |
| | |
| | | }, |
| | | // 调出仓库修改 |
| | | HSCWHNameChange(e) { |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HSCWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HSCWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.HSCIsStockMgr = true |
| | | } else { |
| | | const warehouse = this.HWHNameList.find(item => item.仓库名称 == e) |
| | | if (warehouse) { |
| | | this.hform.HSCWHName = warehouse.仓库名称 |
| | | this.hform.HSCWHID = warehouse.HItemID |
| | | this.HSCIsStockMgr = warehouse['启用仓位'] == 'Y' |
| | | this.hform.HOutStockPlaceName = '' |
| | | this.hform.HOutStockPlaceID = '' |
| | | this.HSCIsStockMgr = false |
| | | } |
| | | this.hform.HOutStockPlaceID = 0 |
| | | if (this.HSCIsStockMgr) { |
| | | this.getStockPlaceRemote(warehouse["HSPGroupID"], 2) // 修改调出仓库 |
| | | } |
| | | } |
| | | }, |
| | |
| | | // } |
| | | // } |
| | | }, |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID, Mode) { |
| | | // Mode=1 -> 调入仓位数据获取; Mode=2 -> 调出仓位数据获取 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | if (Mode == 1) { |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | if (Mode == 2) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | //选择源单类型 |
| | | HMainSourceBillTypeChange(e) { |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HSCWHName" |
| | | @input="HSCWHNameChange" @confirm="HWHNameOutScan"></uni-combox> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <!-- <view class="icon-wrapper"> |
| | | <uni-icons type="more" size="20" @click="showWarehouseList('HSCWHID')"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调出仓位:</view> |
| | | <view class="right" v-show="HSCIsStockMgr"> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HOutStockPlaceName" @input="HOutStockPlaceNameChange" |
| | | @confirm="HStockPlaceOutNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HSCIsStockMgr"> |
| | | <!-- <view class="righton" v-show="!HSCIsStockMgr"> |
| | | <input v-model="hform.HOutStockPlaceName" :disabled="!HSCIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="icon-wrapper" v-show="HSCIsStockMgr"> |
| | | <uni-icons type="more" size="20" @click="showStockPlaceList('HOSpID')"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | <view class="right" v-show="showHMainSourceBillType"> |
| | | <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillTypeIndex" |
| | | @change="HMainSourceBillTypeChange"> |
| | | <input name="HMainSourceBillType" disabled :value="HMainSourceBillType" placeholder="请选择源单类型" /> |
| | | <input name="HMainSourceBillType" disabled :value="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | |
| | | <uni-combox :candidates="arrayHWHInName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHInNameChange" @confirm="HWHNameInScan"></uni-combox> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <!-- <view class="icon-wrapper"> |
| | | <uni-icons type="more" size="20" @click="showWarehouseList('HWHID')"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调入仓位:</view> |
| | | <view class="right" v-show="HIsStockMgr"> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceInNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange" |
| | | @confirm="HStockPlaceNameInScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!HIsStockMgr"> |
| | | <!-- <view class="righton" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="icon-wrapper" v-show="HIsStockMgr"> |
| | | <uni-icons type="more" size="20" @click="showStockPlaceList('HSpID')"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | |
| | | |
| | | <view v-if="tabs == 2"> |
| | | <view class="list" v-for="(item,index) in Materlist" :key="index"> |
| | | <uni-card :title="item.物料名称" :extra="item.物料代码" style="margin: 10px;" @tap="showMaterialDetail(item)"> |
| | | <uni-card :title="item.物料名称" :extra="item.物料代码" style="margin: 10px;" |
| | | @tap="showMaterialDetail(item)"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | |
| | | </view> |
| | | |
| | | <!-- 弹窗组件 --> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType || 1250" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" |
| | | :HSourceBillType="hform.HMainSourceBillType || 1250" :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <!-- <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> --> |
| | | <!-- <MaterialEditPopup ref="materialEdit" :materialData="selectedMaterial" @on-save="onMaterialSave"></MaterialEditPopup> --> |
| | | </view> |
| | |
| | | async HStockPlaceOutNameScan(e) { |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | this.hform.HOutStockPlaceID = 0 |
| | | this.hform.HOutStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HOutStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HOutStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HSCWHID = res.data.data[0].HWHID |
| | | this.hform.HSCWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | // await this.$nextTick() |
| | | // if (index == -1) { |
| | | // uni.showToast({ |
| | | // icon: 'none', |
| | | // title: '扫描仓位条码对应的仓位不存在...' |
| | | // }) |
| | | // } else { |
| | | // this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | // } |
| | | }, |
| | | |
| | | // 扫描调入仓库码 |
| | |
| | | this.HWHInNameChange(this.HWHInNameList[index]['仓库名称']) |
| | | } |
| | | }, |
| | | |
| | | // 扫描调入仓位码 |
| | | async HStockPlaceNameInScan(e) { |
| | | let index = this.HStockPlaceInNameList.findIndex(elem => elem['条码编号'] == e) |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | 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 |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HStockPlaceInNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | // await this.$nextTick() |
| | | // if (index == -1) { |
| | | // uni.showToast({ |
| | | // icon: 'none', |
| | | // title: '扫描仓位条码对应的仓位不存在...' |
| | | // }) |
| | | // } else { |
| | | // this.HStockPlaceInNameChange(this.HStockPlaceInNameList[index]['仓位名称']) |
| | | // } |
| | | }, |
| | | |
| | | // 源单类型变更 |
| | |
| | | this.hform.HSCWHName = warehouse.仓库名称 |
| | | this.hform.HSCWHID = warehouse.HItemID |
| | | this.HSCIsStockMgr = warehouse['启用仓位'] == 'Y' |
| | | if (!this.HSCIsStockMgr) { |
| | | this.hform.HOutStockPlaceName = '' |
| | | this.hform.HOutStockPlaceID = '' |
| | | this.hform.HOutStockPlaceID = 0 |
| | | if (this.HSCIsStockMgr) { |
| | | this.getStockPlaceRemote(warehouse["HSPGroupID"], 2) // 修改调出仓库 |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.hform.HWHName = warehouse.仓库名称 |
| | | this.hform.HWHID = warehouse.HItemID |
| | | this.HIsStockMgr = warehouse['启用仓位'] == 'Y' |
| | | if (!this.HIsStockMgr) { |
| | | this.hform.HStockPlaceName = '' |
| | | this.hform.HStockPlaceID = '' |
| | | this.hform.HStockPlaceID = 0 |
| | | if (this.HIsStockMgr) { |
| | | this.getStockPlaceRemote(warehouse["HSPGroupID"], 1) // 修改调入仓库 |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.hform.HStockPlaceID = stockPlace.HMainID |
| | | } |
| | | }, |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID, Mode) { |
| | | // Mode=1 -> 调入仓位数据获取; Mode=2 -> 调出仓位数据获取 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | if (Mode == 1) { |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | if (Mode == 2) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | // 部门变更 |
| | | HDeptNameChange(e) { |
| | | const dept = this.HDeptNameList.find(item => item.部门名称 == e) |
| | |
| | | }) |
| | | |
| | | // 获取仓位列表 |
| | | CommonUtils.doRequest2({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | resFunction: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | this.HStockPlaceInNameList = res.data.data |
| | | this.arrayHStockPlaceName = res.data.data.map(item => item.仓位名称) |
| | | this.arrayHStockPlaceInName = res.data.data.map(item => item.仓位名称) |
| | | } |
| | | } |
| | | }) |
| | | // CommonUtils.doRequest2({ |
| | | // url: '/Gy_StockPlace/list', |
| | | // data: { |
| | | // sWhere: "", |
| | | // user: uni.getStorageSync('HUserName'), |
| | | // Organization: uni.getStorageSync('Organization') |
| | | // }, |
| | | // resFunction: (res) => { |
| | | // if (res.data.count == 1) { |
| | | // this.HStockPlaceNameList = res.data.data |
| | | // this.HStockPlaceInNameList = res.data.data |
| | | // this.arrayHStockPlaceName = res.data.data.map(item => item.仓位名称) |
| | | // this.arrayHStockPlaceInName = res.data.data.map(item => item.仓位名称) |
| | | // } |
| | | // } |
| | | // }) |
| | | }, |
| | | |
| | | // 获取部门列表 |
| | |
| | | this.hform.HSourceBillNo = data.HSourceBillNo |
| | | |
| | | // 设置源单类型 |
| | | const index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType) |
| | | const index = this.arrayHMainSourceBillValue.findIndex(e => e == data |
| | | .HSourceBillType) |
| | | if (index !== -1) { |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[index] |
| | | this.HMainSourceBillTypeIndex = index |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <!-- 四维尔需扫仓位码带出仓库和仓位信息,先去除仓位扫码的控制 --> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HStockPlaceNameListComputed" placeholder="请输入(或扫描)仓位" |
| | | 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> --> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | }, |
| | | methods: { |
| | | async HWHNameScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | 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 |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async qrCodeDisplay() { |
| | |
| | | }, |
| | | }); |
| | | |
| | | 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' |
| | | }) |
| | | }, |
| | | }); |
| | | // 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' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | |
| | | // this.getHYDList() |
| | | }, |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | async getStockPlaceRemote(HSPGroupID){ |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | 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 { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | HFIFOWHNameChange(e) { |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <!-- 四维尔启用仓位扫码 其他客户按需启用控制 --> |
| | | <view class="right" > |
| | | <uni-combox :candidates="HStockPlaceNameListComputed" placeholder="请输入(或扫描)仓位" |
| | | 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> --> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | }, |
| | | methods: { |
| | | async HWHNameScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e) |
| | | console.log('index: ', index); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | await this.$nextTick() |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓位条码对应的仓位不存在...' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | 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 |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['仓位名称']) |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async qrCodeDisplay() { |
| | |
| | | }, |
| | | }); |
| | | |
| | | 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' |
| | | }) |
| | | }, |
| | | }); |
| | | // 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' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | |
| | | // this.getHYDList() |
| | | }, |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | console.log(this.HWHNameList[i]['启用仓位']) |
| | | |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | 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 { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | HFIFOWHNameChange(e) { |