提交
This commit is contained in:
parent
a5a25d580b
commit
9952afbe2d
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-table-column class="table-form-col" :align="align" :width="width" :show-overflow-tooltip="showOverflowTooltip">
|
<el-table-column class="table-form-col" :align="align" :width="width" >
|
||||||
<template #header>
|
<template #header>
|
||||||
<span :class="required ? 'required-label' : ''">{{label}}</span>
|
<span :class="required ? 'required-label' : ''">{{label}}</span>
|
||||||
<el-tooltip v-if="!isEmpty(tips)" :content="tips" placement="top">
|
<el-tooltip v-if="!isEmpty(tips)" :content="tips" placement="top">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
:collapse="isCollapse"
|
:collapse="isCollapse"
|
||||||
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
||||||
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
||||||
:unique-opened="true"
|
:unique-opened="false"
|
||||||
:active-text-color="settings.theme"
|
:active-text-color="settings.theme"
|
||||||
:collapse-transition="false"
|
:collapse-transition="false"
|
||||||
mode="vertical"
|
mode="vertical"
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
>
|
>
|
||||||
<el-table-column align="center" label="序号" width="50" type="index"/>
|
<el-table-column align="center" label="序号" width="50" type="index"/>
|
||||||
<table-form-col label="生产车间" :prop-prefix="propPrefix" prop="deptId" required :rules="rules.deptId" width="250">
|
<table-form-col label="生产车间" :prop-prefix="propPrefix" prop="deptId" required :rules="rules.deptId" width="250">
|
||||||
<dept-input slot-scope="d" v-model="d.row.deptId"/>
|
<el-select slot-scope="d" v-model="d.row.deptId" placeholder="请选择生产车间" @change="(val) => {onChangeDept(d.row, val)}">
|
||||||
|
<el-option v-for="dept in deptList" :key="dept.deptId" :label="dept.deptName" :value="dept.deptId"/>
|
||||||
|
</el-select>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="数量" :prop-prefix="propPrefix" prop="num" required :rules="rules.num" width="250">
|
<table-form-col label="数量" :prop-prefix="propPrefix" prop="num" required :rules="rules.num" width="250">
|
||||||
<el-input-number slot-scope="d" v-model="d.row.num" :min="0" controls-position="right" style="width: 100%"/>
|
<el-input-number slot-scope="d" v-model="d.row.num" :min="0" controls-position="right" style="width: 100%"/>
|
||||||
|
@ -19,7 +21,7 @@
|
||||||
<table-form-col label="备注" :prop-prefix="propPrefix" prop="remark">
|
<table-form-col label="备注" :prop-prefix="propPrefix" prop="remark">
|
||||||
<el-input slot-scope="d" v-model="d.row.remark" placeholder="请输入备注" :maxlength="200" show-word-limit />
|
<el-input slot-scope="d" v-model="d.row.remark" placeholder="请输入备注" :maxlength="200" show-word-limit />
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<el-table-column label="操作" align="center" width="160">
|
<el-table-column label="操作" align="center" width="120">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增工序</el-button>
|
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增工序</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -29,13 +31,13 @@
|
||||||
@click="handleChangeSort(d.$index, -1)"
|
@click="handleChangeSort(d.$index, -1)"
|
||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
size="small"
|
size="small"
|
||||||
>上移</el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleChangeSort(d.$index, 1)"
|
@click="handleChangeSort(d.$index, 1)"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="small"
|
size="small"
|
||||||
>下移</el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDel(d.$index, d.row)"
|
@click="handleDel(d.$index, d.row)"
|
||||||
|
@ -61,6 +63,7 @@ import DeptTreeSelect from '@/components/Business/Dept/DeptTreeSelect.vue'
|
||||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
import DeptInput from '@/components/Business/Dept/DeptInput.vue'
|
import DeptInput from '@/components/Business/Dept/DeptInput.vue'
|
||||||
import DeptDialog from '@/components/Business/Dept/DeptDialog.vue'
|
import DeptDialog from '@/components/Business/Dept/DeptDialog.vue'
|
||||||
|
import { isEmpty } from '@/utils/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ProdProcessList",
|
name: "ProdProcessList",
|
||||||
|
@ -82,6 +85,10 @@ export default {
|
||||||
prod: {
|
prod: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
|
},
|
||||||
|
deptList: {
|
||||||
|
type: Array,
|
||||||
|
default: () => ([])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -96,6 +103,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onChangeDept(row, val) {
|
||||||
|
let dept = this.deptList.find(item => item.deptId === val);
|
||||||
|
row.deptName = dept.deptName;
|
||||||
|
this.resetHandleWay();
|
||||||
|
},
|
||||||
// 只允许一个工序是最终工序
|
// 只允许一个工序是最终工序
|
||||||
handleIsEndChange(index) {
|
handleIsEndChange(index) {
|
||||||
this.value.forEach((item, idx) => {
|
this.value.forEach((item, idx) => {
|
||||||
|
@ -111,19 +123,29 @@ export default {
|
||||||
if (this.value == null) {
|
if (this.value == null) {
|
||||||
this.$emit('input', []);
|
this.$emit('input', []);
|
||||||
}
|
}
|
||||||
deptList.forEach(dept => {
|
|
||||||
this.value.push({
|
if (!isEmpty(deptList)) {
|
||||||
id: null,
|
deptList.forEach(dept => {
|
||||||
orderProdId: null,
|
this.value.push({
|
||||||
deptId: dept.deptId,
|
id: null,
|
||||||
num: this.prod.num,
|
orderProdId: null,
|
||||||
isEnd: false,
|
deptId: dept.deptId,
|
||||||
remark: null,
|
num: this.prod.num,
|
||||||
sort: this.getNewSort(),
|
isEnd: false,
|
||||||
});
|
deptName: dept.deptName,
|
||||||
})
|
remark: null,
|
||||||
|
sort: this.getNewSort(),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
this.reorder();
|
||||||
|
}
|
||||||
|
|
||||||
this.showDeptDialog = false;
|
this.showDeptDialog = false;
|
||||||
this.reorder();
|
},
|
||||||
|
// 重置处理方式
|
||||||
|
resetHandleWay() {
|
||||||
|
this.prod.handleWay = this.value.map(item => item.deptName).join('+');
|
||||||
},
|
},
|
||||||
// 删除行
|
// 删除行
|
||||||
handleDel(index, row) {
|
handleDel(index, row) {
|
||||||
|
@ -132,12 +154,14 @@ export default {
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.value.splice(index, 1)
|
this.value.splice(index, 1);
|
||||||
|
this.resetHandleWay();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 重新排序,根据sort字段,从小到大排序
|
// 重新排序,根据sort字段,从小到大排序
|
||||||
reorder() {
|
reorder() {
|
||||||
this.value.sort((a, b) => a.sort - b.sort);
|
this.value.sort((a, b) => a.sort - b.sort);
|
||||||
|
this.resetHandleWay();
|
||||||
},
|
},
|
||||||
handleChangeSort(index, offset) {
|
handleChangeSort(index, offset) {
|
||||||
if (index + offset < 0) {
|
if (index + offset < 0) {
|
||||||
|
|
|
@ -6,15 +6,22 @@
|
||||||
stripe
|
stripe
|
||||||
:header-cell-style="headerCellStyle"
|
:header-cell-style="headerCellStyle"
|
||||||
class="mini-table"
|
class="mini-table"
|
||||||
|
ref="table"
|
||||||
>
|
>
|
||||||
<el-table-column type="expand" width="50" align="left">
|
<el-table-column type="expand" width="20" align="left">
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<div class="expand-container">
|
<div class="expand-container">
|
||||||
<prod-process-list v-model="d.row.processList" :prop-prefix="`prodList[${d.$index}].processList`" :rules="rules.processList" :prod="d.row"/>
|
<prod-process-list
|
||||||
|
v-model="d.row.processList"
|
||||||
|
:prop-prefix="`prodList[${d.$index}].processList`"
|
||||||
|
:rules="rules.processList"
|
||||||
|
:prod="d.row"
|
||||||
|
:dept-list="deptList"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="20" align="center" label="#"/>
|
||||||
<table-form-col label="主图" prop-prefix="prodList" prop="picture" width="80" >
|
<table-form-col label="主图" prop-prefix="prodList" prop="picture" width="80" >
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<hover-show>
|
<hover-show>
|
||||||
|
@ -37,6 +44,9 @@
|
||||||
<el-option v-for="item in dict.type.order_prod_work_type" :key="item.value" :label="item.label" :value="item.value"/>
|
<el-option v-for="item in dict.type.order_prod_work_type" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
|
<table-form-col label="成品" prop-prefix="prodList" prop="isEnd" width="60" tips="成品,表示该产品是成品,订单有且仅有一个成品">
|
||||||
|
<el-checkbox slot-scope="d" :value="d.row.isEnd" @change="handleIsEndChange(d.index)"/>
|
||||||
|
</table-form-col>
|
||||||
<table-form-col label="物料编码" prop-prefix="prodList" prop="materialNo">
|
<table-form-col label="物料编码" prop-prefix="prodList" prop="materialNo">
|
||||||
<template v-slot:content-tip="d">{{d.row.materialNo}}</template>
|
<template v-slot:content-tip="d">{{d.row.materialNo}}</template>
|
||||||
<el-input slot-scope="d" v-model="d.row.materialNo" placeholder="请输入物料编码"/>
|
<el-input slot-scope="d" v-model="d.row.materialNo" placeholder="请输入物料编码"/>
|
||||||
|
@ -45,13 +55,6 @@
|
||||||
<template v-slot:content-tip="d">{{d.row.spec}}</template>
|
<template v-slot:content-tip="d">{{d.row.spec}}</template>
|
||||||
<el-input slot-scope="d" v-model="d.row.spec" placeholder="请输入规格"/>
|
<el-input slot-scope="d" v-model="d.row.spec" placeholder="请输入规格"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="成品" prop-prefix="prodList" prop="isEnd" width="80" tips="成品,表示该产品是成品,订单有且仅有一个成品">
|
|
||||||
<el-checkbox slot-scope="d" :value="d.row.isEnd" @change="handleIsEndChange(d.index)"/>
|
|
||||||
</table-form-col>
|
|
||||||
<table-form-col label="处理方式" prop-prefix="prodList" prop="handleWay" show-overflow-tooltip>
|
|
||||||
<template v-slot:content-tip="d">{{d.row.handleWay}}</template>
|
|
||||||
<el-input slot-scope="d" v-model="d.row.handleWay" placeholder="请输入处理方式"/>
|
|
||||||
</table-form-col>
|
|
||||||
<table-form-col label="效果" prop-prefix="prodList" prop="effect" show-overflow-tooltip>
|
<table-form-col label="效果" prop-prefix="prodList" prop="effect" show-overflow-tooltip>
|
||||||
<template v-slot:content-tip="d">{{d.row.effect}}</template>
|
<template v-slot:content-tip="d">{{d.row.effect}}</template>
|
||||||
<el-input slot-scope="d" v-model="d.row.effect" placeholder="请输入效果"/>
|
<el-input slot-scope="d" v-model="d.row.effect" placeholder="请输入效果"/>
|
||||||
|
@ -68,8 +71,17 @@
|
||||||
<template v-slot:content-tip="d">{{d.row.remark}}</template>
|
<template v-slot:content-tip="d">{{d.row.remark}}</template>
|
||||||
<el-input slot-scope="d" v-model="d.row.remark" placeholder="请输入备注" maxlength="200" show-word-limit type="textarea"/>
|
<el-input slot-scope="d" v-model="d.row.remark" placeholder="请输入备注" maxlength="200" show-word-limit type="textarea"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
|
<table-form-col label="处理方式" prop-prefix="prodList" prop="handleWay" show-overflow-tooltip>
|
||||||
|
<template v-slot:content-tip="d">{{d.row.handleWay}}</template>
|
||||||
|
<!-- <el-input slot-scope="d" v-model="d.row.handleWay" placeholder="请输入处理方式"/> -->
|
||||||
|
<template slot-scope="d">
|
||||||
|
<el-button type="text" size="small" @click="handleExpand(d.row)">
|
||||||
|
{{isEmpty(d.row.handleWay) ? '编辑' : d.row.handleWay}}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</table-form-col>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="160">
|
<el-table-column label="操作" align="center" width="120">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增产品</el-button>
|
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增产品</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -79,13 +91,13 @@
|
||||||
@click="handleChangeSort(d.$index, -1)"
|
@click="handleChangeSort(d.$index, -1)"
|
||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
size="small"
|
size="small"
|
||||||
>上移</el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleChangeSort(d.$index, 1)"
|
@click="handleChangeSort(d.$index, 1)"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="small"
|
size="small"
|
||||||
>下移</el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDel(d.$index, d.row)"
|
@click="handleDel(d.$index, d.row)"
|
||||||
|
@ -103,7 +115,8 @@ import TableFormCol from '@/components/TableFormCol/index.vue'
|
||||||
import ProdProcessList from '@/views/bst/order/edit/components/ProdProcessList.vue'
|
import ProdProcessList from '@/views/bst/order/edit/components/ProdProcessList.vue'
|
||||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
import HoverShow from '@/components/HoverShow/index.vue'
|
import HoverShow from '@/components/HoverShow/index.vue'
|
||||||
|
import { listDept } from '@/api/system/dept'
|
||||||
|
import { isEmpty } from '@/utils/index'
|
||||||
export default {
|
export default {
|
||||||
name: "OrderProdList",
|
name: "OrderProdList",
|
||||||
dicts: ['order_prod_work_type'],
|
dicts: ['order_prod_work_type'],
|
||||||
|
@ -125,9 +138,24 @@ export default {
|
||||||
headerCellStyle: {
|
headerCellStyle: {
|
||||||
backgroundColor: "#f5f7fa",
|
backgroundColor: "#f5f7fa",
|
||||||
},
|
},
|
||||||
|
deptList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getDeptList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isEmpty,
|
||||||
|
handleExpand(row) {
|
||||||
|
// 展开行
|
||||||
|
this.$refs.table.toggleRowExpansion(row, true)
|
||||||
|
},
|
||||||
|
// 获取部门列表
|
||||||
|
getDeptList() {
|
||||||
|
listDept({}).then(res => {
|
||||||
|
this.deptList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
// 只允许一个产品是成品
|
// 只允许一个产品是成品
|
||||||
handleIsEndChange(index) {
|
handleIsEndChange(index) {
|
||||||
this.form.prodList.forEach((item, idx) => {
|
this.form.prodList.forEach((item, idx) => {
|
||||||
|
|
|
@ -15,8 +15,11 @@
|
||||||
</form-col>
|
</form-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-row>
|
<el-row>
|
||||||
<form-col :span="span" label="订单编号" prop="orderNo">
|
<form-col :span="span" label="生产订单" prop="orderNo">
|
||||||
<el-input v-model="form.orderNo" placeholder="请输入订单编号"/>
|
<el-input v-model="form.orderNo" placeholder="请输入生产订单编号"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="客户订单" prop="customOrderNo">
|
||||||
|
<el-input v-model="form.customOrderNo" placeholder="请输入客户订单编号"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
<form-col :span="span" label="订单日期" prop="orderDate">
|
<form-col :span="span" label="订单日期" prop="orderDate">
|
||||||
<el-date-picker v-model="form.orderDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :clearable="false" style="width: 100%;"/>
|
<el-date-picker v-model="form.orderDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :clearable="false" style="width: 100%;"/>
|
||||||
|
@ -154,23 +157,29 @@ export default {
|
||||||
submitForm(submit) {
|
submitForm(submit) {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
this.$confirm(`确定要保存${submit ? '并发布' : ''}吗?`, '提示', {
|
||||||
this.loading = true;
|
confirmButtonText: '确定',
|
||||||
updateOrder(this.form, submit).then(response => {
|
cancelButtonText: '取消',
|
||||||
this.$modal.msgSuccess("修改成功");
|
type: 'warning'
|
||||||
this.$tab.closeBack();
|
}).then(() => {
|
||||||
}).finally(() => {
|
if (this.form.id != null) {
|
||||||
this.loading = false;
|
this.loading = true;
|
||||||
})
|
updateOrder(this.form, submit).then(response => {
|
||||||
} else {
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.loading = true;
|
this.$tab.closeBack();
|
||||||
addOrder(this.form, submit).then(response => {
|
}).finally(() => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.loading = false;
|
||||||
this.$tab.closeBack();
|
})
|
||||||
}).finally(() => {
|
} else {
|
||||||
this.loading = false;
|
this.loading = true;
|
||||||
})
|
addOrder(this.form, submit).then(response => {
|
||||||
}
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.$tab.closeBack();
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError("表单校验未通过,请检查");
|
this.$modal.msgError("表单校验未通过,请检查");
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,7 @@ export default {
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||||
{key: 'orderNo', visible: true, label: '单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'orderNo', visible: true, label: '单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'customOrderNo', visible: false, label: '客户单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||||
{key: 'customer', visible: true, label: '客户', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
{key: 'customer', visible: true, label: '客户', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<image-preview :src="detail.picture" :width="100" :height="100" style="margin-right: 16px"/>
|
<image-preview :src="detail.picture" :width="100" :height="100" style="margin-right: 16px"/>
|
||||||
<el-descriptions style="flex: 1" :column="3">
|
<el-descriptions style="flex: 1" :column="3">
|
||||||
<el-descriptions-item label="订单编号">{{ detail.orderNo | dv}}</el-descriptions-item>
|
<el-descriptions-item label="订单编号">{{ detail.orderNo | dv}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="客户单号">{{ detail.customOrderNo | dv}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="订单状态">
|
<el-descriptions-item label="订单状态">
|
||||||
<dict-tag :options="dict.type.order_status" :value="detail.status" size="mini"/>
|
<dict-tag :options="dict.type.order_status" :value="detail.status" size="mini"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
|
<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
|
||||||
|
<el-table-column prop="path" label="路由地址" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column prop="status" label="状态" width="80">
|
<el-table-column prop="status" label="状态" width="80">
|
||||||
|
|
|
@ -160,6 +160,11 @@
|
||||||
<template v-else-if="['employDate'].includes(column.key)">
|
<template v-else-if="['employDate'].includes(column.key)">
|
||||||
{{calcFullYear(d.row[column.key], new Date()) | dv}} 年
|
{{calcFullYear(d.row[column.key], new Date()) | dv}} 年
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="column.key === 'roles'">
|
||||||
|
<template v-for="(role, index) in d.row.roles">
|
||||||
|
<el-tag :key="index" v-if="!isEmpty(role.roleName)">{{role.roleName}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{d.row[column.key] | dv}}
|
{{d.row[column.key] | dv}}
|
||||||
</template>
|
</template>
|
||||||
|
@ -320,6 +325,7 @@ import { $showColumns } from '@/utils/mixins'
|
||||||
import { calcBirthDay, calcFullYear } from '@/utils/date'
|
import { calcBirthDay, calcFullYear } from '@/utils/date'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import ImportDialog from '@/components/ImportDialog/index.vue'
|
import ImportDialog from '@/components/ImportDialog/index.vue'
|
||||||
|
import { isEmpty } from '@/utils/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
|
@ -387,6 +393,7 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: "createTime",
|
orderByColumn: "createTime",
|
||||||
isAsc: "desc",
|
isAsc: "desc",
|
||||||
|
excludeUserId: 1,
|
||||||
userName: undefined,
|
userName: undefined,
|
||||||
phonenumber: undefined,
|
phonenumber: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
|
@ -397,6 +404,7 @@ export default {
|
||||||
{key: 'userId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'userId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'nickName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'nickName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'userName', visible: true, label: '登录账号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'userName', visible: true, label: '登录账号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'roles', visible: true, label: '角色', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'status', visible: true, label: '账号状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'status', visible: true, label: '账号状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'loginIp', visible: true, label: '最后登录IP', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'loginIp', visible: true, label: '最后登录IP', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
@ -447,6 +455,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isEmpty,
|
||||||
calcBirthDay,
|
calcBirthDay,
|
||||||
calcFullYear,
|
calcFullYear,
|
||||||
/** 查询用户列表 */
|
/** 查询用户列表 */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user