This commit is contained in:
shijing 2023-12-25 11:03:21 +08:00
commit 495955c495
6 changed files with 306 additions and 295 deletions

View File

@ -90,7 +90,8 @@ export default {
save: false, save: false,
}, },
query: { query: {
type__in: 'sale_out,do_in' type__in: 'sale_out,do_in',
item_mio__material__type: 10
}, },
form: { form: {
@ -118,7 +119,7 @@ export default {
table_detail(row) { table_detail(row) {
this.$router.push({ this.$router.push({
name: "mioitem", name: "mioitem",
query: { mio: row.id ,type:row.type,cate:'good'} query: { mio: row.id, type: row.type, cate: 'good' }
}); });
}, },
// //

View File

@ -90,7 +90,8 @@ export default {
save: false, save: false,
}, },
query: { query: {
type: 'do_in' type__in: 'do_in,do_out',
item_mio__material__type: 20
}, },
form: { form: {
@ -118,7 +119,7 @@ export default {
table_detail(row) { table_detail(row) {
this.$router.push({ this.$router.push({
name: "mioitem", name: "mioitem",
query: { mio: row.id ,type:row.type,cate:'halfgood'} query: { mio: row.id, type: row.type, cate: 'halfgood' }
}); });
}, },

View File

@ -1,144 +1,152 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" @click="add('pur_in')" v-auth="'mio.pur'">采购入库</el-button> <el-button type="primary" @click="add('pur_in')" v-auth="'mio.pur'">采购入库</el-button>
<el-select v-model="query.state" clearable style="width: 120px; margin-left: 2px" placeholder="状态" <el-select v-model="query.type" clearable style="width: 120px; margin-left: 2px" placeholder="出入库类型"
@change="handleQuery"> @change="handleQuery">
<el-option v-for="item in stateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</div> <el-select v-model="query.state" clearable style="width: 120px; margin-left: 2px" placeholder="状态"
<div class="right-panel"> @change="handleQuery">
<el-input v-model="query.search" placeholder="编号" clearable style="margin-right: 5px;"></el-input> <el-option v-for="item in stateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> </el-select>
</div> </div>
</el-header> <div class="right-panel">
<el-main class="nopadding"> <el-input v-model="query.search" placeholder="编号" clearable style="margin-right: 5px;"></el-input>
<scTable ref="table" :apiObj="apiObj" row-key="id" :params="query" stripe> <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-table-column type="index" width="50" /> </div>
<el-table-column label="记录编号" prop="number"></el-table-column> </el-header>
<el-table-column label="出/入库类型"> <el-main class="nopadding">
<template #default="scope"> <scTable ref="table" :apiObj="apiObj" row-key="id" :params="query" stripe>
{{ typeDict[scope.row.type] }} <el-table-column type="index" width="50" />
</template> <el-table-column label="记录编号" prop="number"></el-table-column>
</el-table-column> <el-table-column label="出/入库类型">
<el-table-column label="记录状态"> <template #default="scope">
<template #default="scope"> {{ typeDict[scope.row.type] }}
{{ stateDict[scope.row.state] }} </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="记录状态">
<el-table-column label="出/入库日期" prop="inout_date"> <template #default="scope">
</el-table-column> {{ stateDict[scope.row.state] }}
</template>
</el-table-column>
<el-table-column label="出/入库日期" prop="inout_date">
</el-table-column>
<el-table-column label="创建人" prop="create_by_name"> <el-table-column label="创建人" prop="create_by_name">
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"> <el-table-column label="创建时间" prop="create_time">
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px"> <el-table-column label="操作" fixed="right" align="center" width="150px">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="table_detail(scope.row)"> <el-button link type="primary" @click="table_detail(scope.row)">
查看 查看
</el-button> </el-button>
<el-button link type="primary" @click="table_submit(scope.row)" v-auth="'mio.submit'" <el-button link type="primary" @click="table_submit(scope.row)" v-auth="'mio.submit'"
v-if="scope.row.state == 10"> v-if="scope.row.state == 10">
提交 提交
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mio.delete'" <el-button link type="danger" @click="table_del(scope.row)" v-auth="'mio.delete'"
v-if="scope.row.state == 10"> v-if="scope.row.state == 10">
删除 删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" <save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
@closed="dialog.save = false"></save-dialog> @closed="dialog.save = false"></save-dialog>
</template> </template>
<script> <script>
import saveDialog from "./mio_form.vue"; import saveDialog from "./mio_form.vue";
export default { export default {
name: "mio", name: "mio",
components: { components: {
saveDialog saveDialog
},
data() {
return {
stateDict: {
10: '创建中',
20: '已提交'
},
stateOptions: [
{ id: 10, name: '创建中' },
{ id: 20, name: '已提交' },
],
typeDict: { 'pur_in': '采购入库' },
cateOptions: [
{ id: 'pur_in', name: '采购入库' }
],
dialog: {
save: false,
},
query: {
type__in: 'pur_in,do_out',
item_mio__material__type: 40
},
form: {
},
apiObj: this.$API.inm.mio.list,
selection: [],
};
},
methods: {
//
add(type) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add", type);
});
}, },
data() { //
return { table_edit(row) {
stateDict: { this.dialog.save = true;
10: '创建中', this.$nextTick(() => {
20: '已提交' this.$refs.saveDialog.open("edit", type).setData(row);
}, });
stateOptions: [
{ id: 10, name: '创建中' },
{ id: 20, name: '已提交' },
],
typeDict: {'pur_in': '采购入库'},
dialog: {
save: false,
},
query: {
type: 'pur_in'
},
form: {
},
apiObj: this.$API.inm.mio.list,
selection: [],
};
}, },
methods: { //
// table_detail(row) {
add(type) { this.$router.push({
this.dialog.save = true; name: "mioitem",
this.$nextTick(() => { query: { mio: row.id, type: row.type, cate: 'helpso' }
this.$refs.saveDialog.open("add", type);
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit", type).setData(row);
});
},
//
table_detail(row) {
this.$router.push({
name: "mioitem",
query: { mio: row.id,type:row.type,cate:'helpso' }
});
},
//
table_del(row) {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.inm.mio.delete.req(row.id).then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
}).catch((err) => {
return err;
}); });
}, }).catch(() => { });
// },
table_del(row) { table_submit(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$API.inm.mio.submit.req(row.id).then(res => {
type: "warning", this.$message.success("提交成功");
}).then(() => {
this.$API.inm.mio.delete.req(row.id).then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
}).catch((err) => {
return err;
});
}).catch(() => { });
},
table_submit(row) {
this.$API.inm.mio.submit.req(row.id).then(res => {
this.$message.success("提交成功");
this.$refs.table.refresh()
})
},
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
},
handleSaveSuccess() {
this.$refs.table.refresh() this.$refs.table.refresh()
} })
}, },
}; handleQuery() {
</script> this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
},
handleSaveSuccess() {
this.$refs.table.refresh()
}
},
};
</script>

View File

@ -1,156 +1,157 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" @click="add('do_out')" v-auth="'mio.do'">生产领料</el-button> <el-button type="primary" @click="add('do_out')" v-auth="'mio.do'">生产领料</el-button>
<el-button type="primary" @click="add('pur_in')" v-auth="'mio.pur'">采购入库</el-button> <el-button type="primary" @click="add('pur_in')" v-auth="'mio.pur'">采购入库</el-button>
<el-select v-model="query.type" clearable style="width: 120px; margin-left: 2px" placeholder="出入库类型" <el-select v-model="query.type" clearable style="width: 120px; margin-left: 2px" placeholder="出入库类型"
@change="handleQuery"> @change="handleQuery">
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
<el-select v-model="query.state" clearable style="width: 120px; margin-left: 2px" placeholder="状态" <el-select v-model="query.state" clearable style="width: 120px; margin-left: 2px" placeholder="状态"
@change="handleQuery"> @change="handleQuery">
<el-option v-for="item in stateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in stateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input v-model="query.search" placeholder="编号" clearable style="margin-right: 5px;"></el-input> <el-input v-model="query.search" placeholder="编号" clearable style="margin-right: 5px;"></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" :params="query" stripe> <scTable ref="table" :apiObj="apiObj" row-key="id" :params="query" stripe>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="记录编号" prop="number"></el-table-column> <el-table-column label="记录编号" prop="number"></el-table-column>
<el-table-column label="出/入库类型"> <el-table-column label="出/入库类型">
<template #default="scope"> <template #default="scope">
{{ typeDict[scope.row.type] }} {{ typeDict[scope.row.type] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="记录状态"> <el-table-column label="记录状态">
<template #default="scope"> <template #default="scope">
{{ stateDict[scope.row.state] }} {{ stateDict[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出/入库日期" prop="inout_date"> <el-table-column label="出/入库日期" prop="inout_date">
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="create_by_name"> <el-table-column label="创建人" prop="create_by_name">
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"> <el-table-column label="创建时间" prop="create_time">
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px"> <el-table-column label="操作" fixed="right" align="center" width="150px">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="table_detail(scope.row)"> <el-button link type="primary" @click="table_detail(scope.row)">
查看 查看
</el-button> </el-button>
<el-button link type="primary" @click="table_submit(scope.row)" v-auth="'mio.submit'" <el-button link type="primary" @click="table_submit(scope.row)" v-auth="'mio.submit'"
v-if="scope.row.state == 10"> v-if="scope.row.state == 10">
提交 提交
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mio.delete'" <el-button link type="danger" @click="table_del(scope.row)" v-auth="'mio.delete'"
v-if="scope.row.state == 10"> v-if="scope.row.state == 10">
删除 删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" <save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
@closed="dialog.save = false"></save-dialog> @closed="dialog.save = false"></save-dialog>
</template> </template>
<script> <script>
import saveDialog from "./mio_form.vue"; import saveDialog from "./mio_form.vue";
export default { export default {
name: "mio", name: "mio",
components: { components: {
saveDialog saveDialog
},
data() {
return {
stateDict: {
10: '创建中',
20: '已提交'
},
stateOptions: [
{ id: 10, name: '创建中' },
{ id: 20, name: '已提交' },
],
typeDict: {
'do_out': '生产领料',
'pur_in': '采购入库'
},
cateOptions: [
{ id: 'do_out', name: '生产领料' },
{ id: 'pur_in', name: '采购入库' }
],
dialog: {
save: false,
},
query: {
type__in: 'pur_in,do_out',
item_mio__material__type: 30
},
form: {
},
apiObj: this.$API.inm.mio.list,
selection: [],
};
},
methods: {
//
add(type) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add", type);
});
}, },
data() { //
return { table_edit(row) {
stateDict: { this.dialog.save = true;
10: '创建中', this.$nextTick(() => {
20: '已提交' this.$refs.saveDialog.open("edit", type).setData(row);
}, });
stateOptions: [
{ id: 10, name: '创建中' },
{ id: 20, name: '已提交' },
],
typeDict: {
'do_out': '生产领料',
'pur_in': '采购入库'
},
cateOptions: [
{ id: 'do_out', name: '生产领料' },
{ id: 'pur_in', name: '采购入库' }
],
dialog: {
save: false,
},
query: {
type: 'do_out'
},
form: {
},
apiObj: this.$API.inm.mio.list,
selection: [],
};
}, },
methods: { //
// table_detail(row) {
add(type) { this.$router.push({
this.dialog.save = true; name: "mioitem",
this.$nextTick(() => { query: { mio: row.id, type: row.type, cate: 'mainso' }
this.$refs.saveDialog.open("add", type);
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit", type).setData(row);
});
},
//
table_detail(row) {
this.$router.push({
name: "mioitem",
query: { mio: row.id ,type:row.type,cate:'mainso'}
});
},
//
table_del(row) {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.inm.mio.delete.req(row.id).then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
}).catch((err) => {
return err;
}); });
}, }).catch(() => { });
// },
table_del(row) { table_submit(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$API.inm.mio.submit.req(row.id).then(res => {
type: "warning", this.$message.success("提交成功");
}).then(() => {
this.$API.inm.mio.delete.req(row.id).then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
}).catch((err) => {
return err;
});
}).catch(() => { });
},
table_submit(row) {
this.$API.inm.mio.submit.req(row.id).then(res => {
this.$message.success("提交成功");
this.$refs.table.refresh()
})
},
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
},
handleSaveSuccess() {
this.$refs.table.refresh() this.$refs.table.refresh()
} })
}, },
}; handleQuery() {
</script> this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
},
handleSaveSuccess() {
this.$refs.table.refresh()
}
},
};
</script>

View File

@ -22,9 +22,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px"> <el-table-column label="操作" fixed="right" align="center" width="150px">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="toMb(scope.row)"> <!-- <el-button link type="primary" @click="toMb(scope.row)">
查看 查看
</el-button> </el-button> -->
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'warehouse.update'"> <el-button link type="primary" @click="table_edit(scope.row)" v-auth="'warehouse.update'">
编辑 编辑
</el-button> </el-button>

View File

@ -100,7 +100,7 @@
<el-table-column label="班次" prop="shift_name"> </el-table-column> <el-table-column label="班次" prop="shift_name"> </el-table-column>
<el-table-column label="出管总数" prop="count_real"> <el-table-column label="出管总数" prop="count_real">
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="mlogb" width="250"> <el-table-column label="规格" prop="mlogb" width="300">
<template #default="scope"> <template #default="scope">
<div v-for="item in scope.row.mlogb" :key="item" class="cateItem" style=""> <div v-for="item in scope.row.mlogb" :key="item" class="cateItem" style="">
<span>{{ item.material_out_name }}|</span> <span>{{ item.material_out_name }}|</span>