测试问题修改 并新增维修报废 退料报废两个静态页面

This commit is contained in:
BianLzhaoMin 2024-05-16 14:16:49 +08:00
parent 8f71e98681
commit 7e1dd910f2
25 changed files with 2453 additions and 1899 deletions

View File

@ -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]
},
},
}
</script>

View File

@ -3,6 +3,7 @@
<!-- 查询表单 -->
<FormModel
:formLabel="config.formLabel"
:routerParams="config.routerParams"
@queryList="queryList"
v-if="config.isFormShow"
>

View File

@ -8,9 +8,9 @@
v-show="showSearch"
label-width="80px"
>
<el-form-item label="关键字" prop="keyword">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyword"
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
@ -474,7 +474,7 @@ export default {
time: [],
unitId: null,
proId: null,
keyword: '',
keyWord: '',
types: 2,
pageNum: 1,
@ -531,6 +531,7 @@ export default {
}
},
created() {
this.queryParams.keyWord = this.$route.query?.keyWord
this.GetUserInfo()
// this.getList();
@ -552,7 +553,7 @@ export default {
const params = {
unitId: this.queryParams.unitId,
projectId: this.queryParams.proId,
keyWord: this.queryParams.keyword,
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
types: this.queryParams.types,
@ -621,6 +622,7 @@ export default {
resetQuery() {
this.queryParams.time = []
this.resetForm('queryForm')
this.queryParams.keyWord = ''
this.GetUnitData()
this.GetProData()
this.handleQuery()
@ -735,17 +737,6 @@ export default {
})
},
},
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
}
</script>

View File

@ -118,7 +118,12 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain size="mini" @click="handleAdd" v-hasPermi="['return:review']"
<el-button
type="primary"
plain
size="mini"
@click="handleAdd"
v-hasPermi="['return:review']"
>退料申请</el-button
>
</el-col>
@ -563,470 +568,471 @@
</template>
<script>
import { listPartTypeApi } from '@/api/repairTest/repair'
import {
ApiGetBackApplyList,
getViewByApply,
backApplyDelApi,
submitBackApplyApi,
} from '@/api/claimAndRefund/return.js'
import { getInfo, h } from '@/api/login'
import {
getUnitData,
getProData,
getAgreementInfoById,
// getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogForm.vue'
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
name: '',
dicts: ['sys_normal_disable'],
components: { dialogForm, Tree },
data() {
return {
fullscreenLoading: false,
type: '',
isShowOneFlag: false,
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: '',
//
open: false,
//
dateRange: [],
deptList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
unitId: '', //id
lotId: '', //id
taskStatus: '', //
typeId: '', //
time: '',
agreementCode: '', //
startTime: '',
endTime: '',
proId: '',
},
dialogQueryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
rules: {
dictName: [
import { listPartTypeApi } from '@/api/repairTest/repair'
import {
ApiGetBackApplyList,
getViewByApply,
backApplyDelApi,
submitBackApplyApi,
} from '@/api/claimAndRefund/return.js'
import { getInfo, h } from '@/api/login'
import {
getUnitData,
getProData,
getAgreementInfoById,
// getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogForm.vue'
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
name: '',
dicts: ['sys_normal_disable'],
components: { dialogForm, Tree },
data() {
return {
fullscreenLoading: false,
type: '',
isShowOneFlag: false,
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: '',
//
open: false,
//
dateRange: [],
deptList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
unitId: '', //id
lotId: '', //id
taskStatus: '', //
typeId: '', //
time: '',
agreementCode: '', //
startTime: '',
endTime: '',
proId: '',
},
dialogQueryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
rules: {
dictName: [
{
required: true,
message: '字典名称不能为空',
trigger: 'blur',
},
],
dictType: [
{
required: true,
message: '字典类型不能为空',
trigger: 'blur',
},
],
},
openOne: false,
openTwo: false,
openTextOne: '',
openTextTwo: '',
openTextThree: '',
companyId: '',
deptOptions: [],
unitList: [],
proList: [],
taskStatusList: [
{
required: true,
message: '字典名称不能为空',
trigger: 'blur',
name: '待退料审核',
id: '37',
},
{
name: '退料审核通过',
id: '38',
},
{
name: '退料核查中',
id: '39',
},
{
name: '退料完成',
id: '40',
},
{
name: '退料审核驳回',
id: '101',
},
],
dictType: [
{
required: true,
message: '字典类型不能为空',
trigger: 'blur',
},
],
},
openOne: false,
openTwo: false,
openTextOne: '',
openTextTwo: '',
openTextThree: '',
companyId: '',
deptOptions: [],
unitList: [],
proList: [],
taskStatusList: [
{
name: '待退料审核',
id: '37',
},
{
name: '退料审核通过',
id: '38',
},
{
name: '退料核查中',
id: '39',
},
{
name: '退料完成',
id: '40',
},
{
name: '退料审核驳回',
id: '101',
},
],
rowObj: {},
loadingType: '',
loadingTotal: 0,
loadingList: [],
}
},
created() {
// this.getList();
this.initSelectData()
this.InitIGetInfo()
this.getTree()
},
methods: {
getTree() {
listPartTypeApi().then((response) => {
// console.log('🚀 ~ listPartTypeApi ~ response:', response);
this.deptList = response.data
})
},
selectDrop(value) {
this.queryParams.typeId = value
},
/** 查询字典类型列表 startTime,结束日期endTime */
async getList() {
this.loading = true
if (this.queryParams.time && this.queryParams.time.length > 0) {
this.queryParams.startTime = this.queryParams.time[0]
this.queryParams.endTime = this.queryParams.time[1]
rowObj: {},
loadingType: '',
loadingTotal: 0,
loadingList: [],
}
try {
let params = {
// companyId: this.companyId,
...this.queryParams,
}
const res = await ApiGetBackApplyList(params)
this.typeList = res.data.rows
this.total = res.data.total
this.loading = false
} catch (error) {}
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = null
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
created() {
// this.getList();
this.initSelectData()
this.handleQuery()
this.InitIGetInfo()
this.getTree()
},
/** 新增按钮操作 */
handleAdd() {
// this.reset();
// // this.open = true;
// // this.title = "";
this.$tab.closeOpenPage('/claimAndRefund/return/returnApplyAdd')
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.dictId)
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/return/returnApplyAdd',
query: {
Id: row.id,
isEdit: true,
},
})
},
// 退
handleUpdateOrder() {
this.title = '查看'
this.isShowOneFlag = true
},
//
handleSubmit() {
this.title = '确认操作'
this.openTextOne = '确认提交申请么?'
this.openTextTwo = '确认提交申请么?'
this.openOne = true
},
submitOpenOneForm() {
this.openTextThree = '提交成功!'
this.openTwo = true
},
/** 提交按钮 */
submitForm: function () {
this.$refs['queryForm1'].validate((valid) => {
if (valid) {
let backApplyInfo = []
for (let i = 0; i < this.loadingList.length; i++) {
this.loadingList[i].companyId = this.companyId
}
backApplyInfo.push({
backPerson: '张三',
phone: '1234578988',
remark: '1425备注',
backTime: '2023-12-14',
// backPerson: this.dialogQueryParams.backPerson,
// phone: this.dialogQueryParams.phone,
// remark: this.dialogQueryParams.remark,
// backTime: this.dialogQueryParams.backTime,
companyId: this.companyId,
})
let params = {
companyId: this.companyId,
agreementId: this.rowObj.agreementId,
backApplyInfo: JSON.stringify(backApplyInfo),
backApplyDetails: JSON.stringify(this.loadingList),
}
console.log('param----', params)
submitBackApplyApi(params).then((res) => {})
// if (this.form.dictId != undefined) {
// updateType(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addType(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
} else {
methods: {
getTree() {
listPartTypeApi().then((response) => {
// console.log('🚀 ~ listPartTypeApi ~ response:', response);
this.deptList = response.data
})
},
selectDrop(value) {
this.queryParams.typeId = value
},
/** 查询字典类型列表 startTime,结束日期endTime */
async getList() {
this.loading = true
if (this.queryParams.time && this.queryParams.time.length > 0) {
this.queryParams.startTime = this.queryParams.time[0]
this.queryParams.endTime = this.queryParams.time[1]
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
let param = {
id: row.id + '',
}
this.$modal
.confirm('是否确认删除所选择的数据项?')
.then(() => {
return backApplyDelApi(param)
})
.then(() => {
this.getList()
// this.$modal.msgSuccess('');
this.$message.success('操作成功!')
})
.catch(() => {
// this.$modal.msgError('');
})
},
handlePrint(row) {
this.isShowOneFlag = true
this.rowObj = row
},
handleSee(row, type) {
this.dialogQueryParams.unitName = row.unitName
this.dialogQueryParams.lotName = row.lotName
this.dialogQueryParams.agreementCode = row.agreementCode
this.dialogQueryParams.backPerson = row.backPerson
this.dialogQueryParams.phone = row.phone
this.dialogQueryParams.backTime = row.backTime + ''
this.$set(this.dialogQueryParams, 'keyWord', '')
this.loadingType = type
this.rowObj = row
this.open = true
this.getDialogList()
},
handlUpdate(row, type) {
this.loadingType = type
this.rowObj = row
this.open = true
this.getDialogList()
},
try {
let params = {
// companyId: this.companyId,
...this.queryParams,
}
const res = await ApiGetBackApplyList(params)
this.typeList = res.data.rows
this.total = res.data.total
this.loading = false
} catch (error) {}
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = null
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.queryParams.keyWord = ''
this.initSelectData()
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
// this.reset();
// // this.open = true;
// // this.title = "";
this.$tab.closeOpenPage('/claimAndRefund/return/returnApplyAdd')
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.dictId)
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/return/returnApplyAdd',
query: {
Id: row.id,
isEdit: true,
},
})
},
// 退
handleUpdateOrder() {
this.title = '查看'
this.isShowOneFlag = true
},
//
handleSubmit() {
this.title = '确认操作'
this.openTextOne = '确认提交申请么?'
this.openTextTwo = '确认提交申请么?'
this.openOne = true
},
submitOpenOneForm() {
this.openTextThree = '提交成功!'
this.openTwo = true
},
/** 提交按钮 */
submitForm: function () {
this.$refs['queryForm1'].validate((valid) => {
if (valid) {
let backApplyInfo = []
for (let i = 0; i < this.loadingList.length; i++) {
this.loadingList[i].companyId = this.companyId
}
backApplyInfo.push({
backPerson: '张三',
phone: '1234578988',
remark: '1425备注',
backTime: '2023-12-14',
// backPerson: this.dialogQueryParams.backPerson,
// phone: this.dialogQueryParams.phone,
// remark: this.dialogQueryParams.remark,
// backTime: this.dialogQueryParams.backTime,
companyId: this.companyId,
})
let params = {
companyId: this.companyId,
agreementId: this.rowObj.agreementId,
backApplyInfo: JSON.stringify(backApplyInfo),
backApplyDetails: JSON.stringify(this.loadingList),
}
console.log('param----', params)
submitBackApplyApi(params).then((res) => {})
// if (this.form.dictId != undefined) {
// updateType(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addType(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
} else {
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
let param = {
id: row.id + '',
}
this.$modal
.confirm('是否确认删除所选择的数据项?')
.then(() => {
return backApplyDelApi(param)
})
.then(() => {
this.getList()
// this.$modal.msgSuccess('');
this.$message.success('操作成功!')
})
.catch(() => {
// this.$modal.msgError('');
})
},
handlePrint(row) {
this.isShowOneFlag = true
this.rowObj = row
},
/** 导出按钮操作 */
handleExport() {
this.download(
'material/backApply/export',
{
...this.queryParams,
},
`退料申请单_${new Date().getTime()}.xlsx`,
)
},
getDialogList() {
let params = {
id: this.rowObj.id,
agreementId: this.rowObj.agreementId,
keyWord: this.dialogQueryParams.keyWord,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
}
getViewByApply(params).then((res) => {
console.log(res)
this.loadingList = res.data.rows
/* this.loadingList.forEach(item=>{
handleSee(row, type) {
this.dialogQueryParams.unitName = row.unitName
this.dialogQueryParams.lotName = row.lotName
this.dialogQueryParams.agreementCode = row.agreementCode
this.dialogQueryParams.backPerson = row.backPerson
this.dialogQueryParams.phone = row.phone
this.dialogQueryParams.backTime = row.backTime + ''
this.$set(this.dialogQueryParams, 'keyWord', '')
this.loadingType = type
this.rowObj = row
this.open = true
this.getDialogList()
},
handlUpdate(row, type) {
this.loadingType = type
this.rowObj = row
this.open = true
this.getDialogList()
},
/** 导出按钮操作 */
handleExport() {
this.download(
'material/backApply/export',
{
...this.queryParams,
},
`退料申请单_${new Date().getTime()}.xlsx`,
)
},
getDialogList() {
let params = {
id: this.rowObj.id,
agreementId: this.rowObj.agreementId,
keyWord: this.dialogQueryParams.keyWord,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
}
getViewByApply(params).then((res) => {
console.log(res)
this.loadingList = res.data.rows
/* this.loadingList.forEach(item=>{
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
item.useNum = res.data
})
})*/
this.loadingTotal = res.data.total
})
},
InitIGetInfo() {
getInfo().then((res) => {
this.companyId = res.user.companyId
this.getList()
})
},
handleNodeClick(ev) {
console.log(ev)
},
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {}
const res = await getUnitData(params)
this.unitList = res.data
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
},
// ID
async InitGetAgreementInfoById() {
const { unitId, proId } = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId,
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById()
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
handleQuery1() {
this.getDialogList()
},
resetQuery1() {
this.dialogQueryParams.keyWord = ''
this.getDialogList()
},
},
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
this.loadingTotal = res.data.total
})
},
InitIGetInfo() {
getInfo().then((res) => {
this.companyId = res.user.companyId
this.getList()
})
},
handleNodeClick(ev) {
console.log(ev)
},
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {}
const res = await getUnitData(params)
this.unitList = res.data
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
},
// ID
async InitGetAgreementInfoById() {
const { unitId, proId } = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId,
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById()
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
handleQuery1() {
this.getDialogList()
},
resetQuery1() {
this.dialogQueryParams.keyWord = ''
this.getDialogList()
},
deep: true,
immediate: true,
},
},
}
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
}
</script>
<style lang="scss" scoped>
.submit_box {
display: flex;
justify-content: flex-start;
align-items: center;
.submit_box_title {
.submit_box {
display: flex;
flex-direction: column;
margin-left: 15px;
justify-content: flex-start;
align-items: center;
:first-child {
font-size: 14px;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 15px;
:first-child {
font-size: 14px;
font-weight: 600;
}
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 30%;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
}
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 30%;
.submit_box_title {
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.dialog-footer {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
justify-content: flex-end;
align-items: center;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
align-items: center;
}
</style>

View File

@ -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(() => {
})
}

View File

@ -0,0 +1,62 @@
<template>
<!-- 退料报废页面 -->
<div class="app-container">
<TableModel :config="config">
<template slot="export">
<el-row :gutter="10" class="mb8">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
>导出数据</el-button
>
</el-row>
</template>
<!-- 列表操作栏 -->
<template slot="handle" slot-scope="{ data }">
<el-button size="mini" type="text" @click="handlePreview(data)">
查看
</el-button>
<el-button
size="mini"
type="text"
@click="handleRepair(data)"
>
申请退料
</el-button>
</template>
</TableModel>
</div>
</template>
<script>
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import { config, dialogConfig, getSelList } from './config.js'
export default {
components: {
TableModel,
DialogModel,
},
data() {
return {
config,
dialogConfig,
getSelList,
}
},
created() {
this.getSelList()
},
methods:{
/* 查看 */
handlePreview() {},
/* 维修 */
handleRepair() {}
}
}
</script>
<style></style>

View File

@ -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,
)

View File

@ -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
},
},
}
</script>
<style lang="scss" scoped>

View File

@ -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(() => {
})
}

View File

@ -0,0 +1,62 @@
<template>
<!-- 维修报废页面 -->
<div class="app-container">
<TableModel :config="config">
<template slot="export">
<el-row :gutter="10" class="mb8">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
>导出数据</el-button
>
</el-row>
</template>
<!-- 列表操作栏 -->
<template slot="handle" slot-scope="{ data }">
<el-button size="mini" type="text" @click="handlePreview(data)">
查看
</el-button>
<el-button
size="mini"
type="text"
@click="handleRepair(data)"
>
维修
</el-button>
</template>
</TableModel>
</div>
</template>
<script>
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import { config, dialogConfig, getSelList } from './config.js'
export default {
components: {
TableModel,
DialogModel,
},
data() {
return {
config,
dialogConfig,
getSelList,
}
},
created() {
this.getSelList()
},
methods:{
/* 查看 */
handlePreview() {},
/* 维修 */
handleRepair() {}
}
}
</script>
<style></style>

View File

@ -1,84 +0,0 @@
<template>
<div>
<el-dialog
:width="width"
:title="title"
:visible.sync="dialogVisible"
:before-close="handleClose"
append-to-body
>
<slot></slot>
<slot name="preview"></slot>
<slot name="handleBtn"></slot>
<!-- 内层对话框 -->
<el-dialog
:title="innerTitle"
:width="innerWidth"
:visible.sync="innerDialogVisible"
:before-close="handleCloseInner"
append-to-body
>
<slot name="innerContent"></slot>
<slot name="innerHandleBtn"></slot>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
default: () => {
return ''
},
},
innerTitle: {
type: String,
default: () => {
return ''
},
},
dialogVisible: {
type: Boolean,
default: () => {
return false
},
},
innerDialogVisible: {
type: Boolean,
default: () => {
return false
},
},
width: {
type: String,
default: () => {
return '70%'
},
},
innerWidth: {
type: String,
default: () => {
return '30%'
},
},
},
methods: {
/* 右上角关闭外层 */
handleClose() {
/* 通知父组件更改弹框显示值 */
this.$emit('closeDialog', false)
},
/* 右上角关闭内层 */
handleCloseInner() {
/* 通知父组件更改弹框显示值 */
this.$emit('closeDialogInner', false)
},
},
}
</script>
<style></style>

View File

@ -1,133 +0,0 @@
<template>
<!-- 查询表单 -->
<div>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="100px"
>
<el-form-item
v-for="(item, v) in formLabel"
:key="v"
:label="item.f_label"
:prop="item.f_model"
>
<el-input
v-if="item.f_type === 'ipt'"
v-model="queryParams[item.f_model]"
:placeholder="`请输入${item.f_label}`"
clearable
style="width: 240px"
/>
<el-select
v-if="item.f_type === 'sel'"
v-model="queryParams[item.f_model]"
clearable
filterable
style="width: 240px"
:placeholder="`请选择${item.f_label}`"
>
<el-option
v-for="(sel, v) in item.f_selList"
:key="v"
:label="sel.label"
:value="sel.value"
/>
</el-select>
<el-cascader
v-if="item.f_type === 'selCas'"
:options="item.f_selList"
:props="item.optionProps"
:show-all-levels="false"
clearable
style="width: 240px"
/>
<el-date-picker
v-if="item.f_type === 'date'"
v-model="queryParams[item.f_model]"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
type="warning"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" v-if="exportShow">
<slot></slot>
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
>导出数据</el-button
>
</el-col> -->
</el-row>
</div>
</template>
<script>
export default {
props: {
formLabel: {
type: Array,
default: () => {
return []
},
},
/* 导出等按钮展示 */
exportShow: {
type: Boolean,
default: () => {
return false
},
},
},
data() {
return {
queryParams: {},
}
},
created() {
this.formLabel.map((e) => {
this.$set(this.queryParams, e.f_model, '')
})
},
methods: {
/* 查询按钮 */
handleQuery() {
console.log('查询')
this.$emit('queryList', this.queryParams)
},
/* 重置按钮 */
resetQuery() {
this.$refs.queryForm.resetFields()
this.$emit('queryList', this.queryParams, 'reset')
},
},
}
</script>
<style></style>

View File

@ -1,247 +0,0 @@
<template>
<div>
<FormModel
:formLabel="formLabel"
@queryList="queryList"
:exportShow="exportShow"
>
<template>
<slot name="submitScrap" />
</template>
</FormModel>
<el-table
:data="tableList"
border
ref="tableRef"
select-on-indeterminate
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="45"
align="center"
v-if="isSelShow"
:selectable="selectable"
/>
<el-table-column
v-for="(item, v) in tableColumCheckProps"
:key="v"
:label="item.t_label"
:prop="item.t_props"
:width="item.t_width"
align="center"
show-overflow-tooltip
>
<template slot-scope="scope">
<template v-if="item.t_slot">
<slot :data="scope.row" :name="item.t_slot"></slot>
</template>
<template v-else>
{{
v === 0
? scope.$index + 1
: scope.row[item.t_props] || '-'
}}
</template>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
v-if="handleColShow"
:width="handleWidth"
>
<template slot-scope="{ row }">
<slot :data="row"></slot>
</template>
<template slot="header">
<el-popover
placement="bottom"
title="筛选列"
width="200"
trigger="click"
>
<span slot="reference" class="handel-text">操作</span>
<div>
<el-checkbox
v-for="(check, index) in columCheckList"
v-show="check.t_label != '序号'"
:key="index"
v-model="check.checked"
>{{ check.t_label }}</el-checkbox
>
</div>
</el-popover>
</template>
</el-table-column>
</el-table>
<pagination
v-if="pageShow"
:total="total"
:page.sync="pageParams.pageNum"
:limit.sync="pageParams.pageSize"
@pagination="queryList"
/>
</div>
</template>
<script>
import FormModel from './formModel.vue'
export default {
components: {
FormModel,
},
props: {
tableProps: {
type: Array,
default: () => {
return []
},
},
formLabel: {
type: Array,
default: () => {
return []
},
},
sendApi: {
type: Function,
default: () => {
return function () {}
},
},
handleColShow: {
type: Boolean,
default: () => {
return true
},
},
exportShow: {
type: Boolean,
default: () => {
return false
},
},
pageShow: {
type: Boolean,
default: () => {
return false
},
},
/* 是否需要复选框 */
isSelShow: {
type: Boolean,
default: () => {
return false
},
},
/* 操作栏宽度 */
handleWidth: {
type: String,
default: () => {
return ''
},
},
/* 额外参数 */
sendParams: {
type: Object,
default: () => {
return {}
},
},
/* 表格是否勾选 */
selectable: {
type: Function,
default: () => {
return true
},
},
},
data() {
return {
total: 0,
tableList: [
{ demo: '123' },
{ demo: '123' },
{ demo: '123' },
{ demo: '123' },
{ demo: '123' },
],
pageParams: {
pageNum: 1,
pageSize: 10,
},
columCheckList: [],
}
},
created() {
this.getList()
this.columCheckList = this.tableProps
this.columCheckList = this.columCheckList.map((e) => {
this.$set(e, 'checked', true)
return e
})
},
computed: {
tableColumCheckProps() {
return this.columCheckList.filter((e) => {
return e.checked != false
})
},
},
methods: {
async queryList(val, reset) {
if (reset) {
this.pageParams.pageNum = 1
this.pageParams.pageSize = 10
}
this.pageParams = Object.assign(
val,
this.pageParams,
this.sendParams,
)
this.pageParams.beginTime = val.time ? val.time[0] : ''
this.pageParams.endTime = val.time ? val.time[1] : ''
this.getList()
},
async getList() {
this.pageParams = Object.assign(
this.pageParams,
this.sendParams,
)
const res = await this.sendApi(this.pageParams)
if (res.code == 200) {
this.tableList = res.rows
this.total = res.total
}
},
/* 表格复选框 */
handleSelectionChange(row) {
console.log(row, '列表复选框')
this.$emit('getTableSelectionChange', row)
},
/* 清除选中状态 */
clearSelType() {
this.$refs.tableRef.clearSelection()
},
},
}
</script>
<style>
.check-all {
margin-bottom: 5px;
cursor: pointer;
}
.handel-text {
cursor: pointer;
}
.handel-text:hover {
text-decoration: underline;
color: #409eff;
}
</style>

View File

@ -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
})
}

View File

@ -163,7 +163,7 @@
<script>
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import { config, dialogConfig, getSelList } from './config'
import { config, dialogConfig, getSelList ,getTypeListSel} from './config'
import {
getForecastWasteListApi,
getDialogListApi,
@ -182,6 +182,7 @@
getDialogListApi,
getForecastWasteListApi,
getSelList,
getTypeListSel,
/* 驳回原因 */
rejectReason: '',
/* 选中的审核数据 */
@ -201,6 +202,7 @@
},
created() {
this.getSelList()
this.getTypeListSel()
},
methods: {
/* 查看 */

View File

@ -4,6 +4,7 @@ import {
listPartTypeApi,
} from '@/api/repairTest/repair'
import { getProjectList } from '@/api/claimAndRefund/receive'
import { getTypeList } from '@/api/store/warehousing'
let unitList = []
let proList = []
@ -121,3 +122,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
})
}

View File

@ -16,12 +16,21 @@
<template slot="export">
<el-row :gutter="10" class="mb8">
<el-button
type="primary"
plain
icon="el-icon-circle-check"
size="mini"
@click="handelSubmitScrap"
>提交报废</el-button
>
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handelSubmitScrap"
>提交报废</el-button
@click="handelExportData"
>导出数据</el-button
>
</el-row>
</template>
@ -104,9 +113,9 @@
>
<template slot="imgPreview">
<ImagePreview
:src="`https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg`"
:width="`60px`"
:height="`60px`"
:src="``"
:width="`30px`"
:height="`30px`"
/>
</template> </TableModel
></template>
@ -145,7 +154,7 @@ import {
getDialogListApi,
submitScrapApi,
} from '@/api/scrap/forecastWaste.js'
import { config, dialogConfig, getSelList } from './config'
import { config, dialogConfig, getSelList,getTypeListSel } from './config'
export default {
name: 'scrapListing',
components: {
@ -165,6 +174,7 @@ export default {
sendParams: {}, //
temp: false,
getSelList,
getTypeListSel,
imgCommonUrl: process.env.VUE_APP_BASE_API + '/system',
/* 提交报废申请参数 */
@ -179,6 +189,7 @@ export default {
created() {
/* 获取表单下拉选数据 */
this.getSelList()
this.getTypeListSel()
},
methods: {
/* 列表按钮操作 */
@ -254,6 +265,10 @@ export default {
closeDialogInner() {
this.dialogConfig.innerVisible = false
},
/* 导出数据 */
handelExportData() {
console.log('数据导出')
}
},
}
</script>

View File

@ -1,3 +1,14 @@
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, // 是否显示分页组件
@ -9,8 +20,13 @@ export const config = {
{ 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: 'laiyuan', f_type: 'ipt', },
{ f_label: '处置状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [] },
{ f_label: '报废单号', f_model: 'scrapNum', f_type: 'ipt', },
{
f_label: '处置状态', f_model: 'disposition', f_type: 'sel', f_selList: [
{ label: '未处置', value: 0 },
{ label: '已处置', value: 1 },
]
},
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
],
columnsList: [
@ -54,3 +70,40 @@ export const dialogConfig = {
}
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(() => {
})
}

View File

@ -154,7 +154,7 @@
} from '@/api/scrap/forecastWaste.js'
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import { config, dialogConfig } from './config.js'
import { config, dialogConfig, getSelList } from './config.js'
export default {
components: {
TableModel,
@ -186,9 +186,12 @@
// },
/* 附件预览地址 */
filePreviewUrl: process.env.VUE_APP_BASE_API + '/system',
getSelList,
}
},
created() {},
created() {
this.getSelList()
},
methods: {
/* 按钮操作 */
handlePreview(row) {

View File

@ -1,3 +1,13 @@
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, // 是否显示分页组件
@ -9,9 +19,22 @@ export const config = {
{ 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: 'laiyuan', f_type: 'ipt', },
{ f_label: '审批状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [] },
{ f_label: '报废类型', f_model: 'taskStatus', f_type: 'sel', f_selList: [] },
{ 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: 'taskStatus', f_type: 'sel', f_selList: [
{ label: '退料', value: 1 },
{ label: '维修', value: 2 },
{ label: '盘点', value: 3 },
]
},
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
],
columnsList: [
@ -26,6 +49,7 @@ export const config = {
{ t_props: 'createTime', t_label: '任务创建时间' },
{ t_props: '', t_label: '审核状态', t_slot: 'type' },
],
routerParams: ''
}
export const dialogConfig = {
@ -53,3 +77,40 @@ export const dialogConfig = {
],
}
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(() => {
})
}

View File

@ -78,9 +78,9 @@
>
<template slot="imgPreview" slot-scope="{ data }">
<ImagePreview
:src="`https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg`"
:width="`60px`"
:height="`60px`"
:src="``"
:width="`30px`"
:height="`30px`"
/>
</template> </TableModel
></template>
@ -149,7 +149,7 @@
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import AuditingDetails from '../../component/auditingDetails.vue'
import { config, dialogConfig } from './config.js'
import { config, dialogConfig,getSelList } from './config.js'
import {
getScrapListApi,
getDialogListApi,
@ -185,9 +185,12 @@
/* 审批详情的列表 */
auditingList: [],
getSelList
}
},
created() {},
created() {
this.getSelList()
},
methods: {
/* 按钮操作 */
handlePreview(row) {
@ -266,11 +269,22 @@
},
/* 审核按钮的显示条件 */
auditingIsShow(row) {
let temp = row.scrapAuditorSetList.some((e) => {
let temp = row.scrapAuditorSetList?.some((e) => {
return e.deptId == this.deptId && e.status == '0'
})
return temp
},
},
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.config.routerParams = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
}
</script>

View File

@ -590,6 +590,7 @@
resetQuery() {
this.queryParams.time = []
this.resetForm('queryForm')
this.queryParams.keyWord = ''
this.handleQuery()
},
/** 新增按钮操作 */

File diff suppressed because it is too large Load Diff

View File

@ -42,11 +42,11 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
// target: `http://10.40.92.13:38080`, //超
target: `http://10.40.92.8:38080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.14:28080`, //福
// target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.253:28080`, //福
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;