Merge remote-tracking branch 'origin/main'

main
yangzhicheng 1 year ago
commit c5827d9968
  1. 87
      src/api/release/productioninformation.js
  2. 4
      src/api/spares/inbound.js
  3. 69
      src/api/spares/manufacturerinfo.js
  4. 2
      src/api/spares/material.js
  5. 49
      src/api/spares/materialclassification.js
  6. 4
      src/api/spares/outbound.js
  7. 70
      src/api/spares/supplierinfo.js
  8. 69
      src/api/spares/warehouse.js
  9. 12
      src/views/leger/equipmentledgerDetail.vue
  10. 506
      src/views/release/productioninformation.vue
  11. 10
      src/views/smart/workorder.vue
  12. 13
      src/views/smart/workorderDetail.vue
  13. 325
      src/views/spares/manufacturerinfo.vue
  14. 56
      src/views/spares/material.vue
  15. 246
      src/views/spares/materialclassification.vue
  16. 333
      src/views/spares/supplierinfo.vue
  17. 309
      src/views/spares/warehouse.vue

@ -0,0 +1,87 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/release/productioninformation/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/release/productioninformation/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/release/productioninformation/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/release/productioninformation/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/release/productioninformation/update',
method: 'post',
data: row
})
}
export const auditing = (ids) => {
return request({
url: '/api/release/productioninformation/auditing',
method: 'post',
params: {
ids,
}
})
}
export const reject = (ids) => {
return request({
url: '/api/release/productioninformation/reject',
method: 'post',
params: {
ids,
}
})
}
export const release = (ids) => {
return request({
url: '/api/release/productioninformation/release',
method: 'post',
params: {
ids,
}
})
}
export const stop = (ids) => {
return request({
url: '/api/release/productioninformation/stop',
method: 'post',
params: {
ids,
}
})
}

@ -32,7 +32,7 @@ export const remove = (ids) => {
})
}
export const add = (row) => {
export const in_add = (row) => {
return request({
url: '/api/spares/inbound/submit',
method: 'post',
@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
url: '/api/spares/inbound/submit',
url: '/api/spares/inbound/update',
method: 'post',
data: row
})

@ -0,0 +1,69 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/manufacturerinfo/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/manufacturerinfo/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/manufacturerinfo/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/manufacturerinfo/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/manufacturerinfo/submit',
method: 'post',
data: row
})
}
export const auditing = (ids) => {
return request({
url: '/api/manufacturerinfo/auditing',
method: 'post',
params: {
ids,
}
})
}
export const reject = (ids) => {
return request({
url: '/api/manufacturerinfo/reject',
method: 'post',
params: {
ids,
}
})
}

@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
url: '/api/spares/material/submit',
url: '/api/spares/material/update',
method: 'post',
data: row
})

@ -0,0 +1,49 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/materialclassification/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/materialclassification/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/materialclassification/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/materialclassification/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/materialclassification/submit',
method: 'post',
data: row
})
}

@ -32,7 +32,7 @@ export const remove = (ids) => {
})
}
export const add = (row) => {
export const out_add = (row) => {
return request({
url: '/api/spares/outbound/submit',
method: 'post',
@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
url: '/api/spares/outbound/submit',
url: '/api/spares/outbound/update',
method: 'post',
data: row
})

@ -0,0 +1,70 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/supplierinfo/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/supplierinfo/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/supplierinfo/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/supplierinfo/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/supplierinfo/submit',
method: 'post',
data: row
})
}
export const auditing = (ids) => {
return request({
url: '/api/supplierinfo/auditing',
method: 'post',
params: {
ids,
}
})
}
export const reject = (ids) => {
return request({
url: '/api/supplierinfo/reject',
method: 'post',
params: {
ids,
}
})
}

@ -0,0 +1,69 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/warehouse/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/warehouse/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/warehouse/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/warehouse/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/warehouse/submit',
method: 'post',
data: row
})
}
export const auditing = (ids) => {
return request({
url: '/api/warehouse/auditing',
method: 'post',
params: {
ids,
}
})
}
export const reject = (ids) => {
return request({
url: '/api/warehouse/reject',
method: 'post',
params: {
ids,
}
})
}

@ -56,6 +56,7 @@
@row-update="document_rowUpdate"
@row-save="document_rowSave"
@row-del="document_rowDel"
:upload-before="uploadBefore"
:upload-after="uploadAfter"
:upload-preview="(file) => handleUploadPreview(file)"
:upload-delete="(file) => handleUploadDelete(file)">
@ -624,7 +625,9 @@
dataType: 'object',
fileType: 'img',//img/video/audio
type: 'upload',
accept: '.pdf',
// hide: true,
tip: '仅能支持上传pdf文件格式',
limit: 1,
propsHttp: {
res: 'data',
@ -950,6 +953,15 @@
handleDownload(row) {
window.open(`/api/system/file/download?daf-auth=${getToken()}&fileName=${row.accessoryName}`);
},
uploadBefore(file, done, loading) {
if (file && file.name && file.name.toLowerCase().endsWith('.pdf')) {
done();
} else {
this.$message.error('只能上传 PDF 格式的文件');
loading();
return false;
}
},
uploadAfter(response, done) {
// response
this.document_form.accessoryName = response.fileName;

@ -0,0 +1,506 @@
<template>
<basic-container>
<avue-tabs :option="title"/>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
:permission="permissionList"
:header-cell-class-name="headerClass"
:before-open="beforeOpen"
v-model="form"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="primary"
size="small"
plain
v-if="permission.productioninformation_delete"
@click="handleDelete">删除
</el-button>
</template>
<template slot="menuRight">
<el-button type="primary"
size="small"
plain
@click="$refs.crud.rowAdd()">新增</el-button>
<el-button type="primary"
size="small"
plain
@click="handleRelease">发布
</el-button>
<el-button type="primary"
size="small"
plain
@click="handleStop">停用
</el-button>
<el-button type="primary"
size="small"
plain
@click="handleReject">批量驳回
</el-button>
<el-button type="primary"
size="small"
plain
@click="handleAuditing">批量审核
</el-button>
</template>
<template #menu="{row,index,size}">
<el-button type="text" size="small"
@click="$refs.crud.rowEdit(row,index)">编辑</el-button>
<el-button type="text" size="small"
@click="$refs.crud.rowDel(row,index)">删除</el-button>
<el-button @click="auditing(row,index)" type="text" size="small" plain>审核</el-button>
<el-button @click="reject(row,index)" type="text" size="small" plain >驳回</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/release/productioninformation";
import {mapGetters} from "vuex";
import {auditing, reject ,release ,stop} from "@/api/release/productioninformation";
export default {
data() {
return {
form: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
title: {
column: [{
label: '基本信息',
}
]
},
button: [
{
type: 'primary',
icon: 'el-icon-plus',
label: '新增',
size: 'mini',
plain: true,
event: 'add', //
show: true //
}
],
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: false,
viewBtn: true,
selection: true,
column: [
{
label: "主键",
prop: "id",
hide:true,
disabled: true,
display: false,
rules: [{
required: true,
message: "请输入主键",
trigger: "blur"
}]
},
{
label: "消息编码",
prop: "messageEncoding",
disabled: true,
display: false,
rules: [{
required: true,
message: "请输入消息编码",
trigger: "blur"
}]
},
{
label: "消息主题",
prop: "messageTopic",
span: 20,
rules: [{
required: true,
message: "请输入消息主题",
trigger: "blur"
}]
},
{
label: "消息类型",
prop: "messageType",
span: 20,
rules: [{
required: true,
message: "请输入消息类型",
trigger: "blur"
}]
},
{
label: "消息等级",
prop: "messageLevel",
span: 20,
rules: [{
required: true,
message: "请输入消息等级",
trigger: "blur"
}]
},
{
label: "发布人",
prop: "publisher",
span: 20,
rules: [{
required: true,
message: "请输入发布人",
trigger: "blur"
}]
},
{
label: "是否停用",
prop: "isDiscontinue",
span: 20,
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=yes_no",
props: {
label: "dictValue",
value: "dictKey"
},
rules: [{
required: true,
message: "请输入是否停用",
trigger: "blur"
}]
},
{
label: "发布时间",
prop: "releaseTime",
span: 20,
type: "date",
format: 'yyyy/MM/dd',
valueFormat: "yyyyMMdd",
rules: [{
required: true,
message: "请输入发布时间",
trigger: "blur"
}]
},
{
label: "审核状态",
prop: "checkstatus",
span: 20,
value:"1",
display: false,
dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "消息内容",
prop: "messageContent",
type:"textarea",
span: 20,
rules: [{
required: true,
message: "请输入消息内容",
trigger: "blur"
}],
maxlength: 1000,
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: false,
editBtn: false
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
headerClass(){
return 'head-style'
},
//
auditing(row) {
this.$confirm("是否将数据审核?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.form.checkstatus="2";
this.form.id = row.id;
this.submitRejectOrauditing();
});
},
//
reject(row) {
this.$confirm("是否将数据驳回?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.form.checkstatus="3"
this.form.id = row.id;
this.submitRejectOrauditing();
});
},
submitRejectOrauditing() {
update(this.form).then(() => {
this.$router.push({
path: "/release/productioninformation",
query: {},
});
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}).catch((error) => {
this.$message({
type: "error",
message: "操作失败!"
});
});
},
//
handleAuditing() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return auditing(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
//
handleReject() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据驳回?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return reject(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
//
handleRelease() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据发布?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return release(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
//
handleStop() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据停用?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return stop(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
}
};
</script>
<style>
.head-style{
background-color: #1e9fff !important;
color: #FFFFFF !important;
}
</style>

@ -22,10 +22,10 @@
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.workorder_delete" @click="handleDelete">批量删除</el-button>
</template>
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject">批量驳回</el-button>
<el-button type="primary" size="small" plain @click="handleAuditing">批量审核</el-button>
<el-button type="primary" size="small" plain @click="handleExport()">导出</el-button>
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.workorder_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.workorder_reject">批量驳回</el-button>
<el-button type="primary" size="small" plain @click="handleAuditing" v-if="permission.workorder_audit">批量审核</el-button>
<el-button type="primary" size="small" plain @click="handleExport" v-if="permission.workorder_export">导出</el-button>
</template>
<template #menu="{row,index}">
<el-button @click="handleDetailSearch(row,index)" type="text" size="small" icon="el-icon-view">查看详情</el-button>
@ -217,7 +217,7 @@
},
{
label: "责任人",
prop: "responsibleUserName",
prop: "managerUserName",
rules: [{
required: true,
message: "请输入负责人",

@ -22,11 +22,11 @@
<div class="container">
<span>
<el-button size="small" @click="back">取消</el-button>
<el-button type="primary" size="small" @click="handleFormSubmit" v-if="addupdateShowButton">确定</el-button>
<el-button type="primary" size="small" @click="auditing" v-if="shouldShowButton">审核</el-button>
<el-button type="primary" size="small" @click="reject" v-if="shouldShowButton">驳回</el-button>
<el-button type="primary" size="small" @click="seachToUpdate" v-if="shouldShowButton">修改</el-button>
<el-button type="primary" size="small" @click="del" v-if="shouldShowButton">删除</el-button>
<el-button type="primary" size="small" @click="handleFormSubmit" v-if="addupdateShowButton && permission.workorder_add">确定</el-button>
<el-button type="primary" size="small" @click="auditing" v-if="shouldShowButton && permission.workorder_audit">审核</el-button>
<el-button type="primary" size="small" @click="reject" v-if="shouldShowButton && permission.workorder_reject">驳回</el-button>
<el-button type="primary" size="small" @click="seachToUpdate" v-if="shouldShowButton && permission.workorder_edit">修改</el-button>
<el-button type="primary" size="small" @click="del" v-if="shouldShowButton && permission.workorder_delete">删除</el-button>
</span>
</div>
</basic-container>
@ -180,7 +180,7 @@
maxlength: 400
}, {
label: "责任人",
prop: "responsibleUserId",
prop: "managerUserId",
type: 'select',
loadingText: '加载中',
placeholder: '请输入用户编号或名称',
@ -372,7 +372,6 @@
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.tab1_form.checkStatus = "1"
add(this.tab1_form).then(() => {
this.$router.push({
path: "/smart/workorder",

@ -0,0 +1,325 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
:search.sync="search"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.manufacturerinfo_delete" @click="handleDelete">批量删除</el-button>
</template>
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.manufacturerinfo_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.manufacturerinfo_reject">批量驳回</el-button>
<el-button type="primary" size="small" plain @click="handleAuditing" v-if="permission.manufacturerinfo_audit">批量审核</el-button>
<el-button type="primary" size="small" plain @click="handleExport()" v-if="permission.manufacturerinfo_export">导出</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/spares/manufacturerinfo";
import {getToken} from "@/util/auth";
import expUtil from "@/util/exportUtil";
import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
search: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "统一社会信用代码/组织机构",
prop: "creditCode",
search: true,
rules: [{
required: true,
message: "请输入统一社会信用代码/组织机构",
trigger: "blur"
}]
},
{
label: "制造商名称",
prop: "manufacturerName",
search: true,
rules: [{
required: true,
message: "请输入制造商名称",
trigger: "blur"
}]
},
{
label: "注册地址",
prop: "registeredAddress",
rules: [{
required: true,
message: "请输入注册地址",
trigger: "blur"
}]
},
{
label: "生产地址",
prop: "productionAddress",
rules: [{
required: true,
message: "请输入生产地址",
trigger: "blur"
}]
},
{
label: "联系电话",
prop: "contactNumber",
rules: [{
required: true,
message: "请输入联系电话",
trigger: "blur"
}]
},
{
label: "电子邮箱",
prop: "email",
rules: [{
required: true,
message: "请输入电子邮箱",
trigger: "blur"
}]
},
{
label: "经营范围",
prop: "businessScope",
},
{
label: "执行标准",
prop: "approvalStatus",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: {
label: "dictValue",
value: "dictKey"
},
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: this.vaildData(this.permission.manufacturerinfo_delete, false),
editBtn: this.vaildData(this.permission.manufacturerinfo_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
handleDetailAdd() {
this.$refs.crud.rowAdd();
},
handleAuditing() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return auditing(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleReject() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return reject(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
expUtil.excelExportEasy(`/api/warehouse/export?daf-auth=${getToken()}`, this.search);
});
},
}
};
</script>
<style>
</style>

@ -94,12 +94,14 @@
import {mapGetters} from "vuex";
import expUtil from "@/util/exportUtil";
import {getToken} from "@/util/auth";
import request from "@/router/axios";
export default {
data() {
return {
form: {},
query: {},
search:{},
loading: true,
inBox: false,
outBox: false,
@ -254,6 +256,29 @@
prop: "materialNo",
type:"select",
span: 22,
dicUrl: "/api/spares/material/getNoList",
props: {
label: "materialNo",
value: "materialNo",
},
event: {
change: (val) => {
if (!val) return
if (val) {
request({
url: '/api/spares/material/getDetailList',
method: 'get',
params: {
materialNo: val
}
}).then((res) => {
this.inForm.materialName = res.data.data.materialName;
this.inForm.model = res.data.data.model;
// this.inForm.warehouse = res.data.data.warehouseName;
})
}
},
},
rules: [{
required: true,
message: "请输入物资编号",
@ -322,6 +347,29 @@
label: "物资编号",
prop: "materialNo",
span: 22,
dicUrl: "/api/spares/material/getNoList",
props: {
label: "materialNo",
value: "materialNo",
},
event: {
change: (val) => {
if (!val) return
if (val) {
request({
url: '/api/spares/material/getDetailList',
method: 'get',
params: {
materialNo: val
}
}).then((res) => {
this.inForm.materialName = res.data.data.materialName;
this.inForm.model = res.data.data.model;
// this.inForm.warehouse = res.data.data.warehouseName;
})
}
},
},
rules: [{
required: true,
message: "请输入物资编号",
@ -455,13 +503,14 @@
},
handleIn(){
this.inBox = true;
this.$refs.inForm.resetForm();
},
submitIn(row, done, loading) {
this.$refs.inForm.validate((valid, done, msg) => {
if (valid) {
done()
in_add(this.inForm).then(() => {
this.$refs.inForm.inForm();
this.$refs.inForm.resetForm();
this.inBox = false;
this.onLoad(this.page);
this.$message({
@ -482,13 +531,14 @@
},
handleOut(){
this.outBox = true;
this.$refs.outForm.resetForm();
},
submitOut(row, done, loading) {
this.$refs.outForm.validate((valid, done, msg) => {
if (valid) {
done()
out_add(this.outForm).then(() => {
this.$refs.outForm.outForm();
this.$refs.outForm.resetForm();
this.outBox = false;
this.onLoad(this.page);
this.$message({
@ -513,7 +563,7 @@
cancelButtonText: "取消",
type: "warning"
}).then(() => {
expUtil.excelExport(`/api/spares/export?daf-auth=${getToken()}`, this.search, ['station', 'iStatus']);
expUtil.excelExport(`/api/spares/material/export?daf-auth=${getToken()}`, this.search, ['station']);
});
},
handleDetailSearch(row) {

@ -0,0 +1,246 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
:search.sync="search"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.materialclassification_delete" @click="handleDelete">批量删除</el-button>
</template>
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.materialclassification_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleExport()" v-if="permission.materialclassification_export">导出</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/spares/materialclassification";
import {getToken} from "@/util/auth";
import expUtil from "@/util/exportUtil";
import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
search: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "物资分配码",
prop: "code",
search: true,
},
{
label: "物资类型",
search: true,
prop: "type",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=supplies_type",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "创建时间",
prop: "createTime",
type: 'datetime',
disabled: true,
},
{
label: "创建人",
prop: "createUser",
type: 'select',
loadingText: '加载中',
placeholder: '请输入用户编号或名称',
remote: true,
disabled: true,
props: {
label: 'name',
value: 'id',
desc: 'code'
},
dicUrl: "/api/daf-user/listBySearch?search={{key}}",
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: this.vaildData(this.permission.materialclassification_delete, false),
editBtn: this.vaildData(this.permission.materialclassification_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
handleDetailAdd() {
this.$refs.crud.rowAdd();
},
handleExport() {
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
expUtil.excelExportEasy(`/api/warehouse/export?daf-auth=${getToken()}`, this.search);
});
},
}
};
</script>
<style>
</style>

@ -0,0 +1,333 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
:search.sync="search"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.supplierinfo_delete" @click="handleDelete">批量删除</el-button>
</template>
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.supplierinfo_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.supplierinfo_reject">批量驳回</el-button>
<el-button type="primary" size="small" plain @click="handleAuditing" v-if="permission.supplierinfo_audit">批量审核</el-button>
<el-button type="primary" size="small" plain @click="handleExport()" v-if="permission.supplierinfo_export">导出</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/spares/supplierinfo";
import {getToken} from "@/util/auth";
import expUtil from "@/util/exportUtil";
import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
search: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "统一社会信用代码/组织机构",
prop: "creditCode",
search: true,
rules: [{
required: true,
message: "请输入统一社会信用代码/组织机构",
trigger: "blur"
}]
},
{
label: "供应商名称",
prop: "supplierName",
search: true,
rules: [{
required: true,
message: "请输入供应商名称",
trigger: "blur"
}]
},
{
label: "注册地址",
prop: "registeredAddress",
rules: [{
required: true,
message: "请输入注册地址",
trigger: "blur"
}]
},
{
label: "生产地址",
prop: "productionAddress",
rules: [{
required: true,
message: "请输入生产地址",
trigger: "blur"
}]
},
{
label: "联系电话",
prop: "contactNumber",
rules: [{
required: true,
message: "请输入联系电话",
trigger: "blur"
}]
},
{
label: "电子邮箱",
prop: "email",
rules: [{
required: true,
message: "请输入电子邮箱",
trigger: "blur"
}]
},
{
label: "经营范围",
prop: "businessScope",
},
{
label: "执行标准",
prop: "approvalStatus",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "付款条约",
prop: "paymentTerms",
},
{
label: "价格条款",
prop: "priceTerms",
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: this.vaildData(this.permission.supplierinfo_delete, false),
editBtn: this.vaildData(this.permission.supplierinfo_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
handleDetailAdd() {
this.$refs.crud.rowAdd();
},
handleAuditing() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return auditing(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleReject() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return reject(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
expUtil.excelExportEasy(`/api/warehouse/export?daf-auth=${getToken()}`, this.search);
});
},
}
};
</script>
<style>
</style>

@ -0,0 +1,309 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
:search.sync="search"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.warehouse_delete" @click="handleDelete">批量删除</el-button>
</template>
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.warehouse_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.warehouse_reject">批量驳回</el-button>
<el-button type="primary" size="small" plain @click="handleAuditing" v-if="permission.warehouse_audit">批量审核</el-button>
<el-button type="primary" size="small" plain @click="handleExport()" v-if="permission.warehouse_export">导出</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/spares/warehouse";
import {getToken} from "@/util/auth";
import expUtil from "@/util/exportUtil";
import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
search: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "仓库编号",
prop: "code",
search: true,
},
{
label: "仓库名称",
search: true,
prop: "name",
},
{
label: "仓库地址",
prop: "address",
search: true,
},
{
label: "仓库类型",
search: true,
prop: "type",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=warehouse_type",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "仓库责任人",
prop: "managerUserId",
type: 'select',
loadingText: '加载中',
placeholder: '请输入用户编号或名称',
remote: true,
props: {
label: 'name',
value: 'id',
desc: 'code'
},
dicUrl: "/api/daf-user/listBySearch?search={{key}}",
},
{
label: "联系电话",
prop: "contactNumber",
},
{
label: "审批状态",
prop: "approvalStatus",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: {
label: "dictValue",
value: "dictKey"
},
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: this.vaildData(this.permission.warehouse_delete, false),
editBtn: this.vaildData(this.permission.warehouse_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
handleDetailAdd() {
this.$refs.crud.rowAdd();
},
handleAuditing() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return auditing(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleReject() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("是否将选择数据审核?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return reject(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
expUtil.excelExportEasy(`/api/warehouse/export?daf-auth=${getToken()}`, this.search);
});
},
}
};
</script>
<style>
</style>
Loading…
Cancel
Save