From 941467c24424570e41bb0b5d40075c058e83e96d Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 13 八月 2025 18:15:26 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
components/ProcExchListPopup/ProcExchListPopup.vue | 127 +++++++++++++++++++--
pages/weiwaigxOut/form.vue | 8
pages/zhijiediaobo/form.vue | 190 +++++++++++++++++++++++++------
components/BillListPopup/BillListPopup.vue | 5
pages/index/index.vue | 17 ++
5 files changed, 289 insertions(+), 58 deletions(-)
diff --git a/components/BillListPopup/BillListPopup.vue b/components/BillListPopup/BillListPopup.vue
index a6c45b0..e5aa0c9 100644
--- a/components/BillListPopup/BillListPopup.vue
+++ b/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',
diff --git a/components/ProcExchListPopup/ProcExchListPopup.vue b/components/ProcExchListPopup/ProcExchListPopup.vue
index af96dd7..763d9a1 100644
--- a/components/ProcExchListPopup/ProcExchListPopup.vue
+++ b/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,17 +47,21 @@
<view class="left">鐗╂枡浠g爜: </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>
@@ -81,19 +97,97 @@
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
@@ -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) {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index d5effa6..b4843fe 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -14,11 +14,11 @@
</view>
<view :enable-hidden="item.hidden" v-if="canEdit" class="box edit" v-for="(item,index) in itemData"
:key="index" @tap="switchHidden(index)">
- <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
- <image :src="item.img" mode=""></image>
- <view class="texts">
- {{item.text}}
- </view>
+ <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
+ <image :src="item.img" mode=""></image>
+ <view class="texts">
+ {{item.text}}
+ </view>
</view>
</view>
@@ -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) {
diff --git a/pages/weiwaigxOut/form.vue b/pages/weiwaigxOut/form.vue
index e3b8ba4..c63fdbf 100644
--- a/pages/weiwaigxOut/form.vue
+++ b/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()
})
},
diff --git a/pages/zhijiediaobo/form.vue b/pages/zhijiediaobo/form.vue
index 3cd9f20..63d0845 100644
--- a/pages/zhijiediaobo/form.vue
+++ b/pages/zhijiediaobo/form.vue
@@ -96,13 +96,12 @@
</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">
@@ -111,9 +110,8 @@
<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">
@@ -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,7 +420,11 @@
arrayHShipType: [], // 鍑鸿揣绫诲瀷
arrayHOrgName: [], // 缁勭粐
arrayHOrgValue: [], // 缁勭粐瀵瑰簲ID
-
+ arrayHWHInName: [], // 璋冨叆浠撳簱
+ HHWHInNameList: [],
+ arrayHStockPlaceInName: [], //璋冨叆浠撲綅
+ HStockPlaceInNameList: [],
+
arrayHBillSubType: [],
arrayHBillSubTypeValue: [],
HBillSubType: '',
@@ -439,7 +443,7 @@
HBillSubType: "",
HBillerID: uni.getStorageSync('HBillerID'),
HRedBlueFlag: false,
-
+
HStockOutOrgName: uni.getStorageSync('Organization'),
HStockInOrgName: uni.getStorageSync('Organization'),
HStockInOrgID: uni.getStorageSync('OrganizationID'),
@@ -507,8 +511,9 @@
this.HSourcebillNoFocus = true
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) => {
@@ -530,7 +536,7 @@
computed: {
HIsStockInner: {
get: function() {
- if(this.hform.HStockStyle == '缁勭粐鍐呰皟鎷�') {
+ if (this.hform.HStockStyle == '缁勭粐鍐呰皟鎷�') {
return true
}
return false
@@ -538,14 +544,63 @@
}
},
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 => {
@@ -553,23 +608,27 @@
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 = []
@@ -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')
},
@@ -842,7 +959,7 @@
this.arrayHShipType = Array.from(data).map(e => {
return e.HName
})
-
+
this.hform.HShipType = this.arrayHShipType[0]
} else {
uni.showToast({
@@ -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
}
}
},
@@ -1645,16 +1762,17 @@
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
--
Gitblit v1.9.1