设备、模具保养任务 今日改为近七日 增加对应的下推任务
模具、设备维修任务 增加下推按钮 三个待派工(故障单的负责人)、待维修(故障单的维修人)、待验收(故障单发现人)
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "2.0.65", |
| | | "versionCode" : 265, |
| | | "versionName" : "2.0.66", |
| | | "versionCode" : 266, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == item.hmainid"> |
| | | <button class="op1" v-if="activeTab == 0" size="mini" plain @tap.stop="pushBill(0,item)">下推保养单</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | |
| | | activeTab: 0, |
| | | |
| | | tabs: [{ |
| | | label: '今日待保养', |
| | | label: '近日待保养', |
| | | type: 0, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '今日已保养', |
| | | label: '近日已保养', |
| | | type: 1, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '今日全部任务', |
| | | label: '近日全部任务', |
| | | type: 2, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | }, |
| | | |
| | | dateRangePicker: ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"], |
| | | curDateGap: "今天", |
| | | curDateGap: "近七天", |
| | | enableCustomDateRange: false, |
| | | startDate: dayjs(new Date()).format('YYYY-MM-DD'), |
| | | startDate: dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD'), |
| | | endDate: dayjs(new Date()).format('YYYY-MM-DD'), |
| | | HBillNo: '', |
| | | |
| | |
| | | // #endif |
| | | }, |
| | | methods: { |
| | | pushBill(currTab, item) { |
| | | let Query = `?operationType=4&HBarCode=${item['设备代码']}` |
| | | if(currTab == 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill' + Query |
| | | }) |
| | | } |
| | | }, |
| | | goTop: function(e) { |
| | | // 解决view层不同步的问题 |
| | | this.scrollTop = this.old.scrollTop |
| | |
| | | }, |
| | | |
| | | clear() { |
| | | this.curDateGap = "今天" |
| | | this.curDateGap = "近7天" |
| | | this.enableCustomDateRange = false |
| | | this.startDate = dayjs(new Date()).format('YYYY-MM-DD') |
| | | this.startDate = dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD') |
| | | this.endDate = dayjs(new Date()).format('YYYY-MM-DD') |
| | | this.HBillNo = '' |
| | | }, |
| | |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == item.hmainid"> |
| | | <button class="op1" v-if="activeTab == 0" size="mini" plain |
| | | @tap.stop="pushBill(0,item)">下推保养单</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | |
| | | activeTab: 0, |
| | | |
| | | tabs: [{ |
| | | label: '今日待保养', |
| | | label: '近日待保养', |
| | | type: 0, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '今日已保养', |
| | | label: '近日已保养', |
| | | type: 1, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '今日全部任务', |
| | | label: '近日全部任务', |
| | | type: 2, |
| | | count: 0, |
| | | listData: [], // 添加这个 |
| | |
| | | }, |
| | | |
| | | dateRangePicker: ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"], |
| | | curDateGap: "今天", |
| | | curDateGap: "近七天", |
| | | enableCustomDateRange: false, |
| | | startDate: dayjs(new Date()).format('YYYY-MM-DD'), |
| | | startDate: dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD'), |
| | | endDate: dayjs(new Date()).format('YYYY-MM-DD'), |
| | | HBillNo: '', |
| | | |
| | |
| | | } |
| | | }, |
| | | }, |
| | | onLoad() { |
| | | onShow() { |
| | | this.onSearchClickHandler() |
| | | }, |
| | | onPullDownRefresh() { |
| | |
| | | // #endif |
| | | }, |
| | | methods: { |
| | | pushBill(currTab, item) { |
| | | let Query = `?operationType=4&HBarCode=${item['器具编号']}` |
| | | if (currTab == 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill' + Query |
| | | }) |
| | | } |
| | | }, |
| | | goTop: function(e) { |
| | | // 解决view层不同步的问题 |
| | | this.scrollTop = this.old.scrollTop |
| | |
| | | }, |
| | | |
| | | clear() { |
| | | this.curDateGap = "今天" |
| | | this.curDateGap = "近七天" |
| | | this.enableCustomDateRange = false |
| | | this.startDate = dayjs(new Date()).format('YYYY-MM-DD') |
| | | this.startDate = dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD') |
| | | this.endDate = dayjs(new Date()).format('YYYY-MM-DD') |
| | | this.HBillNo = '' |
| | | }, |
| | |
| | | |
| | | get_DisplayPage(sWhere, tabType) { |
| | | CommonUtils.doRequest2({ |
| | | url: '/Sb_EquipMaintainTaskReport/MaintainList_APP', |
| | | url: '/Sc_MouldMaintainTaskReport/MaintainList_APP', |
| | | data: { |
| | | "sWhere": sWhere, |
| | | "user": getUserInfo()["Czymc"], |
| | |
| | | } = res.data |
| | | console.log('res.data: ', res.data) |
| | | |
| | | if (data && data.h_p_Sb_EquipMaintainTaskReport_APP) { |
| | | if (data && data.h_p_Sc_MouldMaintainTaskReport_APP) { |
| | | // 更新待签到页签 |
| | | this.tabs[0].listData = data.h_p_Sb_EquipMaintainTaskReport_APP |
| | | this.tabs[0].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP.length |
| | | this.tabs[0].count = data.h_p_Sb_EquipMaintainTaskReport_APP.length |
| | | this.tabs[0].listData = data.h_p_Sc_MouldMaintainTaskReport_APP |
| | | this.tabs[0].pageMeta.total = data.h_p_Sc_MouldMaintainTaskReport_APP.length |
| | | this.tabs[0].count = data.h_p_Sc_MouldMaintainTaskReport_APP.length |
| | | } |
| | | |
| | | if (data && data.h_p_Sb_EquipMaintainTaskReport_APP1) { |
| | | if (data && data.h_p_Sc_MouldMaintainTaskReport_APP1) { |
| | | // 更新待处理页签 |
| | | this.tabs[1].listData = data.h_p_Sb_EquipMaintainTaskReport_APP1 |
| | | this.tabs[1].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP1.length |
| | | this.tabs[1].count = data.h_p_Sb_EquipMaintainTaskReport_APP1.length |
| | | this.tabs[1].listData = data.h_p_Sc_MouldMaintainTaskReport_APP1 |
| | | this.tabs[1].pageMeta.total = data.h_p_Sc_MouldMaintainTaskReport_APP1.length |
| | | this.tabs[1].count = data.h_p_Sc_MouldMaintainTaskReport_APP1.length |
| | | } |
| | | |
| | | if (data && data.h_p_Sb_EquipMaintainTaskReport_APP2) { |
| | | if (data && data.h_p_Sc_MouldMaintainTaskReport_APP2) { |
| | | // 更新待验收页签 |
| | | this.tabs[2].listData = data.h_p_Sb_EquipMaintainTaskReport_APP2 |
| | | this.tabs[2].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP2.length |
| | | this.tabs[2].count = data.h_p_Sb_EquipMaintainTaskReport_APP2.length |
| | | this.tabs[2].listData = data.h_p_Sc_MouldMaintainTaskReport_APP2 |
| | | this.tabs[2].pageMeta.total = data.h_p_Sc_MouldMaintainTaskReport_APP2.length |
| | | this.tabs[2].count = data.h_p_Sc_MouldMaintainTaskReport_APP2.length |
| | | } |
| | | |
| | | |
| | |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3815) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sc_MouldConkBookBill/Sb_MouldConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | console.log('data: ',data); |
| | | if(code == 1) { |
| | | console.log('data: ',data.h_v_Sc_MouldConkBookBillList_Edit); |
| | | let data1 = data.h_v_Sc_MouldConkBookBillList_Edit[0] |
| | | this.hform.HMainSourceBillType = HSourceBillType |
| | | this.HMainSourceBillType = '器具故障登记单' |
| | | this.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HMouldID = data1.HMouldID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HMouldName = data1.产品模具 |
| | | this.hform.HMouldModel = data1.产品模具型号 |
| | | this.hform.HMouldSpec = data1.产品模具规格 |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | // 下推 |
| | | // 下推 |
| | | let { |
| | | HSourceBillType, |
| | | HInterID, |
| | | HBillNo |
| | | } = e |
| | | // 下推 |
| | | // this.enableEdit = false; |
| | | // this.enableSourceBillEdit = false; |
| | | // this.showHMainSourceBillType = false; |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | |
| | | this.HDetailList[0].HSourceBillNo = this.hform.HMainSourceBillNo |
| | | |
| | | let sSubStr = JSON.stringify(this.HDetailList); |
| | | let sMainSub = oMain + ';' + sSubStr + `;-1;${this.operationType}` + ';' + getUserInfo()[ |
| | | 'Czymc']; |
| | | let sMainSub = oMain + ';' + sSubStr; |
| | | console.log('sMainSub: ',sMainSub); |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sb_PDA_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", |
| | | data: { |
| | |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3907) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | |
| | | if(code == 1) { |
| | | console.log('data: ',data.h_v_Sb_EquipConkBookBillList_Edit); |
| | | let data1 = data.h_v_Sb_EquipConkBookBillList_Edit[0] |
| | | this.hform.HMainSourceBillType = HSourceBillType |
| | | this.HMainSourceBillType = '设备故障登记单' |
| | | this.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HEquipID = data1.HEquipID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HBarName = data1.设备名称 |
| | | this.hform.HBarModel = data1.设备型号 |
| | | this.hform.HBarSpec = data1.设备规格 |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | let HEquipID = e.HEquipID |
| | | this.getMaxNum() |
| | | this.getEquipFileMain(HEquipID) |
| | | } else if(this.operationType == 5) { |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | // 下推 |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | // 下推 |
| | | let HBarCode = e.HBarCode |
| | | this.getMaxNum() |
| | | this.GetMessageByBarCode(HBarCode) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if (HSourceBillType == 3907) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sb_EqpRepairWorkBill/GetEquipMatainanceBillBySourceInterID", |
| | | data: { |
| | | user: getUserInfo()["Czymc"], |
| | | HSourceInterID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | code, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | let data1 = data[0] |
| | | this.hform.HEquipID = data[0].HEquipID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarModel = data[0].设备规格 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | |
| | | this.hform.HMainSourceBillNo = data[0]["设备维修记录单"]; |
| | | this.hform.HMainSourceInterID = data[0]["HEquipRepairCheckBillInterID"]; |
| | | this.hform.HMainSourceEntryID = data[0]["HEquipRepairCheckBillEntryID"]; |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | async submit() { |
| | | let valid = this.ValidCheck() |
| | | if (!valid.state) { |
| | |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | this.enableEdit = false; |
| | | this.enableSourceBillEdit = false; |
| | | // 下推 |
| | | let { |
| | | HSourceBillType, |
| | | HInterID, |
| | | HBillNo |
| | | } = e |
| | | // 下推 |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | |
| | | </view> |
| | | <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> |
| | | <!-- 源单单据列表弹窗 --> |
| | | <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType" |
| | | <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="HBillType" |
| | | :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> |
| | | </BillListPopupEquipConkBookBillVue> |
| | | </view> |
| | |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3907) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | |
| | | if(code == 1) { |
| | | console.log('data: ',data.h_v_Sb_EquipConkBookBillList_Edit); |
| | | let data1 = data.h_v_Sb_EquipConkBookBillList_Edit[0] |
| | | this.hform.HMainSourceBillType = HSourceBillType |
| | | this.HMainSourceBillType = '设备故障登记单' |
| | | this.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HEquipID = data1.HEquipID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HBarName = data1.设备名称 |
| | | this.hform.HBarModel = data1.设备型号 |
| | | this.hform.HBarSpec = data1.设备规格 |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | this.enableEdit = false; |
| | | this.enableSourceBillEdit = false; |
| | | this.showHMainSourceBillType = false; |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | // 下推 |
| | | // this.enableEdit = false; |
| | | // this.enableSourceBillEdit = false; |
| | | // this.showHMainSourceBillType = false; |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.getHDeptList() |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待维修</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">已维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">全部任务</view> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待派工</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">待维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">待验收</view> |
| | | </view> |
| | | |
| | | <!-- 设备维修任务列表列表 --> |
| | | <view class="list" v-for="(item,index) in reportBillsDisplay" :key="index"> |
| | | <uni-card :title="item.故障登记单号" :extra="`日期: ${dayjs(item.设备故障日期).format('YYYY-MM-DD')}`" style="margin: 10px;"> |
| | | <uni-card :title="item.故障登记单号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" :key="index"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" |
| | | :key="index"> |
| | | <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}} |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail == index && operations != 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="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index && operations != 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="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="op" v-if="operations == index"> |
| | | <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> --> |
| | | <!-- <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> --> |
| | | <button class="op3" size="mini" v-if="tabs == 0" plain @tap.stop="pushBill(0, item)">下推派工单</button> |
| | | <button class="op3" size="mini" v-if="tabs == 1" plain @tap.stop="pushBill(1, item)">下推维修单</button> |
| | | <button class="op3" size="mini" v-if="tabs == 2" plain @tap.stop="pushBill(2, item)">下推验收单</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | dayjs, |
| | | CommonUtils, |
| | | tabs: 0, |
| | | showDetail: -1, |
| | | operations: -1, |
| | | |
| | | reportBillsDisplay: [], |
| | | reportBillsAwaitRepair: [], // 待维修 |
| | | reportBillsRepaired: [], // 已维修 |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | pushBill(tab, item) { |
| | | console.log('item: ', item); |
| | | let Query = `&HBillNo=${item['故障登记单号']}&HInterID=${item['HInterID']}&HSourceBillType=3907` |
| | | if (tab == 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill?operationType=4' + |
| | | Query |
| | | }) |
| | | } else if (tab == 1) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill?operationType=5' + Query |
| | | }) |
| | | } else if (tab == 2) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill?operationType=4' + |
| | | Query |
| | | }) |
| | | } |
| | | }, |
| | | switchTab(tabIndex) { |
| | | this.tabs = tabIndex |
| | | switch (tabIndex) { |
| | |
| | | async getRepairList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sb_EquipRepairTaskReport/RepairList', |
| | | url: '/Sb_EquipRepairCheckTaskReport/RepairCheckList2', |
| | | data: { |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | this.reportBillsAwaitRepair = data.h_p_Sb_EquipRepairTaskReport |
| | | this.reportBillsRepaired = data.h_p_Sb_EquipRepairTaskReport1 |
| | | this.reportBillsAll = data.h_p_Sb_EquipRepairTaskReport2 |
| | | this.reportBillsAwaitRepair = data.h_p_Sb_EquipRepairCheckTaskReport_2 |
| | | this.reportBillsRepaired = data.h_p_Sb_EquipRepairCheckTaskReport_21 |
| | | this.reportBillsAll = data.h_p_Sb_EquipRepairCheckTaskReport_22 |
| | | |
| | | let fieldList = CommonUtils.fieldListFilterRole({ |
| | | ExcludeKeys: ['故障登记单号', '设备故障日期'], |
| | | ExcludeKeys: ['故障登记单号'], |
| | | FieldList: list |
| | | }) |
| | | |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss"; |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 26rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 150rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | color: #888; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | async onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | | this.OperationType = e.OperationType || 1 |
| | | if(operationType == 1) { |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | this.RoadBillMain(e.HInterID) |
| | |
| | | this.getNewData() |
| | | this.HSourceBillNoFocus = true |
| | | this.refreshBarCodeState() |
| | | } |
| | | |
| | | }else if(operationType == 5) { |
| | | // 单据下推 |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.InitConkType() |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3815) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sc_MouldConkBookBill/Sb_MouldConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | console.log('data: ',data); |
| | | if(code == 1) { |
| | | console.log('data: ',data.h_v_Sc_MouldConkBookBillList_Edit); |
| | | let data1 = data.h_v_Sc_MouldConkBookBillList_Edit[0] |
| | | this.hform.HMainSourceBillType = HSourceBillType |
| | | this.HMainSourceBillType = '器具故障登记单' |
| | | this.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HMouldID = data1.HMouldID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HMouldName = data1.产品模具 |
| | | this.hform.HMouldModel = data1.产品模具型号 |
| | | this.hform.HMouldSpec = data1.产品模具规格 |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3815) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sc_MouldConkBookBill/Sb_MouldConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | console.log('data: ',data); |
| | | if(code == 1) { |
| | | console.log('data: ',data.h_v_Sc_MouldConkBookBillList_Edit); |
| | | let data1 = data.h_v_Sc_MouldConkBookBillList_Edit[0] |
| | | this.hform.HMainSourceBillType = HSourceBillType |
| | | this.HMainSourceBillType = '器具故障登记单' |
| | | this.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HMouldID = data1.HMouldID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HMouldName = data1.产品模具 |
| | | this.hform.HMouldModel = data1.产品模具型号 |
| | | this.hform.HMouldSpec = data1.产品模具规格 |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | // 下推 |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | // 下推 |
| | | // this.enableEdit = false; |
| | | // this.enableSourceBillEdit = false; |
| | | // this.showHMainSourceBillType = false; |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | |
| | | } |
| | | |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待维修</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">已维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">全部任务</view> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待派工</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">待维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">待验收</view> |
| | | </view> |
| | | |
| | | <!-- 设备维修任务列表列表 --> |
| | | <view class="list" v-for="(item,index) in reportBillsDisplay" :key="index"> |
| | | <uni-card :title="item.故障登记单号" :extra="`日期: ${dayjs(item.器具故障日期).format('YYYY-MM-DD')}`" style="margin: 10px;"> |
| | | <uni-card :title="item.故障登记单号" :extra="`日期: ${dayjs(item.器具故障日期).format('YYYY-MM-DD')}`" |
| | | style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" :key="index"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" |
| | | :key="index"> |
| | | <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}} |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail == index && operations != 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="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index && operations != 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="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="op" v-if="operations == index"> |
| | | <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> --> |
| | | <!-- <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> --> |
| | | <button class="op3" size="mini" v-if="tabs == 0" plain @tap.stop="pushBill(0, item)">下推派工单</button> |
| | | <button class="op3" size="mini" v-if="tabs == 1" plain @tap.stop="pushBill(1, item)">下推维修单</button> |
| | | <button class="op3" size="mini" v-if="tabs == 2" plain @tap.stop="pushBill(2, item)">下推验收单</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | dayjs, |
| | | CommonUtils, |
| | | tabs: 0, |
| | | showDetail: -1, |
| | | operations: -1, |
| | | |
| | | reportBillsDisplay: [], |
| | | reportBillsAwaitRepair: [], // 待维修 |
| | | reportBillsRepaired: [], // 已维修 |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | pushBill(tab, item) { |
| | | console.log('item: ',item); |
| | | let Query = `&HBillNo=${item['故障登记单号']}&HInterID=${item['HInterID']}&HSourceBillType=3815` |
| | | if(tab == 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill?operationType=4' + Query |
| | | }) |
| | | }else if(tab == 1) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill?operationType=5' + Query |
| | | }) |
| | | }else if(tab == 2) { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill?operationType=4' + Query |
| | | }) |
| | | } |
| | | }, |
| | | switchTab(tabIndex) { |
| | | this.tabs = tabIndex |
| | | switch (tabIndex) { |
| | |
| | | async getRepairList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sc_MouldRepairTaskReport/RepairList', |
| | | url: 'Sc_MouldRepairCheckTaskReport/RepairCheckList2', |
| | | data: { |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | this.reportBillsAwaitRepair = data.h_p_Sc_MouldRepairTaskReport |
| | | this.reportBillsRepaired = data.h_p_Sc_MouldRepairTaskReport1 |
| | | this.reportBillsAll = data.h_p_Sc_MouldRepairTaskReport2 |
| | | this.reportBillsAwaitRepair = data.h_p_Sc_MouldRepairTaskReport_2 |
| | | this.reportBillsRepaired = data.h_p_Sc_MouldRepairTaskReport_21 |
| | | this.reportBillsAll = data.h_p_Sc_MouldRepairTaskReport_22 |
| | | |
| | | let fieldList = CommonUtils.fieldListFilterRole({ |
| | | ExcludeKeys: ['故障登记单号', '器具故障日期'], |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss"; |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 26rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 150rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | color: #888; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | 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) == "" ? |
| | | 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.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.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; |
| | |
| | | getEditData(hmainid) { |
| | | // 主表数据 |
| | | uni.request({ |
| | | url: CommonUtils.getServerUrl() + '/Sc_MouldMaintainBill/Sc_MouldMaintainBillListCheckDetai', |
| | | url: CommonUtils.getServerUrl() + |
| | | '/Sc_MouldMaintainBill/Sc_MouldMaintainBillListCheckDetai', |
| | | data: { |
| | | HID: hmainid |
| | | }, |
| | |
| | | HMaintainLevName: data.保养级别名称 || "", |
| | | HQty: data.数量 || 1, |
| | | HMaker: data.制单人 || getUserInfo()['Czymc'], |
| | | HMakeDate: data.制单日期 ? data.制单日期.substr(0, 10) : dayjs(new Date()).format( |
| | | HMakeDate: data.制单日期 ? data.制单日期.substr(0, 10) : dayjs(new Date()) |
| | | .format( |
| | | "YYYY-MM-DD"), |
| | | HUpDater: data.修改人 || "", |
| | | HUpDateDate: data.修改日期 ? data.修改日期.substr(0, 10) : "", |
| | |
| | | this.getEditData(e.hmainid) |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | // 下推 |
| | | let HBarCode = e.HBarCode |
| | | this.getMaxNum() |
| | | if (HBarCode) { |
| | | this.GetMessageByBarCode(HBarCode) |
| | | } |
| | | |
| | | } |
| | | }, |
| | |
| | | }, |
| | | //仓库监听事件 |
| | | HWHNameChange(e) { |
| | | console.log('e: ',e); |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i]["HName"] == e) { |
| | | this.hform.HWHName = this.HWHNameList[i]["HName"] |
| | |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | this.HWHNameChange(data[0]['HName']) |
| | | } |
| | | }, |
| | | ) |
| | |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.121:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.89.27:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.88.82:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '手工录入', |
| | | arrayHMainSourceBillType: ['入库申请单', '手工录入'], |
| | | arrayHMainSourceBillValue: [1241, -1], |
| | | // arrayHMainSourceBillType: ['入库申请单', '手工录入'], |
| | | // arrayHMainSourceBillValue: [1241, -1], |
| | | arrayHMainSourceBillType: ['手工录入'], |
| | | arrayHMainSourceBillValue: [-1], |
| | | linterid: '', |
| | | HBillNo: '', |
| | | btnType: 0, //0新增,1修改,2审核,3反审核 |