diff --git a/src/api/stquery/stquery.js b/src/api/stquery/stquery.js index a3588f28..0bf30e79 100644 --- a/src/api/stquery/stquery.js +++ b/src/api/stquery/stquery.js @@ -104,6 +104,24 @@ export function getOutRecordListApi(query) { }) } + // 待报废详情查询 + export function getToScrapInputListApi(query) { + return request({ + url: '/material/complex_query/getScrapList', + method: 'get', + params: query + }) + } + + // 已审核详情查询 + export function getAuditInputListApi(query) { + return request({ + url: '/material/complex_query/getScrapAuditList', + method: 'get', + params: query + }) + } + // 获取电子标签详情 export function getListTag(query) { return request({ @@ -122,8 +140,14 @@ export function getOutRecordListApi(query) { }) } - - + // 获取一级设备类型下拉框 + export function getOptionListApi(query) { + return request({ + url: '/material/ma_type/getListLevel', + method: 'get', + params: query + }) + } diff --git a/src/views/business/leasePublish/component/homeApply.vue b/src/views/business/leasePublish/component/homeApply.vue index 9ddb6af3..20ec294e 100644 --- a/src/views/business/leasePublish/component/homeApply.vue +++ b/src/views/business/leasePublish/component/homeApply.vue @@ -111,7 +111,146 @@ @pagination="getList" /> + + + + + 打 印 + 查看PDF + 取 消 + + @@ -126,6 +265,7 @@ import { import { getLeasePublishList, } from "@/api/leasePublish/index"; +import { getLeaseTask, getCodePDF } from '@/api/business/index' import vueEasyPrint from "vue-easy-print"; import printJS from 'print-js'; @@ -164,6 +304,19 @@ export default { taskStatus: null, //状态 }, + dialogVisible: false, // 弹框显示 + dialogForm: { + proName: '', // 项目名称 + code: '' // 业务单号 + }, + dialogColumns: [ + { label: '名称', prop: 'maTypeName', width: '150px' }, + { label: '规格', prop: 'typeName', width: '150px' }, + { label: '单位', prop: 'unitName', width: '60px' }, + { label: '数量', prop: 'preNum', width: '60px' }, + { label: '备注', prop: 'remark', width: '' } + ], + dialogList: [] }; }, created() { @@ -296,6 +449,54 @@ export default { } }, + // 获取弹框内容 + async handleLld(row) { + console.log('🚀 ~ getDialogContent ~ row:', row.taskId) + const loading = this.$loading({ + lock: true, + text: '加载中...' + }) + try { + // 获取业务联系单 + const res = await getLeaseTask(row.id) + console.log('🚀 ~ getDialogContent ~ res:', res) + // 获取PDF + const PDFres = await getCodePDF(row.taskId) + console.log('🚀 ~ getDialogContent ~ res:', PDFres) + this.dialogVisible = true + this.dialogForm = { + ...res.data.leaseApplyInfo, + pdfUrl: PDFres.data.url + } + this.dialogList = res.data.leaseApplyDetailsList + loading.close() + } catch (error) { + console.log('🚀 ~ 获取弹框内容 ~ error:', error) + loading.close() + } + }, + // 处理时间格式 2021-09-01 转换为 2021年09月01日 + handleTimeFormat(time) { + if (time) { + return time.replace(/-/g, '年').replace(/-/g, '月') + '日' + } + return '' + }, + + // 打印 + print() { + printJS({ + printable: 'print-content', + type: 'html', // + // targetStyles: ['*'], // 打印的元素样式 + scanStyles: false, // 是否扫描页面样式 + // css: [ + // 'https://unpkg.com/element-ui/lib/theme-chalk/index.css' // Element UI 的样式表 + // ], + maxWidth: '1400' + // 其他配置选项 + }) + }, }, diff --git a/src/views/material/repair/scrapLedgerReview/index.vue b/src/views/material/repair/scrapLedgerReview/index.vue index aa678bc6..15bd99c4 100644 --- a/src/views/material/repair/scrapLedgerReview/index.vue +++ b/src/views/material/repair/scrapLedgerReview/index.vue @@ -282,21 +282,30 @@ export default { // this.$modal.msgError("请选择配件"); // return; // } - - const infos={'idList':this.idList,'taskIdList':this.taskIdList} + let idLstTemp = []; + let taskIdListTemp = []; + idLstTemp = idLstTemp.concat(row.idList); + taskIdListTemp = taskIdListTemp.concat(row.taskIdList); + const infos={'idList':idLstTemp,'taskIdList':taskIdListTemp} this.$modal.confirm('是否确认通过?') .then(function() { return ledgerApprove(infos) }).then(() => { - this.$modal.msgSuccess('入库成功') + this.$modal.msgSuccess('通过成功') this.getTopData(); this.getList() + // 清除表格的选中状态 + this.$refs.multipleTable.clearSelection(); }).catch(() => {}); }, //驳回 reject(row) { this.checkResult = "不合格"; this.confirmShow = true; + this.idList = []; + this.taskIdList = []; + this.idList = this.idList.concat(row.idList); + this.taskIdList = this.taskIdList.concat(row.taskIdList); // this.$modal.confirm('是否确认驳回该配件?') // .then(function() { // return partTypeReject(infos) diff --git a/src/views/material/stquery/deviceOutBound.vue b/src/views/material/stquery/deviceOutBound.vue index 18a385a6..13013eb0 100644 --- a/src/views/material/stquery/deviceOutBound.vue +++ b/src/views/material/stquery/deviceOutBound.vue @@ -57,6 +57,17 @@ placeholder="请选择工程名称" > --> + + + + + + + import { - getOutRecordListApi + getOutRecordListApi,getOptionListApi, } from '@/api/stquery/stquery'; import { getProjectList, @@ -207,8 +218,11 @@ export default { proId: null, typeName: null, //物资名称 typeModelName: null, // - outStyle:null + outStyle:null, + companyId:null, + firstTypeIdList:[] }, + optionList: [] } }, created() { @@ -219,6 +233,7 @@ export default { initSelectData() { this.GetUnitData() this.GetProData() + this.getOptionListApi() }, /** 转换菜单数据结构 */ normalizer(node) { @@ -257,6 +272,17 @@ export default { this.proList = res.data this.queryParams.proId=null }, + async getOptionListApi() { + const res = await getOptionListApi() + if (res.code == 200) { + this.optionList = res.data.map((item) => { + return { + value: item.typeId, + label: item.typeName, + } + } + )} + }, proChange(val){ // if(val&&val.length>0){ // this.queryParams.proId=this.projectId[this.projectId.length - 1] @@ -282,6 +308,7 @@ export default { outStyle: this.queryParams.outStyle, typeName: this.queryParams.typeName, typeModelName: this.queryParams.typeModelName, + firstTypeIdList: this.queryParams.firstTypeIdList, startTime: this.queryParams.time && this.queryParams.time[0], endTime: this.queryParams.time && this.queryParams.time[1], pageSize: this.queryParams.pageSize, @@ -315,6 +342,7 @@ export default { this.queryParams.time=[] this.unitId=[] this.projectId=[] + this.queryParams.firstTypeIdList=[] this.resetForm('queryForm') this.handleQuery() }, diff --git a/src/views/material/stquery/deviceStatusRecord.vue b/src/views/material/stquery/deviceStatusRecord.vue index 1ecff291..c437b77b 100644 --- a/src/views/material/stquery/deviceStatusRecord.vue +++ b/src/views/material/stquery/deviceStatusRecord.vue @@ -127,7 +127,7 @@