diff --git a/sgzb-ui/src/api/scrap/forecastWaste.js b/sgzb-ui/src/api/scrap/forecastWaste.js index 932f9fc5..67ea629b 100644 --- a/sgzb-ui/src/api/scrap/forecastWaste.js +++ b/sgzb-ui/src/api/scrap/forecastWaste.js @@ -27,7 +27,7 @@ export const submitScrapApi = (data) => { /* 报废列表 */ export const getScrapListApi = (data) => { - return request.post('/material/scrap/scrapTaskReviewList', data) + return request.get('/material/scrap/scrapTaskReviewList', { params: data }) } /* 报废审核接口 */ @@ -37,10 +37,11 @@ export const auditingScrapApi = (data) => { /* 处置列表接口 */ export const getDispositionListApi = (data) => { - return request.post('/material/scrap/obtainDisposalList', data) + return request.get('/material/scrap/obtainDisposalList', { params: data }) } /* 处置发送接口 */ export const submitDispositionApi = (data) => { return request.post('/material/scrap/obtainDisposal', data) } + diff --git a/sgzb-ui/src/components/FormModel/index.vue b/sgzb-ui/src/components/FormModel/index.vue index 06c8cc7e..742b699c 100644 --- a/sgzb-ui/src/components/FormModel/index.vue +++ b/sgzb-ui/src/components/FormModel/index.vue @@ -42,6 +42,7 @@ :options="item.f_selList" :props="item.optionProps" :show-all-levels="false" + @change="casCadeChange" clearable style="width: 240px" /> @@ -86,6 +87,12 @@ return [] }, }, + routerParams: { + type: String, + default: () => { + return null + }, + }, }, data() { return { @@ -98,6 +105,12 @@ this.$set(this.queryParams, e.f_model, '') }) }, + mounted() { + this.queryParams.keyword = this.routerParams + if (this.queryParams.keyword) { + this.$emit('queryList', this.queryParams) + } + }, methods: { /* 查询按钮 */ handleQuery() { @@ -108,6 +121,10 @@ this.$refs.queryForm.resetFields() this.$emit('queryList', this.queryParams, 'reset') }, + /* 级联选择框的change事件 */ + casCadeChange(val) { + this.queryParams.type = val[val.length - 1] + }, }, } diff --git a/sgzb-ui/src/components/TableModel/index.vue b/sgzb-ui/src/components/TableModel/index.vue index 9af0289d..1a05cc31 100644 --- a/sgzb-ui/src/components/TableModel/index.vue +++ b/sgzb-ui/src/components/TableModel/index.vue @@ -3,6 +3,7 @@ @@ -19,6 +20,10 @@ ref="tableRef" select-on-indeterminate @selection-change="handleSelectionChange" + v-loading="loading" + element-loading-text="数据正在加载,请稍后" + element-loading-spinner="el-icon-loading" + element-loading-background="rgba(0, 0, 0, 0.6)" > - + diff --git a/sgzb-ui/src/views/claimAndRefund/return/returnApply.vue b/sgzb-ui/src/views/claimAndRefund/return/returnApply.vue index ac6e128b..a5bd8405 100644 --- a/sgzb-ui/src/views/claimAndRefund/return/returnApply.vue +++ b/sgzb-ui/src/views/claimAndRefund/return/returnApply.vue @@ -118,7 +118,12 @@ - 退料申请 @@ -563,470 +568,471 @@ diff --git a/sgzb-ui/src/views/claimAndRefund/returnScrap/config.js b/sgzb-ui/src/views/claimAndRefund/returnScrap/config.js new file mode 100644 index 00000000..eed82bc4 --- /dev/null +++ b/sgzb-ui/src/views/claimAndRefund/returnScrap/config.js @@ -0,0 +1,110 @@ +import { + getUnitInfoSelectApi, + listPartTypeApi, +} from '@/api/repairTest/repair' +import { getProjectList } from '@/api/claimAndRefund/receive' + +let unitList = [] +let proList = [] +let typeList = [] + +export const config = { + handleColShow: true, // 是否显示操作列 + pageShow: true, // 是否显示分页组件 + isSelShow: true,// 表格是否需要复选框 + isFormShow: true, // 是否显示表单查询组件 + handleWidth: '160px', // 操作列宽度 + formLabel: [ + { f_label: '关键字', f_model: 'keyword', f_type: 'ipt' }, + { f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] }, + { f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] }, + { f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } }, + { f_label: '预报废单号', f_model: 'scrapNum', f_type: 'ipt', }, + { + f_label: '退料状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [ + { label: '待提交', value: 124 }, + { label: '审核中', value: 58 }, + { label: '已驳回', value: 61 }, + { label: '已通过', value: 59 }, + ] + }, + { f_label: '创建时间', f_model: 'time', f_type: 'date' }, + ], + columnsList: [ + { t_width: '55px', t_props: '', t_label: '序号' }, + { t_props: 'scrapNum', t_label: '预报废单号' }, + { t_props: 'scrapNum', t_label: '退料单号' }, + { t_props: 'repairNum', t_label: '单位名称' }, + { t_props: 'repairNum', t_label: '工程名称' }, + { t_props: 'itemType', t_label: '机具类型' }, + { t_props: 'createBy', t_label: '任务创建人' }, + { t_props: 'createTime', t_label: '任务创建时间' }, + { t_props: 'createTime', t_label: '审批状态' }, + { t_props: 'createTime', t_label: '驳回原因' }, + { t_props: '', t_label: '审核状态', t_slot: 'type' }, + ], + routerParams: '' +} + +export const dialogConfig = { + outerWidth: '70%', + outerTitle: '', + outerVisible: false, + innerWidth: '50%', + innerTitle: '', + innerVisible: false, + handleColShow: false, // 是否显示操作列 + pageShow: false, // 是否显示分页组件 + isSelShow: false,// 表格是否需要复选框 + isFormShow: true, // 是否显示表单查询组件 + formLabel: [ + { f_label: '类型名称', f_model: 'keywords', f_type: 'ipt' }, + ], + columnsList: [ + { t_width: '55px', t_props: '', t_label: '序号' }, + { t_width: '', t_props: 'machineTypeName', t_label: '设备类型' }, + { t_width: '', t_props: 'specificationType', t_label: '规格型号' }, + { t_width: '', t_props: 'maCode', t_label: '设备编码' }, + { t_width: '', t_props: 'scrapNum', t_label: '设备数量' }, + { t_width: '', t_props: 'remark', t_label: '报废原因' }, + { t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' }, + ], + +} + +export const getSelList = () => { + new Promise(async (resolve) => { + const { data: unitRes } = await getUnitInfoSelectApi() + unitList = unitRes.map((e) => { + e.value = e.unitId + e.label = e.unitName + return e + }) + const { data: proRes } = await getProjectList() + proList = proRes.map((e) => { + e.value = e.projectId + e.label = e.projectName + return e + }) + const { data: typeRes } = await listPartTypeApi() + typeList = typeRes + resolve() + }).then(() => { + config.formLabel.map((item) => { + if (item.f_model === 'backUnit') { + item.f_selList = unitList + return item + } + if (item.f_model === 'backPro') { + item.f_selList = proList + return item + } + if (item.f_model === 'type') { + item.f_selList = typeList + return item + } + }) + }).catch(() => { + + }) +} diff --git a/sgzb-ui/src/views/claimAndRefund/returnScrap/index.vue b/sgzb-ui/src/views/claimAndRefund/returnScrap/index.vue new file mode 100644 index 00000000..c8f0dd29 --- /dev/null +++ b/sgzb-ui/src/views/claimAndRefund/returnScrap/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/sgzb-ui/src/views/index.vue b/sgzb-ui/src/views/index.vue index 72d16ed2..17da6efe 100644 --- a/sgzb-ui/src/views/index.vue +++ b/sgzb-ui/src/views/index.vue @@ -315,6 +315,26 @@ taskTypeId: 41, routerPath: 'repairTest/repair/repair', }, + /* 维修审核 */ + { + taskTypeId: 45, + routerPath: 'repairTest/repair/repair', + }, + /* 修试入库任务 */ + { + taskTypeId: 50, + routerPath: 'store/warehousing/repairWarehousing', + }, + /* 修试入库任务 */ + { + taskTypeId: 57, + routerPath: 'scrap/manage/scrapAuditing', + }, + /* 修试入库任务 */ + { + taskTypeId: 67, + routerPath: 'store/newBuy/newAccessoryList', + }, ], /* 催办弹框 */ @@ -373,6 +393,7 @@ * 列表查看操作=========================================================== */ handlePreview(id, key) { + console.log(id, 'key---', key) const [routerInfo] = this.previewRouterList.filter( (e) => e.taskTypeId == id, ) diff --git a/sgzb-ui/src/views/repairTest/repair/index.vue b/sgzb-ui/src/views/repairTest/repair/index.vue index 73694adf..47e70068 100644 --- a/sgzb-ui/src/views/repairTest/repair/index.vue +++ b/sgzb-ui/src/views/repairTest/repair/index.vue @@ -644,7 +644,7 @@ export default { repairTitle: '查看', } }, - created() { + created() { getUnitInfoSelectApi().then((res) => { this.unitInfoSelectList = res.data }) @@ -656,8 +656,8 @@ export default { }) }, mounted() { - this.getTree() this.getList() + this.getTree() }, methods: { onClose() { @@ -745,6 +745,7 @@ export default { this.dateRange = [] this.queryParams.backUnit = '' this.queryParams.backPro = '' + this.queryParams.keyword = '' this.resetForm('queryForm') this.$refs.mychildSon.inputValue = '' this.handleQuery() @@ -1073,6 +1074,18 @@ export default { .catch(() => {}) }, }, + watch: { + $route: { + handler(to) { + if (to.query.keyWord) { + this.queryParams.keyword = to.query.keyWord + this.getList() + } + }, + deep: true, + immediate:true + }, + }, } diff --git a/sgzb-ui/src/views/scrapManage/component/dialogModel.vue b/sgzb-ui/src/views/scrapManage/component/dialogModel.vue deleted file mode 100644 index beb15e87..00000000 --- a/sgzb-ui/src/views/scrapManage/component/dialogModel.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/sgzb-ui/src/views/scrapManage/component/formModel.vue b/sgzb-ui/src/views/scrapManage/component/formModel.vue deleted file mode 100644 index 5c1eb711..00000000 --- a/sgzb-ui/src/views/scrapManage/component/formModel.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - - - diff --git a/sgzb-ui/src/views/scrapManage/component/scrapSource.vue b/sgzb-ui/src/views/scrapManage/component/scrapSource.vue new file mode 100644 index 00000000..5cdfd0ce --- /dev/null +++ b/sgzb-ui/src/views/scrapManage/component/scrapSource.vue @@ -0,0 +1,20 @@ + + + diff --git a/sgzb-ui/src/views/scrapManage/component/tableModel.vue b/sgzb-ui/src/views/scrapManage/component/tableModel.vue deleted file mode 100644 index a07b7471..00000000 --- a/sgzb-ui/src/views/scrapManage/component/tableModel.vue +++ /dev/null @@ -1,247 +0,0 @@ - - - - - diff --git a/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/config.js b/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/config.js index de041702..e63ed903 100644 --- a/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/config.js +++ b/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/config.js @@ -5,6 +5,8 @@ import { } from '@/api/repairTest/repair' import { getProjectList } from '@/api/claimAndRefund/receive' +import { getTypeList } from '@/api/store/warehousing' + let unitList = [] let proList = [] let typeList = [] @@ -68,7 +70,7 @@ export const dialogConfig = { isSelShow: false,// 表格是否需要复选框 isFormShow: true, // 是否显示表单查询组件 formLabel: [ - { f_label: '类型名称', f_model: 'keywords', f_type: 'sel' }, + { f_label: '类型名称', f_model: 'keywords', f_type: 'sel', f_selList: [], selLabel: 'typeName', selValue: 'typeId' }, ], columnsList: [ @@ -121,3 +123,12 @@ export const getSelList = () => { }) } + +export const getTypeListSel = async () => { + const { data: res } = await getTypeList({ level: '3' }) + dialogConfig.formLabel[0].f_selList = res.map((e) => { + e.value = e.typeId + e.label = e.typeName + return e + }) +} diff --git a/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/index.vue b/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/index.vue index 449e97d9..0a64f8c8 100644 --- a/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/index.vue +++ b/sgzb-ui/src/views/scrapManage/forecastWaste/auditing/index.vue @@ -21,9 +21,7 @@