This commit is contained in:
TianyangZhang 2025-12-04 10:25:08 +08:00
commit 8ed0bd9d29
11 changed files with 220 additions and 139 deletions

View File

@ -85,6 +85,14 @@ export default {
} }
} }
}, },
state: {
item: {
name: "节点详情",
req: async function(id){
return await http.get(`${config.API_URL}/wf/state/${id}/`);
}
},
},
ticket: { ticket: {
list: { list: {
url: `${config.API_URL}/wf/ticket/`, url: `${config.API_URL}/wf/ticket/`,

View File

@ -295,8 +295,10 @@ export default {
}, },
getUsers(){ getUsers(){
let that = this; let that = this;
that.$API.system.user.list.req({ posts__name: "库管", page: 0 }).then((res) => { let userOption = [];
that.userOption = res; that.$API.system.user.list.req({ posts__code__contains: "inm", page: 0 }).then((res) => {
userOption = Array.from(new Map(res.map(item => [item.id, item])).values());
that.userOption = userOption;
}); });
}, },
deptChange(){ deptChange(){

View File

@ -2,8 +2,8 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" v-auth="'handover.create'" @click="table_add(20)"> <el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返工交接</el-button>
返工交接</el-button> <el-button type="primary" v-auth="'handover.create'" v-if="route_code=='scrap'" @click="table_bsofei(40,30)">合批报废</el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
@ -108,7 +108,7 @@ export default {
data() { data() {
return { return {
wmState, wmState,
apiObj: this.$API.wpm.wmaterial.list, apiObj: null,
params: { params: {
state : 50, state : 50,
state_all: 1 state_all: 1
@ -126,6 +126,11 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
that.route_code = that.$route.path.split("/")[2];
if(that.route_code=='scrap'){
that.params.material__type__in = 30;
}
that.apiObj = that.$API.wpm.wmaterial.list;
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
that.mgroupOptions = res; that.mgroupOptions = res;
res.forEach(item=>{ res.forEach(item=>{
@ -145,6 +150,13 @@ export default {
this.$refs.saveDialog.open("add"); this.$refs.saveDialog.open("add");
}); });
}, },
table_bsofei(type,mtype) {
this.dialog.save = true;
this.type = type;
this.$nextTick(() => {
this.$refs.saveDialog.open("add",null,mtype);
});
},
// //
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);

View File

@ -12,8 +12,13 @@
type="primary" type="primary"
@click="add('pur_in')" @click="add('pur_in')"
v-auth="'mio.pur'" v-auth="'mio.pur'"
>采购入库</el-button >采购入库</el-button>
> <el-button
type="primary"
@click="add('do_out','baofei')"
v-auth="'mio.do'"
v-if="project_code=='gx'"
>报废</el-button>
<el-select <el-select
v-model="query.type" v-model="query.type"
clearable clearable
@ -73,7 +78,8 @@
></el-table-column> ></el-table-column>
<el-table-column label="出/入库类型"> <el-table-column label="出/入库类型">
<template #default="scope"> <template #default="scope">
{{ typeDict[scope.row.type] }} <span v-if="scope.row.mgroup_name=='废品库'&&scope.row.type=='do_out'">原料报废</span>
<span v-else>{{ typeDict[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="记录状态"> <el-table-column label="记录状态">
@ -124,7 +130,7 @@
type="primary" type="primary"
@click="table_submit(scope.row)" @click="table_submit(scope.row)"
v-auth="'mio.submit'" v-auth="'mio.submit'"
v-if="scope.row.state == 10" v-if="scope.row.state == 10&&scope.row.type!=='do_out'"
> >
提交 提交
</el-button> </el-button>
@ -208,17 +214,25 @@ export default {
apiObj: this.$API.inm.mio.list, apiObj: this.$API.inm.mio.list,
selection: [], selection: [],
type: "", type: "",
htype: "",
cate: "mainso", cate: "mainso",
mioId: "", mioId: "",
project_code: "",
visibleDrawer: false, visibleDrawer: false,
}; };
}, },
mounted() {this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;},
methods: { methods: {
// //
add(type) { add(type,htype) {
this.dialog.save = true; this.dialog.save = true;
this.htype = htype;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open("add", type); if(htype!==undefined){
this.$refs.saveDialog.open("add", type,htype);
}else{
this.$refs.saveDialog.open("add", type);
}
}); });
}, },
// //

View File

@ -115,7 +115,7 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="操作部门" label="操作部门"
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'" v-if="(form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in')&& htype!='baofei'"
> >
<el-select <el-select
v-model="form.belong_dept" v-model="form.belong_dept"
@ -132,8 +132,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="部门执行人" label="部门执行人" prop="do_user"
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'" v-if="(form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in')&& htype!='baofei'"
> >
<el-select v-model="form.do_user" clearable style="width: 100%"> <el-select v-model="form.do_user" clearable style="width: 100%">
<el-option <el-option
@ -144,9 +144,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="仓库执行人" prop="mio_user">
label="仓库执行人"
>
<el-select <el-select
v-model="form.mio_user" v-model="form.mio_user"
clearable clearable
@ -199,13 +197,16 @@ export default {
form: {}, form: {},
rules: { rules: {
number: [ number: [
{ {required: true,message: "请填写编号",trigger: "blur"},
required: true, ],
message: "请填写编号", do_user: [
trigger: "blur", {required: true,message: "请选择部门执行人",trigger: "blur"},
}, ],
mio_user: [
{required: true,message: "请选择仓库执行人",trigger: "blur"},
], ],
}, },
htype:"",
visible: false, visible: false,
isSaveing: false, isSaveing: false,
options: [], options: [],
@ -221,10 +222,21 @@ export default {
}; };
}, },
mounted() { mounted() {
let that = this;
this.form.inout_date = this.$TOOL.dateFormat2(new Date()); this.form.inout_date = this.$TOOL.dateFormat2(new Date());
//
if(that.htype=='baofei'){
//
//
that.$API.mtm.mgroup.list.req({ name:'废品库',page: 0}).then((res) => {
that.form.recive_mgroup = item.id;
that.getCkUserList();//
});
}
}, },
methods: { methods: {
init() { init() {
let that = this;
this.getDeptUser(); this.getDeptUser();
var type = this.form.type; var type = this.form.type;
if (type == "pur_in") { if (type == "pur_in") {
@ -234,9 +246,16 @@ export default {
this.getOrderOptions(); this.getOrderOptions();
this.getCustomerOptions(); this.getCustomerOptions();
} else if (type == "do_in" || type == "do_out" || type == "borrow_out" || type == "return_in") { } else if (type == "do_in" || type == "do_out" || type == "borrow_out" || type == "return_in") {
this.getDeptOptions(); if(that.htype=='baofei'){
this.getmgroupOptions(); that.$API.mtm.mgroup.list.req({ name:'废品库',page: 0}).then((res) => {
this.getgetDeptUsers(); that.mgroupOptions = res;
that.form.mgroup = res[0].id;
});
}else{
this.getDeptOptions();
this.getmgroupOptions();
this.getgetDeptUsers();
}
} else if (type == "other_in") { } else if (type == "other_in") {
this.getSupplierOptions(); this.getSupplierOptions();
} else if (type == "other_out") { } else if (type == "other_out") {
@ -293,15 +312,18 @@ export default {
}); });
}, },
getDeptUser() { getDeptUser() {
this.$API.system.user.list let that = this;
.req({ posts__name: "库管", page: 0 }) let userOption = [];
.then((res) => { that.$API.system.user.list.req({ posts__code__contains: "inm", page: 0 }).then((res) => {
this.userOption = res; userOption = Array.from(new Map(res.map(item => [item.id, item])).values());
}); that.userOption = userOption;
// console.log('userOption',userOption);
});
}, },
// //
open(mode = "add", type = "") { open(mode = "add", type = "",htype="") {
this.mode = mode; this.mode = mode;
this.htype = htype;
this.form.type = type; this.form.type = type;
this.init(); this.init();
this.visible = true; this.visible = true;
@ -314,6 +336,9 @@ export default {
this.isSaveing = true; this.isSaveing = true;
try { try {
var res; var res;
if(this.htype=='baofei'){
this.form.do_user = this.form.mio_user
}
if (this.mode == "add") { if (this.mode == "add") {
res = await this.$API.inm.mio.create.req(this.form); res = await this.$API.inm.mio.create.req(this.form);
} else if (this.mode == "edit") { } else if (this.mode == "edit") {

View File

@ -100,7 +100,7 @@
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span> <span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{ project_code=='gx'?Math.round(scope.row.count):scope.row.count }}</span>
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link> <el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -113,7 +113,7 @@
</el-table-column> </el-table-column>
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'"> <el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'">
</el-table-column> </el-table-column>
<el-table-column label="不合格数量" prop="count_notok"> <el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip> <el-table-column label="创建时间" prop="create_time" show-overflow-tooltip>
</el-table-column> </el-table-column>
@ -354,7 +354,6 @@ export default {
mounted() { mounted() {
let url1 = window.location.hash; let url1 = window.location.hash;
this.url_code = url1.split('/')[2]; this.url_code = url1.split('/')[2];
console.log(this.url_code);
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime(); this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
this.params.mio = this.mioId; this.params.mio = this.mioId;

View File

@ -139,7 +139,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="mTracking==20&&form.type == 'sale_out'&&project_code=='bxerp'"> <el-col :md="12" :sm="24" v-else-if="mTracking==20&&form.type == 'sale_out'&&project_code=='bxerp'">
<el-form-item label="数量"> <el-form-item label="数量">
<el-input-number <el-input-number
v-model="form.count" v-model="form.count"
@ -270,12 +270,13 @@ const defaultForm = {
export default { export default {
emits: ["success", "closed"], emits: ["success", "closed"],
props: { props: {
mioObj: { type: Object },
cate: { type: String, default: null }, cate: { type: String, default: null },
htype: { type: String, default: null },
mioId: { type: String, default: null }, mioId: { type: String, default: null },
mgroup: { type: String, default: null },
belongDeptName: { type: String, default: null }, belongDeptName: { type: String, default: null },
belongDeptId: { type: String, default: null }, belongDeptId: { type: String, default: null },
mgroup: { type: String, default: null },
mioObj: { type: Object },
tableDatas: { type: Array ,default:function(){return []}}, tableDatas: { type: Array ,default:function(){return []}},
}, },
data() { data() {
@ -330,13 +331,35 @@ export default {
let that = this; let that = this;
let config_base = that.$TOOL.data.get("BASE_INFO").base; let config_base = that.$TOOL.data.get("BASE_INFO").base;
that.project_code = config_base.base_code; that.project_code = config_base.base_code;
//
if(that.htype=='baofei'){
//
//
that.$API.mtm.mgroup.list.req({ name:'废品库',page: 0}).then((res) => {
that.form.recive_mgroup = item.id;
that.getCkUserList();//
});
}
}, },
methods: { methods: {
init() { init() {
this.getMaterialOptions(); this.getMaterialOptions();
this.getWarehouseOptions(); this.getWarehouseOptions();
}, },
//
getCkUserList() {
let that = this;
this.$API.system.user.list.req({ page: 0, posts__code: "inm&check" })
.then((res) => {
if(that.type==40){
that.userList2 = [];
that.userList2 = res;
}else if(that.type==20&&that.mgroupName=='废品库'){
that.userList = [];
that.userList = res;
}
});
},
getWarehouseOptions() { getWarehouseOptions() {
let that = this; let that = this;
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => { this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
@ -541,9 +564,11 @@ export default {
} else { } else {
this.getBatchOptions(); this.getBatchOptions();
} }
if(that.project_code=='gx'&&that.type == 'pur_in'){ if(that.type == 'pur_in'){
that.form.batch = '无'
that.batchcount = 99999999999; that.batchcount = 99999999999;
if(that.project_code=='gx'){
that.form.batch = '无'
}
} }
}, },
getItem(options, id) { getItem(options, id) {
@ -628,10 +653,8 @@ export default {
this.init(); this.init();
} }
this.visible = true; this.visible = true;
// console.log('that.type',that.type);
if(that.type=='other_in'||that.type=='do_out'){ if(that.type=='other_in'||that.type=='do_out'){
let mioitemSelecObj =JSON.parse(sessionStorage.getItem("mioitemSelecObj")); let mioitemSelecObj =JSON.parse(sessionStorage.getItem("mioitemSelecObj"));
// console.log('mioitemSelecObj',mioitemSelecObj);
if(mioitemSelecObj!==null){ if(mioitemSelecObj!==null){
that.selectObj = mioitemSelecObj; that.selectObj = mioitemSelecObj;
that.form.material = that.selectObj.id; that.form.material = that.selectObj.id;

View File

@ -9,7 +9,7 @@
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding" style="height: 100%"> <el-main class="nopadding">
<scTable <scTable
ref="table" ref="table"
v-loading="listLoading" v-loading="listLoading"
@ -18,7 +18,6 @@
stripe stripe
highlightCurrentRow highlightCurrentRow
hidePagination hidePagination
hideDo
> >
<el-table-column label="#" type="index"></el-table-column> <el-table-column label="#" type="index"></el-table-column>
<el-table-column label="ID" prop="id" width="160"></el-table-column> <el-table-column label="ID" prop="id" width="160"></el-table-column>
@ -32,14 +31,14 @@
<el-table-column label="顺序ID" prop="sort" width="80"></el-table-column> <el-table-column label="顺序ID" prop="sort" width="80"></el-table-column>
<el-table-column label="类型" width="100"> <el-table-column label="类型" width="100">
<template #default="scope"> <template #default="scope">
<el-tag effect="plain" v-if="scope.row.type == 0"> <el-tag type="info" v-if="scope.row.type == 0">
普通类型 普通
</el-tag> </el-tag>
<el-tag effect="plain" v-if="scope.row.type == 1"> <el-tag type="primary" v-if="scope.row.type == 1">
初始状态 初始
</el-tag> </el-tag>
<el-tag effect="plain" v-if="scope.row.type == 2"> <el-tag type="success" v-if="scope.row.type == 2">
结束状态 结束
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -53,7 +52,7 @@
{{ options2_[scope.row.distribute_type] }}</template {{ options2_[scope.row.distribute_type] }}</template
> >
</el-table-column> </el-table-column>
<el-table-column label="到达调用"> <el-table-column label="到达调用" :show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
{{ scope.row.on_reach_func }} {{ scope.row.on_reach_func }}
</template> </template>
@ -136,7 +135,17 @@
prop="participant" prop="participant"
v-if="addForm.participant_type == 1" v-if="addForm.participant_type == 1"
> >
<el-select <xtSelect
v-model="addForm.participant"
v-model:obj = "addForm.participant_"
style="width:100%"
:apiObj="$API.system.user.list"
>
<el-table-column prop="name" label="姓名" />
<el-table-column prop="phone" label="手机号" />
<el-table-column prop="belong_dept_name" label="部门" />
</xtSelect>
<!-- <el-select
style="width: 100%" style="width: 100%"
v-model="addForm.participant" v-model="addForm.participant"
placeholder="请选择参与者" placeholder="请选择参与者"
@ -158,14 +167,25 @@
>{{ item.phone }}</span >{{ item.phone }}</span
> >
</el-option> </el-option>
</el-select> </el-select> -->
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="参与者" label="参与者"
prop="participant" prop="participant"
v-if="addForm.participant_type == 2" v-if="addForm.participant_type == 2"
> >
<el-select <xtSelect
v-model="addForm.participant"
v-model:obj = "addForm.participant_"
style="width:100%"
:apiObj="$API.system.user.list"
:multiple="true"
>
<el-table-column prop="name" label="姓名" />
<el-table-column prop="phone" label="手机号" />
<el-table-column prop="belong_dept_name" label="部门" />
</xtSelect>
<!-- <el-select
style="width: 100%" style="width: 100%"
v-model="addForm.participant" v-model="addForm.participant"
multiple multiple
@ -188,7 +208,7 @@
>{{ item.phone }}</span >{{ item.phone }}</span
> >
</el-option> </el-option>
</el-select> </el-select> -->
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="参与者" label="参与者"
@ -236,40 +256,31 @@
prop="participant" prop="participant"
v-if="addForm.participant_type == 4" v-if="addForm.participant_type == 4"
> >
<el-select <xtSelect
style="width: 100%" v-model="addForm.participant"
v-model="addForm.participant" v-model:obj = "addForm.participant_"
multiple style="width:100%"
placeholder="请选择角色" :apiObj="$API.system.role.list"
:multiple="true"
> >
<el-option <el-table-column prop="name" label="名称" />
v-for="item in roles" </xtSelect>
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="岗位" label="岗位"
prop="participant" prop="participant"
v-if="addForm.participant_type == 10" v-if="addForm.participant_type == 10"
> >
<el-select <xtSelect
style="width: 100%" v-model="addForm.participant"
v-model="addForm.participant" v-model:obj = "addForm.participant_"
multiple style="width:100%"
placeholder="请选择岗位" :apiObj="$API.system.post.list"
:multiple="true"
> >
<el-option <el-table-column prop="name" label="名称" />
v-for="item in posts" <el-table-column prop="code" label="标识" />
:key="item.id" </xtSelect>
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="部门过滤" label="部门过滤"
@ -524,10 +535,6 @@ export default {
mounted() { mounted() {
this.id = sessionStorage.getItem("jinYuWorkflowId"); this.id = sessionStorage.getItem("jinYuWorkflowId");
this.getList(); this.getList();
this.getUsers();
this.getRole();
this.getPost();
this.getField();
}, },
methods: { methods: {
// //
@ -559,6 +566,7 @@ export default {
this.fieldList = fieldList; this.fieldList = fieldList;
}, },
handleAdd() { handleAdd() {
this.getField();
this.type = "add"; this.type = "add";
this.dialogVisible = true; this.dialogVisible = true;
// if(this.dialogInitNum === 0){ // if(this.dialogInitNum === 0){
@ -616,10 +624,13 @@ export default {
// }) // })
}, },
handleEdit(row) { handleEdit(row) {
this.type = "edit"; this.getField();
this.editId = row.id; this.$API.wf.state.item.req(row.id).then(res=>{
this.dialogVisible = true; this.type = "edit";
this.addForm = Object.assign({}, row); this.editId = row.id;
this.dialogVisible = true;
this.addForm = Object.assign({}, res);
})
}, },
handleDelete(row) { handleDelete(row) {
this.$API.wf.state.delete.req(row.id).then((res) => { this.$API.wf.state.delete.req(row.id).then((res) => {

View File

@ -9,12 +9,24 @@
<scTable <scTable
:data="list" ref="table" :data="list" ref="table"
row-key="id" stripe highlightCurrentRow hidePagination hideDo row-key="id" stripe highlightCurrentRow hidePagination
> >
<el-table-column label="#" type="index"></el-table-column> <el-table-column label="#" type="index"></el-table-column>
<el-table-column label="ID" prop="id" width="160"></el-table-column> <el-table-column label="ID" prop="id" width="160"></el-table-column>
<el-table-column label="名称" prop="name"></el-table-column> <el-table-column label="名称" prop="name"></el-table-column>
<!-- <el-table-column label="定时器(s)" prop="timer" width="100"></el-table-column> --> <el-table-column label="属性" width="100">
<template #default="scope">
<el-tag type="primary" v-if="scope.row.attribute_type == 1">
同意
</el-tag>
<el-tag type="danger" v-if="scope.row.attribute_type == 2">
拒绝
</el-tag>
<el-tag type="info" v-if="scope.row.attribute_type == 3">
其他
</el-tag>
</template>
</el-table-column>
<el-table-column label="源状态"> <el-table-column label="源状态">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.source_state_">{{scope.row.source_state_.name}}</span> <span v-if="scope.row.source_state_">{{scope.row.source_state_.name}}</span>
@ -25,7 +37,7 @@
<span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span> <span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提交时调用"> <el-table-column label="提交时调用" :show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
{{ scope.row.on_submit_func }} {{ scope.row.on_submit_func }}
</template> </template>
@ -167,7 +179,6 @@
}, },
mounted() { mounted() {
this.getList(); this.getList();
this.getStateList();
}, },
methods: { methods: {
onJsonChange (value) { onJsonChange (value) {
@ -187,10 +198,12 @@
} }
}, },
handleAdd() { handleAdd() {
this.getStateList();
this.type = 'add'; this.type = 'add';
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleEdit(row) { handleEdit(row) {
this.getStateList();
this.type = 'edit'; this.type = 'edit';
this.editId = row.id; this.editId = row.id;
this.dialogVisible = true; this.dialogVisible = true;
@ -208,7 +221,6 @@
}, },
async getStateList() { async getStateList() {
let res = await this.$API.wf.workflow.states.req(this.id); let res = await this.$API.wf.workflow.states.req(this.id);
console.log(res);
this.stateList = res; this.stateList = res;
}, },
async submitHandle(){ async submitHandle(){

View File

@ -453,8 +453,10 @@ export default {
// //
getDeptUser() { getDeptUser() {
let that = this; let that = this;
let userOption = [];
this.$API.system.user.list.req({ page: 0, posts__code__contains: "inm" }).then((res) => { this.$API.system.user.list.req({ page: 0, posts__code__contains: "inm" }).then((res) => {
that.userOption = res; userOption = Array.from(new Map(res.map(item => [item.id, item])).values());
that.userOption = userOption;
}); });
}, },
// //

View File

@ -2,9 +2,9 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" <!-- <el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'"
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&project_code=='gx'" v-if="mgroupName!=='size'&&mgroupName!=='facade'&&project_code=='gx'"
>领料</el-button> >领料</el-button> -->
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'">入库</el-button> <el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'">入库</el-button>
<el-button <el-button
type="primary" type="primary"
@ -97,49 +97,21 @@
align="center" align="center"
width="120px" width="120px"
> >
<template #default="scope"> <template #default="scope">
<el-button <el-button link type="primary" @click="table_detail(scope.row)">查看</el-button>
link <el-button link type="primary" @click="table_edit(scope.row)"
type="primary" v-if="scope.row.state == 10&&scope.row.create_by==userId"
@click="table_detail(scope.row)" >编辑</el-button>
> <el-button link type="primary" @click="table_submit(scope.row)"
查看 v-auth="'mio.submit'" v-if="scope.row.state == 10&&scope.row.type!=='do_in'"
</el-button> > <span>{{ scope.row.type=='do_out'?'接收':'提交' }}</span>
<el-button
link
type="primary"
@click="table_edit(scope.row)"
v-if="scope.row.state == 10"
>
编辑
</el-button>
<el-button
link
type="primary"
@click="table_submit(scope.row)"
v-auth="'mio.submit'"
v-if="scope.row.state == 10&&scope.row.type!=='do_in'"
>
提交
</el-button>
<el-button
link
type="danger"
@click="table_del(scope.row)"
v-auth="'mio.delete'"
v-if="scope.row.state == 10"
>
删除
</el-button>
<el-button
link
type="warning"
@click="revert(scope.row)"
v-auth="'mio.submit'"
v-if="scope.row.state == 20"
>
撤销
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)"
v-auth="'mio.delete'" v-if="scope.row.state == 10&&scope.row.create_by==userId"
>删除</el-button>
<el-button link type="warning" @click="revert(scope.row)"
v-auth="'mio.submit'" v-if="scope.row.state == 20"
>撤销</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -234,6 +206,7 @@ export default {
let that = this; let that = this;
that.params.mgroup = that.mgroupId; that.params.mgroup = that.mgroupId;
that.apiObj = that.$API.inm.mio.list; that.apiObj = that.$API.inm.mio.list;
that.userId = this.$TOOL.data.get("USER_INFO").id;
that.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; that.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
console.log("project_code",that.project_code); console.log("project_code",that.project_code);
}, },