| components/BillListPopup/BillListPopup.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| components/ProcExchListPopup/ProcExchListPopup.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/index/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/weiwaigxOut/form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/zhijiediaobo/form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
components/BillListPopup/BillListPopup.vue
@@ -121,6 +121,10 @@ // this.exit() }, getBillList() { this.HBillList = [] this.length = 0 this.page = 0 this.curPage = 1 CommonUtils.doRequest( "/WEBSController/GetSourceBillList_Json", { HBilltype: this.HBillType, @@ -145,7 +149,6 @@ } this.HBillList = result this.page = result.length console.log(this.page) } else { uni.showToast({ icon: 'none', components/ProcExchListPopup/ProcExchListPopup.vue
@@ -18,6 +18,18 @@ <view class="title"><text>生产订单: </text></view> <view class="right"><input type="text" v-model="HICMOBillNo" /></view> </view> <view class="search-condition"> <view class="title"><text>工序: </text></view> <view class="right"> <uni-combox placeholder="请选择工序" @input="onProcChangeHandler" v-model="HProcName" :candidates="HProcListName"></uni-combox> </view> </view> <view class="search-condition"> <view class="title"><text>部门: </text></view> <view class="right"> <uni-combox placeholder="请选择部门" @input="onDeptChangeHandler" v-model="HDepartName" :candidates="HDepartListName"></uni-combox> </view> </view> <view class="buttons"> <view style="flex: 1;"></view> <button size="mini" type="primary" @click="search">搜索</button> @@ -26,7 +38,7 @@ <scroll-view id="#BillListPanel" scroll-y="true" style="height: 45vh;"> <view class="options-wrapper" v-show="HBillList.length != 0"> <uni-card v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['物料名称']" :extra="`数量: ${bill['数量']}`" @tap="clickCard(bill['HSourceInterID'], bill['单据号'])"> :extra="`数量: ${bill['数量']}`" @tap="clickCard(bill['HSourceInterID'], bill['单据号'], bill['工序号'])"> <view class="item"> <view class="left">单据号: </view> <view class="right">{{bill['单据号']}}</view> @@ -35,10 +47,10 @@ <view class="left">物料代码: </view> <view class="right">{{bill['物料编码']}}</view> </view> <!-- <view class="item"> <view class="left">物料名称: </view> <view class="right">{{bill['物料名称']}}</view> </view> --> <view class="item"> <view class="left">工序: </view> <view class="right">{{bill['工序']}}</view> </view> <view class="item"> <view class="left">规格型号: </view> <view class="right">{{bill['规格型号']}}</view> @@ -46,6 +58,10 @@ <view class="item"> <view class="left">车间: </view> <view class="right">{{bill['车间']}}</view> </view> <view class="item"> <view class="left">流水号: </view> <view class="right">{{bill['工序号']}}</view> </view> </uni-card> </view> @@ -81,6 +97,16 @@ HICMOBillNo: '', HBillList: [], panelHeight: 0, HProcListName: [], HProcListValue: [], HProcID: '', HProcName: '', HDepartListName: [], HDepartListValue: [], HDepartID: getUserInfo()['HDeptID'], HDepartName: getUserInfo()['HDept'], }; }, props: { @@ -90,10 +116,78 @@ prop: "HSourceBill", event: 'change' }, mounted() { }, methods: { onProcChangeHandler(e) { let index = this.HProcListName.findIndex(eName => e == eName) if(index != -1){ this.HProcID = this.HProcListValue[index] }else { this.HProcName = '' this.HProcID = '' } }, onDeptChangeHandler(e) { let index = this.HDepartListName.findIndex(eName => e == eName) if(index != -1){ this.HDepartID = this.HDepartListValue[index] }else { this.HDepartName = '' this.HDepartID = '' } }, getHDeptList() { // 获得部门 CommonUtils.doRequest2({ url: "/Gy_Department/list", data: { sWhere: ` and HUSEORGID=${uni.getStorageSync('OrganizationID')}`, user: this.userInfo['Czymc'], Organization: uni.getStorageSync('Organization') }, resFunction: (res) => { let {data, count, Message} = res.data this.HDepartListName = [] this.HDepartListValue = [] Array.from(data).forEach(item => { this.HDepartListName.push(item['部门名称']) this.HDepartListValue.push(item['HItemID']) }) } }) }, getHProcList() { // 获得工序 CommonUtils.doRequest2({ url: "/Web/GetProcList_Json", data: { sWhere: '', }, resFunction: (res) => { let {data, count, Message} = res.data console.log('HProc data: ',data); this.HProcListName = [] this.HProcListValue = [] Array.from(data).forEach(item => { this.HProcListName.push(item['工序']) this.HProcListValue.push(item['HItemID']) }) } }) }, popupChangeHandler(e) { if (e.show === true) { // 初始化单据信息 this.getBillList() // 初始化部门 this.getHDeptList() // 初始化工序 this.getHProcList() } else { // 清理资源 this.size = 20 @@ -115,21 +209,28 @@ showPopup() { this.$refs.popup.open(); }, clickCard(interid, billno) { uni.$emit('BillSelectComplete', { clickCard(interid, billno, procNumber) { uni.$emit('BillSelectComplete2', { HInterID: interid, HBillNo: billno HBillNo: billno, HProcNo: procNumber }) // this.exit() }, getBillList() { this.HBillList = [] this.length = 0 this.page = 0 this.curPage = 1 CommonUtils.doRequest( "/WEBSController/GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json", { "/WEBSController/GetMES_ProcessExchangeBillList_APP_HaiCheng", { HBillNo: this.HBillNo || '', HNumber: this.HNumber || '', HName: this.HName || '', HICMOBillNo: this.HICMOBillNo || "", user: this.userInfo['Czymc'] user: this.userInfo['Czymc'], HProcID: this.HProcID, HDeptID: this.HDepartID }, (res) => { let { @@ -138,7 +239,7 @@ Message } = res.data if (count == 1) { console.log(data) console.log("ProcessExchangeBill: ", data) this.length = Array.from(data).length const result = []; for (let i = 0; i < data.length; i += this.size) { pages/index/index.vue
@@ -403,6 +403,12 @@ this.getHiddenItem() }, methods: { checkCardShow(item) { if(item.HMaker && item.HMaker != getUserInfo()['Czymc'] && item.hidden == true){ return false } return true }, async getHiddenItem() { // let itemCache = uni.getStorageSync('HIndexItemData') || '' // console.log('itemCache: ',itemCache); @@ -415,6 +421,7 @@ }) Array.from(data).forEach(e => { this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"]) this.itemData[e["HIndex"]].HMaker = e["HMaker"] }) }, switchHidden(index) { pages/weiwaigxOut/form.vue
@@ -506,9 +506,11 @@ this.getDefValByUser() uni.$on('BillSelectComplete', (e) => { console.log("接收到的消息: ", e.HBillNo) this.getHBarCodeData(e.HBillNo) uni.$on('BillSelectComplete2', (e) => { console.log("接收到的消息: ", e.HBillNo, e.HProcNumber) this.hform.HBarCode = e.HBillNo this.hform.HProcNo = e.HProcNo this.getHBarCodeData(e.HBillNo, e.HProcNo) this.$refs.billList.exit() }) }, pages/zhijiediaobo/form.vue
@@ -101,8 +101,7 @@ @input="HStockStyleChange"></uni-combox> </view> --> <view class="righton" > <input name="HStockStyle" disabled v-model="hform.HStockStyle" placeholder="请选择调拨类型" /> <input name="HStockStyle" disabled v-model="hform.HStockStyle" placeholder="请选择调拨类型" /> </view> </view> <view class="form-item"> @@ -112,8 +111,7 @@ @input="HTransferDirectChange"></uni-combox> </view> --> <view class="righton" > <input name="HTransferDirect" disabled v-model="hform.HTransferDirect" placeholder="请选择调拨方向" /> <input name="HTransferDirect" disabled v-model="hform.HTransferDirect" placeholder="请选择调拨方向" /> </view> </view> <view class="form-item"> @@ -157,15 +155,15 @@ <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="不可操作" /> @@ -371,7 +369,9 @@ } 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 { @@ -420,6 +420,10 @@ arrayHShipType: [], // 出货类型 arrayHOrgName: [], // 组织 arrayHOrgValue: [], // 组织对应ID arrayHWHInName: [], // 调入仓库 HHWHInNameList: [], arrayHStockPlaceInName: [], //调入仓位 HStockPlaceInNameList: [], arrayHBillSubType: [], arrayHBillSubTypeValue: [], @@ -508,7 +512,8 @@ this.getNewData() } this.getHBaseList() this.getHWarehouseInList() // this.getHBaseList() this.getHSupList() this.getHEmpList() this.getHDeptList() @@ -516,6 +521,7 @@ this.InitTransferDirect() this.InitShipType() this.getRelationStore() this.GetSourceBillType() uni.$on('BillSelectComplete', (e) => { @@ -538,13 +544,62 @@ } }, 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 let { data, count, Message } = res.data if(count == 1) { this.arrayHOrgName = [] this.arrayHOrgValue = [] @@ -570,6 +625,10 @@ if(index != -1) { this.hform.HStockInOrgID = this.arrayHOrgValue[index] } // 更新调入仓库 this.getHWarehouseInList(e) this.hform.HWHID = '', this.hform.HWHName = '' }, set_InitBillSubType() { // 初始化单据子类型 this.arrayHBillSubType = [] @@ -730,12 +789,70 @@ 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') }, @@ -989,10 +1106,10 @@ } }, 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 } } }, @@ -1647,7 +1764,8 @@ 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) {