Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
# Conflicts:
# manifest.json
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "2.0.3", |
| | | "versionCode" : 203, |
| | | "versionName" : "2.082", |
| | | "versionCode" : 282, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | }, |
| | | /* ios打包配置 */ |
| | | "ios" : { |
| | | |
| | | "dSYMs" : false, |
| | | "privacyDescription" : { |
| | | "NSPhotoLibraryUsageDescription" : "我们需要访问您的相册来进行图片选择", |
| | |
| | | "sdkConfigs" : { |
| | | "ad" : {}, |
| | | "push" : { |
| | | "unipush" : {} |
| | | |
| | | } |
| | | }, |
| | | "icons" : { |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "设备维修记录单列表" |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | "path" : "pages/ZLGL/awaitCheckBillList/awaitCheckBillList", |
| | | "style" : |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "生产退库校验缓存列表" |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SB_EquipICMOTechParamBill/SB_EquipICMOTechParamBillEdit", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备工艺参数点检" |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | { |
| | | "path" : "pages/Sc_PackUnionCarryUpBill/Sc_PackUnionCarryUpBill_Fast", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "装箱追溯" |
| | | } |
| | | } |
| | | |
| | | ], |
| | | "tabBar": { |
| | | "color": "#888888", //tab 上的文字默认颜色,仅支持十六进制颜色 |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">其他信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">制单信息</view> |
| | | <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{ |
| | | height: 'auto', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">源单类型:</view> |
| | | <zxz-uni-data-select class="right" :localdata="[{value: '3772', key: '工序流转卡'}]" dataKey="key" |
| | | dataValue="value" v-model="hform.HMainSourceBillType"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="right"> |
| | | <input type="text" v-model="hform.HMainSourceBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">流转卡号:</view> |
| | | <view class="right"> |
| | | <input type="text" v-model="hform.HProcExchBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产订单号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HICMOBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">工序号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HProcNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">物料代码:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HMaterNumber" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">物料名称:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HMaterName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">规格型号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HMaterModel" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">工序:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HProcName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">点检人:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HItemID" |
| | | v-model="hform.HEmpID"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HSourceName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班组:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HGroupList" dataKey="班组名称" dataValue="HItemID" |
| | | v-model="hform.HGroupID"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产车间:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="部门名称" dataValue="HItemID" |
| | | v-model="hform.HDeptID"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HEquipName" disabled /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form" :style="{ |
| | | height: 'auto', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">组织:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HStockOrgName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <textarea cols="30" rows="10" v-model="hform.HRemark"></textarea> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">创建人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMakeDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDateDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核时间:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HCheckDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteDate" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | <!-- 附件信息 --> |
| | | <template v-if="tabs == 3"> |
| | | <view class="card-item-wrapper"> |
| | | <view class="attachment-btns"> |
| | | <button type="primary" size="mini" @tap="fileUpload">选择文件</button> |
| | | <view style="flex: 1;"></view> |
| | | </view> |
| | | <view v-for="(item, index) in attachmentInfo" :key="index"> |
| | | <uni-card :title="item['fileName']" :thumbnail="item.filePath"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>大小:</text>{{item["size"]}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>状态:</text>{{item["status"]}} |
| | | </view> |
| | | <view class="detail operation" v-if="item['status']!='上传成功'"> |
| | | <text>操作:</text> |
| | | <button class="btn-a" size="mini" @tap.stop="uploadFile(index)">上传</button> |
| | | <button class="btn-b" size="mini" @tap.stop="delFile(index)">删除</button> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <view class="tabs"> |
| | | <view class="on">工艺参数</view> |
| | | </view> |
| | | <template> |
| | | <view class="form" :style="{ |
| | | height: 400 + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | |
| | | <view class="list" v-for="(item,index) in HTechParams" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | |
| | | <view class="detail"> |
| | | <text>工艺参数大类:</text>{{item.HTechParamClassName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺参数代码:</text>{{item.HTechParamNumber}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺参数名称:</text>{{item.HTechParamName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺参数单位代码:</text>{{item.HTechParamUnitNumber}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺参数单位名称:</text>{{item.HTechParamUnitName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺次序:</text>{{item.HSNO}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>工艺参数值:</text>{{item.HVaule}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>标准值:</text>{{item.HStd}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>上限:</text>{{item.HMax}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>下限:</text>{{item.HMin}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>检测结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxResultChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HResult == 'OK'" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>是否必录:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HIsRequired" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>备注:</text>{{item.HRemark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </view> |
| | | </template> |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> |
| | | <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'DJ'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue"; |
| | | export default { |
| | | name: 'sb_EquipDotCheckBill', |
| | | components: { |
| | | BillSelectorPopupVue |
| | | }, |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "SB_EquipICMOTechParamBillEdit", |
| | | HBillType: '3919', |
| | | operationType: 1, |
| | | uploadOptions: {}, |
| | | |
| | | HTechParams: [], // 工艺参数 |
| | | |
| | | HDeptList: [], |
| | | HShiftsList: [], |
| | | HCheckFileList: [], |
| | | HEmpList: [], // 职员列表 |
| | | HGroupList: [], // 生产班组列表 |
| | | attachmentInfo: [], |
| | | |
| | | hform: { |
| | | "HBillNo": "", |
| | | "HInterID": 0, |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HStockOrgID": uni.getStorageSync("OrganizationID"), |
| | | "HStockOrgName": uni.getStorageSync("Organization"), |
| | | "HMainSourceBillType": "3772", |
| | | "HMainSourceInterID": 0, |
| | | "HMainSourceEntryID": 0, |
| | | "HMainSourceBillNo": "", |
| | | "HProcExchBillNo": "", |
| | | "HProcExchInterID": 0, |
| | | "HProcExchEntryID": 0, |
| | | "HICMOBillNo": "", |
| | | "HICMOInterID": 0, |
| | | "HICMOEntryID": 0, |
| | | "HProcNo": "", |
| | | "HMaterNumber": "", |
| | | "HMaterID": 0, |
| | | "HMaterName": "", |
| | | "HMaterModel": "", |
| | | "HProcName": "", |
| | | "HProcID": 0, |
| | | "HEmpName": "", |
| | | "HEmpID": getUserInfo()["HEmpID"], |
| | | "HSourceName": "", |
| | | "HSourceID": 0, |
| | | "HGroupName": "", |
| | | "HGroupID": getUserInfo()["HGroupID"], |
| | | "HDeptName": "", |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEquipName": "", |
| | | "HEquipID": 0, |
| | | "HRemark": "", |
| | | "HMaker": getUserInfo()["Czymc"], |
| | | "HChecker": "", |
| | | "HCloseMan": "", |
| | | "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HCheckDate": "", |
| | | "HCloseDate": "", |
| | | "HUpDater": "", |
| | | "HDeleteMan": "", |
| | | "HUpDateDate": "", |
| | | "HDeleteDate": "" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | calcHLastResult: { |
| | | get() { |
| | | if (this.HCheckFileList.length == 0) { |
| | | return 'OK' |
| | | } else { |
| | | let okCount = this.HCheckFileList.reduce((acc, item) => { |
| | | if (item.HDotCheckResult) { |
| | | return acc + 1 |
| | | } |
| | | return acc |
| | | }, 0) |
| | | if (okCount == this.HCheckFileList.length) { |
| | | return 'OK' |
| | | } |
| | | return 'NG' |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return CommonUtils.showTips({ |
| | | message: '不能选择点检规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipDotCheckBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HTechParams[index]["HIsRequired"] = false |
| | | } else { |
| | | this.HTechParams[index]["HIsRequired"] = true |
| | | } |
| | | }, |
| | | checkBoxResultChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HTechParams[index]["HResult"] = 'NG' |
| | | } else { |
| | | this.HTechParams[index]["HResult"] = 'OK' |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取班组数据 |
| | | async getGroupList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Group/list', |
| | | data: { |
| | | sWhere: ` and 禁用标记 != 'Y' and 审核人!='' and HUSEORGID = '1'`, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HGroupList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| | | async getHDeptList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')} `, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HDeptList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode(cb => { |
| | | this.hform.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | | async GetMessageByBarCode(HBarCode) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Gy_EquipFileBill/txtHBarCode_KeyDown", |
| | | data: { |
| | | HBarCode: HBarCode, |
| | | user: getUserInfo()["Czymc"] |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipID = data[0].HInterID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | this.hform.HBarModel = data[0].设备型号 |
| | | this.hform.HQty = 1 |
| | | |
| | | // 获取检验规程 |
| | | this.GetItemByEquipFile() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | // 获取保养规程 |
| | | async get_DocCheckItem2(HDotCheckRuleInterID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetDotCheckRuleItemByDotCheckRuleID", |
| | | data: { |
| | | "HDotCheckRuleInterID": HDotCheckRuleInterID |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipDotCheckRuleInterID = data[0].HInterID |
| | | this.hform.HEquipDotCheckRuleInterNo = data[0].HBillNo |
| | | this.hform.HPlanNo = data[0].点检计划单 |
| | | this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0] |
| | | .点检计划ID |
| | | this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[ |
| | | 0].点检计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerCode": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID, |
| | | "HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID, |
| | | "HSourceBillNo": item.点检计划单, |
| | | "HDotCheckItemClassID": 0, |
| | | "HDotCheckItemClassName": "", |
| | | "HDotCheckItemMethodID": 0, |
| | | "HDotCheckItemMethodName": "", |
| | | //"HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByEquipFile", |
| | | data: { |
| | | "EquipProjectID": this.hform.HEquipID, |
| | | "Type": "DJ", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HEquipDotCheckRuleInterID = data[0].点检规程ID |
| | | this.hform.HEquipDotCheckRuleInterNo = data[0].点检规程单号 |
| | | this.hform.HPlanNo = data[0].点检计划单 |
| | | this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0] |
| | | .点检计划ID |
| | | this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[ |
| | | 0].点检计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目名称, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerCode": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID, |
| | | "HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID, |
| | | "HSourceBillNo": item.点检计划单, |
| | | "HDotCheckItemClassID": 0, |
| | | "HDotCheckItemClassName": "", |
| | | "HDotCheckItemMethodID": 0, |
| | | "HDotCheckItemMethodName": "", |
| | | "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false |
| | | } |
| | | }) |
| | | this.tabs = 1 |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | radioChange({ |
| | | detail: { |
| | | value |
| | | } |
| | | }) { |
| | | this.HLastResult = value |
| | | }, |
| | | async getMaxNum() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMAXNum", |
| | | data: { |
| | | "HBillType": this.HBillType |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | console.log('data: ', data); |
| | | this.hform.HInterID = data[0]["HInterID"] |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async set_CheckBill(HInterID, num) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Check_Json', |
| | | data: { |
| | | "HInterID": HInterID, |
| | | "Type": num, |
| | | "HMaker": getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | let { |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `审核失败: ${err}` |
| | | }) |
| | | return false |
| | | } |
| | | }, |
| | | async submit() { |
| | | try { |
| | | if (this.hform.HProcNo == '') { |
| | | this.hform.HProcNo = 0 |
| | | } |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HTechParams); |
| | | let operationType = this.operationType |
| | | if (operationType == 5) { |
| | | operationType = 1 |
| | | } |
| | | let sMainSub = oMain + ';' + sSubStr + ';' + operationType + ';' + getUserInfo()["Czymc"]; |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Save_Json", |
| | | data: { |
| | | "sMainSub": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data, |
| | | HInterID, |
| | | Verify |
| | | } = res.data |
| | | if (count == 1) { |
| | | |
| | | if (Verify) { |
| | | await this.set_CheckBill(HInterID, 1); //审核 |
| | | } |
| | | |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + Message |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async loadBillMain(HInterID, HEntryID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/LEMS/MES_IF_EquipICMOTechParamList_Json", |
| | | data: { |
| | | hinterid: HInterID, |
| | | HEntryID, |
| | | HEntryID, |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | |
| | | Object.assign(this.hform, { |
| | | "HMaterID": data[0].HMaterID, |
| | | "HMaterNumber": data[0].产品代码, |
| | | "HMaterName": data[0].产品名称, |
| | | "HMaterModel": data[0].规格型号, |
| | | "HProcID": data[0].HProcID, |
| | | "HProcName": data[0].工序名称, |
| | | "HProcNo": data[0].工序号, |
| | | //"HGroupID": data[0].HGroupID == undefined ? 0 : data[0].HGroupID, |
| | | //"HGroupName": data[0].班组, |
| | | "HDeptID": data[0].HDeptID == undefined ? 0 : data[0].HDeptID, |
| | | "HDeptName": data[0].加工车间, |
| | | |
| | | "HSourceID": data[0].HSourceID, |
| | | "HSourceName": data[0].生产资源, |
| | | |
| | | "HEquipID": data[0].HEquipID, |
| | | "HEquipName": data[0].设备名称, |
| | | |
| | | "HICMOInterID": data[0].hicmointerid, |
| | | "HICMOEntryID": data[0].HICMOEntryID, |
| | | "HICMOBillNo": data[0].任务单号, |
| | | |
| | | "HProcExchInterID": data[0].hmainid, |
| | | "HProcExchEntryID": data[0].HEntryID, |
| | | "HProcExchBillNo": data[0].单据号, |
| | | |
| | | "HMainSourceInterID": data[0].hmainid, |
| | | "HMainSourceEntryID": data[0].HEntryID, |
| | | "HMainSourceBillNo": data[0].单据号, |
| | | "HMainSourceBillType": data[0].单据类型, |
| | | }) |
| | | |
| | | this.HTechParams = data.map(item => { |
| | | return { |
| | | "HTechParamClassID": item["HTechParamClassID"] == null ? 0 : item[ |
| | | "HTechParamClassID"], |
| | | "HTechParamClassName": item["工艺参数大类名称"], |
| | | "HTechParamID": item["HTechParamID"] == null ? 0 : item[ |
| | | "HTechParamID" |
| | | ], |
| | | "HTechParamNumber": item["工艺参数代码"], |
| | | "HTechParamName": item["工艺参数名称"], |
| | | "HTechParamUnitID": item["HTechParamUnitID"] == null ? 0 : item[ |
| | | "HTechParamUnitID"], |
| | | "HTechParamUnitNumber": item["工艺参数单位代码"], |
| | | "HTechParamUnitName": item["工艺参数单位名称"], |
| | | "HSNO": item["工艺次序"] == null ? 0 : item["工艺次序"], |
| | | "HTechParamIDStd": item["HTechParamIDStd"] == null ? 0 : item[ |
| | | "HTechParamIDStd"], |
| | | "HTechParamIDStdName": item["对应设定值工艺参数"], |
| | | "HResultStd": "", |
| | | "HVaule": item["数采值"], |
| | | "HStd": item["标准值"], |
| | | "HMax": item["上限值"], |
| | | "HMin": item["下限值"], |
| | | "HRemark": item["采集来源"], |
| | | "HResult": (item["数采值"] <= item["上限值"] && item["数采值"] >= item["下限值"]) ? |
| | | "OK" : "NG", |
| | | "HIsRequired": item["HIsRequired"] |
| | | } |
| | | }) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单信息失败: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单信息失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | async getEmpList() { |
| | | try { |
| | | let sWhere = " where 1=1 " |
| | | if (this.hform.HDeptName && uni.getStorageSync("Organization") == '宁波市华舟包装有限公司') { |
| | | sWhere += ` and HDeptName = '${this.hform.HDeptName}'` |
| | | } |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/PublicPageMethod/UserList', |
| | | data: { |
| | | sWhere: sWhere, |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HEmpList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | onLoad(e) { |
| | | console.log('e: ', e); |
| | | if (!e.operationType) { |
| | | this.operationType = 1 |
| | | } else { |
| | | this.operationType = e.operationType |
| | | } |
| | | |
| | | if (this.operationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.operationType == 2) { |
| | | // 复制 |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | } else if (this.operationType == 5) { |
| | | // 报工平台下推 |
| | | this.getMaxNum() |
| | | let { |
| | | hinterid, |
| | | hsubid |
| | | } = e |
| | | this.loadBillMain(hinterid, hsubid) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | | // this.getShiftList() |
| | | this.getGroupList() |
| | | this.getEmpList() |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | try { |
| | | let sWhere= " where 1=1 " |
| | | if(this.hform.HDeptName && uni.getStorageSync("Organization") == '宁波市华舟包装有限公司'){ |
| | | // sWhere += ` and HDeptName = '${this.hform.HDeptName}'` |
| | | sWhere += ` and HDeptName = '${this.hform.HDeptName}'` |
| | | } |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/PublicPageMethod/UserList', |
| New file |
| | |
| | | <template> |
| | | <view class="form"> |
| | | <view class="form-base-info"> |
| | | <view class="form-item"> |
| | | <view class="title">SN条码</view> |
| | | <view class="right"> |
| | | <input type="text" :focus="HBarCodeFocus" v-model="HBarCode" |
| | | @confirm="GetMeesageByBarCode(HBarCode)" /> |
| | | </view> |
| | | <view class="right-icon"> |
| | | <uni-icons type="scan" |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" |
| | | @click="toScanCode2"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">箱条码</view> |
| | | <view class="right"> |
| | | <input type="text" :focus="HBarCodePackFocus" v-model="HBarCode_Pack" |
| | | @confirm="GetMeesageByBarCode_Pack(HBarCode_Pack)" /> |
| | | </view> |
| | | <view class="right-icon"> |
| | | <uni-icons class="right-icon" :class="[EnableScanBarCodePack?'disabled':'']" type="scan" |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" |
| | | @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">单据号</view> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID</view> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="hform.HInterID" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">SN条码信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">合计信息</view> |
| | | </view> |
| | | <!-- 装箱信息 --> |
| | | <view v-if="tabs == 0"> |
| | | <!-- <zb-table id="list-table" :checked-highlight="true" :fit="true" :style="{height: `${listTableHeight}px`}" :columns="columns" :data="listData" |
| | | :show-header="true" :border="true" :row-key="row => row.index" @toggleRowSelection="handleSelect" |
| | | @toggleAllSelection="handleSelectAll" @rowClick="onTableRowClickHandler" /> --> |
| | | |
| | | <view class="item-wrapper"> |
| | | <view v-for="(item, index) in listData" :key="index"> |
| | | <uni-card :title="item['HMaterName']" :extra="`条码数量: ${item['HQtyMust']}`" @tap="cmdDelete(item)"> |
| | | <view class="detail" v-if="item['HBarCode']"> |
| | | <text>条码编号:</text>{{item['HBarCode']}} |
| | | </view> |
| | | <view class="detail" v-if="item['HQty']"> |
| | | <text>数量:</text>{{item['HQty']}} |
| | | </view> |
| | | <view class="detail" v-if="item['HMaterNumber']"> |
| | | <text>物料代码:</text>{{item['HMaterNumber']}} |
| | | </view> |
| | | <view class="detail" v-if="item['HMaterModel']"> |
| | | <text>物料名称:</text>{{item['HMaterModel']}} |
| | | </view> |
| | | <view class="detail" v-if="item['HPieceQty']"> |
| | | <text>规格型号:</text>{{item['HPieceQty']}} |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | </view> |
| | | </view> |
| | | <!-- 合计信息 --> |
| | | <view v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form-base-info"> |
| | | <view class="form-item"> |
| | | <view class="title">条码合计</view> |
| | | <view class="right disabled"> |
| | | <input disabled type="text" v-model="hform.txtHBarcodeQtys" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">数量合计</view> |
| | | <view class="right disabled"> |
| | | <input disabled type="text" v-model="hform.txtHSumQtys" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-btn" id="bottom-btn"> |
| | | <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini" |
| | | @tap="cmdSubmit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <!-- <button class="btn-d" size="mini" @tap="cmdDelete">删除</button> --> |
| | | <button class="btn-c" size="mini" @tap="cmdExit">退出</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | import { |
| | | getUserInfo |
| | | } from "../../utils/auth"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common.js" |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | // 计算列表高度 |
| | | bottomBtnTop: 0, |
| | | listTableTop: 0, |
| | | // 公共变量 |
| | | |
| | | EnableScanBarCodePack: true, |
| | | EnableSubmit: true, |
| | | HBarCodePackFocus: false, |
| | | HBarCodeFocus: false, |
| | | HBarCode_Pack: '', //箱条码 |
| | | HBarCode: '', // 包条码 |
| | | tabs: 0, |
| | | HBillType: '3704', |
| | | HBillSubType: '1', //子类型(1装箱、2组托) |
| | | OperationType: 1, //操作类型(1新增、2从缓存列表中返回) |
| | | HMaterNumber_Pack: "", //托条码对应物料代码 |
| | | listOption: [], |
| | | listData: [], |
| | | |
| | | selectedRows: [], // 存储选中的数据 |
| | | HModName: "CE", |
| | | ModRightName: "CE_PackUnionCarryUp", //模块权限参数 |
| | | titleData: [], //不需要显示的字段 |
| | | OperationType: 1, //从缓存列表中返回数据类型(1新增、2从缓存列表中返回) |
| | | HBarCode_Pack_Temp: "", //从缓存列表中返回箱条码 |
| | | |
| | | // 表单提交值 |
| | | hform: { |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HBillNo: '', |
| | | HInterID: '', |
| | | HBillType: '3704', |
| | | HBarCode_Pack: '', |
| | | HStockOrgID: uni.getStorageSync("OrganizationID"), |
| | | txtHBarcodeQtys: 0, |
| | | txtHSumQtys: 0, |
| | | }, |
| | | // 分页模块元数据 |
| | | paginationMeta: { |
| | | |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | checkboxGroupChangeHandler(e) { |
| | | let checkBoxValues = Array.from(e.detail.value) |
| | | if (checkBoxValues.findIndex(elem => elem == 'qualityApproval') != -1) { |
| | | this.hform.HQualityApproval = true |
| | | } else { |
| | | this.hform.HQualityApproval = false |
| | | } |
| | | }, |
| | | onTableRowClickHandler(row, index) { |
| | | console.log('row: ', row); |
| | | if (!this.listData[index].checked) { |
| | | this.$set(this.listData[index], 'checked', true) |
| | | } else { |
| | | this.listData[index].checked = !this.listData[index].checked |
| | | } |
| | | }, |
| | | async HBarCodeFocusRefresh() { |
| | | this.HBarCode = '' |
| | | this.HBarCodeFocus = false |
| | | await this.$nextTick() |
| | | this.HBarCodeFocus = true |
| | | }, |
| | | async HBarCodePackFocusRefresh() { |
| | | this.HBarCode_Pack = '' |
| | | this.HBarCodePackFocus = false |
| | | await this.$nextTick() |
| | | this.HBarCodePackFocus = true |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode((scanCode) => { |
| | | this.HBarCode_Pack = scanCode |
| | | this.GetMeesageByBarCode_Pack(HBarCode_Pack) |
| | | }) |
| | | }, |
| | | GetMeesageByBarCode_Pack(HBarCode_Pack) { |
| | | // 获取箱条码对应的数据 |
| | | CommonUtils.doRequest2({ |
| | | url: '/WEBSController/get_BarCode_PackUnionCarryUp', |
| | | data: { |
| | | sInterID: this.hform.HInterID || 0, |
| | | sBillNo: this.hform.HBillNo, |
| | | HBillType: this.HBillType, |
| | | sHBarCode_Pack: HBarCode_Pack, |
| | | sMaker: getUserInfo()['Czymc'], |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message, |
| | | list |
| | | } = res.data |
| | | if (count == 1) { |
| | | CommonUtils.playSound(1) |
| | | |
| | | this.HBarCode_Pack = data["HBarCode"] |
| | | this.HBarCodeFocusRefresh() |
| | | this.DisBillEntryList(); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.HBarCodePackFocusRefresh() |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | toScanCode2() { |
| | | MpaasScan.scanCode((scanCode) => { |
| | | this.HBarCode = scanCode |
| | | GetMeesageByBarCode(scanCode) |
| | | }) |
| | | }, |
| | | async GetMeesageByBarCode(HBarCode) { |
| | | // 获取SN码对应的数据 |
| | | let sInterID = this.hform.HInterID |
| | | let sBillNo = this.hform.HBillNo |
| | | let sHBarCode = this.HBarCode |
| | | let sHBarCode_Pack = this.HBarCode_Pack |
| | | let sMaker = getUserInfo()["Czymc"] |
| | | let HStockOrgID = uni.getStorageSync("OrganizationID") |
| | | |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_SNBarCode_PackUnionCarryUp", |
| | | data: { |
| | | sHBarCode, |
| | | sInterID, |
| | | HBillType, |
| | | sBillNo, |
| | | sHBarCode_Pack, |
| | | sMaker, |
| | | HStockOrgID |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | CommonUtils.playSound(1) |
| | | this.DisBillEntryList() |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `扫描SN条码失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.playSound(0) |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `扫描SN条码失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | DisBillEntryList() { |
| | | CommonUtils.doRequest2({ |
| | | url: '/WEBSController/GetBillEntry_TmpList_PackUnionCarryUp', |
| | | data: { |
| | | "sInterID": this.hform.HInterID, |
| | | "sBillNo": this.hform.HBillNo, |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.listData = data |
| | | |
| | | this.SetCount() |
| | | } else { |
| | | // 没有任何记录视为从0开始新增 |
| | | this.listData = [] |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleSelect(selected, array) { |
| | | this.selectedRows = array |
| | | }, |
| | | handleSelectAll(selected, array) { |
| | | this.selectedRows = array |
| | | }, |
| | | SetCount() { |
| | | let sBarcodeQty = 0; |
| | | let sSumQtys = 0; |
| | | this.listData.forEach(item => { |
| | | sBarcodeQty += parseFloat(item["HPieceQty"]) |
| | | sSumQtys += parseFloat(item["HQty"]) |
| | | }) |
| | | |
| | | this.hform.txtHBarcodeQtys = sBarcodeQty |
| | | this.hform.txtHSumQtys = sSumQtys |
| | | |
| | | }, |
| | | getMaxNo() { |
| | | CommonUtils.doRequest2({ |
| | | url: "/WEBSController/GetMaxBillNoAndID_Json", |
| | | data: { |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | resFunction: (d) => { |
| | | console.log('d: ', d); |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = d.data |
| | | if (count == 1) { |
| | | this.hform.HInterID = data[0].HInterID; |
| | | this.hform.HBillNo = data[0].HBillNo |
| | | } else { |
| | | |
| | | uni.showModal({ |
| | | title: "温馨提示", |
| | | showCancel: false, |
| | | content: Message |
| | | |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | submitPreCheck() { |
| | | if (CommonUtils.isEmpty(this.hform.HInterID)) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '单据内码获取失败,错误的单据内码!' |
| | | }) |
| | | return false |
| | | } |
| | | if (CommonUtils.isEmpty(this.hform.HBillNo)) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '单据号获取失败,错误的单据号!' |
| | | }) |
| | | return false |
| | | } |
| | | if (this.listData.length < 1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '没有扫码信息,请先扫描条码,确认无误后再提交!' |
| | | }) |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | cmdDelete(item) { |
| | | uni.showModal({ |
| | | title: '删除确认', |
| | | content: '确认要删除选中行所有扫码记录?删除后将不可恢复!', |
| | | success: () => { |
| | | if (confirm) { |
| | | CommonUtils.doRequest2({ |
| | | url: '/WEBSController/set_DelPackUnionBill_Temp', |
| | | data: { |
| | | sInterID: this.hform.HInterID, |
| | | HBillType: this.HBillType, |
| | | sBarCode: item.HBarCode |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | CommonUtils.playSound(1) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | this.DisBillEntryList() |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | cmdSubmit() { |
| | | let checkRes = this.submitPreCheck() |
| | | if (!checkRes) { |
| | | return |
| | | } |
| | | this.EnableSubmit = false |
| | | CommonUtils.doRequest2({ |
| | | url: '/WEBSController/set_SavePackUnionCarryUpBill', |
| | | data: { |
| | | "ModRightNamePackUnionCarryUp": this.ModRightName, |
| | | "sInterID": this.hform.HInterID, |
| | | "HBillType": this.hform.HBillType, |
| | | "sBillNo": this.hform.HBillNo, |
| | | "sHBarCode_Pack": this.HBarCode_Pack, |
| | | "sMaker": this.hform.HMaker, |
| | | "HStockOrgID": this.hform.HStockOrgID |
| | | |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: Message, |
| | | confirmText: "新增", |
| | | cancelText: '关闭', |
| | | success: ({ |
| | | confirm, |
| | | cancel |
| | | }) => { |
| | | if (confirm) { |
| | | uni.redirectTo({ |
| | | url: "./Sc_PackUnionCarryUpBill_Fast?operationType=1" |
| | | }) |
| | | } |
| | | |
| | | if (cancel) { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | cmdExit() { |
| | | uni.navigateBack() |
| | | } |
| | | }, |
| | | computed: { |
| | | listTableHeight: { |
| | | get() { |
| | | return this.bottomBtnTop - this.listTableTop - 10 |
| | | } |
| | | } |
| | | }, |
| | | async onReady() { |
| | | // #ifndef MP-WEIXIN |
| | | let query = uni.createSelectorQuery().in(this) |
| | | query.select("#bottom-btn") |
| | | .boundingClientRect((data) => { |
| | | if (data) { |
| | | this.bottomBtnTop = data.top |
| | | } else { |
| | | console.log("未找到#bottom-btn节点"); |
| | | } |
| | | }) |
| | | .exec(); |
| | | query.select("#tabs") |
| | | .boundingClientRect((data) => { |
| | | if (data) { |
| | | this.listTableTop = data.top |
| | | } else { |
| | | console.log("未找到#tabs节点"); |
| | | } |
| | | }) |
| | | .exec(); |
| | | // #endif |
| | | }, |
| | | onLoad(e) { |
| | | // 1为 新增 |
| | | this.BarCodeType = e.BarCodeType || 1 |
| | | this.OperationType = e.OperationType || 1 |
| | | this.HBarCode_Pack = e.HBarCode_Pack_Temp || "" |
| | | |
| | | if (this.OperationType == 1) { |
| | | this.getMaxNo() |
| | | } else if (this.OperationType == 2) { |
| | | // this.GetMeesageByBarCode_Pack(this.HBarCode_Pack) |
| | | let { |
| | | HBarCode_Pack, |
| | | HInterID, |
| | | HBillNo |
| | | } = e |
| | | this.HBarCode_Pack = HBarCode_Pack |
| | | this.hform.HInterID = HInterID |
| | | this.hform.HBillNo = HBillNo |
| | | this.DisBillEntryList() |
| | | this.tabs = 0 |
| | | } |
| | | |
| | | // 光标默认聚焦在托条码上 |
| | | this.HBarCodePackFocusRefresh() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | input { |
| | | width: inherit; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | .form-base-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .bill-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 16rpx 30rpx; |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | |
| | | .title { |
| | | width: 5rem; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .disabled { |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | .right-icon { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .tabs { |
| | | width: 100%; |
| | | display: flex; |
| | | border-bottom: 1px solid #ddd; |
| | | margin: 20rpx 0; |
| | | |
| | | view { |
| | | width: 25%; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on { |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .bottom-btn { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | // height: 120rpx; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | background-color: #fff; |
| | | box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4); |
| | | padding: 30rpx 40rpx 40rpx 40rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | // position: absolute; |
| | | // right: 120rpx; |
| | | } |
| | | |
| | | .btn-d { |
| | | background-color: #ff8901; |
| | | color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | this.tabs = tabIndex |
| | | switch (tabIndex) { |
| | | case 0: |
| | | this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}' and 阅读状态 = '未阅'` |
| | | this.sWhere = ` and (接收人 = '${getUserInfo()['HEmpName']}' or 抄送接收人 = '${getUserInfo()['HEmpName']}') and 阅读状态 = '未阅'` |
| | | break; |
| | | case 1: |
| | | this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}'` |
| | |
| | | } |
| | | }, |
| | | displayDetail(item) { |
| | | console.log('item: ',item); |
| | | uni.showModal({ |
| | | title: `${item["主题"]}`, |
| | | content: `${item["内容"]}`, |
| | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | count, |
| | | code |
| | | } = res.data |
| | | if (count == 1) { |
| | | if (data[0]['HBack'] == 1) { |
| | |
| | | }) |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == "3791") { //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID |
| | | this.hform.HProcExchQty = data[0].流转卡数量 |
| | | this.hform.HSourceName = data[0].生产资源 |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].工序名称 |
| | | this.hform.HCheckQty = data[0].出站数量 |
| | | } else { |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].单据号 |
| | | this.hform.HProcExchInterID = data[0].HInterID |
| | | this.hform.HProcExchEntryID = data[0].HEntryID |
| | | this.hform.HProcExchQty = data[0].流转卡数量 |
| | | this.hform.HSourceName = data[0].生产资源 |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | |
| | | if (code == 2) { |
| | | // 存在已有的单据,提示是否需要继续新增 |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: "此单据已生成末件检验单,是否需要继续新增", |
| | | confirmText: "是", |
| | | cancelText: "否", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | if (this.hform.HSourceBillType == "3791") { //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID |
| | | this.hform.HProcExchQty = data[0].流转卡数量 |
| | | this.hform.HSourceName = data[0].生产资源 |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].工序名称 |
| | | this.hform.HCheckQty = data[0].出站数量 |
| | | } else { |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].单据号 |
| | | this.hform.HProcExchInterID = data[0].HInterID |
| | | this.hform.HProcExchEntryID = data[0].HEntryID |
| | | this.hform.HProcExchQty = data[0].流转卡数量 |
| | | this.hform.HSourceName = data[0].生产资源 |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | } |
| | | this.hform.HRemarkSN = HBarCodeOld // 所扫描的条码存SN字段 |
| | | this.get_CheckItem(); |
| | | } else if (res.cancel) {} |
| | | }, |
| | | }) |
| | | } |
| | | this.hform.HRemarkSN = HBarCodeOld // 所扫描的条码存SN字段 |
| | | this.get_CheckItem(); |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | } |
| | | |
| | | |
| | | this.get_CheckItem(); |
| | | this.hasSourceBill = true |
| | | this.$refs['billList'].exit() |
| | |
| | | CurUserName: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | return true |
| | | } else { |
| | |
| | | }, |
| | | }, |
| | | async onLoad(e) { |
| | | this.setAuto(); |
| | | this.setAuto(); |
| | | this.operationType = e.operationType || 1; |
| | | this.hform.HInterID = e.linterid || 0; |
| | | if (this.operationType == 1) { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | input { |
| | | width: inherit; |
| | | font-size: 30rpx; |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <uni-card :title="'工单号:'+item.HICMOBillNo" :extra="'日期:'+item.计划日期" style="margin: 10px;" @tap="edit(item)"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.HMaterName" style="width: 100%;"> |
| | | <text>产品名称:</text>{{item.HMaterName}} |
| | | </view> |
| | | <view class="detail" v-if="item.HModel" style="width: 100%;"> |
| | | <text>产品型号:</text>{{item.HModel}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>计划数量:</text>{{item.HDatePlanQty?item.HDatePlanQty:0}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>汇报总数:</text>{{item.HDateFinishQty?item.HDateFinishQty:0}} |
| | | </view> |
| | | <view class="detail" v-if="item.HICMOStatus"> |
| | | <text>当前状态:</text>{{item.HICMOStatus}} |
| | | </view> |
| | | <view class="detail" v-if="item.领料状态"> |
| | | <text>领料状态:</text>{{item.领料状态}} |
| | | </view> |
| | | <view class="detail" style="width: 100%;display: flex;align-items: center;"> |
| | | <text>生产进度:</text> |
| | | <zui-progress-bar :value="item.percent" :width="210" type="follow-left"/> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <uni-popup ref="popup" background-color="#fff"> |
| | | <view class="popup-content"> |
| | | <view class="tit">异常类型</view> |
| | | <view class="item" v-for="(item,index) in popList" :key="index" @tap="toAbnm(item)">{{item}}</view> |
| | | </view> |
| | | </uni-popup> |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0">已到底</view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <uni-card :title="'工单号:'+item.HICMOBillNo" :extra="'日期:'+item.计划日期" style="margin: 10px;" @tap="edit(item)"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.HMaterName" style="width: 100%;"> |
| | | <text>产品名称:</text>{{item.HMaterName}} |
| | | </view> |
| | | <view class="detail" v-if="item.HModel" style="width: 100%;"> |
| | | <text>产品型号:</text>{{item.HModel}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>计划数量:</text>{{item.HDatePlanQty?item.HDatePlanQty:0}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>汇报总数:</text>{{item.HDateFinishQty?item.HDateFinishQty:0}} |
| | | </view> |
| | | <view class="detail" v-if="item.HICMOStatus"> |
| | | <text>当前状态:</text>{{item.HICMOStatus}} |
| | | </view> |
| | | <view class="detail" v-if="item.领料状态"> |
| | | <text>领料状态:</text>{{item.领料状态}} |
| | | </view> |
| | | <view class="detail" style="width: 100%;display: flex;align-items: center;"> |
| | | <text>生产进度:</text> |
| | | <zui-progress-bar :value="item.percent" :width="210" type="follow-left" /> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <uni-popup ref="popup" background-color="#fff"> |
| | | <view class="popup-content"> |
| | | <view class="tit">异常类型</view> |
| | | <view class="item" v-for="(item,index) in popList" :key="index" @tap="toAbnm(item)">{{item}}</view> |
| | | </view> |
| | | </uni-popup> |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0">已到底</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | userInfo:getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', |
| | | HSourceID:'', |
| | | HSourceName:'', |
| | | number:1, |
| | | listData:[], |
| | | chooseIt:'', |
| | | popList:['人员原因', '设备原因', '材料原因', '工艺原因', '模具原因', '测试原因', '环境原因'], |
| | | // 定义操作映射配置 |
| | | actionConfig: { |
| | | '开工': { |
| | | apiUrl: '/Sc_MESBeginWorkBill/FastBeginWorkBill', |
| | | type: '开工', |
| | | handler: 'handleBegin', |
| | | checkStatus: true, // 需要检查状态 |
| | | denyMsg: '单据状态不满足开工条件!' // 固定错误提示 |
| | | }, |
| | | '完工': { |
| | | apiUrl: '/Sc_MESEndWorkBill/FastEndWorkBill', |
| | | type: '完工', |
| | | handler: 'handleEnd', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足完工条件!' // 固定错误提示 |
| | | }, |
| | | '停工': { |
| | | apiUrl: '/Sc_MESStopWorkBill/FastStopWorkBill', |
| | | type: '停工', |
| | | handler: 'handleStop', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足停工条件!' // 固定错误提示 |
| | | }, |
| | | '异常反馈': { |
| | | apiUrl: '', |
| | | type: '异常反馈', |
| | | handler: 'handleAbnormal', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足异常反馈条件!' // 固定错误提示 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e) |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }) |
| | | this.HSourceName=e.HSourceName |
| | | this.HSourceID=e.HSourceID |
| | | this.getList(e.HSourceID) |
| | | }, |
| | | onPullDownRefresh: function() { |
| | | this.getList(this.HSourceID) |
| | | setTimeout(()=>{ |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | getList(e){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/ReportPlatForm/SearchGetWorkBillList', |
| | | data: { "HSourceID": e }, |
| | | success: (res) => { |
| | | if(res.data.count == 1){ |
| | | console.log(res.data.data.h_p_JIT_GetWorkBillListInfoBySource) |
| | | this.listData = res.data.data.h_p_JIT_GetWorkBillListInfoBySource |
| | | for(var i=0;i<this.listData.length;i++){ |
| | | this.listData[i].percent = (this.listData[i].HDateFinishQty / this.listData[i].HDatePlanQty).toFixed(4) |
| | | } |
| | | setTimeout(()=>{ |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | }else{ |
| | | setTimeout(()=>{ |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | uni.showToast({ |
| | | title:'获取列表出错!', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | setTimeout(()=>{ |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | uni.showToast({ |
| | | title:'获取列表接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | toAbnm(item){ |
| | | console.log(item,this.chooseIt) |
| | | this.$refs.popup.close() |
| | | uni.navigateTo({ |
| | | url:'./OA_ErrMsgBackBill?HICMOBillNo=' + this.chooseIt.HICMOBillNo |
| | | +'&HSourceName=' + this.HSourceName |
| | | +'&HSourceBillNo=' + this.chooseIt.HSourceBillNo |
| | | +'&HType=' + item |
| | | +'&OperationType=4&linterid=&HSouceBillType=' |
| | | }) |
| | | }, |
| | | edit(item){ |
| | | console.log(item) |
| | | this.chooseIt = item |
| | | |
| | | // 使用对象映射配置生成可用的操作列表 |
| | | const availableActions = Object.keys(this.actionConfig) |
| | | |
| | | uni.showActionSheet({ |
| | | itemList: availableActions, |
| | | success: (res)=> { |
| | | const actionKey = availableActions[res.tapIndex] |
| | | const actionConfig = this.actionConfig[actionKey] |
| | | |
| | | // 调用对应的处理方法 |
| | | this[actionConfig.handler](item, actionConfig) |
| | | }, |
| | | fail: function (res) { |
| | | console.log(res.errMsg); |
| | | } |
| | | }); |
| | | }, |
| | | // 开工处理 |
| | | handleBegin(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 完工处理 |
| | | handleEnd(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 停工处理 |
| | | handleStop(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 异常反馈处理 |
| | | handleAbnormal(item, config) { |
| | | const sWhere = { |
| | | "HSourceID": this.HSourceID, |
| | | "HICMOBillNo": item.HICMOBillNo, |
| | | "HInterID": item.HSourceInterID, |
| | | "type": config.type |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus', |
| | | type: "GET", |
| | | data: { "sWhere": JSON.stringify(sWhere) }, |
| | | dataType: "json", |
| | | async: false, |
| | | success: (res) => { |
| | | console.log('异常反馈状态检查:', res.data) |
| | | // 根据第二个页面的逻辑:如果count>0,表示不允许操作 |
| | | if (res.data.count > 0) { |
| | | // 不允许操作,显示错误提示 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | uni.showToast({ |
| | | title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,${config.denyMsg}`, |
| | | icon:'none', |
| | | duration: 3000 |
| | | }) |
| | | } |
| | | else { |
| | | // count<=0,表示允许操作 |
| | | this.$refs.popup.open('center') |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | // 创建通用的请求数据 |
| | | createUpData(item) { |
| | | return { |
| | | HBillType: item.HBillType, |
| | | HSourceInterID: item.HSourceInterID, |
| | | HSourceEntryID: item.HSourceEntryID, |
| | | HSourceBillNo: item.HSourceBillNo, |
| | | HSourceBillType: item.HSourceBillType, |
| | | user: uni.getStorageSync('HUserName') |
| | | } |
| | | }, |
| | | // 通用的检查和执行方法 |
| | | checkAndExecuteWorkStatus(item, config, apiUrl, upData) { |
| | | const sWhere = { |
| | | "HSourceID": this.HSourceID, |
| | | "HICMOBillNo": item.HICMOBillNo, |
| | | "HInterID": item.HSourceInterID, |
| | | "type": config.type |
| | | } |
| | | |
| | | console.log('状态检查参数:', JSON.stringify(sWhere)) |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus', |
| | | type: "GET", |
| | | data: { "sWhere": JSON.stringify(sWhere) }, |
| | | dataType: "json", |
| | | async: false, |
| | | success: (res) => { |
| | | console.log('状态检查结果:', res.data) |
| | | // 根据第二个页面的逻辑:如果data.count>0,表示不允许操作 |
| | | if (res.data.count > 0) { |
| | | // 不允许操作,显示错误提示 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | const operationMap = { |
| | | '开工': '开工', |
| | | '完工': '完工', |
| | | '停工': '停工', |
| | | '异常反馈': '异常反馈' |
| | | } |
| | | const operationName = operationMap[config.type] || config.type |
| | | |
| | | // 根据操作类型给出不同的建议 |
| | | let suggestion = '' |
| | | switch(config.type) { |
| | | case '开工': |
| | | suggestion = '开工操作需要工单状态为"待生产"或"挂起"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '完工': |
| | | suggestion = '完工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '停工': |
| | | suggestion = '停工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '异常反馈': |
| | | suggestion = '异常反馈需要工单处于"生产中"或"开工"状态,请检查当前状态是否符合要求' |
| | | break |
| | | default: |
| | | suggestion = '请检查工单状态是否符合操作要求' |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,无法进行【${operationName}】操作。\n${suggestion}`, |
| | | icon:'none', |
| | | duration: 4000 |
| | | }) |
| | | } |
| | | else { |
| | | // data.count<=0,表示允许操作 |
| | | this.showConfirmDialog(config.type, item, apiUrl, upData) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title:'状态检查接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | // 显示确认对话框 |
| | | showConfirmDialog(actionType, item, apiUrl, upData) { |
| | | // 获取当前工单状态显示在确认框中 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | |
| | | uni.showModal({ |
| | | title: actionType + '确认', |
| | | content: `设备:${this.HSourceName}\n工单:${item.HICMOBillNo}\n产品:${item.HMaterName}\n当前状态:${status}\n\n确定要执行【${actionType}】操作吗?`, |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定') |
| | | this.executeWork(apiUrl, upData, item, actionType) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 执行工作操作 |
| | | executeWork(apiUrl, upData, item, actionType) { |
| | | uni.showLoading({ |
| | | title:`正在${actionType}...` |
| | | }) |
| | | |
| | | console.log('执行操作参数:', upData) |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + apiUrl, |
| | | data: upData, |
| | | success: (res) => { |
| | | console.log('执行操作结果:', res) |
| | | if(res.data.count == 1){ |
| | | // 操作成功后刷新列表 |
| | | this.getList(this.HSourceID) |
| | | uni.showToast({ |
| | | title:`${actionType}成功!`, |
| | | icon:'success' |
| | | }) |
| | | }else{ |
| | | uni.hideLoading() |
| | | // 显示更详细的操作失败提示 |
| | | let errorMsg = res.data.Message || `${actionType}失败` |
| | | uni.showToast({ |
| | | title: `${actionType}失败:${errorMsg}`, |
| | | icon:'none', |
| | | duration: 3000 |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title:`${actionType}接口请求失败,请检查网络`, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | changeTab(e){ |
| | | this.number = e |
| | | if(e==1){ |
| | | this.listData = this.listData1 |
| | | }else{ |
| | | this.listData = this.listData2 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | HSourceID: '', |
| | | HSourceName: '', |
| | | number: 1, |
| | | listData: [], |
| | | chooseIt: '', |
| | | popList: ['人员原因', '设备原因', '材料原因', '工艺原因', '模具原因', '测试原因', '环境原因'], |
| | | // 定义操作映射配置 |
| | | actionConfig: { |
| | | '开工': { |
| | | apiUrl: '/Sc_MESBeginWorkBill/FastBeginWorkBill', |
| | | type: '开工', |
| | | handler: 'handleBegin', |
| | | checkStatus: true, // 需要检查状态 |
| | | denyMsg: '单据状态不满足开工条件!' // 固定错误提示 |
| | | }, |
| | | '完工': { |
| | | apiUrl: '/Sc_MESEndWorkBill/FastEndWorkBill', |
| | | type: '完工', |
| | | handler: 'handleEnd', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足完工条件!' // 固定错误提示 |
| | | }, |
| | | '停工': { |
| | | apiUrl: '/Sc_MESStopWorkBill/FastStopWorkBill', |
| | | type: '停工', |
| | | handler: 'handleStop', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足停工条件!' // 固定错误提示 |
| | | }, |
| | | '异常反馈': { |
| | | apiUrl: '', |
| | | type: '异常反馈', |
| | | handler: 'handleAbnormal', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足异常反馈条件!' // 固定错误提示 |
| | | }, |
| | | '工艺参数点检': { |
| | | apiUrl: '', |
| | | type: '工艺参数点检', |
| | | handler: 'handleICMOTechParam', |
| | | checkStatus: true, |
| | | denyMsg: '单据状态不满足工艺参数点检条件!' // 固定错误提示 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e) |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | this.HSourceName = e.HSourceName |
| | | this.HSourceID = e.HSourceID |
| | | this.getList(e.HSourceID) |
| | | }, |
| | | onPullDownRefresh: function() { |
| | | this.getList(this.HSourceID) |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | getList(e) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/ReportPlatForm/SearchGetWorkBillList', |
| | | data: { |
| | | "HSourceID": e |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | console.log(res.data.data.h_p_JIT_GetWorkBillListInfoBySource) |
| | | this.listData = res.data.data.h_p_JIT_GetWorkBillListInfoBySource |
| | | for (var i = 0; i < this.listData.length; i++) { |
| | | this.listData[i].percent = (this.listData[i].HDateFinishQty / this.listData[ |
| | | i].HDatePlanQty).toFixed(4) |
| | | } |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | } else { |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | uni.showToast({ |
| | | title: '获取列表出错!', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | }, 1000); |
| | | uni.showToast({ |
| | | title: '获取列表接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | toAbnm(item) { |
| | | console.log(item, this.chooseIt) |
| | | this.$refs.popup.close() |
| | | uni.navigateTo({ |
| | | url: './OA_ErrMsgBackBill?HICMOBillNo=' + this.chooseIt.HICMOBillNo + |
| | | '&HSourceName=' + this.HSourceName + |
| | | '&HSourceBillNo=' + this.chooseIt.HSourceBillNo + |
| | | '&HType=' + item + |
| | | '&OperationType=4&linterid=&HSouceBillType=' |
| | | }) |
| | | }, |
| | | edit(item) { |
| | | console.log(item) |
| | | this.chooseIt = item |
| | | |
| | | // 使用对象映射配置生成可用的操作列表 |
| | | const availableActions = Object.keys(this.actionConfig) |
| | | |
| | | uni.showActionSheet({ |
| | | itemList: availableActions, |
| | | success: (res) => { |
| | | const actionKey = availableActions[res.tapIndex] |
| | | const actionConfig = this.actionConfig[actionKey] |
| | | |
| | | // 调用对应的处理方法 |
| | | this[actionConfig.handler](item, actionConfig) |
| | | }, |
| | | fail: function(res) { |
| | | console.log(res.errMsg); |
| | | } |
| | | }); |
| | | }, |
| | | // 开工处理 |
| | | handleBegin(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 完工处理 |
| | | handleEnd(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 停工处理 |
| | | handleStop(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 异常反馈处理 |
| | | handleAbnormal(item, config) { |
| | | const sWhere = { |
| | | "HSourceID": this.HSourceID, |
| | | "HICMOBillNo": item.HICMOBillNo, |
| | | "HInterID": item.HSourceInterID, |
| | | "type": config.type |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus', |
| | | type: "GET", |
| | | data: { |
| | | "sWhere": JSON.stringify(sWhere) |
| | | }, |
| | | dataType: "json", |
| | | async: false, |
| | | success: (res) => { |
| | | console.log('异常反馈状态检查:', res.data) |
| | | // 根据第二个页面的逻辑:如果count>0,表示不允许操作 |
| | | if (res.data.count > 0) { |
| | | // 不允许操作,显示错误提示 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | uni.showToast({ |
| | | title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,${config.denyMsg}`, |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }) |
| | | } else { |
| | | // count<=0,表示允许操作 |
| | | this.$refs.popup.open('center') |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | // 工艺参数点检 |
| | | handleICMOTechParam(item, config) { |
| | | const upData = this.createUpData(item) |
| | | this.checkAndExecuteWorkStatus( |
| | | item, |
| | | config, |
| | | config.apiUrl, |
| | | upData |
| | | ) |
| | | }, |
| | | // 创建通用的请求数据 |
| | | createUpData(item) { |
| | | return { |
| | | HBillType: item.HBillType, |
| | | HSourceInterID: item.HSourceInterID, |
| | | HSourceEntryID: item.HSourceEntryID, |
| | | HSourceBillNo: item.HSourceBillNo, |
| | | HSourceBillType: item.HSourceBillType, |
| | | user: uni.getStorageSync('HUserName') |
| | | } |
| | | }, |
| | | // 通用的检查和执行方法 |
| | | checkAndExecuteWorkStatus(item, config, apiUrl, upData) { |
| | | const sWhere = { |
| | | "HSourceID": this.HSourceID, |
| | | "HICMOBillNo": item.HICMOBillNo, |
| | | "HInterID": item.HSourceInterID, |
| | | "type": config.type |
| | | } |
| | | |
| | | console.log('状态检查参数:', JSON.stringify(sWhere)) |
| | | |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus', |
| | | type: "GET", |
| | | data: { |
| | | "sWhere": JSON.stringify(sWhere) |
| | | }, |
| | | dataType: "json", |
| | | async: false, |
| | | success: (res) => { |
| | | console.log('状态检查结果:', res.data) |
| | | // 根据第二个页面的逻辑:如果data.count>0,表示不允许操作 |
| | | if (res.data.count > 0) { |
| | | // 不允许操作,显示错误提示 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | const operationMap = { |
| | | '开工': '开工', |
| | | '完工': '完工', |
| | | '停工': '停工', |
| | | '异常反馈': '异常反馈', |
| | | '工艺参数点检': '工艺参数点检' |
| | | } |
| | | const operationName = operationMap[config.type] || config.type |
| | | |
| | | // 根据操作类型给出不同的建议 |
| | | let suggestion = '' |
| | | switch (config.type) { |
| | | case '开工': |
| | | suggestion = '开工操作需要工单状态为"待生产"或"挂起"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '完工': |
| | | suggestion = '完工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '停工': |
| | | suggestion = '停工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '异常反馈': |
| | | suggestion = '异常反馈需要工单处于"生产中"或"开工"状态,请检查当前状态是否符合要求' |
| | | break |
| | | case '工艺参数点检': |
| | | suggestion = '工艺参数点检需要工单处于"生产中"或"开工"状态,请检查当前状态是否符合要求' |
| | | break |
| | | default: |
| | | suggestion = '请检查工单状态是否符合操作要求' |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,无法进行【${operationName}】操作。\n${suggestion}`, |
| | | icon: 'none', |
| | | duration: 4000 |
| | | }) |
| | | } else { |
| | | // data.count<=0,表示允许操作 |
| | | this.showConfirmDialog(config.type, item, apiUrl, upData) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '状态检查接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | // 显示确认对话框 |
| | | showConfirmDialog(actionType, item, apiUrl, upData) { |
| | | // 获取当前工单状态显示在确认框中 |
| | | const status = item.HICMOStatus || '未知状态' |
| | | |
| | | uni.showModal({ |
| | | title: actionType + '确认', |
| | | content: `设备:${this.HSourceName}\n工单:${item.HICMOBillNo}\n产品:${item.HMaterName}\n当前状态:${status}\n\n确定要执行【${actionType}】操作吗?`, |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定') |
| | | this.executeWork(apiUrl, upData, item, actionType) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 执行工作操作 |
| | | executeWork(apiUrl, upData, item, actionType) { |
| | | uni.showLoading({ |
| | | title: `正在${actionType}...`, |
| | | mask: true |
| | | }) |
| | | console.log('执行操作参数:', upData) |
| | | |
| | | if (actionType == '工艺参数点检') { |
| | | uni.hideLoading() |
| | | console.log('item: ',item); |
| | | uni.navigateTo({ |
| | | url: `/pages/MJGL/SB_EquipICMOTechParamBill/SB_EquipICMOTechParamBillEdit?hinterid=${item.HSourceInterID}&hsubid=${item.HSourceEntryID}&operationType=5` |
| | | }) |
| | | } else { |
| | | uni.request({ |
| | | url: this.serverUrl + apiUrl, |
| | | data: upData, |
| | | success: (res) => { |
| | | console.log('执行操作结果:', res) |
| | | if (res.data.count == 1) { |
| | | // 操作成功后刷新列表 |
| | | this.getList(this.HSourceID) |
| | | uni.showToast({ |
| | | title: `${actionType}成功!`, |
| | | icon: 'success' |
| | | }) |
| | | |
| | | if(actionType == '完工') { |
| | | // 完工单提交成功后。提示是否需要跳转达到下模单 |
| | | uni.showModal({ |
| | | title: "跳转页面", |
| | | content: "完工单保存成功,是否跳转到下模单页面。", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定') |
| | | uni.redirectTo({ |
| | | url: "/pages/MJGL/xiamodan/MouldLowerBillList" |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消') |
| | | } |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } else { |
| | | uni.hideLoading() |
| | | // 显示更详细的操作失败提示 |
| | | let errorMsg = res.data.Message || `${actionType}失败` |
| | | uni.showToast({ |
| | | title: `${actionType}失败:${errorMsg}`, |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: `${actionType}接口请求失败,请检查网络`, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | changeTab(e) { |
| | | this.number = e |
| | | if (e == 1) { |
| | | this.listData = this.listData1 |
| | | } else { |
| | | this.listData = this.listData2 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .list{ |
| | | width: 100%; |
| | | .card-detail{ |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | .detail{ |
| | | width: 46%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | text{ |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | .more{ |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | .part{ |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .popup-content{ |
| | | width: 500rpx; |
| | | border-radius: 20rpx; |
| | | text-align: center; |
| | | padding-bottom: 20rpx; |
| | | .tit{ |
| | | height: 120rpx; |
| | | line-height: 120rpx; |
| | | font-size: 34rpx; |
| | | color: #222; |
| | | font-weight: bold; |
| | | } |
| | | .item{ |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | border-top: 1px solid #eee; |
| | | font-size: 32rpx; |
| | | color: #444; |
| | | } |
| | | } |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | width: 46%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .popup-content { |
| | | width: 500rpx; |
| | | border-radius: 20rpx; |
| | | text-align: center; |
| | | padding-bottom: 20rpx; |
| | | |
| | | .tit { |
| | | height: 120rpx; |
| | | line-height: 120rpx; |
| | | font-size: 34rpx; |
| | | color: #222; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .item { |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | border-top: 1px solid #eee; |
| | | font-size: 32rpx; |
| | | color: #444; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "标签打印", |
| | | "url": "/pages/labelPrinter/index", |
| | | "id": 24, |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "条码拆码", |
| | | "url": "/pages/tiaomachaima/tiaomachaima", |
| | | "id": 25, |
| | | "id": 38, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "条码拆码2", |
| | | "url": "/pages/tiaomachaima/tiaomachaima2", |
| | | "id": 26, |
| | | "id": 39, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "条码拆码", |
| | | "url": "/pages/tiaomachaima/tiaomachaimaCopy_HK", |
| | | "id": 25, |
| | | "id": 40, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "销售出库单验证", |
| | | "url": "/pages/Kf_SellOutBill_CusBar/Kf_SellOutBill_CusBar_APP", |
| | | "id": 26, |
| | | "id": 41, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "直接调拨单验证", |
| | | "url": "/pages/Kf_MoveStockBill_CusBar/Kf_MoveStockBill_CusBar_APP", |
| | | "id": 28, |
| | | "id": 42, |
| | | "hidden": false |
| | | },{ |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "小卫拆箱", |
| | | "url": "/pages/chaixiang/chaixiang_xiaowei", |
| | | "id": 27, |
| | | "id": 43, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "小卫装箱", |
| | | "url": "/pages/zhuangxiang/snZhuangxiang_xiaowei", |
| | | "id": 28, |
| | | "id": 44, |
| | | "hidden": false |
| | | },{ |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产退料校验', |
| | | url: '/pages/shengchantuiliaoCheck/MateOutBackCheckBill?OperationType=1', |
| | | id: 37, |
| | | id: 45, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "分步式调出单验证", |
| | | "url": "/pages/Kf_MoveStockStepOutBill_CusBar/Kf_MoveStockStepOutBill_CusBar_APP", |
| | | "id": 28, |
| | | "id": 46, |
| | | "hidden": false |
| | | }, |
| | | { |
| | |
| | | url: '/pages/shengchantuikuCheck/Kf_ProductInBackCheckBill?OperationType=1', |
| | | id: 39, |
| | | hidden: false, |
| | | } |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon21.png", |
| | | "text": "装箱追溯", |
| | | "url": "/pages/Sc_PackUnionCarryUpBill/Sc_PackUnionCarryUpBill_Fast", |
| | | "id": 47, |
| | | "hidden": false |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.102:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.20.35:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.88.82:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | |
| | | "宁波华舟包装2": "http://192.168.88.167:8082/API_NW/", |
| | | "宁波华舟包装": "http://61.164.64.222:8082/API_WW/", |
| | | }, |
| | | serverUrlName: uni.getStorageSync('serverUrlName') || '宁波四维尔-外网', |
| | | serverUrlName: uni.getStorageSync('serverUrlName') || '宁波华舟包装', |
| | | |
| | | arrayOrganization: [], |
| | | Organization: '', |
| | |
| | | text:'已审核', |
| | | url:'/pages/ZLGL/checkFlowList/QC_CheckedBillflowList', |
| | | id:1 |
| | | },{ |
| | | img:'../../static/icon06.png', |
| | | text:'未读消息', |
| | | url:'', |
| | | id:2 |
| | | },{ |
| | | img:'../../static/icon07.png', |
| | | text:'已读消息', |
| | | url:'', |
| | | id:3 |
| | | }, |
| | | // { |
| | | // img:'../../static/icon06.png', |
| | | // text:'未读消息', |
| | | // url:'', |
| | | // id:2 |
| | | // },{ |
| | | // img:'../../static/icon07.png', |
| | | // text:'已读消息', |
| | | // url:'', |
| | | // id:3 |
| | | // }, |
| | | { |
| | | img:'../../static/icon05.png', |
| | | text:'修改密码', |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="header"> |
| | | <view class="switch-button"> |
| | | <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="mains"> |
| | | <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" |
| | | :key="index" @tap="toUrl(item)"> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | <view :enable-hidden="item.hidden" :hidden="!item.id" 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> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="header"> |
| | | <view class="switch-button"> |
| | | <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="mains"> |
| | | <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" |
| | | :key="index" @tap="toUrl(item)"> |
| | | <template v-if="item.corner"> |
| | | <uni-badge :text="bindingData[item.cornerCount]" |
| | | type="error" |
| | | :max-num="99" |
| | | size="normal" |
| | | absolute |
| | | :offset="[7, 7]"> |
| | | <image :src="item.img" mode=""></image> |
| | | </uni-badge> |
| | | </template> |
| | | <template v-else> |
| | | <image :src="item.img" mode=""></image> |
| | | </template> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | <view :enable-hidden="item.hidden" :hidden="!item.id" 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> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getMenuList, |
| | | setMenuList |
| | | } from '../../utils/menuListApp' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | export default { |
| | | data() { |
| | | return { |
| | | updateCount: 0, |
| | | menuListName: 'tab2', |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [ |
| | | // 采购相关 |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "采购入库暂存列表", |
| | | "url": "/pages/caigouruku/POStockInBillList", |
| | | "id": 1, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "采购退料暂存列表", |
| | | "url": "/pages/caigoutuiliao/POStockInBackBillList", |
| | | "id": 2, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "采购入库校验暂存列表", |
| | | "url": "/pages/caigourukujiaoyan/POStockInCheckBillList", |
| | | "id": 3, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "销售出库暂存列表", |
| | | "url": "/pages/xiaoshouchuku/SellOutBillList", |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon20.png", |
| | | "text": "销售退货暂存列表", |
| | | "url": "/pages/xiaoshoutuihuo/ICStockBillMainList", |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "销售出库校验暂存列表", |
| | | "url": "/pages/xiaoshouchukujiaoyan/SellOutCheckBillList", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 生产相关 |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "生产领料暂存列表", |
| | | "url": "/pages/shengchanlingliaoshengdan/Kf_MateOutBillList", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon31.png", |
| | | "text": "生产补料暂存列表", |
| | | "url": "/pages/shengchanbuliao/MateReplenishOutBillList", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产入库暂存列表", |
| | | "url": "/pages/shengchanrukushengdan/Kf_ProductInBillList", |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "生产退料单暂存列表", |
| | | "url": "/pages/shengchantuiliao/MateOutBackBillList", |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "生产领料校验暂存列表", |
| | | "url": "/pages/shengchanlingliao/PPickingCheckBillList", |
| | | "id": 11, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon31.png", |
| | | "text": "生产补料校验暂存列表", |
| | | "url": "/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBillList", |
| | | "id": 12, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产入库校验暂存列表", |
| | | "url": "/pages/shengchanruku/ProductInCheckBillList", |
| | | "id": 13, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon32.png", |
| | | "text": "生产调拨校验暂存列表", |
| | | "url": "/pages/shengchandiaobo/MoveStockBillList", |
| | | "id": 14, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 委外相关 |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "委外领料暂存列表", |
| | | "url": "/pages/weiwailingliao/Kf_EntrustOutBillList", |
| | | "id": 15, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon20.png", |
| | | "text": "委外入库暂存列表", |
| | | "url": "/pages/weiwairuku/EntrustInBillList", |
| | | "id": 16, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "委外领料校验暂存列表", |
| | | "url": "/pages/weiwailingliaojiaoyan/EntrustOutCheckBillList", |
| | | "id": 17, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "销售出库校验暂存列表", |
| | | "url": "/pages/xiaoshouchukujiaoyan/SellOutCheckBillList", |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 其他出入库相关 |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "其他入库暂存列表", |
| | | "url": "/pages/qitaruku_v2/OtherInBillList", |
| | | "id": 19, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "其他出库暂存列表", |
| | | "url": "/pages/qitachuku_v2/OtherOutBillList", |
| | | "id": 20, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "其他出库校验暂存列表", |
| | | "url": "/pages/qitachuku/qitachuku", |
| | | "id": 21, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 调拨相关 |
| | | { |
| | | "img": "../../static/icon/icon32.png", |
| | | "text": "直接调拨暂存列表", |
| | | "url": "/pages/zhijiediaobo/MoveStockBillList", |
| | | "id": 22, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 其他暂存相关 |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "组托单暂存列表", |
| | | "url": "/pages/zutuosaoma/PackUnionBillList", |
| | | "id": 23, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '分步式调入单缓存', |
| | | url: '/pages/fenbushidiaorudan/table', |
| | | id: 24, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon9.png', |
| | | text: '工序进站接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuIn/Cj_StationInBillList', |
| | | id: 25, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon10.png', |
| | | text: '工序出站汇报单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuOut/Cj_StationOutBillList', |
| | | id: 26, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon11.png', |
| | | text: '工序委外发出单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxIn/Cj_StationEntrustInBillList', |
| | | id: 27, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '工序委外接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxOut/Cj_StationEntrustOutBillList', |
| | | id: 28, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具报废出库单列表", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList", |
| | | "id": 29, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具调拨单列表", |
| | | "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "id": 30, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具领用出库单列表", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "id": 31, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具领用退库单列表", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "id": 32, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "上模单列表", |
| | | "url": "/pages/MJGL/shangmudan/MouldUpperBillList", |
| | | "id": 33, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "下模单列表", |
| | | "url": "/pages/MJGL/xiamodan/MouldLowerBillList", |
| | | "id": 34, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "器具点检记录单列表", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBillList", |
| | | "id": 35, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "器具保养记录单列表", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBillList", |
| | | "id": 36, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "器具故障登记列表", |
| | | "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修派工单列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "id": 38, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "器具维修记录列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "id": 39, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修验收单列表", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "id": 40, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "首件检验单列表", |
| | | "url": "/pages/ZLGL/shoujianjianyan/firstCheckBillList", |
| | | "id": 41, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "巡检检验单列表", |
| | | "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBillList", |
| | | "id": 42, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "末件检验单列表", |
| | | "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBillList", |
| | | "id": 43, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "来料检验列表", |
| | | "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBillList", |
| | | "id": 44, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "全检检验单列表", |
| | | "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList", |
| | | "id": 45, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "车间自检单列表", |
| | | "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList", |
| | | "id": 46, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "在库检验单缓存", |
| | | "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBillList", |
| | | "id": 47, |
| | | "hidden": false |
| | | }, |
| | | // 设备相关 |
| | | { |
| | | "img": "../../static/icon/icon3.png", |
| | | "text": "设备点检记录单列表", |
| | | "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList", |
| | | "id": 48, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon3.png", |
| | | "text": "设备保养记录单列表", |
| | | "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList", |
| | | "id": 49, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon6.png", |
| | | "text": "设备故障登记单列表", |
| | | "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList", |
| | | "id": 50, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修派工单列表", |
| | | "url": "/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList", |
| | | "id": 51, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon7.png", |
| | | "text": "设备维修记录单列表", |
| | | "url": "/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBillList", |
| | | "id": 52, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修验收单列表", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList", |
| | | "id": 53, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 安灯相关 |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "异常反馈单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList", |
| | | "id": 54, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈接收单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBillList", |
| | | "id": 55, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈签到单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBillList", |
| | | "id": 56, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈处理单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBillList", |
| | | "id": 57, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈验收单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBillList", |
| | | "id": 58, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈待处理列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_MyErrMsgBanck/OA_ErrMsgBackMyList", |
| | | "id": 59, |
| | | "hidden": false |
| | | }, |
| | | |
| | | |
| | | // 取样还样相关 |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "取样单列表", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList", |
| | | "id": 60, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "还样单列表", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList", |
| | | "id": 61, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "装箱单暂存列表", |
| | | "url": "/pages/zhuangxiangdan/table", |
| | | "id": 62, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单列表", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList?OperationType=1", |
| | | "id": 63, |
| | | "hidden": false |
| | | }, |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getMenuList, |
| | | setMenuList |
| | | } from '../../utils/menuListApp' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | export default { |
| | | data() { |
| | | return { |
| | | updateCount: 0, |
| | | menuListName: 'tab2', |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | bindingData: { |
| | | UnReadCount: 0, |
| | | }, |
| | | itemData: [ |
| | | // 采购相关 |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单查询", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery?OperationType=1", |
| | | "id": 64, |
| | | "hidden": false |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "采购入库暂存列表", |
| | | "url": "/pages/caigouruku/POStockInBillList", |
| | | "id": 1, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '员工签到记录单列表', |
| | | tip: '点击进入', |
| | | url: '/pages/EmployeeRecords/EmployeeRecordsBillList', |
| | | id: 65, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "采购订单列表", |
| | | "url": "/pages/caigoudingdan/caigoudingdanList", |
| | | "id": 66, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "销售订单列表", |
| | | "url": "/pages/xiaoshoudingdan/xiaoshoudingdanBillList", |
| | | "id": 67, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "特批单列表", |
| | | "url": "/pages/tepidan/TePiDanList", |
| | | "id": 68, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "客诉处理单列表", |
| | | "url": "/pages/CustomerComplaintsBill/CustomerComplaintsBillList", |
| | | "id": 69, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产退料校验暂存列表", |
| | | "url": "/pages/shengchantuiliaoCheck/MateOutBackCheckBillList", |
| | | "id": 66, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "采购退料暂存列表", |
| | | "url": "/pages/caigoutuiliao/POStockInBackBillList", |
| | | "id": 2, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "采购入库校验暂存列表", |
| | | "url": "/pages/caigourukujiaoyan/POStockInCheckBillList", |
| | | "id": 3, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "销售出库暂存列表", |
| | | "url": "/pages/xiaoshouchuku/SellOutBillList", |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon20.png", |
| | | "text": "销售退货暂存列表", |
| | | "url": "/pages/xiaoshoutuihuo/ICStockBillMainList", |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "销售出库校验暂存列表", |
| | | "url": "/pages/xiaoshouchukujiaoyan/SellOutCheckBillList", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 生产相关 |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "生产领料暂存列表", |
| | | "url": "/pages/shengchanlingliaoshengdan/Kf_MateOutBillList", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon31.png", |
| | | "text": "生产补料暂存列表", |
| | | "url": "/pages/shengchanbuliao/MateReplenishOutBillList", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产入库暂存列表", |
| | | "url": "/pages/shengchanrukushengdan/Kf_ProductInBillList", |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "生产退料单暂存列表", |
| | | "url": "/pages/shengchantuiliao/MateOutBackBillList", |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "生产领料校验暂存列表", |
| | | "url": "/pages/shengchanlingliao/PPickingCheckBillList", |
| | | "id": 11, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon31.png", |
| | | "text": "生产补料校验暂存列表", |
| | | "url": "/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBillList", |
| | | "id": 12, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产入库校验暂存列表", |
| | | "url": "/pages/shengchanruku/ProductInCheckBillList", |
| | | "id": 13, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon32.png", |
| | | "text": "生产调拨校验暂存列表", |
| | | "url": "/pages/shengchandiaobo/MoveStockBillList", |
| | | "id": 14, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 委外相关 |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "委外领料暂存列表", |
| | | "url": "/pages/weiwailingliao/Kf_EntrustOutBillList", |
| | | "id": 15, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon20.png", |
| | | "text": "委外入库暂存列表", |
| | | "url": "/pages/weiwairuku/EntrustInBillList", |
| | | "id": 16, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "委外领料校验暂存列表", |
| | | "url": "/pages/weiwailingliaojiaoyan/EntrustOutCheckBillList", |
| | | "id": 17, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon30.png", |
| | | "text": "销售出库校验暂存列表", |
| | | "url": "/pages/xiaoshouchukujiaoyan/SellOutCheckBillList", |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 其他出入库相关 |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "其他入库暂存列表", |
| | | "url": "/pages/qitaruku_v2/OtherInBillList", |
| | | "id": 19, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "其他出库暂存列表", |
| | | "url": "/pages/qitachuku_v2/OtherOutBillList", |
| | | "id": 20, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon18.png", |
| | | "text": "其他出库校验暂存列表", |
| | | "url": "/pages/qitachuku/qitachuku", |
| | | "id": 21, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 调拨相关 |
| | | { |
| | | "img": "../../static/icon/icon32.png", |
| | | "text": "直接调拨暂存列表", |
| | | "url": "/pages/zhijiediaobo/MoveStockBillList", |
| | | "id": 22, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 其他暂存相关 |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "组托单暂存列表", |
| | | "url": "/pages/zutuosaoma/PackUnionBillList", |
| | | "id": 23, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '分步式调入单缓存', |
| | | url: '/pages/fenbushidiaorudan/table', |
| | | id: 24, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon9.png', |
| | | text: '工序进站接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuIn/Cj_StationInBillList', |
| | | id: 25, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon10.png', |
| | | text: '工序出站汇报单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuOut/Cj_StationOutBillList', |
| | | id: 26, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon11.png', |
| | | text: '工序委外发出单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxIn/Cj_StationEntrustInBillList', |
| | | id: 27, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '工序委外接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxOut/Cj_StationEntrustOutBillList', |
| | | id: 28, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具报废出库单列表", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList", |
| | | "id": 29, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具调拨单列表", |
| | | "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "id": 30, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具领用出库单列表", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "id": 31, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具领用退库单列表", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "id": 32, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "上模单列表", |
| | | "url": "/pages/MJGL/shangmudan/MouldUpperBillList", |
| | | "id": 33, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "下模单列表", |
| | | "url": "/pages/MJGL/xiamodan/MouldLowerBillList", |
| | | "id": 34, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "器具点检记录单列表", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBillList", |
| | | "id": 35, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "器具保养记录单列表", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBillList", |
| | | "id": 36, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "器具故障登记列表", |
| | | "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修派工单列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "id": 38, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "器具维修记录列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "id": 39, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修验收单列表", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "id": 40, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "首件检验单列表", |
| | | "url": "/pages/ZLGL/shoujianjianyan/firstCheckBillList", |
| | | "id": 41, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "巡检检验单列表", |
| | | "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBillList", |
| | | "id": 42, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "末件检验单列表", |
| | | "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBillList", |
| | | "id": 43, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "来料检验列表", |
| | | "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBillList", |
| | | "id": 44, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "全检检验单列表", |
| | | "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList", |
| | | "id": 45, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "车间自检单列表", |
| | | "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList", |
| | | "id": 46, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "在库检验单缓存", |
| | | "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBillList", |
| | | "id": 47, |
| | | "hidden": false |
| | | }, |
| | | // 设备相关 |
| | | { |
| | | "img": "../../static/icon/icon3.png", |
| | | "text": "设备点检记录单列表", |
| | | "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList", |
| | | "id": 48, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon3.png", |
| | | "text": "设备保养记录单列表", |
| | | "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList", |
| | | "id": 49, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon6.png", |
| | | "text": "设备故障登记单列表", |
| | | "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList", |
| | | "id": 50, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修派工单列表", |
| | | "url": "/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList", |
| | | "id": 51, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon7.png", |
| | | "text": "设备维修记录单列表", |
| | | "url": "/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBillList", |
| | | "id": 52, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修验收单列表", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList", |
| | | "id": 53, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 安灯相关 |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "异常反馈单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList", |
| | | "id": 54, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈接收单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBillList", |
| | | "id": 55, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈签到单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBillList", |
| | | "id": 56, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈处理单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBillList", |
| | | "id": 57, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈验收单列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBillList", |
| | | "id": 58, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈待处理列表", |
| | | "url": "/pages/ZLGL/AanDengHujiao/OA_MyErrMsgBanck/OA_ErrMsgBackMyList", |
| | | "id": 59, |
| | | "hidden": false |
| | | }, |
| | | |
| | | |
| | | // 取样还样相关 |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "取样单列表", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillList", |
| | | "id": 60, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "还样单列表", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_BackSampleCheckBill/QC_BackSampleCheckBillList", |
| | | "id": 61, |
| | | "hidden": false |
| | | }, |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "装箱单暂存列表", |
| | | "url": "/pages/zhuangxiangdan/table", |
| | | "id": 62, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单列表", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList?OperationType=1", |
| | | "id": 63, |
| | | |
| | | "corner": true, |
| | | "cornerCount": "UnReadCount" |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单查询", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery?OperationType=1", |
| | | "id": 64, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon12.png', |
| | | text: '员工签到记录单列表', |
| | | tip: '点击进入', |
| | | url: '/pages/EmployeeRecords/EmployeeRecordsBillList', |
| | | id: 65, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "采购订单列表", |
| | | "url": "/pages/caigoudingdan/caigoudingdanList", |
| | | "id": 66, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "销售订单列表", |
| | | "url": "/pages/xiaoshoudingdan/xiaoshoudingdanBillList", |
| | | "id": 67, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "特批单列表", |
| | | "url": "/pages/tepidan/TePiDanList", |
| | | "id": 68, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "客诉处理单列表", |
| | | "url": "/pages/CustomerComplaintsBill/CustomerComplaintsBillList", |
| | | "id": 69, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "生产退料校验暂存列表", |
| | | "url": "/pages/shengchantuiliaoCheck/MateOutBackCheckBillList", |
| | | |
| | | "id": 70, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon17.png", |
| | | "text": "销售退货校验暂存列表", |
| | |
| | | "id": 70, |
| | | "hidden": false |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getHiddenItem() |
| | | }, |
| | | methods: { |
| | | judgeHidden() { |
| | | return process.env.NODE_ENV === 'development' |
| | | }, |
| | | async getHiddenItem() { |
| | | let data = await getMenuList({ |
| | | menuName: this.menuListName |
| | | }) |
| | | Array.from(data).forEach(e => { |
| | | this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"]) |
| | | this.itemData[e["HIndex"]].id = e["HEntryID"]; //id为0强制隐藏 |
| | | }) |
| | | }, |
| | | switchHidden(index) { |
| | | this.updateCount++; |
| | | this.itemData[index].hidden = !this.itemData[index].hidden |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getHiddenItem() |
| | | }, |
| | | onShow() { |
| | | this.getWorkLinkList() |
| | | }, |
| | | methods: { |
| | | async getWorkLinkList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList', |
| | | data: { |
| | | sWhere: ` and (接收人 = '${getUserInfo()['HEmpName']}' or 抄送接收人 = '${getUserInfo()['HEmpName']}') and 阅读状态 = '未阅'`, |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | switchIconsModeHandler() { |
| | | this.canEdit = !this.canEdit |
| | | if (this.canEdit == false && this.updateCount > 0) { |
| | | this.$nextTick(() => { |
| | | // uni.setStorageSync("HIndexItemData", this.itemData) |
| | | setMenuList({ |
| | | menuName: this.menuListName, |
| | | payload: this.itemData |
| | | }) |
| | | let { |
| | | count, |
| | | data, |
| | | Message, |
| | | list |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.bindingData.UnReadCount = data.length |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取工作联系单异常: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | this.updateCount = 0 |
| | | }) |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | toUrl(item) { |
| | | if (item.url) { |
| | | uni.navigateTo({ |
| | | url: item.url |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '功能开发中。。。', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取工作联系单异常: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | judgeHidden() { |
| | | return process.env.NODE_ENV === 'development' |
| | | }, |
| | | async getHiddenItem() { |
| | | let data = await getMenuList({ |
| | | menuName: this.menuListName |
| | | }) |
| | | Array.from(data).forEach(e => { |
| | | this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"]) |
| | | this.itemData[e["HIndex"]].id = e["HEntryID"]; //id为0强制隐藏 |
| | | |
| | | if( this.itemData[e["HIndex"]].text == '工作联系单查询') { |
| | | this.itemData[e["HIndex"]]["corner"]= true, |
| | | this.itemData[e["HIndex"]]["cornerCount"]= "UnReadCount" |
| | | } |
| | | }) |
| | | }, |
| | | switchHidden(index) { |
| | | this.updateCount++; |
| | | this.itemData[index].hidden = !this.itemData[index].hidden |
| | | |
| | | }, |
| | | switchIconsModeHandler() { |
| | | this.canEdit = !this.canEdit |
| | | if (this.canEdit == false && this.updateCount > 0) { |
| | | this.$nextTick(() => { |
| | | // uni.setStorageSync("HIndexItemData", this.itemData) |
| | | setMenuList({ |
| | | menuName: this.menuListName, |
| | | payload: this.itemData |
| | | }) |
| | | |
| | | this.updateCount = 0 |
| | | }) |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | toUrl(item) { |
| | | if (item.url) { |
| | | uni.navigateTo({ |
| | | url: item.url |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '功能开发中。。。', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .header { |
| | | width: 100%; |
| | | height: 2em; |
| | | position: relative; |
| | | |
| | | .header { |
| | | width: 100%; |
| | | height: 2em; |
| | | position: relative; |
| | | .switch-button { |
| | | position: absolute; |
| | | right: 10rpx; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .switch-button { |
| | | position: absolute; |
| | | right: 10rpx; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | .mains { |
| | | width: 720rpx; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 80rpx; |
| | | |
| | | .mains { |
| | | width: 720rpx; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 80rpx; |
| | | .box { |
| | | width: 25%; |
| | | margin-top: 2.5vh; |
| | | text-align: center; |
| | | |
| | | .box { |
| | | width: 25%; |
| | | margin-top: 2.5vh; |
| | | text-align: center; |
| | | image { |
| | | width: 18vw; |
| | | height: 18vw; |
| | | } |
| | | |
| | | image { |
| | | width: 18vw; |
| | | height: 18vw; |
| | | } |
| | | .texts { |
| | | width: 120rpx; |
| | | margin: 0 auto; |
| | | font-size: 29rpx; |
| | | font-weight: normal; |
| | | color: #333333; |
| | | margin-top: .2vh; |
| | | } |
| | | } |
| | | |
| | | .texts { |
| | | width: 120rpx; |
| | | margin: 0 auto; |
| | | font-size: 29rpx; |
| | | font-weight: normal; |
| | | color: #333333; |
| | | margin-top: .2vh; |
| | | } |
| | | } |
| | | .edit { |
| | | position: relative; |
| | | } |
| | | |
| | | .edit { |
| | | position: relative; |
| | | } |
| | | .edit-mark { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .edit-mark { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | view[enable-hidden] { |
| | | opacity: .4 !important; |
| | | } |
| | | |
| | | view[enable-hidden] { |
| | | opacity: .4 !important; |
| | | } |
| | | |
| | | view[hidden] { |
| | | display: none; |
| | | } |
| | | } |
| | | view[hidden] { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | // 处理业务消息 |
| | | if (message.Type === "MessageUnRead") { // 未读消息 |
| | | let payload = { |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", |
| | | itemId: 0 |
| | | } |
| | | const content = JSON.parse(message.Content); |
| | |
| | | } else if (message.Type === "Message") { |
| | | const content = JSON.parse(message.Content) |
| | | let payload = { |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", |
| | | itemId: 0 |
| | | } |
| | | this.showTaskTip(content[0]["内容"], payload, content[0]["主题"]); |
| | |
| | | httpFormatWs(httpUrl=this.serverUrl) { |
| | | if(httpUrl.indexOf("http://") === 0){ |
| | | httpUrl = httpUrl.replace("http://", "") |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws" |
| | | httpUrl = httpUrl.substring(0, httpUrl.length - 1) |
| | | let BackSlashLast = httpUrl.lastIndexOf('/') |
| | | httpUrl = httpUrl.substring(0, BackSlashLast) |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":8888/ws" |
| | | }else if(httpUrl.indexOf("https://") === 0) { |
| | | httpUrl = httpUrl.replace("https://", "") |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws" |
| | | httpUrl = httpUrl.substring(0, httpUrl.length - 1) |
| | | let BackSlashLast = httpUrl.lastIndexOf('/') |
| | | httpUrl = httpUrl.substring(0, BackSlashLast) |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":8888/ws" |
| | | }else{ |
| | | // 提示传入连接错误 |
| | | } |