wtt
2025-08-13 941467c24424570e41bb0b5d40075c058e83e96d
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
5个文件已修改
347 ■■■■ 已修改文件
components/BillListPopup/BillListPopup.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/ProcExchListPopup/ProcExchListPopup.vue 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/weiwaigxOut/form.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zhijiediaobo/form.vue 190 ●●●● 补丁 | 查看 | 原始文档 | 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,17 +47,21 @@
                                <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>
@@ -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) {
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) {
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
@@ -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