| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baogong/AddLineBind", |
| | | "style": { |
| | | "navigationBarTitleText": "添加生产资源" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/zutuosaoma/PackUnionBill", |
| | | "style": { |
| | | "navigationBarTitleText": "组托扫码" |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "设备维修验收单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备维修派工单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备维修派工单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修派工单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修派工单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修验收单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修验收单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "工作联系单" |
| | | } |
| | | "path": "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill", |
| | | "style": { |
| | | "navigationBarTitleText": "设备维修派工单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "工作联系单列表" |
| | | } |
| | | "path": "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "设备维修派工单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备维修任务" |
| | | } |
| | | "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "style": { |
| | | "navigationBarTitleText": "器具维修派工单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修任务" |
| | | } |
| | | "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "器具维修派工单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/EmployeeRecords/EmployeeRecordsBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "员工签到记录表" |
| | | } |
| | | "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "style": { |
| | | "navigationBarTitleText": "器具维修验收单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/EmployeeRecords/EmployeeRecordsBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "员工签到记录表列表" |
| | | } |
| | | "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "器具维修验收单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备故障登记单" |
| | | } |
| | | },{ |
| | | "path" : "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备故障登记单列表" |
| | | } |
| | | "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill", |
| | | "style": { |
| | | "navigationBarTitleText": "工作联系单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "工作联系单列表" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport", |
| | | "style": { |
| | | "navigationBarTitleText": "设备维修任务" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport", |
| | | "style": { |
| | | "navigationBarTitleText": "器具维修任务" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/EmployeeRecords/EmployeeRecordsBill", |
| | | "style": { |
| | | "navigationBarTitleText": "员工签到记录表" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/EmployeeRecords/EmployeeRecordsBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "员工签到记录表列表" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill", |
| | | "style": { |
| | | "navigationBarTitleText": "设备故障登记单" |
| | | } |
| | | }, { |
| | | "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "设备故障登记单列表" |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | ], |
| | | "tabBar": { |
| | |
| | | <view class="form-item"> |
| | | <view class="title">班组:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHGroupName" placeholder="请选择车间" v-model="hform.HGroupName" |
| | | <uni-combox :candidates="arrayHGroupName" placeholder="请选择班组" v-model="hform.HGroupName" |
| | | @input="HGroupNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">班次:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHShiftsName" placeholder="请选择车间" v-model="hform.HShiftsName" |
| | | <uni-combox :candidates="arrayHShiftsName" placeholder="请选择班次" v-model="hform.HShiftsName" |
| | | @input="HShiftsNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSourceName" placeholder="请选择车间" v-model="hform.HSourceName" |
| | | <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName" |
| | | @input="HSourceNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">工序:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHProcName" placeholder="请选择车间" v-model="hform.HProcName" |
| | | <uni-combox :candidates="arrayHProcName" placeholder="请选择工序" v-model="hform.HProcName" |
| | | @input="HProcNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | ], |
| | | selectedRows: [], // 存储选中的数据 |
| | | HModName: "Sc_PackUnionBill_Packing_PDA", |
| | | ModRightName: "CE_PackUnionBill_Packing", //模块权限参数 |
| | | titleData: [], //不需要显示的字段 |
| | | OperationType: 1, //从缓存列表中返回数据类型(1新增、2从缓存列表中返回) |
| | | //蓝牙相关信息 |
| | | printInfo: "", //打印内容 |
| | | maskShow: false, //蓝牙打印机显示绑定 |
| | | printListData: [], // |
| | | OperationType: 1, //从缓存列表中返回数据类型(1新增、2从缓存列表中返 |
| | | //展示表单 |
| | | showResultTable: false, // 控制结果表格显示 |
| | | resultTableData: [], // 结果表格数据 |
| | |
| | | HMaterModel: '', |
| | | HRoles: [], |
| | | }, |
| | | roleOptions: [], |
| | | // [{ |
| | | // value: '班组长', |
| | | // text: '班组长' |
| | | // }, |
| | | // { |
| | | // value: '班员', |
| | | // text: '班员' |
| | | // }, |
| | | // { |
| | | // value: '机修工', |
| | | // text: '机修工' |
| | | // }, |
| | | // { |
| | | // value: '操作工', |
| | | // text: '操作工' |
| | | // } |
| | | // ], |
| | | roleOptions: [], |
| | | // 分页模块元数据 |
| | | paginationMeta: { |
| | | |
| | |
| | | }, |
| | | GetMeesageByBarCode(HBarCode) { |
| | | |
| | | // 获取待组托条码对应的数据 |
| | | let sOldBarCode = this.HBarCode |
| | | let HDeleteFlag = sOldBarCode.substring(0, 1) |
| | | let sBarCode = sOldBarCode.slice(1) |
| | | if (HDeleteFlag == '*') { |
| | | if (!sBarCode) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '请扫描要删除的条码', |
| | | }) |
| | | } else { |
| | | this.HBarCodeFocusRefresh() |
| | | } |
| | | CommonUtils.doRequest2({ |
| | | url: '/WEBSController/set_DelPackUnionBill_Temp_Pack_Json', |
| | | data: { |
| | | "HInterID": this.hform.HInterID, |
| | | "HBarCode": sBarCode, |
| | | "HBillType": this.HBillType |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | CommonUtils.playSound(1) |
| | | //this.DisBillEntryList() |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | let sBarCode = this.HBarCode |
| | | if (!sBarCode) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '条码不能为空,请扫描条码!', |
| | | }) |
| | | } |
| | | CommonUtils.doRequest2({ |
| | | url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json', |
| | | data: { |
| | | "HInterID": this.hform.HInterID, |
| | | "HBarCode": sBarCode, |
| | | }, |
| | | |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | CommonUtils.playSound(1) |
| | | //let data=res.data |
| | | console.log(sBarCode) |
| | | console.log(res.data.data[0]) |
| | | console.log(res.data[1]) |
| | | debugger |
| | | this.hform.HMouldID = data[0][0].模具id |
| | | console.log("idwei", data[0][0].模具id) |
| | | this.hform.HMouldNo = data[0][0].模具编码 |
| | | this.hform.HMouldName = data[0][0].模具名称 |
| | | this.hform.HMouldState = data[0][0].模具状态 |
| | | this.listData = [] |
| | | let tabledata = data[1][0] |
| | | if (data[1].length > 0) { |
| | | this.hform.HEquipID = tabledata.设备内码 |
| | | this.hform.HEquipName = tabledata.设备名称 |
| | | // |
| | | //this.hform.HSourceID = tabledata.HSourceID |
| | | this.hform.HMaterID = tabledata.HMaterID |
| | | //this.hform.HProcID = tabledata.HSourceInterID |
| | | for (let i = 0; i < data[1].length; i++) { |
| | | this.listData.push(Object.assign(data[1][i], { |
| | | index: i |
| | | })) |
| | | } |
| | | } |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.listData = [] |
| | | this.HBarCodeFocusRefresh() |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | let sBarCode = this.HBarCode |
| | | if (!sBarCode) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '条码不能为空,请扫描条码!', |
| | | }) |
| | | } |
| | | CommonUtils.doRequest2({ |
| | | url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json', |
| | | data: { |
| | | "HInterID": this.hform.HInterID, |
| | | "HBarCode": sBarCode, |
| | | }, |
| | | |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | //let data=res.data |
| | | console.log(sBarCode) |
| | | console.log(res.data.data[0]) |
| | | console.log(res.data[1]) |
| | | this.hform.HMouldID = data[0][0].模具id |
| | | this.hform.HMouldNo = data[0][0].模具编码 |
| | | this.hform.HMouldName = data[0][0].模具名称 |
| | | this.hform.HMouldState = data[0][0].模具状态 |
| | | this.listData = [] |
| | | let tabledata = data[1][0] |
| | | if (data[1].length > 0) { |
| | | this.hform.HEquipID = tabledata.设备内码 |
| | | this.hform.HEquipName = tabledata.设备名称 |
| | | this.hform.HMaterID = tabledata.HMaterID |
| | | for (let i = 0; i < data[1].length; i++) { |
| | | this.listData.push(Object.assign(data[1][i], { |
| | | index: i |
| | | })) |
| | | } |
| | | } |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.listData = [] |
| | | this.HBarCodeFocusRefresh() |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | onRoleChange(e) { |
| | | console.log('选中的角色:', this.hform.HRoles); |
| | |
| | | "HBillType": this.HBillType |
| | | }, |
| | | resFunction: (d) => { |
| | | console.log('d: ', d); |
| | | let { |
| | | count, |
| | | data, |
| | |
| | | url: "/pages/EmployeeRecords/EmployeeRecordsBill?operationType=1" |
| | | }) |
| | | }, |
| | | //编辑点检记录单 |
| | | edit(item) { |
| | | console.log(item) |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill?operationType=3&hmainid=' + item.hmainid |
| | | }) |
| | | }, |
| | | //删除点检记录单 |
| | | del(item) { |
| | | console.log(item); |
| | | uni.showModal({ |
| | | title: '删除确认', |
| | | content: '确认要删除吗,删除后不能恢复', |
| | |
| | | CommonUtils.doRequest2({ |
| | | url: '/Sc_EmployeeSignInNoteBillController/deleteBill', |
| | | data: { |
| | | HItemID: item['InterID'], |
| | | HItemID: item['HInterID'], |
| | | user: getUserInfo()['Czymc'] |
| | | }, |
| | | resFunction: (res) => { |
| | |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == index"> |
| | | <!-- <button class="op1" size="mini" plain @tap.stop="">子表信息</button> --> |
| | | <!-- <button class="op2" size="mini" plain @tap.stop="">反审核</button> --> |
| | | <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> --> |
| | | <button class="op3" size="mini" plain @tap.stop="Xt_FistCheck(item)">下推首件单</button> |
| | | <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | |
| | | url: "/pages/quyangdan/TakeSampleCheckBill?operationType=0" |
| | | }) |
| | | }, |
| | | Xt_FistCheck(item){ |
| | | uni.navigateTo({ |
| | | url: '/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=2&linterid=' + |
| | | item.hmainid + '&HBillNo=' + item.单据号 + '&HSouceBillType=7521', |
| | | success: () => { |
| | | // 跳转成功后触发查询 |
| | | this.onSearchClickHandler() |
| | | } |
| | | }) |
| | | }, |
| | | del(item) { |
| | | uni.showModal({ |
| | | title: '删除确认', |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form" :style="{height: containerHeight + 'px',overflow: 'auto'}"> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <uni-combox |
| | | :candidates="arrayHSourceName" |
| | | placeholder="请选择生产资源" |
| | | v-model="hform.HSourceName" |
| | | @input="HSourceNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">负责人:</view> |
| | | <view class="right"> |
| | | <uni-combox |
| | | :candidates="arrayHManagerName" |
| | | placeholder="请选择负责人" |
| | | v-model="hform.HManagerName" |
| | | @input="HManagerNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">班组:</view> |
| | | <view class="right"> |
| | | <uni-combox |
| | | :candidates="arrayHGroupName" |
| | | placeholder="请选择班组" |
| | | v-model="hform.HGroupName" |
| | | @input="HGroupNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HCreateDate" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HRemark" placeholder="请输入备注" auto-height /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-c" size="mini" @tap="save">保存</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="goBack">返回</button> |
| | | </view> |
| | | |
| | | </view> |
| | | <view> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName" |
| | | @input="HSourceNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">负责人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHManagerName" placeholder="请选择负责人" v-model="hform.HManagerName" |
| | | @input="HManagerNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">班组:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHGroupName" placeholder="请选择班组" v-model="hform.HGroupName" |
| | | @input="HGroupNameChange"> |
| | | </uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HCreateDate" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HRemark" placeholder="请输入备注" auto-height /> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-c" size="mini" @tap="save">保存</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="goBack">返回</button> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { CommonUtils } from "@/utils/common"; |
| | | import { getUserInfo } from "@/utils/auth"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: 'AddLineBind', |
| | | data() { |
| | | return { |
| | | // 移除btnTop,改用固定底部布局 |
| | | // 数据列表 |
| | | HSourceNameList: [], |
| | | HManagerNameList: [], |
| | | HGroupNameList: [], |
| | | |
| | | // 用于uni-combox的数组 |
| | | arrayHSourceName: [], |
| | | arrayHManagerName: [], |
| | | arrayHGroupName: [], |
| | | |
| | | hform: { |
| | | HUserName: getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'), |
| | | HSourceID: getUserInfo()['HSourceID'], |
| | | HSourceName: getUserInfo()['HSource'], |
| | | HManagerID: getUserInfo()['HKeeperID'], |
| | | HManagerName: getUserInfo()['HKeeper'], |
| | | HGroupID: getUserInfo()['HGroupID'], |
| | | HGroupName: getUserInfo()['HGroup'], |
| | | HCreateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HRemark: '' |
| | | }, |
| | | |
| | | // 服务器地址 |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | |
| | | // 添加窗口高度 |
| | | windowHeight: 0 |
| | | }; |
| | | }, |
| | | onUnload() { |
| | | // 页面关闭时触发刷新 |
| | | uni.$emit('refreshDeviceList'); |
| | | export default { |
| | | name: 'AddLineBind', |
| | | data() { |
| | | return { |
| | | // 移除btnTop,改用固定底部布局 |
| | | // 数据列表 |
| | | HSourceNameList: [], |
| | | HManagerNameList: [], |
| | | HGroupNameList: [], |
| | | |
| | | // 用于uni-combox的数组 |
| | | arrayHSourceName: [], |
| | | arrayHManagerName: [], |
| | | arrayHGroupName: [], |
| | | |
| | | hform: { |
| | | HUserName: getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'), |
| | | HSourceID: getUserInfo()['HSourceID'], |
| | | HSourceName: getUserInfo()['HSource'], |
| | | HManagerID: getUserInfo()['HKeeperID'], |
| | | HManagerName: getUserInfo()['HKeeper'], |
| | | HGroupID: getUserInfo()['HGroupID'], |
| | | HGroupName: getUserInfo()['HGroup'], |
| | | HCreateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HRemark: '' |
| | | }, |
| | | |
| | | // 服务器地址 |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | |
| | | // 添加窗口高度 |
| | | windowHeight: 0 |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 获取所有列表数据 |
| | | async getListData() { |
| | | // 获取生产资源列表 |
| | | await this.getSourceList(); |
| | | // 获取负责人列表(人员列表) |
| | | await this.getManagerList(); |
| | | // 获取班组列表 |
| | | await this.getGroupList(); |
| | | }, |
| | | |
| | | // 获取生产资源列表 |
| | | async getSourceList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getSourceList', |
| | | data: { |
| | | sWhere: "" |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.code == 1) { |
| | | this.HSourceNameList = res[1].data.data.Gy_Source || []; |
| | | for (let i = 0; i < this.HSourceNameList.length; i++) { |
| | | this.arrayHSourceName[i] = this.HSourceNameList[i].生产资源; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 获取负责人列表(人员列表) |
| | | async getManagerList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: 0 |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.count == 1) { |
| | | this.HManagerNameList = res[1].data.data || []; |
| | | for (let i = 0; i < this.HManagerNameList.length; i++) { |
| | | this.arrayHManagerName[i] = this.HManagerNameList[i].HName; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取负责人列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取负责人列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 获取班组列表 |
| | | async getGroupList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/Gy_Group/list', |
| | | method: 'GET', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName') |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.count == 1) { |
| | | this.HGroupNameList = res[1].data.data || []; |
| | | for (let i = 0; i < this.HGroupNameList.length; i++) { |
| | | this.arrayHGroupName[i] = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取班组列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取班组列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 选择生产资源 |
| | | HSourceNameChange(e) { |
| | | for (let i = 0; i < this.HSourceNameList.length; i++) { |
| | | if (this.HSourceNameList[i].生产资源 == e) { |
| | | this.hform.HSourceName = this.HSourceNameList[i].生产资源; |
| | | this.hform.HSourceID = this.HSourceNameList[i].HItemID; |
| | | this.hform.HSourceCode = this.HSourceNameList[i].资源代码 || ''; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 选择负责人 |
| | | HManagerNameChange(e) { |
| | | for (let i = 0; i < this.HManagerNameList.length; i++) { |
| | | if (this.HManagerNameList[i].HName == e) { |
| | | this.hform.HManagerName = this.HManagerNameList[i].HName; |
| | | this.hform.HManagerID = this.HManagerNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 选择班组 |
| | | HGroupNameChange(e) { |
| | | for (let i = 0; i < this.HGroupNameList.length; i++) { |
| | | const groupName = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName; |
| | | if (groupName == e) { |
| | | this.hform.HGroupName = groupName; |
| | | this.hform.HGroupID = this.HGroupNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 验证表单 |
| | | validateForm() { |
| | | if (!this.hform.HSourceID || this.hform.HSourceID == 0) { |
| | | uni.showToast({ |
| | | title: '请选择生产资源', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | if (!this.hform.HManagerID || this.hform.HManagerID == 0) { |
| | | uni.showToast({ |
| | | title: '请选择负责人', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | // 保存数据 |
| | | async save() { |
| | | if (!this.validateForm()) { |
| | | return; |
| | | } |
| | | |
| | | uni.showLoading({ |
| | | title: '保存中...' |
| | | }); |
| | | |
| | | try { |
| | | const res = await CommonUtils.doRequest2Sync({ |
| | | url: "/ReportPlatForm/SaveGetLineBindBillList", |
| | | data: { |
| | | HUserName: this.hform.HUserName, |
| | | HSourceID: this.hform.HSourceID, |
| | | HSourceName: this.hform.HSourceName, |
| | | HManagerID: this.hform.HManagerID, |
| | | HManagerName: this.hform.HManagerName, |
| | | HGroupID: this.hform.HGroupID, |
| | | HGroupName: this.hform.HGroupName, |
| | | HCreateDate: this.hform.HCreateDate, |
| | | HRemark: this.hform.HRemark |
| | | }, |
| | | method: "GET" |
| | | }); |
| | | |
| | | uni.hideLoading(); |
| | | |
| | | if (res.data.count == 1) { |
| | | uni.showToast({ |
| | | title: '保存成功', |
| | | icon: 'success', |
| | | success: () => { |
| | | setTimeout(() => { |
| | | // 保存成功后返回上一页 |
| | | uni.navigateBack(); |
| | | }, 1500); |
| | | } |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message || '保存失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '保存失败: ' + err, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 返回上一页 |
| | | goBack() { |
| | | uni.navigateBack(); |
| | | } |
| | | }, |
| | | onLoad() { |
| | | // 初始化数据 |
| | | this.hform.HUserName = getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'); |
| | | // 获取所有列表数据 |
| | | this.getListData(); |
| | | |
| | | // 获取窗口高度 |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.windowHeight = systemInfo.windowHeight; |
| | | }, |
| | | onReady() { |
| | | // 移除原来的按钮位置计算,使用固定底部布局 |
| | | } |
| | | } |
| | | onUnload() { |
| | | // 页面关闭时触发刷新 |
| | | uni.$emit('refreshDeviceList'); |
| | | }, |
| | | methods: { |
| | | // 获取所有列表数据 |
| | | async getListData() { |
| | | // 获取生产资源列表 |
| | | await this.getSourceList(); |
| | | // 获取负责人列表(人员列表) |
| | | await this.getManagerList(); |
| | | // 获取班组列表 |
| | | await this.getGroupList(); |
| | | }, |
| | | |
| | | // 获取生产资源列表 |
| | | async getSourceList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getSourceList', |
| | | data: { |
| | | sWhere: "" |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.code == 1) { |
| | | this.HSourceNameList = res[1].data.data.Gy_Source || []; |
| | | for (let i = 0; i < this.HSourceNameList.length; i++) { |
| | | this.arrayHSourceName[i] = this.HSourceNameList[i].生产资源; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 获取负责人列表(人员列表) |
| | | async getManagerList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: 0 |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.count == 1) { |
| | | this.HManagerNameList = res[1].data.data || []; |
| | | for (let i = 0; i < this.HManagerNameList.length; i++) { |
| | | this.arrayHManagerName[i] = this.HManagerNameList[i].HName; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取负责人列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取负责人列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 获取班组列表 |
| | | async getGroupList() { |
| | | try { |
| | | const res = await uni.request({ |
| | | url: this.serverUrl + '/Gy_Group/list', |
| | | method: 'GET', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName') |
| | | } |
| | | }); |
| | | |
| | | if (res[1].data.count == 1) { |
| | | this.HGroupNameList = res[1].data.data || []; |
| | | for (let i = 0; i < this.HGroupNameList.length; i++) { |
| | | this.arrayHGroupName[i] = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName; |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取班组列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | uni.showToast({ |
| | | title: '获取班组列表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 选择生产资源 |
| | | HSourceNameChange(e) { |
| | | for (let i = 0; i < this.HSourceNameList.length; i++) { |
| | | if (this.HSourceNameList[i].生产资源 == e) { |
| | | this.hform.HSourceName = this.HSourceNameList[i].生产资源; |
| | | this.hform.HSourceID = this.HSourceNameList[i].HItemID; |
| | | this.hform.HSourceCode = this.HSourceNameList[i].资源代码 || ''; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 选择负责人 |
| | | HManagerNameChange(e) { |
| | | for (let i = 0; i < this.HManagerNameList.length; i++) { |
| | | if (this.HManagerNameList[i].HName == e) { |
| | | this.hform.HManagerName = this.HManagerNameList[i].HName; |
| | | this.hform.HManagerID = this.HManagerNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 选择班组 |
| | | HGroupNameChange(e) { |
| | | for (let i = 0; i < this.HGroupNameList.length; i++) { |
| | | const groupName = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName; |
| | | if (groupName == e) { |
| | | this.hform.HGroupName = groupName; |
| | | this.hform.HGroupID = this.HGroupNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 验证表单 |
| | | validateForm() { |
| | | if (!this.hform.HSourceID || this.hform.HSourceID == 0) { |
| | | uni.showToast({ |
| | | title: '请选择生产资源', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | if (!this.hform.HManagerID || this.hform.HManagerID == 0) { |
| | | uni.showToast({ |
| | | title: '请选择负责人', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | // 保存数据 |
| | | async save() { |
| | | if (!this.validateForm()) { |
| | | return; |
| | | } |
| | | |
| | | uni.showLoading({ |
| | | title: '保存中...' |
| | | }); |
| | | |
| | | try { |
| | | const res = await CommonUtils.doRequest2Sync({ |
| | | url: "/ReportPlatForm/SaveGetLineBindBillList", |
| | | data: { |
| | | HUserName: this.hform.HUserName, |
| | | HSourceID: this.hform.HSourceID, |
| | | HSourceName: this.hform.HSourceName, |
| | | HManagerID: this.hform.HManagerID, |
| | | HManagerName: this.hform.HManagerName, |
| | | HGroupID: this.hform.HGroupID, |
| | | HGroupName: this.hform.HGroupName, |
| | | HCreateDate: this.hform.HCreateDate, |
| | | HRemark: this.hform.HRemark |
| | | }, |
| | | method: "GET" |
| | | }); |
| | | |
| | | uni.hideLoading(); |
| | | |
| | | if (res.data.count == 1) { |
| | | uni.showToast({ |
| | | title: '保存成功', |
| | | icon: 'success', |
| | | success: () => { |
| | | setTimeout(() => { |
| | | // 保存成功后返回上一页 |
| | | uni.navigateBack(); |
| | | }, 1500); |
| | | } |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message || '保存失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '保存失败: ' + err, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 返回上一页 |
| | | goBack() { |
| | | uni.navigateBack(); |
| | | } |
| | | }, |
| | | onLoad() { |
| | | // 初始化数据 |
| | | this.hform.HUserName = getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'); |
| | | // 获取所有列表数据 |
| | | this.getListData(); |
| | | |
| | | // 获取窗口高度 |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.windowHeight = systemInfo.windowHeight; |
| | | }, |
| | | onReady() { |
| | | // 移除原来的按钮位置计算,使用固定底部布局 |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .form { |
| | | padding: 20rpx; |
| | | // 添加底部内边距,为底部按钮留出空间 |
| | | padding-bottom: 160rpx; // 按钮高度 + 额外间距 |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .title { |
| | | width: 180rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | padding: 0 20rpx; |
| | | min-height: 70rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | input, textarea { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | textarea { |
| | | padding: 20rpx 0; |
| | | min-height: 100rpx; |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | padding: 0 20rpx; |
| | | min-height: 70rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | input { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | color: #666; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | position: fixed; // 改为固定定位 |
| | | bottom: 0; // 固定在底部 |
| | | left: 0; |
| | | right: 0; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 20rpx; |
| | | background-color: #fff; |
| | | border-top: 1px solid #eee; |
| | | box-sizing: border-box; // 确保内边距不影响宽度 |
| | | z-index: 999; // 确保按钮在最上层 |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | .form { |
| | | padding: 20rpx; |
| | | // 使用 calc 计算高度 |
| | | height: calc(100vh - 160rpx); |
| | | /* 减去底部按钮区域的高度 */ |
| | | overflow: auto; |
| | | box-sizing: border-box; |
| | | /* 确保内边距不影响高度计算 */ |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | margin-bottom: 20rpx; |
| | | margin-left: 10px; |
| | | |
| | | .title { |
| | | width: 180rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | padding: 0 20rpx; |
| | | min-height: 70rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | input, |
| | | textarea { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | textarea { |
| | | padding: 20rpx 0; |
| | | min-height: 100rpx; |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | padding: 0 20rpx; |
| | | min-height: 70rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | input { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | color: #666; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | position: fixed; // 改为固定定位 |
| | | bottom: 0; // 固定在底部 |
| | | left: 0; |
| | | right: 0; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 20rpx; |
| | | background-color: #fff; |
| | | border-top: 1px solid #eee; |
| | | box-sizing: border-box; // 确保内边距不影响宽度 |
| | | z-index: 999; // 确保按钮在最上层 |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | id: 7, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '员工签到记录单列表', |
| | | tip: '点击进入', |
| | | url: '/pages/EmployeeRecords/EmployeeRecordsBillList', |
| | | id: 8, |
| | | hidden: false, |
| | | } |
| | | |
| | | ] |
| | | } |
| | | }, |
| | |
| | | "id": 63, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '员工签到记录单列表', |
| | | tip: '点击进入', |
| | | url: '/pages/EmployeeRecords/EmployeeRecordsBillList', |
| | | id: 64, |
| | | hidden: false, |
| | | } |
| | | ] |
| | | } |
| | | }, |