Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
5个文件已修改
2 文件已重命名
4个文件已添加
6个文件已删除
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList", |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具点检记录单", |
| | | "navigationBarTitleText": "模具点检记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/qitachukujiaoyan/qitachukujiaoyan", |
| | | "style": { |
| | | "navigationBarTitleText": "其他出库校验", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujudianjianjiludan/form", |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具点检记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList_son", |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckRuleBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录子表" |
| | | "navigationBarTitleText": "模具点检规程" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList", |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录单", |
| | | "navigationBarTitleText": "模具保养记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, { |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainRuleBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养规程" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill", |
| | | "style": { |
| | | "navigationBarTitleText": "生产补料单校验" |
| | | } |
| | | }, { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/MouldMaintainBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录单" |
| | | } |
| | | }, { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList_son", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录子表" |
| | | } |
| | | }, { |
| | | }, |
| | | { |
| | | "path": "pages/qitachukujiaoyan/qitachukujiaoyan", |
| | | "style": { |
| | | "navigationBarTitleText": "其他出库校验", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/qitachukujiaoyan/qitachukujiaoyan", |
| | | "style": { |
| | | "navigationBarTitleText": "其他出库校验", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/qitachukujiaoyan/qitachukudanjiaoyan", |
| | | "style": { |
| 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: containerHeight + 'px',overflow: 'auto' }"> |
| | | <view class="form-item"> |
| | | <view class="title">模具条码:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBarCode" @confirm="GetMessageByBarCode(hform.HBarCode)" |
| | | placeholder="请输入(或扫描)模具条码" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养开始:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate"> |
| | | <input :value="hform.HBeginDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养结束:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate"> |
| | | <input :value="hform.HEndDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-if="false"> |
| | | <view class="title">数量:</view> |
| | | <view class="right"> |
| | | <input type="number" v-model="hform.HQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">最终结论:</view> |
| | | <view class="right none-border"> |
| | | <radio-group @change="radioChange" class="radio_Container"> |
| | | <label> |
| | | <view> |
| | | <radio value="OK" :checked="hform.HLastResult == 'OK'" /> |
| | | <text>OK</text> |
| | | </view> |
| | | </label> |
| | | </label> |
| | | <view> |
| | | <radio value="NG" :checked="hform.HLastResult == 'NG'" /> |
| | | <text>NG</text> |
| | | </view> |
| | | </label> |
| | | </radio-group> |
| | | </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> |
| | | <view class="right"> |
| | | <input v-model="hform.HRemark" placeholder="请输入备注" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具名称:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarName" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具规格:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarSpec" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具型号:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarModel" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养计划:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HPlanNo" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养级别:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HMaintainLevList" dataKey="保养级别名称" |
| | | dataValue="HItemID" v-model="hform.HMaintainLevID"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 明细信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 模具保养规程 |
| | | </view> |
| | | <view class="right"> |
| | | <input type="text" :value="hform.HMouldMaintainRuleInterNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HMaintainResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>保养项目ID:</text>{{item.HMaintainItemID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养项目:</text>{{item.HMaintainItem}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养部位:</text>{{item.HMaintainPart}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>负责人ID:</text>{{item.HManagerID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人名称:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>备注:</text>{{item.HRemark}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单ID:</text>{{item.HSourceInterID}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单子ID:</text>{{item.HSourceEntryID}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单号:</text>{{item.HSourceBillNo}} |
| | | </view> |
| | | |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</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="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> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | TrackOpTypes |
| | | } from "vue"; |
| | | export default { |
| | | name: 'Sc_MouldMaintainBill', |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "Sc_MouldMaintainBill", |
| | | HBillType: '3819', |
| | | operationType: 1, |
| | | uploadOptions: {}, |
| | | |
| | | HMaintainLevList: [], |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | |
| | | hform: { |
| | | HBarCode: "", |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HQty: 1, |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HMaintainLevName: "", |
| | | HMaintainLevID: 0, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HMouldID: 0, |
| | | HBarSpec: "", |
| | | HBarModel: "", |
| | | HPlanNo: "", |
| | | HPlanInterID: 0, |
| | | HMouldMaintainRuleInterID: 0, |
| | | HMouldMaintainRuleInterNo: "", |
| | | HRequestComDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HRecentMainModule: 0, |
| | | HCumulativeModule: 0, |
| | | HProductionModule: 0, |
| | | HExplanation: "", |
| | | HInnerBillNo: "", |
| | | HMainSourceInterID: 0, |
| | | HMainSourceEntryID: 0, |
| | | HMainSourceBillNo: "", |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: "", |
| | | HUpDateDate: "", |
| | | HChecker: "", |
| | | HCheckDate: "", |
| | | HDeleteMan: "", |
| | | HDeleteDate: "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HLastResult: "OK" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HCheckFileList[index]["HMaintainResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HMaintainResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sc_MouldMaintainBill/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 getHMaintainLevList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_BadReason/Gy_MaintainLevList', |
| | | data: { |
| | | sWhere: " and HUSEORGID = " + uni.getStorageSync('OrganizationID'), |
| | | user: uni.getStorageSync('HUserName') |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HMaintainLevList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode(cb => { |
| | | this.hfrom.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | | async GetMessageByBarCode(HBarCode) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown", |
| | | data: { |
| | | HBarCode: HBarCode, |
| | | user: uni.getStorageSync('HUserName') |
| | | }, |
| | | }) |
| | | if (!res) { |
| | | return |
| | | } |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | console.log('data: ', data); |
| | | this.hform.HMouldID = data[0].HInterID |
| | | this.hform.HBarName = data[0].HName |
| | | this.hform.HBarSpec = data[0].HModel |
| | | this.hform.HBarModel = data[0].HModel2 |
| | | this.hform.HQty = 1 |
| | | // 获取检验规程 |
| | | this.GetItemByMouldFile() |
| | | } catch (err) { |
| | | |
| | | } |
| | | }, |
| | | async GetItemByMouldFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByMouldFile", |
| | | data: { |
| | | "MouldProjectID": this.hform.HMouldID, |
| | | "Type": "BY", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HMouldMaintainRuleInterID = data[0].HMouldMaintainRuleID |
| | | this.hform.HMouldMaintainRuleInterNo = data[0].器具保养规程 |
| | | this.hform.HPlanNo = data[0].单据号 |
| | | this.hform.HMouldMaintainPlanInterID = (data[0].hmainid == null ? 0 : data[0].hmainid) == "" ? |
| | | 0 : data[0].hmainid |
| | | this.hform.HMouldMaintainPlanEntryID = (data[0].HEntryID == null ? 0 : data[0].HEntryID) == |
| | | "" ? 0 : data[0].HEntryID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.保养项目ID, |
| | | "HMaintainItem": item.保养项目名称, |
| | | "HMaintainPart": item.保养部位, // 修改字段名 |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.hmainid == null ? 0 : item.hmainid, // 需确认是否正确 |
| | | "HSourceEntryID": item.HEntryID == null ? 0 : item.HEntryID, // 需确认是否正确 |
| | | "HSourceBillNo": item.单据号 // 需确认是否正确 |
| | | |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取保养规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取保养规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | toCheckFile() { |
| | | // 判断是否已扫描模具 |
| | | if (!this.hform.HMouldID || this.hform.HMouldID == 0) { |
| | | uni.showToast({ |
| | | title: '请先扫描模具二维码带出模具信息', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 打开保养规程选择页面 |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainRuleBillList?mouldId=' + this.hform |
| | | .HMouldID, |
| | | success: (res) => { |
| | | // 通过事件通道监听返回的数据 |
| | | res.eventChannel.on('selectedPlanData', (data) => { |
| | | console.log('接收到选择的数据:', data); |
| | | // 赋值字段 |
| | | this.hform.HMouldMaintainRuleInterNo = data.单据号; |
| | | this.hform.HMouldMaintainRuleInterID = data.hmainid; |
| | | this.hform.HPlanNo = data.保养计划号 == null ? "" : data.保养计划号; |
| | | this.hform.HPlanInterID = data.保养计划id == null ? 0 : ata.保养计划id, |
| | | this.hform.HMouldMaintainPlanInterID = data.保养计划id == null ? 0 : data.保养计划id; |
| | | this.hform.HMouldMaintainPlanEntryID = data.保养计划子id == null ? 0 : data.保养计划子id; |
| | | this.hform.HMainSourceBillNo = data.保养计划号 == null ? "" : data.保养计划号; |
| | | this.hform.HMaintainLevName = data.保养级别; |
| | | this.hform.HMaintainLevID = data.HMaintainLevID; |
| | | |
| | | // 调用获取保养项目的方法 |
| | | this.get_MaintainItem2(); |
| | | }); |
| | | |
| | | res.eventChannel.on('closePage', () => { |
| | | console.log('关闭选择页面'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 获取保养规则项目 |
| | | async get_MaintainItem2() { |
| | | try { |
| | | // 验证是否已选择保养规程 |
| | | if (!this.hform.HMouldMaintainRuleInterID || this.hform.HMouldMaintainRuleInterID == 0) { |
| | | uni.showToast({ |
| | | title: '请先选择保养规程', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetMaintainItemByMaintainRuleID/Mould', |
| | | data: { |
| | | "HMouldMaintainRuleInterID": this.hform.HMouldMaintainRuleInterID |
| | | } |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | if (data && data.length > 0) { |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainItemID": item.HMaintainItemID || 0, |
| | | "HMaintainItem": item.保养项目 || "", |
| | | "HMaintainPart": item.保养部位 || "", |
| | | "HClaim": item.具体要求 || "", |
| | | "HManagerID": item.负责人ID || 0, |
| | | "HManagerCode": item.负责人代码 || "", |
| | | "HManagerName": item.负责人名称 || "", |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HRemark": item.表体备注 || "" |
| | | }; |
| | | }); |
| | | } else { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: '该保养规程暂无保养项目记录', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } else { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: Message || '获取保养项目失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: `获取保养项目失败: ${err}`, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | radioChange(e) { |
| | | console.log('radioChange:', e.detail.value); |
| | | this.hform.HLastResult = e.detail.value; |
| | | }, |
| | | getEditData(hmainid) { |
| | | // 主表数据 |
| | | uni.request({ |
| | | url: CommonUtils.getServerUrl() + '/Sc_MouldMaintainBill/Sc_MouldMaintainBillListCheckDetai', |
| | | data: { |
| | | HID: hmainid |
| | | }, |
| | | success: (res) => { |
| | | console.log('编辑接口返回数据:', res.data); |
| | | if (res.data.code == 1) { |
| | | var data = res.data.data.h_v_Sc_MouldMaintain[0]; |
| | | this.hform = { |
| | | HInterID: hmainid, |
| | | HBillNo: data.单据号, |
| | | HDate: data.日期.substr(0, 10), |
| | | HMouldID: data.HMouldID || 0, |
| | | HBarCode: data.模具条码 || "", |
| | | HBarName: data.产品模具 || "", |
| | | HBarSpec: data.模具规格 || "", |
| | | HBarModel: data.模具型号 || "", |
| | | HPlanNo: data.保养计划编号 || "", |
| | | HPlanInterID: data.保养计划内码 || 0, |
| | | HBeginDate: data.保养开始日期 ? data.保养开始日期.substr(0, 10) : dayjs(new Date()) |
| | | .format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: data.保养结束日期 ? data.保养结束日期.substr(0, 10) : dayjs(new Date()) |
| | | .format("YYYY-MM-DD HH:mm:ss"), |
| | | HLastResult: data.最终结论 === '合格' ? 'OK' : (data.最终结论 === '不合格' ? 'NG' : |
| | | 'OK'), |
| | | HMouldMaintainRuleInterID: data.HMouldMaintainRuleInterID || 0, |
| | | HMouldMaintainRuleInterNo: data.器具保养规程 || "", |
| | | HRemark: data.备注 || "", |
| | | HMaintainLevID: data.HMaintainLevID || 0, |
| | | HMaintainLevName: data.保养级别名称 || "", |
| | | HQty: data.数量 || 1, |
| | | HMaker: data.制单人 || getUserInfo()['Czymc'], |
| | | HMakeDate: data.制单日期 ? data.制单日期.substr(0, 10) : dayjs(new Date()).format( |
| | | "YYYY-MM-DD"), |
| | | HUpDater: data.修改人 || "", |
| | | HUpDateDate: data.修改日期 ? data.修改日期.substr(0, 10) : "", |
| | | HChecker: data.审核人 || "", |
| | | HCheckDate: data.审核日期 ? data.审核日期.substr(0, 10) : "", |
| | | HDeleteMan: data.作废人 || "", |
| | | HDeleteDate: data.作废日期 ? data.作废日期.substr(0, 10) : "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HInnerBillNo: data.内部单据号 || "", |
| | | HExplanation: data.摘要 || "", |
| | | HRequestComDate: data.要求完成日期 ? data.要求完成日期.substr(0, 10) : "", |
| | | HRecentMainModule: data.最近保养模数 || 0, |
| | | HCumulativeModule: data.累计模数 || 0, |
| | | HProductionModule: data.本次生产模数 || 0 |
| | | }; |
| | | |
| | | // 获取部门列表并设置保养级别 |
| | | if (data.HMaintainLevID) { |
| | | this.$nextTick(() => { |
| | | this.hform.HMaintainLevID = data.HMaintainLevID; |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message || '获取数据失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log('主表请求失败:', res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | complete: () => { |
| | | // 获取子表数据 |
| | | this.getSubEditData(hmainid); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 获取子表数据 |
| | | getSubEditData(hmainid) { |
| | | uni.request({ |
| | | url: CommonUtils.getServerUrl() + |
| | | '/Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetaiNew', |
| | | data: { |
| | | "HInterID":hmainid |
| | | }, |
| | | success: (res) => { |
| | | console.log('子表数据:', res.data); |
| | | if (res.data.count == 1) { |
| | | this.HCheckFileList = res.data.list[0].map(item => { |
| | | const isChecked = item.HMaintainResult === '合格' ? true : false; |
| | | return { |
| | | "HMaintainItemID": item.HMaintainItemID || 0, |
| | | "HMaintainItem": item.HMaintainItem || "", |
| | | "HMaintainPart": item.HMaintainPart || "", |
| | | "HClaim": item.HClaim || "", |
| | | "HManagerID": item.HManagerID || 0, |
| | | "HManagerName": item.HManagerName || "", |
| | | "HMaintainResult": isChecked, |
| | | "HRemark": item.HManagerName || "" |
| | | }; |
| | | }); |
| | | } else { |
| | | console.log('子表数据为空或获取失败:', res.data.Message); |
| | | this.HCheckFileList = []; |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log('子表请求失败:', res); |
| | | this.HCheckFileList = []; |
| | | } |
| | | }); |
| | | }, |
| | | 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 = 0 |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async submit() { |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HCheckFileList); |
| | | let sMainSub = oMain + ';' + sSubStr + ';' + uni.getStorageSync('HUserName'); |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sc_MouldMaintainBill/SaveGetMouldMaintainBillListAPP", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill?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 |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log('e: ', e); |
| | | this.getHMaintainLevList() |
| | | 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) { |
| | | // 编辑 |
| | | this.getEditData(e.hmainid) |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | } |
| | | }, |
| | | 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"> |
| | | </style> |
| File was renamed from pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList.vue |
| | |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == index"> |
| | | <button class="op1" size="mini" plain @tap.stop="toSon(item)">子表信息</button> |
| | | <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> |
| | | <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | |
| | | // 新增模具保养记录单 |
| | | onAddClickHandler() { |
| | | uni.navigateTo({ |
| | | url: "/pages/MJGL/mujubaoyangjiludan/form" |
| | | url: "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill?operationType=1" |
| | | }) |
| | | }, |
| | | //编辑保养记录单 |
| | | edit(item) { |
| | | console.log(item) |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujubaoyangjiludan/form?hmainid=' + item.hmainid |
| | | url: '/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill?operationType=3&hmainid=' + item.hmainid |
| | | }) |
| | | }, |
| | | //删除保养记录单 |
| | |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //子表查看 |
| | | toSon(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList_son?HInterID=' + item.hmainid + '&产品模具=' + item |
| | | .产品模具 + '&产品模具代码=' + item.产品模具代码, |
| | | }); |
| | | } |
| | | }, |
| New file |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- 表单区域 --> |
| | | <view class="form-container"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HCreateBy" placeholder="请输入制单人" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-show="false"> |
| | | <view class="title">开始时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange"> |
| | | <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" |
| | | placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-show="false"> |
| | | <view class="title">结束时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange"> |
| | | <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 按钮区域 --> |
| | | <view class="buttons-container"> |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | <view class="buttons"> |
| | | <button class="op5" size="mini" type="default" @tap="clear">重置</button> |
| | | <button class="op3" size="mini" type="default" @tap="search">查询</button> |
| | | <button class="op4" size="mini" type="default" @tap="close">关闭</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 列表区域 --> |
| | | <scroll-view class="list-container" scroll-y="true" :style="{height: listHeight + 'px'}"> |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <uni-card :title="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.点检周期"> |
| | | <text>点检周期:</text>{{item.点检周期}} |
| | | </view> |
| | | <view class="detail" v-if="item.周期单位"> |
| | | <text>周期单位:</text>{{item.周期单位}} |
| | | </view> |
| | | <view class="detail" v-if="item.摘要"> |
| | | <text>摘要:</text>{{item.摘要}} |
| | | </view> |
| | | <view class="detail" v-if="item.备注"> |
| | | <text>备注:</text>{{item.备注}} |
| | | </view> |
| | | <view class="detail" v-if="item.hmainid" v-show="false"> |
| | | <text>hmainid:</text>{{item.hmainid}} |
| | | </view> |
| | | <view class="detail" v-if="item.hsubid" v-show="false">> |
| | | <text>hsubid:</text>{{item.hsubid}} |
| | | </view> |
| | | <view class="detail" v-if="item.HInterID" v-show="false"> |
| | | <text>HInterID:</text>{{item.HInterID}} |
| | | </view> |
| | | </view> |
| | | <view class="card-detail" v-if="showDetail == index"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item.制单日期"> |
| | | <text>制单日期:</text>{{item.制单日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.审核人"> |
| | | <text>审核人:</text>{{item.审核人}} |
| | | </view> |
| | | <view class="detail" v-if="item.审核日期"> |
| | | <text>审核日期:</text>{{item.审核日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.修改人"> |
| | | <text>修改人:</text>{{item.修改人}} |
| | | </view> |
| | | <view class="detail" v-if="item.修改日期"> |
| | | <text>修改日期:</text>{{item.修改日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.关闭人"> |
| | | <text>关闭人:</text>{{item.关闭人}} |
| | | </view> |
| | | <view class="detail" v-if="item.关闭日期"> |
| | | <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="more" v-if="showDetail == index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0">已到底</view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | bottomBtnTop: 0, |
| | | listTableTop: 0, |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | // 新增字段 |
| | | mouldId: 0, |
| | | hform: { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | }, |
| | | sWhere: '', |
| | | listData: [], |
| | | showDetail: -1, |
| | | listHeight: 0, // 动态计算列表高度 |
| | | safeAreaInsets: {} // 安全区域信息 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | |
| | | // 获取安全区域信息 |
| | | try { |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.safeAreaInsets = systemInfo.safeAreaInsets || { |
| | | top: 0, |
| | | bottom: 0 |
| | | }; |
| | | } catch (e) { |
| | | console.error('获取安全区域失败:', e); |
| | | this.safeAreaInsets = { |
| | | top: 0, |
| | | bottom: 0 |
| | | }; |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 动态计算列表高度 |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | this.calculateListHeight(); |
| | | }, 100); |
| | | }); |
| | | }, |
| | | onReady() { |
| | | this.calculateListHeight(); |
| | | }, |
| | | onResize() { |
| | | this.calculateListHeight(); |
| | | }, |
| | | methods: { |
| | | // 计算列表区域的高度 |
| | | calculateListHeight() { |
| | | const query = uni.createSelectorQuery().in(this); |
| | | query.select('.form-container').boundingClientRect(data => { |
| | | if (data) { |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | const windowHeight = systemInfo.windowHeight; |
| | | const formHeight = data.height; |
| | | // 计算剩余可用高度,减去表单区域的高度 |
| | | this.listHeight = windowHeight - formHeight - (this.safeAreaInsets.bottom || 0); |
| | | } |
| | | }).exec(); |
| | | }, |
| | | getList() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MouldMaintainRuleBill/GetMouldMaintainRuleListPDA', |
| | | data: { |
| | | sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName') |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.listData = res.data.data |
| | | uni.hideLoading() |
| | | } else { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //选择单据日期 |
| | | BenginHCreateDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.BenginHCreateDate = e.detail.value |
| | | }, |
| | | //选择单据日期 |
| | | EndHCreateDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.EndHCreateDate = e.detail.value |
| | | }, |
| | | search() { |
| | | this.sWhere = '' |
| | | if (this.mouldId && this.mouldId != 0) { |
| | | this.sWhere += " and HInterID = " + this.mouldId; |
| | | } |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HCreateBy) { |
| | | this.sWhere += " and 制单人 like '%" + this.hform.HCreateBy + "%'"; |
| | | } |
| | | if (this.hform.BenginHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.BenginHCreateDate + "'"; |
| | | } |
| | | if (this.hform.EndHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.EndHCreateDate + "'"; |
| | | } |
| | | |
| | | this.getList() |
| | | }, |
| | | clear() { |
| | | this.sWhere = '' |
| | | this.showDetail = -1, |
| | | this.hform = { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | }, |
| | | this.search() |
| | | }, |
| | | choose(item) { |
| | | var data = { |
| | | 单据号: item.单据号, |
| | | hmainid: item.hmainid, |
| | | 保养计划号:item.保养计划号, |
| | | 保养计划id:item.保养计划id, |
| | | 保养计划子id:item.保养计划子id, |
| | | 保养级别:item.保养级别, |
| | | HMaintainLevID:item.HMaintainLevID |
| | | } |
| | | |
| | | // 修改这里:使用事件通道返回数据给父页面 |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('selectedPlanData', data); |
| | | |
| | | // 关闭当前页面 |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | close() { |
| | | // 关闭当前页面 |
| | | uni.navigateBack(); |
| | | }, |
| | | }, |
| | | onLoad(options) { |
| | | // 接收传递的参数 |
| | | if (options.mouldId) { |
| | | this.mouldId = options.mouldId; |
| | | } |
| | | // 根据模具ID自动查询相关点检规程 |
| | | this.search(); |
| | | // 获取事件通道,用于页面间通信 |
| | | if (this.getOpenerEventChannel) { |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | |
| | | // 监听页面关闭事件(如果需要从父页面关闭当前页面) |
| | | eventChannel.on('closePage', () => { |
| | | uni.navigateBack(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | width: 100%; |
| | | height: 100vh; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: relative; |
| | | } |
| | | |
| | | // 表单容器,包含查询条件和按钮 |
| | | .form-container { |
| | | flex-shrink: 0; |
| | | background-color: #fff; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .form { |
| | | width: 100%; |
| | | padding: 20rpx 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 12rpx 0; |
| | | margin-bottom: 10rpx; |
| | | |
| | | .title { |
| | | width: 180rpx; |
| | | flex-shrink: 0; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 16rpx 20rpx; |
| | | font-size: 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | |
| | | // 按钮容器 |
| | | .buttons-container { |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .buttons { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 20rpx 0; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | color: #fff; |
| | | margin: 0 15rpx; |
| | | } |
| | | } |
| | | |
| | | // 列表容器,使用滚动视图 |
| | | .list-container { |
| | | flex: 1; |
| | | width: 100%; |
| | | -webkit-overflow-scrolling: touch; |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 130rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .over { |
| | | text-align: center; |
| | | padding: 40rpx 0; |
| | | color: #999; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | background-color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | background-color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | background-color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | background-color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | background-color: #888; |
| | | } |
| | | |
| | | /* 适配不同屏幕尺寸 */ |
| | | @media screen and (max-width: 360px) { |
| | | .form { |
| | | padding: 20rpx 20rpx; |
| | | } |
| | | |
| | | .form-item { |
| | | font-size: 26rpx; |
| | | padding: 10rpx 0; |
| | | |
| | | .title { |
| | | width: 160rpx; |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | button { |
| | | width: 160rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-size: 26rpx; |
| | | margin: 0 10rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /* 确保在iOS上输入框不会被键盘遮挡 */ |
| | | .form-item input, |
| | | .form-item .right { |
| | | max-height: 100rpx; |
| | | } |
| | | </style> |
| 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: containerHeight + 'px',overflow: 'auto' }"> |
| | | <view class="form-item"> |
| | | <view class="title">模具条码:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBarCode" @confirm="GetMessageByBarCode(hform.HBarCode)" |
| | | placeholder="请输入(或扫描)模具条码" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">点检开始:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate"> |
| | | <input :value="hform.HBeginDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">点检结束:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate"> |
| | | <input :value="hform.HEndDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">数量:</view> |
| | | <view class="right"> |
| | | <input type="number" v-model="hform.HQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">最终结论:</view> |
| | | <view class="right none-border"> |
| | | <radio-group @change="radioChange" class="radio_Container"> |
| | | <label> |
| | | <view> |
| | | <radio value="OK" :checked="hform.HLastResult == 'OK'" /> |
| | | <text>OK</text> |
| | | </view> |
| | | </label> |
| | | </label> |
| | | <view> |
| | | <radio value="NG" :checked="hform.HLastResult == 'NG'" /> |
| | | <text>NG</text> |
| | | </view> |
| | | </label> |
| | | </radio-group> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">异常情况记录:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HErrNote" placeholder="请输入异常情况记录" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">重大安全隐患记录:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBigSafeNote" placeholder="请输入重大安全隐患记录" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">点检数据:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HDotCheckNote" placeholder="请输入点检数据" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班次:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HShiftsList" dataKey="班次名称" dataValue="HItemID" |
| | | v-model="hform.HShiftsID"> |
| | | </zxz-uni-data-select> |
| | | </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="HDeptList" dataKey="部门名称" dataValue="HItemID" |
| | | v-model="hform.HDeptID"> |
| | | </zxz-uni-data-select> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HRemark" placeholder="请输入备注" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具名称:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarName" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具规格:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarSpec" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">模具型号:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarModel" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">点检计划:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HPlanNo" disabled /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 明细信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 模具点检规程 |
| | | </view> |
| | | <view class="right"> |
| | | <input type="text" :value="hform.HMouldDotCheckRuleNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HDotCheckResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>点检项目ID:</text>{{item.HDotCheckItemID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检项目:</text>{{item.HDotCheckItem}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>点检项目分类ID:</text>{{item.HDotCheckItemClassID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检项目分类:</text>{{item.HDotCheckItemClassName}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>点检方法ID:</text>{{item.HDotCheckItemMethodID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检方法:</text>{{item.HDotCheckItemMethodName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检部位:</text>{{item.HDotCheckPart}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>负责人ID:</text>{{item.HManagerID}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人名称:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>备注:</text>{{item.HRemark}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单ID:</text>{{item.HSourceInterID}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单子ID:</text>{{item.HSourceEntryID}} |
| | | </view> |
| | | <view class="detail" v-if="false"> |
| | | <text>源单号:</text>{{item.HSourceBillNo}} |
| | | </view> |
| | | |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</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="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> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | TrackOpTypes |
| | | } from "vue"; |
| | | export default { |
| | | name: 'Sc_MouldDotCheckBill', |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "Sc_MouldDotCheckBill", |
| | | HBillType: '3821', |
| | | operationType: 1, |
| | | uploadOptions: {}, |
| | | |
| | | HDeptList: [], |
| | | HShiftsList: [], |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | |
| | | hform: { |
| | | HBarCode: "", |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HQty: 0, |
| | | HErrNote: "", |
| | | HBigSafeNote: "", |
| | | HDotCheckNote: "", |
| | | HShiftsName: "", |
| | | HShiftsID: 0, |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HMouldID: 0, |
| | | HBarSpec: "", |
| | | HBarModel: "", |
| | | HPlanNo: "", |
| | | HPlanInterID: 0, |
| | | HPlanEntryID: 0, |
| | | HMouldDotCheckRuleID: 0, |
| | | HMouldDotCheckRuleNo: "", |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: "", |
| | | HUpDateDate: "", |
| | | HChecker: "", |
| | | HCheckDate: "", |
| | | HDeleteMan: "", |
| | | HDeleteDate: "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HLastResult: "OK" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HCheckFileList[index]["HDotCheckResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HDotCheckResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sc_MouldDotCheckBill/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: '/Web/GetGy_ShiftsList_Json', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | }) |
| | | |
| | | 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 getHDeptList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | 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.hfrom.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | | async GetMessageByBarCode(HBarCode) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown", |
| | | data: { |
| | | HBarCode: HBarCode |
| | | }, |
| | | }) |
| | | if (!res) { |
| | | return |
| | | } |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | console.log('data: ', data); |
| | | this.hform.HMouldID = data[0].HInterID |
| | | this.hform.HBarName = data[0].HName |
| | | this.hform.HBarSpec = data[0].HModel |
| | | this.hform.HBarModel = data[0].HModel2 |
| | | this.hform.HQty = 1 |
| | | // 获取检验规程 |
| | | this.GetItemByMouldFile() |
| | | } catch (err) { |
| | | |
| | | } |
| | | }, |
| | | async GetItemByMouldFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByMouldFile", |
| | | data: { |
| | | "MouldProjectID": this.hform.HMouldID, |
| | | "Type": "DJ", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HMouldDotCheckRuleID = data[0].HMouldDotCheckRuleID |
| | | this.hform.HMouldDotCheckRuleNo = data[0].HMouldDotCheckRuleNo |
| | | this.hform.HPlanNo = data[0].单据号 |
| | | this.hform.HPlanInterID = (data[0].hmainid == null ? 0 : data[0].hmainid) == "" ? 0 : data[0].hmainid |
| | | this.hform.HPlanEntryID = (data[0].HEntryID == null ? 0 : data[0].HEntryID) == "" ? 0 : data[0].HEntryID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.点检项目ID, |
| | | "HDotCheckItem": item.点检项目名称, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.hmainid == null ? 0 : item.hmainid, |
| | | "HSourceEntryID": item.HEntryID == null ? 0 : item.HEntryID, |
| | | "HSourceBillNo": item.单据号, |
| | | "HDotCheckItemClassID": item.点检项目分类id || 0, |
| | | "HDotCheckItemClassName": item.点检项目分类 || "", |
| | | "HDotCheckItemMethodID": item.点检方法id || 0, |
| | | "HDotCheckItemMethodName": item.点检方法 || "", |
| | | "HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | toCheckFile() { |
| | | // 判断是否已扫描模具 |
| | | if (!this.hform.HMouldID || this.hform.HMouldID == 0) { |
| | | uni.showToast({ |
| | | title: '请先扫描模具二维码带出模具信息', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 打开点检规程选择页面 |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckRuleBillList?mouldId=' + this.hform |
| | | .HMouldID, |
| | | success: (res) => { |
| | | // 通过事件通道监听返回的数据 |
| | | res.eventChannel.on('selectedPlanData', (data) => { |
| | | console.log('接收到选择的数据:', data); |
| | | // 赋值字段 |
| | | this.hform.HMouldDotCheckRuleNo = data.HMouldDotCheckRuleNo; // 单据号 |
| | | this.hform.HMouldDotCheckRuleID = data.HInterID; // hmainid |
| | | |
| | | // 调用获取点检项目的方法 |
| | | this.get_DocCheckItem2(); |
| | | }); |
| | | |
| | | res.eventChannel.on('closePage', () => { |
| | | console.log('关闭选择页面'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 获取点检规则项目 |
| | | async get_DocCheckItem2() { |
| | | try { |
| | | // 验证是否已选择点检规程 |
| | | if (!this.hform.HMouldDotCheckRuleID || this.hform.HMouldDotCheckRuleID == 0) { |
| | | uni.showToast({ |
| | | title: '请先选择点检规程', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetDotCheckRuleItemByDotCheckRuleID/Mould', |
| | | data: { |
| | | "HDotCheckRuleInterID": this.hform.HMouldDotCheckRuleID |
| | | } |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | if (data && data.length > 0) { |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID || 0, |
| | | "HDotCheckCode": item.点检项目代码 || "", |
| | | "HDotCheckItem": item.点检项目 || "", |
| | | "HDotCheckPart": item.点检部位 || "", |
| | | "HClaim": item.具体要求 || "", |
| | | "HManagerID": item.负责人ID || 0, |
| | | "HManagerCode": item.负责人代码 || "", |
| | | "HManagerName": item.负责人名称 || "", |
| | | "HSourceInterID": (item.点检计划ID == null ? 0 : item.点检计划ID) || 0, |
| | | "HSourceEntryID": (item.点检计划子ID == null ? 0 : item.点检计划子ID) || 0, |
| | | "HSourceBillNo": (item.点检计划单 == null ? '' : item.点检计划单) || '', |
| | | "HDotCheckItemClassID": (item.HDotCheckItemClassID == null ? 0 : item.HDotCheckItemClassID) || 0, |
| | | "HDotCheckItemClassName": (item.点检项目分类名称 == null ? '' : item.点检项目分类名称) ||'', |
| | | "HDotCheckItemMethodID": (item.点检方法id == null ? 0 : item.点检方法id) || 0, |
| | | "HDotCheckItemMethodName": (item.点检方法 == null ? '' : item.点检方法) || '', |
| | | "HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | }; |
| | | }); |
| | | } else { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: '该点检规程暂无点检项目记录', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } else { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: Message || '获取点检项目失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | this.HCheckFileList = []; |
| | | uni.showToast({ |
| | | title: `获取点检项目失败: ${err}`, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | radioChange(e) { |
| | | console.log('radioChange:', e.detail.value); |
| | | this.hform.HLastResult = e.detail.value; |
| | | }, |
| | | getEditData(hmainid) { |
| | | // 主表数据 |
| | | uni.request({ |
| | | url: CommonUtils.getServerUrl() + '/Sc_MouldDotCheckBill/Sc_MouldDotCheckBillListCheckDetai', |
| | | data: { |
| | | HID: hmainid |
| | | }, |
| | | success: (res) => { |
| | | console.log('编辑接口返回数据:', res.data); |
| | | if (res.data.code == 1) { |
| | | var data = res.data.data.h_v_Sc_MouldDotCheckBillMain_Edit[0]; |
| | | this.hform = { |
| | | HInterID: hmainid, |
| | | HBillNo: data.单据号, |
| | | HDate: data.日期.substr(0, 10), |
| | | HMouldID: data.HMouldID || 0, |
| | | HBarCode: data.模具条码 || "", |
| | | HBarName: data.产品模具 || "", |
| | | HBarSpec: data.模具规格 || "", |
| | | HBarModel: data.模具型号 || "", |
| | | HPlanNo: data.点检计划编号 || "", |
| | | HPlanInterID: data.HPlanInterID || 0, |
| | | HPlanEntryID: data.HPlanEntryID || 0, |
| | | HBeginDate: data.点检开始日期 ? data.点检开始日期.substr(0, 10) : dayjs(new Date()) |
| | | .format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: data.点检结束日期 ? data.点检结束日期.substr(0, 10) : dayjs(new Date()) |
| | | .format("YYYY-MM-DD HH:mm:ss"), |
| | | HShiftsID: data.HShiftsID || 0, |
| | | HShiftsName: data.班次名称 || "", |
| | | HLastResult: data.最终结论 === '合格' ? 'OK' : (data.最终结论 === '不合格' ? 'NG' : |
| | | 'OK'), |
| | | HMouldDotCheckRuleID: data.HMouldDotCheckRuleID || 0, |
| | | HMouldDotCheckRuleNo: data.器具点检规程单据号 || "", |
| | | HErrNote: data.异常情况记录 || "", |
| | | HBigSafeNote: data.重大安全隐患记录 || "", |
| | | HDotCheckNote: data.点检数据 || "", |
| | | HRemark: data.备注 || "", |
| | | HDeptID: data.HDeptID || 0, |
| | | HDeptName: data.部门名称 || "", |
| | | HQty: data.数量 || 1, |
| | | |
| | | HMaker: data.制单人 || getUserInfo()['Czymc'], |
| | | HMakeDate: data.制单日期 ? data.制单日期.substr(0, 10) : dayjs(new Date()).format( |
| | | "YYYY-MM-DD"), |
| | | HUpDater: data.修改人 || "", |
| | | HUpDateDate: data.修改日期 ? data.修改日期.substr(0, 10) : "", |
| | | HChecker: data.审核人 || "", |
| | | HCheckDate: data.审核日期 ? data.审核日期.substr(0, 10) : "", |
| | | HDeleteMan: data.作废人 || "", |
| | | HDeleteDate: data.作废日期 ? data.作废日期.substr(0, 10) : "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HInnerBillNo: data.内部单据号 || "", |
| | | HExplanation: data.摘要 || "" |
| | | }; |
| | | |
| | | // 获取部门列表并设置部门 |
| | | if (data.HDeptID) { |
| | | this.$nextTick(() => { |
| | | this.hform.HDeptID = data.HDeptID; |
| | | }); |
| | | } |
| | | |
| | | // 获取班次列表并设置班次 |
| | | if (data.HShiftsID) { |
| | | this.$nextTick(() => { |
| | | this.hform.HShiftsID = data.HShiftsID; |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message || '获取数据失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log('主表请求失败:', res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | complete: () => { |
| | | // 获取子表数据 |
| | | this.getSubEditData(hmainid); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 获取子表数据 |
| | | getSubEditData(hmainid) { |
| | | uni.request({ |
| | | url: CommonUtils.getServerUrl() + '/Sc_MouldDotCheckBill/Sc_MouldDotCheckBillListProjectDetai', |
| | | data: { |
| | | sqlWhere: 'and HInterID=' + hmainid |
| | | }, |
| | | success: (res) => { |
| | | console.log('子表数据:', res.data); |
| | | if (res.data.count == 1) { |
| | | this.HCheckFileList = res.data.list[0].map(item => { |
| | | const isChecked = item.点检结果 === '合格' ? true : false; |
| | | return { |
| | | "HDotCheckItemID": item.点检项目ID || 0, |
| | | "HDotCheckItem": item.点检项目 || "", |
| | | "HDotCheckPart": item.点检部位 || "", |
| | | "HClaim": item.具体要求 || "", |
| | | "HManagerID": item.负责人ID || 0, |
| | | "HManagerName": item.负责人名称 || "", |
| | | "HSourceInterID": item.hmainid || 0, |
| | | "HSourceEntryID": item.HEntryID || 0, |
| | | "HSourceBillNo": item.单据号 || "", |
| | | "HDotCheckItemClassID": item.HDotCheckItemClassID || 0, |
| | | "HDotCheckItemClassName": item.点检项目分类名称 || "", |
| | | "HDotCheckItemMethodID": item.HDotCheckItemMethodID || 0, |
| | | "HDotCheckItemMethodName": item.点检方法名称 || "", |
| | | "HDotCheckResult": isChecked, |
| | | "HRemark":item.子备注2|| "" |
| | | }; |
| | | }); |
| | | } else { |
| | | console.log('子表数据为空或获取失败:', res.data.Message); |
| | | this.HCheckFileList = []; |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log('子表请求失败:', res); |
| | | this.HCheckFileList = []; |
| | | } |
| | | }); |
| | | }, |
| | | 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 = 0 |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async submit() { |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HCheckFileList); |
| | | let sMainSub = oMain + ';' + sSubStr + ';' + uni.getStorageSync('HUserName'); |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sc_MouldDotCheckBill/SaveGetMouldDotCheckBillListAPP", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill?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 |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log('e: ', e); |
| | | this.getHDeptList() |
| | | this.getShiftList() |
| | | 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) { |
| | | // 编辑 |
| | | this.getEditData(e.hmainid) |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | } |
| | | }, |
| | | 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"> |
| | | </style> |
| File was renamed from pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList.vue |
| | |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == index"> |
| | | <button class="op1" size="mini" plain @tap.stop="toSon(item)">子表信息</button> |
| | | <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> |
| | | <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | |
| | | // 新增模具点检记录单 |
| | | onAddClickHandler() { |
| | | uni.navigateTo({ |
| | | url: "/pages/MJGL/mujudianjianjiludan/form" |
| | | url: "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill?operationType=1" |
| | | }) |
| | | }, |
| | | //编辑点检记录单 |
| | | edit(item) { |
| | | console.log(item) |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujudianjianjiludan/form?hmainid=' + item.hmainid |
| | | url: '/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill?operationType=3&hmainid=' + item.hmainid |
| | | }) |
| | | }, |
| | | //删除点检记录单 |
| | |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //子表查看 |
| | | toSon(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList_son?HInterID=' + item.hmainid + '&产品模具代码=' + item |
| | | .产品模具代码 + '&产品模具=' + item.产品模具, |
| | | }); |
| | | } |
| | | }, |
| New file |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- 表单区域 --> |
| | | <view class="form-container"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HCreateBy" placeholder="请输入制单人" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-show="false"> |
| | | <view class="title">开始时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange"> |
| | | <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" |
| | | placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-show="false"> |
| | | <view class="title">结束时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange"> |
| | | <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 按钮区域 --> |
| | | <view class="buttons-container"> |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | <view class="buttons"> |
| | | <button class="op5" size="mini" type="default" @tap="clear">重置</button> |
| | | <button class="op3" size="mini" type="default" @tap="search">查询</button> |
| | | <button class="op4" size="mini" type="default" @tap="close">关闭</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 列表区域 --> |
| | | <scroll-view class="list-container" scroll-y="true" :style="{height: listHeight + 'px'}"> |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <uni-card :title="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.点检周期"> |
| | | <text>点检周期:</text>{{item.点检周期}} |
| | | </view> |
| | | <view class="detail" v-if="item.周期单位"> |
| | | <text>周期单位:</text>{{item.周期单位}} |
| | | </view> |
| | | <view class="detail" v-if="item.摘要"> |
| | | <text>摘要:</text>{{item.摘要}} |
| | | </view> |
| | | <view class="detail" v-if="item.备注"> |
| | | <text>备注:</text>{{item.备注}} |
| | | </view> |
| | | <view class="detail" v-if="item.hmainid" v-show="false"> |
| | | <text>hmainid:</text>{{item.hmainid}} |
| | | </view> |
| | | <view class="detail" v-if="item.hsubid" v-show="false">> |
| | | <text>hsubid:</text>{{item.hsubid}} |
| | | </view> |
| | | <view class="detail" v-if="item.HInterID" v-show="false"> |
| | | <text>HInterID:</text>{{item.HInterID}} |
| | | </view> |
| | | </view> |
| | | <view class="card-detail" v-if="showDetail == index"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item.制单日期"> |
| | | <text>制单日期:</text>{{item.制单日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.审核人"> |
| | | <text>审核人:</text>{{item.审核人}} |
| | | </view> |
| | | <view class="detail" v-if="item.审核日期"> |
| | | <text>审核日期:</text>{{item.审核日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.修改人"> |
| | | <text>修改人:</text>{{item.修改人}} |
| | | </view> |
| | | <view class="detail" v-if="item.修改日期"> |
| | | <text>修改日期:</text>{{item.修改日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item.关闭人"> |
| | | <text>关闭人:</text>{{item.关闭人}} |
| | | </view> |
| | | <view class="detail" v-if="item.关闭日期"> |
| | | <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="more" v-if="showDetail == index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0">已到底</view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | bottomBtnTop: 0, |
| | | listTableTop: 0, |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | // 新增字段 |
| | | mouldId: 0, |
| | | hform: { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | }, |
| | | sWhere: '', |
| | | listData: [], |
| | | showDetail: -1, |
| | | listHeight: 0, // 动态计算列表高度 |
| | | safeAreaInsets: {} // 安全区域信息 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | |
| | | // 获取安全区域信息 |
| | | try { |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.safeAreaInsets = systemInfo.safeAreaInsets || { |
| | | top: 0, |
| | | bottom: 0 |
| | | }; |
| | | } catch (e) { |
| | | console.error('获取安全区域失败:', e); |
| | | this.safeAreaInsets = { |
| | | top: 0, |
| | | bottom: 0 |
| | | }; |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 动态计算列表高度 |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | this.calculateListHeight(); |
| | | }, 100); |
| | | }); |
| | | }, |
| | | onReady() { |
| | | this.calculateListHeight(); |
| | | }, |
| | | onResize() { |
| | | this.calculateListHeight(); |
| | | }, |
| | | methods: { |
| | | // 计算列表区域的高度 |
| | | calculateListHeight() { |
| | | const query = uni.createSelectorQuery().in(this); |
| | | query.select('.form-container').boundingClientRect(data => { |
| | | if (data) { |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | const windowHeight = systemInfo.windowHeight; |
| | | const formHeight = data.height; |
| | | // 计算剩余可用高度,减去表单区域的高度 |
| | | this.listHeight = windowHeight - formHeight - (this.safeAreaInsets.bottom || 0); |
| | | } |
| | | }).exec(); |
| | | }, |
| | | getList() { |
| | | // console.log(this.sWhere) |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleListPDA', |
| | | data: { |
| | | sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName') |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.listData = res.data.data |
| | | uni.hideLoading() |
| | | } else { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //选择单据日期 |
| | | BenginHCreateDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.BenginHCreateDate = e.detail.value |
| | | }, |
| | | //选择单据日期 |
| | | EndHCreateDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.EndHCreateDate = e.detail.value |
| | | }, |
| | | search() { |
| | | this.sWhere = '' |
| | | if (this.mouldId && this.mouldId != 0) { |
| | | this.sWhere += " and HInterID = " + this.mouldId; |
| | | } |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HCreateBy) { |
| | | this.sWhere += " and 制单人 like '%" + this.hform.HCreateBy + "%'"; |
| | | } |
| | | if (this.hform.BenginHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.BenginHCreateDate + "'"; |
| | | } |
| | | if (this.hform.EndHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.EndHCreateDate + "'"; |
| | | } |
| | | |
| | | this.getList() |
| | | }, |
| | | clear() { |
| | | this.sWhere = '' |
| | | this.showDetail = -1, |
| | | this.hform = { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | }, |
| | | this.search() |
| | | }, |
| | | choose(item) { |
| | | var data = { |
| | | //点检规程单据号 |
| | | HMouldDotCheckRuleNo: item.单据号, |
| | | //模具档案id |
| | | HMouldID: item.HInterID, |
| | | //点检规程id |
| | | HMouldDotCheckRuleID: item.hmainid, |
| | | } |
| | | |
| | | // 修改这里:使用事件通道返回数据给父页面 |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('selectedPlanData', data); |
| | | |
| | | // 关闭当前页面 |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | close() { |
| | | // 关闭当前页面 |
| | | uni.navigateBack(); |
| | | }, |
| | | }, |
| | | onLoad(options) { |
| | | // 接收传递的参数 |
| | | if (options.mouldId) { |
| | | this.mouldId = options.mouldId; |
| | | } |
| | | // 根据模具ID自动查询相关点检规程 |
| | | this.search(); |
| | | // 获取事件通道,用于页面间通信 |
| | | if (this.getOpenerEventChannel) { |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | |
| | | // 监听页面关闭事件(如果需要从父页面关闭当前页面) |
| | | eventChannel.on('closePage', () => { |
| | | uni.navigateBack(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | width: 100%; |
| | | height: 100vh; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: relative; |
| | | } |
| | | |
| | | // 表单容器,包含查询条件和按钮 |
| | | .form-container { |
| | | flex-shrink: 0; |
| | | background-color: #fff; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .form { |
| | | width: 100%; |
| | | padding: 20rpx 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 12rpx 0; |
| | | margin-bottom: 10rpx; |
| | | |
| | | .title { |
| | | width: 180rpx; |
| | | flex-shrink: 0; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 16rpx 20rpx; |
| | | font-size: 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | |
| | | // 按钮容器 |
| | | .buttons-container { |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .buttons { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 20rpx 0; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | color: #fff; |
| | | margin: 0 15rpx; |
| | | } |
| | | } |
| | | |
| | | // 列表容器,使用滚动视图 |
| | | .list-container { |
| | | flex: 1; |
| | | width: 100%; |
| | | -webkit-overflow-scrolling: touch; |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 130rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .over { |
| | | text-align: center; |
| | | padding: 40rpx 0; |
| | | color: #999; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | background-color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | background-color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | background-color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | background-color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | background-color: #888; |
| | | } |
| | | |
| | | /* 适配不同屏幕尺寸 */ |
| | | @media screen and (max-width: 360px) { |
| | | .form { |
| | | padding: 20rpx 20rpx; |
| | | } |
| | | |
| | | .form-item { |
| | | font-size: 26rpx; |
| | | padding: 10rpx 0; |
| | | |
| | | .title { |
| | | width: 160rpx; |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | button { |
| | | width: 160rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-size: 26rpx; |
| | | margin: 0 10rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /* 确保在iOS上输入框不会被键盘遮挡 */ |
| | | .form-item input, |
| | | .form-item .right { |
| | | max-height: 100rpx; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | |
| | | ], |
| | | // itemData: [{ |
| | | // img: '../../static/icon/icon1.png', |
| | | // text: '设备档案', |
| | | // url: '/pages/shebeidangan/table', |
| | | // id: 1 |
| | | // }, { |
| | | // img: '../../static/icon/icon8.png', |
| | | // text: '设备履历', |
| | | // url: '/pages/shebeilvli/table', |
| | | // id: 0, |
| | | // }, { |
| | | // img: '../../static/icon/icon2.png', |
| | | // text: '设备保养计划单', |
| | | // url: '/pages/baoyangjihua/table', |
| | | // id: 2 |
| | | // }, { |
| | | // img: '../../static/icon/icon3.png', |
| | | // text: '设备保养记录单', |
| | | // url: '/pages/baoyangjilu/table', |
| | | // id: 3 |
| | | // }, { |
| | | // img: '../../static/icon/icon4.png', |
| | | // text: '设备点检计划单', |
| | | // url: '', |
| | | // id: 4 |
| | | // }, { |
| | | // img: '../../static/icon/icon5.png', |
| | | // text: '设备点检记录单', |
| | | // url: '', |
| | | // id: 5, |
| | | // }, { |
| | | // img: '../../static/icon/icon6.png', |
| | | // text: '设备故障登记表', |
| | | // url: '/pages/guzhangdengji/table', |
| | | // id: 6 |
| | | // }, { |
| | | // img: '../../static/icon/icon7.png', |
| | | // text: '设备维修记录单', |
| | | // url: '/pages/shebeiweixiu/table', |
| | | // id: 7, |
| | | // // },{ |
| | | // // img:'../../static/icon/icon8.png', |
| | | // // text:'设备履历', |
| | | // // url:'/pages/shebeilvli/table', |
| | | // // id:8, |
| | | // }, { |
| | | // img: '../../static/icon/icon9.png', |
| | | // text: '工序进站接收单', |
| | | // url: '/pages/gongxuIn/table', |
| | | // id: 9, |
| | | // }, { |
| | | // img: '../../static/icon/icon10.png', |
| | | // text: '工序出站汇报单', |
| | | // url: '/pages/gongxuOut/table', |
| | | // id: 10, |
| | | // }, { |
| | | // img: '../../static/icon/icon11.png', |
| | | // text: '工序委外发出单', |
| | | // url: '/pages/weiwaigxIn/table', |
| | | // id: 11, |
| | | // }, { |
| | | // img: '../../static/icon/icon12.png', |
| | | // text: '工序委外接收单', |
| | | // url: '/pages/weiwaigxOut/table', |
| | | // id: 12, |
| | | // // }, { |
| | | // // img: '../../static/icon/icon13.png', |
| | | // // text: '设备管理', |
| | | // // url: '/pages/shebeiguanli/table', |
| | | // // id: 13, |
| | | // }, { |
| | | // img: '../../static/icon/icon14.png', |
| | | // text: '报工平台', |
| | | // url: '/pages/baogong/table', |
| | | // id: 14, |
| | | // }, { |
| | | // img: '../../static/icon/icon15.png', |
| | | // text: '异常反馈单', |
| | | // url: '/pages/yichang/table', |
| | | // id: 15, |
| | | // }, { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '异常反馈处理单', |
| | | // url: '/pages/yichang/list', |
| | | // id: 16, |
| | | // }, { |
| | | // img: '../../static/icon/icon17.png', |
| | | // text: '采购入库', |
| | | // url: '/pages/caigouruku/table', |
| | | // id: 17, |
| | | // }, { |
| | | // img: '../../static/icon/icon18.png', |
| | | // text: '采购退料', |
| | | // url: '/pages/caigoutuiliao/table', |
| | | // id: 18, |
| | | // }, { |
| | | // img: '../../static/icon/icon19.png', |
| | | // text: '销售出库', |
| | | // url: '/pages/xiaoshouchuku/table', |
| | | // id: 19, |
| | | // }, { |
| | | // img: '../../static/icon/icon20.png', |
| | | // text: '销售退货', |
| | | // url: '/pages/xiaoshoutuihuo/table', |
| | | // id: 20, |
| | | // }, { |
| | | // img: '../../static/icon/icon21.png', |
| | | // text: '收料通知单', |
| | | // url: '/pages/shouliaotongzhi/table', |
| | | // id: 21, |
| | | // },{ |
| | | // img: '../../static/icon/icon30.png', |
| | | // text: '生产领料校验', |
| | | // url: '/pages/shengchanlingliao/table', |
| | | // id: 30, |
| | | // },{ |
| | | // img: '../../static/icon/icon31.png', |
| | | // text: '生产入库校验', |
| | | // url: '/pages/shengchanruku/table', |
| | | // id: 31, |
| | | // },{ |
| | | // img: '../../static/icon/icon32.png', |
| | | // text: '生产调拨校验', |
| | | // url: '/pages/shengchandiaobo/table', |
| | | // id: 32, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '标签打印', |
| | | // url: '/pages/labelPrinter/index', |
| | | // id: 22, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '设备运行状态', |
| | | // url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai', |
| | | // id: 23, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '模具运行状态', |
| | | // url: '/pages/mujvzhuangtai/mujvzhuangtai', |
| | | // id: 24, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '条码拆码', |
| | | // url: '/pages/tiaomachaima/tiaomachaima', |
| | | // id: 25, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '其他入库', |
| | | // url: '/pages/qitaruku/qitaruku', |
| | | // id: 26, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '其他出库', |
| | | // url: '/pages/qitachuku/qitachuku', |
| | | // id: 27, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '来料条码打印', |
| | | // url: '/pages/tiaomadaying/tiaomadaying', |
| | | // id: 28, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '上模单', |
| | | // url: '/pages/MJGL/shangmudan/table', |
| | | // id: 29, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '采购订单', |
| | | // url: '/pages/caigoudingdan/caigoudingdan', |
| | | // id: 30, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '其他出库校验', |
| | | // url: '/pages/qitachukujiaoyan/qitachukujiaoyan', |
| | | // id: 31, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '生产补料校验', |
| | | // url: '/pages/shengchanbuliaojiaoyan/CacheList', |
| | | // id: 32, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '销售出库校验', |
| | | // url: '/pages/xiaoshouchukujiaoyan/table', |
| | | // id: 33, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '委外领料校验', |
| | | // url: '/pages/weiwailingliaojiaoyan/table', |
| | | // id: 34, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '采购入库校验', |
| | | // url: '/pages/caigourukujiaoyan/table', |
| | | // id: 35, |
| | | // }, |
| | | |
| | | // { |
| | | // img: '../../static/icon/icon16.png', |
| | | // text: '委外补料校验', |
| | | // url: '/pages/weiwaibuliaojiaoyan/Kf_EntrustReplenishOutBill_CheckList', |
| | | // id: 37, |
| | | // }, |
| | | // { |
| | | // img: '../../static/icon/icon17.png', |
| | | // text: '生产领料', |
| | | // url: '/pages/shengchanlingliaoshengdan/Kf_MateOutBillList', |
| | | // id: 38, |
| | | // }, |
| | | // ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | img: '../../static/icon/icon16.png', |
| | | text: '分步式调入单缓存', |
| | | url: '/pages/fenbushidiaorudan/table', |
| | | id: 28, |
| | | id: 24, |
| | | hidden: false, |
| | | }, |
| | | { |
| | |
| | | text: '工序进站接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuIn/Cj_StationInBillList', |
| | | id: 2, |
| | | id: 25, |
| | | hidden: false, |
| | | }, |
| | | { |
| | |
| | | text: '工序出站汇报单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/gongxuOut/Cj_StationOutBillList', |
| | | id: 4, |
| | | id: 26, |
| | | hidden: false, |
| | | }, |
| | | { |
| | |
| | | text: '工序委外发出单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxIn/Cj_StationEntrustInBillList', |
| | | id: 6, |
| | | id: 27, |
| | | hidden: false, |
| | | }, |
| | | { |
| | |
| | | text: '工序委外接收单列表', |
| | | tip: '查看列表', |
| | | url: '/pages/weiwaigxOut/Cj_StationEntrustOutBillList', |
| | | id: 8, |
| | | id: 28, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单列表", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList", |
| | | "id": 51, |
| | | "id": 29, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具调拨单列表", |
| | | "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "id": 51, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单列表", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "id": 50, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "模具点检记录单列表", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList", |
| | | "id": 47, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "模具保养记录单列表", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList", |
| | | "id": 48, |
| | | "id": 30, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单列表", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "id": 49, |
| | | "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/weixiujilu/mouldRepairRecordBillList", |
| | | "id": 39, |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记列表", |
| | | "url": "/pages/qijvguzhangdengji/mouldMistake", |
| | | "id": 37, |
| | | "id": 38, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "首件检验单列表", |
| | | "url": "/pages/ZLGL/shoujianjianyan/firstCheckBillList", |
| | | "id": 41, |
| | | "id": 39, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "巡检检验单列表", |
| | | "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBillList", |
| | | "id": 43, |
| | | "id": 40, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "末件检验单列表", |
| | | "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList", |
| | | "id": 45, |
| | | "id": 41, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "来料检验列表", |
| | | "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBillList", |
| | | "id": 54, |
| | | "id": 42, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "全检检验单列表", |
| | | "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList", |
| | | "id": 55, |
| | | "id": 43, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "车间自检单列表", |
| | | "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList", |
| | | "id": 55, |
| | | "id": 44, |
| | | "hidden": false |
| | | }, |
| | | // 标签条码相关 |
| | |
| | | "img": "../../static/icon/icon3.png", |
| | | "text": "设备保养记录单列表", |
| | | "url": "/pages/baoyangjilu/Sb_EquipMaintainRuleList", |
| | | "id": 27, |
| | | "id": 45, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon6.png", |
| | | "text": "设备故障登记表列表", |
| | | "url": "/pages/guzhangdengji/EqpConkBookBillList", |
| | | "id": 28, |
| | | "id":46, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon7.png", |
| | | "text": "设备维修记录单列表", |
| | | "url": "/pages/shebeiweixiu/SbEqpMaintenanceBillList", |
| | | "id": 29, |
| | | "id": 47, |
| | | "hidden": false |
| | | }, |
| | | |
| | |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "异常反馈单列表", |
| | | "url": "/pages/yichang/MESExecptFeedBackBillList", |
| | | "id": 30, |
| | | "url": "/pages/yichang/ErrMsgBackHandleBillList", |
| | | "id": 48, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon16.png", |
| | | "text": "异常反馈处理单列表", |
| | | "url": "/pages/yichang/MESExecptFeedBackBillList", |
| | | "id": 31, |
| | | "url": "/pages/yichang/ErrMsgBackHandleBillList", |
| | | "id": 49, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 库存查询相关 |
| | | |
| | | |
| | | // 取样还样相关 |
| | |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "取样单列表", |
| | | "url": "/pages/quyangdan/TakeSampleCheckBillList", |
| | | "id": 33, |
| | | "id": 50, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "还样单列表", |
| | | "url": "/pages/huanyangdan/BackSampleCheckBillList", |
| | | "id": 34, |
| | | "id": 51, |
| | | "hidden": false |
| | | }, |
| | | |
| | | // 模具相关 |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "上模单列表", |
| | | "url": "/pages/MJGL/shangmudan/MouldUpperBillList", |
| | | "id": 35, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "下模单列表", |
| | | "url": "/pages/MJGL/xiamodan/MouldLowerBillList", |
| | | "id": 36, |
| | | "hidden": false |
| | | }, |
| | | |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "在库检验单缓存", |
| | | "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBillList", |
| | | "id": 57, |
| | | "id": 53, |
| | | "hidden": false |
| | | } |
| | | |
| | |
| | | text: '模具状态分析', |
| | | tip: '查看详情', |
| | | url: '/pages/mujvzhuangtai/mujvzhuangtai', |
| | | id: 15, |
| | | id: 1, |
| | | hidden: false, |
| | | |
| | | }, |
| | |
| | | img: '../../static/icon/icon8.png', |
| | | text: '模具档案查询', |
| | | url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`, |
| | | id: 36, |
| | | id: 2, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '器具寿命', |
| | | text: '模具寿命', |
| | | url: '/pages/shoujishouming/table', |
| | | id: 17, |
| | | id: 3, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记单", |
| | | "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1", |
| | | "id": 38, |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录单", |
| | | "url": "/pages/weixiujilu/mouldRepairRecordBill", |
| | | "id": 40, |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修验收单", |
| | | "url": "/pages/weixiujilu/mouldRepairRecordBill", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具点检记录单", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img":"../../static/icon/icon8.png", |
| | | "text": "模具保养记录单", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "id": 49, |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill", |
| | | "id": 50, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "id": 50, |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '上模单', |
| | | url: `/pages/MJGL/shangmudan/MouldUpperBill`, |
| | | id: 37, |
| | | id: 11, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '下模单', |
| | | url: `/pages/MJGL/xiamodan/MouldLowerBill`, |
| | | id: 12, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "id": 13, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon1.png', |
| | | text: '设备档案查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeidangan/Gy_EquipFileMainBillList', |
| | | id: 9, |
| | | id: 14, |
| | | hidden: true, |
| | | }, |
| | | { |
| | |
| | | text: '设备履历查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeilvli/EquipFileBillResume', |
| | | id: 10, |
| | | id: 15, |
| | | hidden: true, |
| | | }, |
| | | { |
| | |
| | | text: '设备运行状态', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai', |
| | | id: 14, |
| | | id: 16, |
| | | hidden: true, |
| | | }, |
| | | { |
| | |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备保养记录单", |
| | | "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill", |
| | | "id": 53, |
| | | "id": 17, |
| | | "hidden": false |
| | | }, |
| | | { |
| | |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备点检记录单", |
| | | "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill", |
| | | "id": 55, |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |
| | | { |
| | |
| | | HMaterModel:'', |
| | | HCusModel:'', |
| | | HCusMaterName:'', |
| | | HEmpID:getUserInfo()['Czybm'], |
| | | HEmpID:getUserInfo()['HEmpID'], |
| | | HEmpNumber:uni.getStorageSync("HEmpNumber"), |
| | | HEmpName:getUserInfo()['Czymc'], |
| | | HGroupID:0, |