| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | </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> |
| | | </uni-card> |
| | | </view> |
| | |
| | | HICMOBillNo: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | HProcListName: [], |
| | | HProcListValue: [], |
| | | HProcID: '', |
| | | HProcName: '', |
| | | |
| | | HDepartListName: [], |
| | | HDepartListValue: [], |
| | | HDepartID: getUserInfo()['HDeptID'], |
| | | HDepartName: getUserInfo()['HDept'], |
| | | }; |
| | | }, |
| | | props: { |
| | | |
| | | |
| | | }, |
| | | model: { |
| | | 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 |
| | |
| | | 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 { |
| | |
| | | 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) { |