chenhaozhe
2025-08-06 5e234e7e92f694cb40ad395f10544e5e2faa3318
pages/weiwaigxOut/form.vue
@@ -59,6 +59,20 @@
                </view>
            </view>
            <view class="form-item">
            <view class="title">工序:</view>
            <view class="right">
               <uni-combox :candidates="arrayHProcName" placeholder="请选择工序" v-model="hform.HProcName"
                  @input="HProcNameChange"></uni-combox>
            </view>
         </view>
         <view class="form-item">
            <view class="title">部门:</view>
            <view class="right">
               <uni-combox :candidates="arrayHDept" placeholder="请选择部门" v-model="hform.HDept"
                  @input="HHDeptChange"></uni-combox>
            </view>
         </view>
         <view class="form-item">
                <view class="title">送货单号:</view>
                <view class="right">
                    <input v-model="hform.HInnerBillNo" placeholder="请输入送货单号" />
@@ -110,6 +124,9 @@
                <view class="title">流转卡:</view>
                <view class="righton">
                    <input disabled v-model="hform.HProcExchBillNo" />
            </view>
            <view class="icon-wrapper" :disabled="hform.HMainSourceBillType === -1">
               <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
                </view>
            </view>
            <view class="form-item">
@@ -344,6 +361,7 @@
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
      <ProcExchListPopupVue ref="billList"></ProcExchListPopupVue>
    </view>
</template>
<script>
@@ -351,7 +369,12 @@
    import {
        getUserInfo
    } from "@/utils/auth.js";
   import ProcExchListPopupVue from '../../components/ProcExchListPopup/ProcExchListPopup.vue';
import { CommonUtils } from '../../utils/common';
    export default {
      components: {
         ProcExchListPopupVue
      },
        data() {
            return {
                userInfo: getUserInfo(),
@@ -371,9 +394,13 @@
                HEmpNameList: [],
                arrayHGroupName: [], //班组
                HGroupNameList: [],
            arrayHDept: [], // 部门
            HDeptList: [],
                isEdit: false,
                hform: {
               HStockOrgID: uni.getStorageSync('OrganizationID'),
                    HInterID: '',
                    HBillNo: '',
                    HBarCode: '',
@@ -430,8 +457,8 @@
                    // HSourceID:'',      
                    HGroupName: '',
                    HGroupID: 0,
                    // HDept:'',
                    // HDeptID:'',
               HDept: '',
               HDeptID: '',
                    HMaker: '',
                    HMakeDate: '',
@@ -467,8 +494,16 @@
            this.getHProcList()
            this.getHSupList()
            this.getHEmpList()
         this.getHProcList()
         this.getHDeptList()
            this.getDefValByUser()
         uni.$on('BillSelectComplete', (e) => {
            console.log("接收到的消息: ", e.HBillNo)
            this.getHBarCodeData(e.HBillNo)
            this.$refs.billList.exit()
         })
        },
        methods: {
            //通过登录用户获取默认值
@@ -639,6 +674,36 @@
                for (var i = 0; i < this.HProcNameList.length; i++) {
                    if (this.HProcNameList[i].工序 == e) {
                        this.hform.HProcID = this.HProcNameList[i].HItemID
               }
            }
         },
         getHDeptList() { // 获得部门
            CommonUtils.doRequest(
            "/Gy_Department/list",
            {
               sWhere: ` and HUSEORGID=${uni.getStorageSync('OrganizationID')}`,
               user: this.userInfo['Czymc'],
               Organization: uni.getStorageSync('Organization')
            },
            (res) => {
               let {data, count, Message} = res.data
               console.log('data: ',data);
               if(count == 1) {
                  this.HDeptList = data
                  this.arrayHDept = Array.from(data).map(e => e['部门名称'])
               }else {
                  uni.showToast({
                     icon: 'none',
                     Message: Message
                  })
               }
            }
            )
         },
         HHDeptChange(e) {
            for (var i = 0; i < this.HDeptList.length; i++) {
               if (this.HDeptList[i]['部门名称']== e) {
                  this.hform.HDeptID = this.HDeptList[i].HItemID
                    }
                }
            },
@@ -898,6 +963,8 @@
                            this.hform.HICMOQty = data.任务单数量
                            this.hform.HOrderProcNO = data.订单跟踪号
                            this.hform.HStationInTime = getDateTime.dateTimeStr('y-m-d h:i:s')
                     // this.hform.HProcName = data['工序']
                     // this.hform.HProcID = data['HProcID']
                            // this.hform.HMoney= 0
                            // this.hform.HSupID= data.HSupID
                            // this.hform.HSupName= data.供应商
@@ -905,11 +972,12 @@
                            // this.hform.HSource= data.生产资源
                            // this.hform.HGroupID= data.HGroupID
                            // this.hform.HGroupName= data.班组
                            this.hform.HDeptID = this.userInfo.HDeptID
                            this.hform.HDept = this.userInfo.HDept
                     // this.hform.HDeptID = this.userInfo.HDeptID
                     // this.hform.HDept = this.userInfo.HDept
                            this.hform.HProcExchHinteID = data.hmainid
                            this.hform.HPRDOrg = data.组织名称
                            this.hform.HPRDOrgID = data.HPRDORGID
                            if (e) {
                                this.getHProcNoData(this.hform.HBarCode, this.hform.HProcNo)
                            }
@@ -1180,6 +1248,9 @@
                    },
                });
            },
         showBillList() {
            this.$refs.billList.showPopup()
         },
            goBack() {
                uni.showModal({
                    title: '提示',
@@ -1223,9 +1294,10 @@
        align-items: center;
        font-size: 30rpx;
        padding: 6rpx 0;
      gap: 10rpx;
        .title {
            width: 208rpx;
         width: 188rpx;
            text {
                color: red;
@@ -1234,13 +1306,13 @@
        }
        .right {
            width: 450rpx;
         flex: 1;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton {
            width: 450rpx;
         flex: 1;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
@@ -1258,6 +1330,26 @@
            font-size: 30rpx;
        }
      .icon-wrapper {
         background-color: #3A78FF;
         width: 52rpx;
         height: 52rpx;
         border-radius: 100%;
         display: flex;
         justify-content: center;
         align-items: center;
         .uni-icons {
            color: #fff !important;
         }
      }
      .icon-wrapper[disabled] {
         background-color: rgba(228, 228, 228, 1);
         pointer-events: none;
         touch-action: none;
      }
    }
    .bottom-btn {