代码提交

master
taozi 4 months ago
commit 7cbc754ac2
  1. 2
      public/index.html
  2. 2
      public/js/Sortable.min.js
  3. 22
      public/js/xlsx.full.min.js
  4. 3
      src/api/secondOrder/list.js
  5. 58
      src/api/secondOrder/outbound.js
  6. 19
      src/lang/zh.js
  7. 10
      src/option/system/dict.js
  8. 12
      src/views/authority/role.vue
  9. 16
      src/views/demandOrder/index.vue
  10. 85
      src/views/firstOrder/components/approvalProcessDialog.vue
  11. 256
      src/views/firstOrder/inbound.vue
  12. 134
      src/views/firstOrder/list.vue
  13. 47
      src/views/firstOrder/outbound.vue
  14. 25
      src/views/materials/expend.vue
  15. 147
      src/views/materials/index.vue
  16. 14
      src/views/purchaseOrders/index.vue
  17. 377
      src/views/secondOrder/components/outDialog.vue
  18. 14
      src/views/secondOrder/inbound.vue
  19. 281
      src/views/secondOrder/list.vue
  20. 37
      src/views/secondOrder/outbound.vue

@ -18,7 +18,7 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/common/iconfont.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.12.6/index.css">
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
<script src="/js/xlsx.full.min.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>BladeX微服务开发平台</title>
<style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/smartpark/twoPutStorage/list',
url: '/smartpark/consumerForm/list',
method: 'get',
params: {
...params,
@ -13,3 +13,4 @@ export const getList = (current, size, params) => {
cryptoData: false
})
}

@ -0,0 +1,58 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/smartpark/twoOutStorage/list',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}
// 获取物资列表
export const getConsumerFormList = params => {
return request({
url: '/smartpark/consumerForm/getConsumerFormList',
method: 'get',
params: params,
cryptoToken: false,
cryptoData: false
})
}
// 获取领用人列表
export const getUserList = params => {
return request({
url: '/smartpark/user/getUserByDeptId',
method: 'get',
params: params,
cryptoToken: false,
cryptoData: false
})
}
// 提交
export const submit = data => {
return request({
url: '/smartpark/user/getUserByDeptId',
method: 'post',
data: data,
})
}
// 获取详情
export const getDetails = params => {
return request({
url: '/smartpark/user/getUserByDeptId',
method: 'get',
params: params,
})
}

@ -33,6 +33,22 @@ export default {
emptyBtn: '清 空'
},
crud: {
excel: {
name: '文件名',
type: '数据',
prop: '字段',
params: '参数',
paramsDic:{
header:'表头',
data:'数据源',
headers:'复杂表头',
sum:'合计'
},
typeDic:{
true:'当前数据(当前页全部的数据)',
false:'选中的数据(当前页选中的数据)',
}
},
filter: {
addBtn: '新增条件',
clearBtn: '清空数据',
@ -121,5 +137,6 @@ export default {
clearCache: '清除缓存',
closeOthers: '关闭其它',
closeAll: '关闭所有'
}
},
};

@ -18,6 +18,8 @@ export const optionParent = {
search: true,
slot: true,
span: 24,
headerAlign: "center",
align: "center",
rules: [
{
required: true,
@ -31,6 +33,8 @@ export const optionParent = {
prop: "dictValue",
search: true,
align: "center",
headerAlign: "center",
align: "center",
rules: [
{
required: true,
@ -43,7 +47,8 @@ export const optionParent = {
label: "字典排序",
prop: "sort",
type: "number",
align: "right",
headerAlign: "center",
align: "center",
width: 100,
rules: [
{
@ -57,6 +62,7 @@ export const optionParent = {
label: "封存",
prop: "isSealed",
type: "switch",
headerAlign: "center",
align: "center",
width: 100,
dicData: [
@ -82,6 +88,8 @@ export const optionParent = {
{
label: "字典备注",
prop: "remark",
headerAlign: "center",
align: "center",
hide: true
}
]

@ -166,6 +166,8 @@ export default {
type: "tree",
hide: true,
span: 24,
headerAlign: "center",
align: "center",
props: {
label: "title",
},
@ -181,6 +183,8 @@ export default {
label: "角色名称",
prop: "roleName",
search: true,
headerAlign: "center",
align: "center",
span: 24,
rules: [
{
@ -197,6 +201,8 @@ export default {
dicUrl: "/api/blade-system/tenant/select",
addDisplay: false,
editDisplay: false,
headerAlign: "center",
align: "center",
viewDisplay: website.tenantMode,
span: 24,
props: {
@ -220,6 +226,8 @@ export default {
prop: "roleAlias",
search: true,
span: 24,
headerAlign: "center",
align: "center",
rules: [
{
required: true,
@ -234,6 +242,8 @@ export default {
prop: "currentAlias",
type: "radio",
dicData: [],
headerAlign: "center",
align: "center",
props: {
label: "roleName",
value: "roleAlias",
@ -245,6 +255,8 @@ export default {
label: "角色排序",
prop: "sort",
type: "number",
headerAlign: "center",
align: "center",
span: 24,
rules: [
{

@ -53,6 +53,8 @@ export default {
label: "需求单号",
prop: "demandNo",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "提交时间",
@ -60,30 +62,44 @@ export default {
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
headerAlign: "center",
align: "center",
},
{
label: "物品名称",
prop: "materialName",
headerAlign: "center",
align: "center",
},
{
label: "型号",
prop: "model",
headerAlign: "center",
align: "center",
},
{
label: "数量",
prop: "num",
headerAlign: "center",
align: "center",
},
{
label: "申请年份",
prop: "year",
headerAlign: "center",
align: "center",
},
{
label: "申请季度",
prop: "quarter",
headerAlign: "center",
align: "center",
},
{
label: "申请部门",
prop: "department",
headerAlign: "center",
align: "center",
}
]
},

@ -0,0 +1,85 @@
<template>
<div>
<el-dialog
:close-on-click-modal="false"
:title="inDialogTiltle"
:visible.sync="inDialogVisible"
:append-to-body="true"
width="20%"
@close="handleCloseDetail"
>
<el-steps class="teps-con" direction="vertical" :active="1">
<el-step
v-for="(item, index) in approvalList"
:title="item.name"
:description="item.time || ''"
></el-step>
</el-steps>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="handleCloseDetail()"> </el-button>
</span> -->
</el-dialog>
</div>
</template>
<script>
import {
getAllQuarter,
getPurchasesByIds,
getMaterialList,
getDetailList,
} from "@/api/firstOrder/inbound";
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
},
data() {
return {
inDialogVisible: false,
inDialogTiltle: "审批流程",
approvalList: [
{
name: "张三",
time: "2021-01-01 10:10:10",
status: "通过",
},
{
name: "张三1",
time: "",
status: "待审核",
},
{
name: "张三3",
time: "",
status: "待审核",
},
],
};
},
mounted() {
this.inDialogVisible = this.showDialog;
},
methods: {
handleCloseDetail() {
this.inDialogVisible = false;
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
.form-title {
font-size: 16px;
font-weight: 600;
padding: 18px 0;
}
.teps-con{
margin:0 auto 0
}
:deep(.el-dialog__body) {
height: 300px;
}
</style>

@ -1,69 +1,117 @@
<template>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<!-- @row-click="rowSelect" -->
<template slot-scope="scope" slot="menuLeft">
<el-button size="small" plain @click="handleDesign()">新增入库单
</el-button>
<el-button size="small" plain @click="handleExport()">入库单导出
<el-button size="small" type="primary" @click="handleDesign()"
>新增入库单
</el-button>
<!-- <el-button size="small" type="primary" @click="handleExport()"
>入库单导出
</el-button> -->
</template>
<template slot-scope="scope" slot="purchaseEndInfo">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.purchaseEndInfo != ''">{{
scope.row.purchaseEndInfo }}</el-button>
<el-button
type="text"
@click.stop="purchaseFn(scope.row)"
v-if="scope.row.purchaseEndInfo != ''"
>{{ scope.row.purchaseEndInfo }}</el-button
>
<span v-else></span>
</template>
<template #menu="scope">
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button>
<el-button type="text" v-if="scope.row.status == 1" @click.stop="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" @click.stop="approvalProcessFn(scope.row)"
>审批流程</el-button
>
<el-button type="text" @click.stop="handleDetails(scope.row)"
>详情</el-button
>
<el-button
type="text"
v-if="scope.row.status == 1"
@click.stop="handleEdit(scope.row)"
>编辑</el-button
>
</template>
</avue-crud>
<!-- 新增 -->
<inDialog v-if="inDialogVisible" :repairVisible='inDialogVisible' :inDialogTiltle="inDialogTiltle"
:inDialogType="inDialogType" @handleCloseDetail="handleCloseDetail" type="一级库" :id='id'
@submitSuccess="handleSubmitSuccess">
<inDialog
v-if="inDialogVisible"
:repairVisible="inDialogVisible"
:inDialogTiltle="inDialogTiltle"
:inDialogType="inDialogType"
@handleCloseDetail="handleCloseDetail"
type="一级库"
:id="id"
@submitSuccess="handleSubmitSuccess"
>
</inDialog>
<!-- 采购单详情 -->
<purchaseDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog"
:purchaseTitle="purchaseTitle" :id='id'></purchaseDialog>
<purchaseDialog
:showDialog="purchaseOpen"
v-if="purchaseOpen"
@closeDialog="closeDialog"
:purchaseTitle="purchaseTitle"
:id="id"
></purchaseDialog>
<!-- 审批流程 -->
<approvalProcessDialog
:showDialog="approvalProcessShow"
v-if="approvalProcessShow"
@closeDialog="closeDialog"
></approvalProcessDialog>
</basic-container>
</template>
<script>
import { getList } from "@/api/firstOrder/inbound";
// import { mapGetters } from "vuex";
import inDialog from './components/inDialog.vue';
import purchaseDialog from './components/purchaseDialog.vue';
import inDialog from "./components/inDialog.vue";
import purchaseDialog from "./components/purchaseDialog.vue";
import approvalProcessDialog from "./components/approvalProcessDialog.vue";
export default {
components: {
inDialog,
purchaseDialog
purchaseDialog,
approvalProcessDialog,
},
data() {
return {
// form: {},
form: { inDate: [], inOperatorName: '', inOperator: '' },
form: { inDate: [], inOperatorName: "", inOperator: "" },
selectionList: [],
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
height: 'auto',
height: "auto",
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
selection: true,
viewBtn: false,
editBtn: false,
delBtn: false,
@ -77,12 +125,16 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuWidth: 120,
menuWidth: 190,
menu: true,
menuAlign: "left",
searchMenuPosition: "right",
excelBtn: true,
column: [
{
label: "采购单名称",
prop: "purchaseEndInfo",
<<<<<<< HEAD
width: 150,
align: "center",
formatter: (row, column) => {
@ -92,12 +144,23 @@ export default {
}
return value; //
}
=======
width: 180,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "入库单号",
prop: "orderNo",
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 110,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "入库日期",
@ -105,12 +168,20 @@ export default {
search: true,
type: "datetime",
searchRange: true,
startPlaceholder: '开始时间',
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
<<<<<<< HEAD
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
width: 160,
align: "center"
=======
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
width: 140,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -118,25 +189,42 @@ export default {
label: "入库人",
prop: "inOperatorName",
search: true,
<<<<<<< HEAD
searchParam: 'inOperator',
align: "center"
=======
searchParam: "inOperator",
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "来源",
prop: "source",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "事由",
prop: "reason",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "物资类型",
prop: "materialType",
search: false,
<<<<<<< HEAD
type: 'select',
align: "center",
dicData: [{
@ -147,100 +235,134 @@ export default {
label: '其他物资',
value: '2'
}]
=======
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "办公物资",
value: "1",
},
{
label: "其他物资",
value: "2",
},
],
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "审批人员",
prop: "approvers",
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "状态",
prop: "status",
<<<<<<< HEAD
type: 'select',
=======
type: "select",
headerAlign: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
align: "center",
dicData: [
{
label: '暂存',
value: 1
label: "暂存",
value: 1,
},
{
label: '待审批',
value: 2
label: "待审批",
value: 2,
},
{
label: '已审批',
value: 3
label: "已审批",
value: 3,
},
]
],
},
]
],
},
data: [],
inDialogVisible: false,
inDialogTiltle: '入库',
inDialogType: '',//
inDialogTiltle: "入库",
inDialogType: "", //
purchaseOpen: false,
purchaseTitle: '',
inTitle: '',
purchaseTitle: "",
inTitle: "",
approvalProcessShow: false, //
};
},
computed: {
},
computed: {},
methods: {
approvalProcessFn(row) {
this.approvalProcessShow = true;
},
handleDesign() {
this.inDialogType = 'add'
this.inDialogTiltle = '新增入库'
this.inDialogVisible = true
this.inDialogType = "add";
this.inDialogTiltle = "新增入库";
this.inDialogVisible = true;
},
//
handleDetails(row) {
<<<<<<< HEAD
this.inDialogVisible = true
this.inDialogType = 'details'
this.inDialogTiltle = '详情'
this.id = row.id
console.log(this.id, 'id')
=======
this.inDialogVisible = true;
this.inDialogType = "details";
this.inDialogTiltle = "详情";
this.id = row.id;
console.log(this.id, "id");
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
//
handleEdit(row) {
this.inDialogVisible = true
this.inDialogType = 'edit'
this.inDialogTiltle = '编辑'
this.id = row.id
this.inDialogVisible = true;
this.inDialogType = "edit";
this.inDialogTiltle = "编辑";
this.id = row.id;
},
//
purchaseFn(row) {
this.purchaseOpen = true
this.purchaseTitle = row.purchaseEndInfo + '采购单详情'
this.id = row.id
this.purchaseOpen = true;
this.purchaseTitle = row.purchaseEndInfo + "采购单详情";
this.id = row.id;
},
closeDialog() {
this.purchaseOpen = false
this.purchaseOpen = false;
this.approvalProcessShow = false;
},
handleCloseDetail() {
this.inDialogVisible = false
this.inDialogVisible = false;
},
handleExport() {
this.$message({
type: "success",
message: "出库单导出成功!"
message: "出库单导出成功!",
});
},
//
rowSelect() {
this.inDialogVisible = true
this.inDialogType = 'inbound'
this.inDialogTiltle = '入库'
this.inDialogVisible = true;
this.inDialogType = "inbound";
this.inDialogTiltle = "入库";
},
searchReset() {
this.query = {};
this.form.inDate = []
this.form.inOperatorName = ''
this.form.inOperator = ''
this.form.inDate = [];
this.form.inOperatorName = "";
this.form.inOperator = "";
this.onLoad(this.page);
},
searchChange(params, done) {
if (params && params.inOperatorName && !params.inOperator) {
@ -271,7 +393,7 @@ export default {
},
//
handleSubmitSuccess() {
this.onLoad(this.page)
this.onLoad(this.page);
},
//
onLoad(page, params = {}) {
@ -280,21 +402,21 @@ export default {
...params,
...this.query,
pageSize: page.pageSize,
pageNum: page.currentPage
pageNum: page.currentPage,
};
if (queryParams.inDate && Array.isArray(queryParams.inDate)) {
queryParams.startTime = queryParams.inDate[0];
queryParams.endTime = queryParams.inDate[1];
delete queryParams.inDate;
}
getList(page.currentPage, page.pageSize, queryParams).then(res => {
console.log('列表', res.data.result)
getList(page.currentPage, page.pageSize, queryParams).then((res) => {
console.log("列表", res.data.result);
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
});
}
}
},
},
};
</script>

@ -1,35 +1,51 @@
<template>
<div>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
:permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menu">
<el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录
<el-button type="text" size="small" @click.stop="handleLog(scope.row)"
>记录
</el-button>
</template>
</avue-crud>
</basic-container>
<el-dialog title="记录" :visible.sync="dialogLogVisible" width="60%" :close-on-click-modal="false"
:append-to-body="true">
<el-dialog
title="记录"
:visible.sync="dialogLogVisible"
width="60%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="入库" name="2"></el-tab-pane>
<el-tab-pane label="出库" name="1"></el-tab-pane>
<!-- <el-tab-pane label="报废" name="third"></el-tab-pane> -->
</el-tabs>
<el-table :data="tableData" style="width: 100%">
<el-table-column type="index" width="50">
</el-table-column>
<el-table-column type="index" width="50"> </el-table-column>
<el-table-column prop="quantity" label="数量" width="180">
</el-table-column>
<el-table-column prop="operatorName" label="操作人" width="180">
</el-table-column>
<el-table-column prop="operationTime" label="时间" width="180">
</el-table-column>
<el-table-column prop="departmentName" label="部门">
</el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogLogVisible = false"> </el-button>
@ -54,10 +70,10 @@ export default {
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
height: 'auto',
height: "auto",
calcHeight: 30,
tip: false,
searchShow: true,
@ -76,58 +92,82 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
menuWidth: 80,
column: [
{
label: "存货编号",
prop: "materialCode",
headerAlign: "center",
align: "center",
},
{
label: "存货名称",
prop: "materialName",
search: true,
headerAlign: "center",
align: "left",
},
{
label: "规格型号",
prop: "model",
headerAlign: "center",
align: "left",
},
{
label: "类别",
prop: "type",
search: true,
type: 'select',
dicData: [{
label: '易耗品',
value: "YH"
}, {
label: '耐用品',
value: "NY"
}]
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "易耗品",
value: "YH",
},
{
label: "耐用品",
value: "NY",
},
],
},
{
label: "计量单位",
prop: "unit",
headerAlign: "center",
align: "center",
},
{
label: "数量",
prop: "num",
headerAlign: "center",
align: "center",
},
{
label: "单价",
prop: "unitPrice",
headerAlign: "center",
align: "center",
},
{
label: "金额",
prop: "amount",
headerAlign: "center",
align: "center",
},
{
label: "描述",
prop: "remark",
}
]
headerAlign: "center",
align: "center",
},
],
},
data: [],
dialogLogVisible: false,
transactionType: '1',
transactionType: "1",
tableData: [],
ckTable: [],
rkTable: [],
@ -141,43 +181,47 @@ export default {
addBtn: false,
viewBtn: false,
delBtn: false,
editBtn: false
editBtn: false,
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
}
},
},
mounted() {
this.tableData = this.ckTable
this.tableData = this.rkTable
this.tableData = this.ckTable;
this.tableData = this.rkTable;
},
methods: {
async handleLog(row) {
this.dialogLogVisible = true
this.currentRow = row
this.dialogLogVisible = true;
this.currentRow = row;
const params = {
oneFromId: row.id,
transactionType: this.transactionType,
}
};
const pageNum = this.page.currentPage;
const pageSize = this.page.pageSize;
const res = await recordList(pageNum, pageSize, Object.assign({}, this.query, params));
const res = await recordList(
pageNum,
pageSize,
Object.assign({}, this.query, params)
);
this.tableData = res.data.result.list;
},
handleTabClick() {
//
if (this.transactionType == '1') {
this.tableData = this.ckTable
if (this.transactionType == "1") {
this.tableData = this.ckTable;
}
//
if (this.transactionType == '2') {
this.tableData = this.rkTable
if (this.transactionType == "2") {
this.tableData = this.rkTable;
}
},
@ -209,17 +253,21 @@ export default {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.loading = true;
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
).then((res) => {
// const data = res.data.data;
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
// this.selectionClear();
});
this.loading = false
}
}
this.loading = false;
},
},
};
</script>

@ -6,10 +6,10 @@
@refresh-change="refreshChange" @on-load="onLoad" >
<!-- @row-click="rowSelect" -->
<template slot-scope="scope" slot="menuLeft">
<el-button size="small" plain @click="handleDesign()">新增出库单
</el-button>
<el-button size="small" plain @click="handleExport()">出库单导出
<el-button size="small" type="primary" @click="handleDesign()">新增出库单
</el-button>
<!-- <el-button size="small" plain @click="handleExport()">出库单导出
</el-button> -->
</template>
<template slot-scope="scope" slot="purchaseEndInfo">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.purchaseEndInfo != ''">{{
@ -79,18 +79,33 @@ export default {
columnBtn: false,
menuWidth: 120,
menu: true,
menuAlign: "left",
searchMenuPosition: "right",
excelBtn: true,
column: [
{
label: "需求单名称",
prop: "demandEndInfo",
<<<<<<< HEAD
width: 150,
align: "center"
=======
width: 180,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库单号",
prop: "orderNo",
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 110,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库日期",
@ -102,8 +117,14 @@ export default {
endPlaceholder: "结束时间",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 140,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -111,13 +132,22 @@ export default {
label: "事由",
prop: "reason",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "物资类型",
prop: "materialType",
search: false,
type: 'select',
<<<<<<< HEAD
=======
headerAlign: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
align: "center",
dicData: [{
label: '办公物资',
@ -131,14 +161,25 @@ export default {
{
label: "部门",
prop: "department",
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库人",
prop: "shipperName",
search: true,
<<<<<<< HEAD
searchParam: 'inOperator',
align: "center"
=======
headerAlign: "center",
align: "center",
searchParam: 'inOperator'
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
// {

@ -130,16 +130,23 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
menuWidth: 140,
column: [
{
label: "编号",
prop: "no",
headerAlign: "center",
align: "center",
},
{
label: "部门",
prop: "str8",
search: true,
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "部门一",
@ -155,38 +162,56 @@ export default {
label: "名称",
prop: "name",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "规格型号",
prop: "xh",
headerAlign: "center",
align: "center",
},
{
label: "类别",
prop: "lb",
headerAlign: "center",
align: "center",
},
{
label: "计量单位",
prop: "unit",
headerAlign: "center",
align: "center",
},
{
label: "数量",
prop: "number",
headerAlign: "center",
align: "center",
},
{
label: "单价",
prop: "dj",
headerAlign: "center",
align: "center",
},
{
label: "金额",
prop: "pice",
headerAlign: "center",
align: "center",
},
{
label: "状态",
prop: "status",
headerAlign: "center",
align: "center",
},
{
label: "归还时间",
prop: "time",
headerAlign: "center",
align: "center",
},
],
},

@ -16,7 +16,8 @@
:option="option"
v-model="form"
:data="data"
@row-del="rowDel" @on-load="onLoad"
@row-del="rowDel"
@on-load="onLoad"
:table-loading="loading"
@row-update="rowUpdate"
@row-save="rowSave"
@ -40,10 +41,10 @@ export default {
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
height: 'auto',
height: "auto",
calcHeight: 30,
tip: false,
searchShow: true,
@ -62,25 +63,36 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
column: [
{
label: "物资名称",
prop: "materialName",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "规格/型号",
prop: "model",
headerAlign: "center",
align: "center",
},
{
label: "类别",
prop: "materialCode",
type: 'select',
type: "select",
headerAlign: "center",
align: "center",
dicData: [],
props: {
label: 'label',
value: 'value'
label: "label",
value: "value",
},
// formatter: (row, value, label, column) => {
// // valuelabel
@ -90,30 +102,32 @@ export default {
// };
// return typeMap[value] || value;
// },
dataType: 'string'
dataType: "string",
},
{
label: "单位",
prop: "unit",
headerAlign: "center",
align: "center",
},
]
],
},
data: [],
dialogLogVisible: false,
activeName: 'first',
activeName: "first",
tableData: [],
ckTable: [
{ str1: '3', str2: '2025-04-09', str3: '部门一' },
{ str1: '37', str2: '2025-04-03', str3: '部门一' }
{ str1: "3", str2: "2025-04-09", str3: "部门一" },
{ str1: "37", str2: "2025-04-03", str3: "部门一" },
],
rkTable: [
{ str1: '5', str2: '2025-03-19', str3: '部门二' },
{ str1: '12', str2: '2025-03-19', str3: '部门二' },
{ str1: "5", str2: "2025-03-19", str3: "部门二" },
{ str1: "12", str2: "2025-03-19", str3: "部门二" },
],
bfTable: [
{ str1: '9', str2: '2025-03-19', str3: '部门三' },
{ str1: '19', str2: '2025-03-19', str3: '部门三' },
{ str1: "9", str2: "2025-03-19", str3: "部门三" },
{ str1: "19", str2: "2025-03-19", str3: "部门三" },
],
};
},
@ -124,51 +138,55 @@ export default {
addBtn: false,
viewBtn: false,
delBtn: false,
editBtn: false
editBtn: false,
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
}
},
},
mounted() {
this.tableData = this.ckTable
this.fetchMaterialCode()
this.tableData = this.ckTable;
this.fetchMaterialCode();
},
methods: {
fetchMaterialCode() {
getCode().then(res => {
const dicData = res.data.result.map(item => ({
getCode()
.then((res) => {
const dicData = res.data.result.map((item) => ({
label: item.name,
value: item.code
value: item.code,
}));
console.log('materialCode字典数据:', dicData);
const targetColumn = this.option.column.find(col => col.prop === 'materialCode');
console.log("materialCode字典数据:", dicData);
const targetColumn = this.option.column.find(
(col) => col.prop === "materialCode"
);
if (targetColumn) {
targetColumn.dicData = dicData;
}
}).catch(error => {
console.error('获取materialCode字典数据失败:', error);
this.$message.error('加载类别数据失败,请刷新重试');
})
.catch((error) => {
console.error("获取materialCode字典数据失败:", error);
this.$message.error("加载类别数据失败,请刷新重试");
});
},
handleLog() {
this.dialogLogVisible = true
this.dialogLogVisible = true;
},
handleTabClick(tab, event) {
console.log(tab, event);
if (this.activeName == 'first') {
this.tableData = this.ckTable
if (this.activeName == "first") {
this.tableData = this.ckTable;
}
if (this.activeName == 'second') {
this.tableData = this.rkTable
if (this.activeName == "second") {
this.tableData = this.rkTable;
}
if (this.activeName == 'third') {
this.tableData = this.bfTable
if (this.activeName == "third") {
this.tableData = this.bfTable;
}
},
searchReset() {
@ -200,33 +218,38 @@ export default {
},
//
rowSave(row, done, loading) {
add(row).then(() => {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
message: "操作成功!",
});
done();
}, error => {
},
(error) => {
window.console.log(error);
loading();
});
}
);
},
//
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page)
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
})
done(row)
},error => {
message: "操作成功!",
});
done(row);
},
(error) => {
window.console.log(error);
loading();
})
}
);
},
//
@ -234,29 +257,27 @@ export default {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
return remove(row.id.toString());
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
message: "操作成功!",
});
done();
})
.catch(action => {
if (action !== 'cancel') {
.catch((action) => {
if (action !== "cancel") {
this.$message({
type: "error",
message: "操作失败"
message: "操作失败",
});
}
});
},
onLoad(page, params = {}) {
this.loading = true;
@ -279,16 +300,20 @@ export default {
// dj: '11',
// pice: '22'
// })
this.loading = false
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.loading = false;
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
).then((res) => {
// const data = res.data.data;
this.data = res.data.result.list;
this.loading = false
this.loading = false;
this.page.total = res.data.result.total;
// this.selectionClear();
});
this.loading = false
}
}
this.loading = false;
},
},
};
</script>

@ -53,30 +53,44 @@ export default {
label: "采购单号",
prop: "purchaseNo",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "物资Id",
prop: "materialId",
headerAlign: "center",
align: "center",
},
{
label: "规格型号",
prop: "model",
headerAlign: "center",
align: "center",
},
{
label: "类别",
prop: "type",
headerAlign: "center",
align: "center",
},
{
label: "单位",
prop: "unit",
headerAlign: "center",
align: "center",
},
{
label: "数量",
prop: "num",
headerAlign: "center",
align: "center",
},
{
label: "金额",
prop: "money",
headerAlign: "center",
align: "center",
}
]
},

@ -5,10 +5,10 @@
:title="outDialogTiltle"
:visible.sync="outDialogVisible"
:append-to-body="true"
width="70%"
@close="handleCloseDetail"
fullscreen
>
<div class="dialog-content">
<!-- 基本信息 -->
<el-form
:model="sizeForm"
@ -18,23 +18,10 @@
>
<div class="form-title">基本信息</div>
<el-row>
<el-col :span="12">
<el-form-item label="仓库名称">
<el-input
v-model="sizeForm.waNmae"
:disabled="outDialogType != 'add' || type == '一级库'"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="出库单号">
<el-input v-model="sizeForm.code" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="出库申请时间">
<el-date-picker
v-model="sizeForm.inDate"
v-model="sizeForm.outDate"
type="date"
placeholder="选择日期"
style="width: 100%"
@ -65,11 +52,46 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="领用人">
<el-input
v-model="sizeForm.submitName"
<el-form-item label="部门">
<el-select
v-model="sizeForm.departmentId"
placeholder="请选择部门"
style="width: 100%"
:disabled="outDialogType != 'add'"
></el-input>
@change="deptChange"
clearable
filterable
>
<el-option
v-for="item in departmentOptions"
:key="item.departmentId"
:label="item.department"
:value="item.departmentId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="领用人">
<!-- userOptions -->
<el-select
v-model="sizeForm.lingyongren"
placeholder="请选择物资名称"
style="width: 100%"
v-if="outDialogType != 'details'"
:disabled="sizeForm.departmentId == ''"
value-key="id"
clearable
filterable
>
<el-option
v-for="item in userOptions"
:key="item.materialId"
:label="item.materialName"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -80,30 +102,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审批人">
<el-input v-model="sizeForm.applyNmae" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="二级入库确认">
<el-input v-model="sizeForm.applyNmae" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选项">
<el-radio-group
v-model="sizeForm.radio"
@change="radioChange()"
:disabled="outDialogType != 'add'"
>
<el-radio :label="1" :disabled="sizeForm.type == 2">批量选择</el-radio>
<el-radio :label="2">单项选择</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<!-- <div class="form-title">2025年04月05日出库信息</div> -->
<el-button
type="primary"
size="mini"
@ -112,27 +111,37 @@
>新增</el-button
>
<el-table :data="sizeForm.inTableData" border style="width: 100%">
<el-table-column prop="str1" label="编码" width="100"> </el-table-column>
<el-table-column prop="str2" label="名称" width="140">
<el-table-column prop="materialCode" label="物资编码" width="100">
</el-table-column>
<el-table-column prop="str2" label="物资名称" width="140">
<template slot-scope="scope">
<el-select
v-model="scope.row.str2"
placeholder="请选择"
v-model="scope.row.materialitem"
placeholder="请选择物资名称"
style="width: 100%"
size="mini"
@change="changeName(scope.$index)"
@change="
handleMaterialChange(scope.row.materialitem, scope.$index)
"
v-if="outDialogType != 'details'"
value-key="id"
>
<el-option
v-for="item in materials"
:key="item.materialId"
:label="item.materialName"
:value="item"
>
<el-option label="名称一" value="1"></el-option>
<el-option label="名称二" value="2"></el-option>
</el-option>
</el-select>
<span v-else> {{ scope.row.materialName }}</span>
</template>
</el-table-column>
<el-table-column prop="str3" label="规格" width="100"> </el-table-column>
<el-table-column prop="str4" label="类别" width="100"> </el-table-column>
<el-table-column prop="str5" label="单位" width="100"> </el-table-column>
<el-table-column prop="str6" label="申请数量" width="100"> </el-table-column>
<el-table-column prop="str9" label="已出库" width="100"> </el-table-column>
<el-table-column prop="str7" label="出库数量" width="140">
<el-table-column prop="model" label="规格/型号"> </el-table-column>
<el-table-column prop="type" label="类别"> </el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="str6" label="申请数量"> </el-table-column>
<el-table-column prop="str9" label="已出库"> </el-table-column>
<el-table-column prop="str7" label="出库数量">
<template slot-scope="scope">
<el-input-number
size="mini"
@ -145,28 +154,19 @@
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="str8" label="单价" width="100"> </el-table-column>
<!-- <el-table-column prop="status" label="出库情况">
<template slot-scope="scope">
<el-button
type="text"
@click="putIn(scope.row)"
v-if="scope.row.status == 1"
>出库</el-button
>
<span v-if="scope.row.status == 0">已出库</span>
</template>
</el-table-column> -->
<el-table-column prop="unitPrice" label="单价"> </el-table-column>
</el-table>
<div class="form-title">出库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%">
<el-table-column prop="date" label="当前库存" width="100">
<el-table-column prop="str1" label="编码" width="100"> </el-table-column>
<el-table-column prop="str2" label="名称" width="100">
<el-table
:data="sizeForm.inAccountsTableData"
border
style="width: 100%"
>
<el-table-column prop="date" label="当前库存">
<el-table-column prop="str1" label="编码"> </el-table-column>
<el-table-column prop="str2" label="名称">
<template slot-scope="scope">
<el-select
v-if="sizeForm.radio == 2"
v-model="sizeForm.type"
placeholder="请选择"
style="width: 100%"
@ -175,54 +175,36 @@
<el-option label="办公室物资" value="1"></el-option>
<el-option label="其他物资" value="2"></el-option>
</el-select>
<span v-else>{{ scope.row.str2 }}</span>
</template>
</el-table-column>
<el-table-column prop="str3" label="规格" width="100"> </el-table-column>
<el-table-column prop="str4" label="类别" width="100"> </el-table-column>
<el-table-column prop="str5" label="单位" width="100"> </el-table-column>
<el-table-column prop="str6" label="数量" width="100"> </el-table-column>
<el-table-column prop="str7" label="单价" width="100"> </el-table-column>
<el-table-column prop="str3" label="规格"> </el-table-column>
<el-table-column prop="str4" label="类别"> </el-table-column>
<el-table-column prop="str5" label="单位"> </el-table-column>
<el-table-column prop="str6" label="数量"> </el-table-column>
<el-table-column prop="str7" label="单价"> </el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库信息" width="100">
<el-table-column prop="str8" label="数量" width="100"> </el-table-column>
<el-table-column prop="str9" label="单价" width="100"> </el-table-column>
<el-table-column prop="date" label="出库信息">
<el-table-column prop="str8" label="数量"> </el-table-column>
<el-table-column prop="str9" label="单价"> </el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库后库存">
<el-table-column prop="str10" label="数量" width="100"> </el-table-column>
<el-table-column prop="str11" label="单价" width="100"> </el-table-column>
<el-table-column prop="str10" label="数量"> </el-table-column>
<el-table-column prop="str11" label="单价"> </el-table-column>
</el-table-column>
</el-table>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseDetail()"> </el-button>
<!-- <el-button type="primary" @click="save()"> </el-button> -->
<el-button type="primary" @click="sumbit()"> </el-button>
</span>
</el-dialog>
<!-- 批量出库 选择 -->
<el-dialog
:close-on-click-modal="false"
title="选择数据来源"
:visible.sync="inBatchDialogVisible"
:append-to-body="true"
width="40%"
@close="handleBatchClose"
>
<el-select v-model="batchType" placeholder="请选择数据来源" style="width: 100%">
<el-option label="2025年1季度" value="1"></el-option>
<el-option label="2025年2季度" value="2"></el-option>
<el-option label="2025年3季度" value="3"></el-option>
<el-option label="2025年4季度" value="4"></el-option>
</el-select>
<span slot="footer" class="dialog-footer">
<el-button @click="handleBatchClose()"> </el-button>
<el-button type="primary" @click="batchSumbit()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getDetailedItems, getMaterialList } from "@/api/firstOrder/outbound";
import { getUserList } from "@/api/secondOrder/outbound";
export default {
props: {
repairVisible: {
@ -253,10 +235,14 @@ export default {
argument: "", //
inAccountsTableData: [], //
inTableData: [],
departmentId: "", //id
},
inTableData: [],
inBatchDialogVisible: false, //
batchType: "", //
materials: [], //
userOptions: [], //
departmentOptions: [], //
};
},
mounted() {
@ -266,44 +252,55 @@ export default {
} else {
this.inInit();
}
this.getMaterialList();
this.getDetailedItems();
},
methods: {
//
async getMaterialList() {
this.loading = true;
try {
const res = await getMaterialList();
this.materials = res.data.result;
} catch (error) {
this.$message.error("获取数据来源失败,请重试");
} finally {
this.loading = false;
}
},
//
handleMaterialChange(row, index) {
this.sizeForm.inTableData[index].materialId = row.materialId;
this.sizeForm.inTableData[index].model = row.model;
this.sizeForm.inTableData[index].materialCode = row.materialCode;
this.sizeForm.inTableData[index].materialName = row.materialName;
this.sizeForm.inTableData[index].type = row.type;
this.sizeForm.inTableData[index].unit = row.unit;
},
//
getUserList(value) {
getUserList({ departmentId: value }).then((res) => {
this.userOptions = res.data.result;
});
},
//
getDetailedItems() {
getDetailedItems().then((res) => {
this.departmentOptions = res.data.result;
});
},
//
deptChange(value) {
this.getUserList(value);
},
handleCloseDetail() {
this.outDialogVisible = false;
this.$emit("handleCloseDetail");
},
inInit() {
const randomNum = Math.floor(Math.random() * 100000000) + 1;
this.sizeForm.code = String(randomNum).padStart(8, "0"); //
this.sizeForm.applyNmae = "审批人一";
this.sizeForm.submitName = "填报人一";
this.sizeForm.radio = 1;
this.sizeForm.waNmae = "仓库一";
this.sizeForm.argument = "入库";
this.sizeForm.type = "1";
this.sizeForm.inDate = new Date(); //
this.sizeForm.inTableData.push({
str1: "000001",
str2: "物品1",
str3: "规格1",
str4: "类别1",
str5: "单位1",
str6: "11",
str7: "4",
str8: "3",
str9: "33",
name: "审批人",
status: "1", //
});
},
inInit() {},
addInit() {
//
const randomNum = Math.floor(Math.random() * 100000000) + 1;
this.sizeForm.code = String(randomNum).padStart(8, "0"); //
this.sizeForm.inDate = new Date(); //
if (this.type == "一级库") {
this.sizeForm.waNmae = "一级库";
}
this.sizeForm.outDate = new Date(); //
},
handleCloseDetail() {
this.inDialogVisible = false;
@ -311,66 +308,7 @@ export default {
},
//
inTableAdd() {
this.sizeForm.inTableData.push({
str1: "",
str2: "",
str3: "",
str4: "",
str5: "",
str6: "",
str7: 0,
name: "",
});
},
//
putIn(row) {
row.status = 0;
//
this.sizeForm.inAccountsTableData.push({
str1: "000001",
str2: "物品1",
str3: "规格1",
str4: "类别1",
str5: "单位1",
str6: "12",
str7: "3",
str8: row.str7,
str9: "3",
str10: row.str7 + 12,
str11: "3",
str12: "审批人1",
str13: "2025-04-05",
});
},
//
handleBatchClose() {
this.inBatchDialogVisible = false;
},
//
batchSumbit() {
this.sizeForm.inTableData.push({
str1: "000001",
str2: "物品1",
str3: "规格1",
str4: "类别1",
str5: "单位1",
str6: "11",
str7: "4",
str8: "3",
str9: "部门一",
name: "审批人",
status: "1", //
});
this.inBatchDialogVisible = false;
},
//
save() {
this.$message({
type: "success",
message: "保存成功",
});
this.handleCloseDetail();
this.sizeForm.inTableData.push({});
},
//
sumbit() {
@ -380,39 +318,6 @@ export default {
});
this.handleCloseDetail();
},
//
radioChange(val) {
this.sizeForm.inTableData = [];
if (this.sizeForm.radio == 1) {
this.inBatchDialogVisible = true;
}
},
//
changeName(index) {
console.log(9999, index);
this.sizeForm.inTableData.forEach((item, i) => {
if (i == index) {
item.str1 = "000001";
item.str2 = "物品1";
item.str3 = "规格1";
item.str4 = "类别1";
item.str5 = "单位1";
item.str6 = "11";
item.str7 = 4;
item.str8 = "3";
item.str9 = "部门一";
item.name = "审批人";
item.status = "1";
this.$set(item, "str7", 4);
}
});
console.log(888888, this.sizeForm.inTableData);
},
numberChange() {
this.$forceUpdate(); //
console.log(77777, this.sizeForm.inTableData);
},
},
};
</script>
@ -420,4 +325,16 @@ export default {
.form-title {
margin: 20px 0;
}
::v-deep.el-dialog__footer {
position: fixed !important;
bottom: 0 !important;
right: 0 !important;
}
::v-deep.dialog-content {
max-height: calc(100vh - 200px); /* 减去标题栏和底部按钮的高度 */
overflow-y: auto;
padding-right: 10px; /* 预留滚动条空间 */
}
</style>

@ -102,11 +102,15 @@ export default {
columnBtn: false,
menu: true,
menuWidth: 100,
menuAlign: "left",
searchMenuPosition: "right",
column: [
{
label: "需求单名称",
prop: "demandEndInfo",
width: 180,
headerAlign: "center",
align: "center",
},
// {
// label: "",
@ -115,6 +119,8 @@ export default {
{
label: "入库单号",
prop: "orderNo",
headerAlign: "center",
align: "center",
},
{
label: "入库时间",
@ -126,21 +132,29 @@ export default {
endPlaceholder: "结束时间",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
headerAlign: "center",
align: "center",
},
{
label: "入库人",
prop: "inOperatorName",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "部门",
prop: "departments",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "状态",
prop: "status",
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "已入库",

@ -1,32 +1,55 @@
<template>
<div>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
:permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menu">
<!-- <el-button type="text" size="small" @click.stop="handleReturn(scope.row)">归还
</el-button> -->
<el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录
<el-button type="text" size="small" @click.stop="handleLog(scope.row)"
>记录
</el-button>
</template>
</avue-crud>
</basic-container>
<!-- 归还 -->
<el-dialog title="归还" :visible.sync="dialogReturnVisible" width="30%" :close-on-click-modal="false"
:append-to-body="true">
<el-dialog
title="归还"
:visible.sync="dialogReturnVisible"
width="30%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-form ref="form" :model="returnForm" label-width="100px">
<el-form-item label="归还数量">
<el-input-number v-model="returnForm.count" :min="1"></el-input-number>
<el-input-number
v-model="returnForm.count"
:min="1"
></el-input-number>
</el-form-item>
<el-form-item label="归还理由">
<el-input v-model="returnForm.rmark" type="textarea" :rows="3" placeholder="请输入内容"></el-input>
<el-input
v-model="returnForm.rmark"
type="textarea"
:rows="3"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -35,14 +58,24 @@
</span>
</el-dialog>
<!-- 报废 -->
<el-dialog title="报废" :visible.sync="dialogScrapVisible" width="30%" :close-on-click-modal="false"
:append-to-body="true">
<el-dialog
title="报废"
:visible.sync="dialogScrapVisible"
width="30%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-form ref="form" :model="scrapForm" label-width="100px">
<el-form-item label="报废数量">
<el-input-number v-model="scrapForm.count" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="报废理由">
<el-input v-model="scrapForm.rmark" type="textarea" :rows="3" placeholder="请输入内容"></el-input>
<el-input
v-model="scrapForm.rmark"
type="textarea"
:rows="3"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -51,24 +84,26 @@
</span>
</el-dialog>
<!-- 记录 -->
<el-dialog title="记录" :visible.sync="dialogLogVisible" width="60%" :close-on-click-modal="false"
:append-to-body="true">
<el-dialog
title="记录"
:visible.sync="dialogLogVisible"
width="60%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="入库" name="first"></el-tab-pane>
<el-tab-pane label="出库" name="second"></el-tab-pane>
<el-tab-pane label="报废" name="third"></el-tab-pane>
</el-tabs>
<el-table :data="tableData" style="width: 100%">
<el-table-column type="index" width="50">
</el-table-column>
<el-table-column type="index" width="50"> </el-table-column>
<el-table-column prop="str1" label="数量" width="180">
</el-table-column>
<el-table-column prop="str2" label="时间" width="180">
</el-table-column>
<el-table-column prop="str3" label="部门">
</el-table-column>
<el-table-column prop="str4" label="操作人">
</el-table-column>
<el-table-column prop="str3" label="部门"> </el-table-column>
<el-table-column prop="str4" label="操作人"> </el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogLogVisible = false"> </el-button>
@ -78,7 +113,7 @@
</template>
<script>
import { getList, remove } from "@/api/report/report";
import { getList } from "@/api/secondOrder/list.js";
import { mapGetters } from "vuex";
export default {
@ -91,10 +126,10 @@ export default {
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
height: 'auto',
height: "auto",
calcHeight: 30,
tip: false,
searchShow: true,
@ -102,7 +137,10 @@ export default {
border: true,
index: true,
selection: true,
viewBtn: true,
viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
dialogClickModal: false,
menu: true,
selection: false,
@ -113,130 +151,150 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
column: [
{
label: "部门",
prop: "str8",
prop: "department",
search: true,
type: 'select',
dicData: [{
label: '部门一',
value: 0
}, {
label: '部门二',
value: 1
}]
headerAlign: "center",
align: "center",
// type: "select",
// dicData: [
// {
// label: "",
// value: 0,
// },
// {
// label: "",
// value: 1,
// },
// ],
},
{
label: "存货编号",
prop: "no",
label: "物资编号",
prop: "materialCode",
headerAlign: "center",
align: "center",
},
{
label: "存货名称",
prop: "name",
label: "物资名称",
prop: "materialName",
headerAlign: "center",
align: "center",
search: true,
},
{
label: "规格型号",
prop: "xh",
prop: "model",
headerAlign: "center",
align: "center",
},
{
label: "类别",
prop: "lb",
prop: "type",
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "易耗品",
value: "YH",
},
{
label: "耐用品",
value: "NY",
},
],
},
{
label: "计量单位",
prop: "unit",
headerAlign: "center",
align: "center",
},
{
label: "数量",
prop: "number",
prop: "num",
headerAlign: "center",
align: "center",
},
{
label: "单价",
prop: "dj",
prop: "unitPrice",
headerAlign: "center",
align: "center",
},
{
label: "金额",
prop: "pice",
}
]
prop: "amount",
headerAlign: "center",
align: "center",
},
],
},
data: [],
dialogReturnVisible: false,
returnInfo: {},
returnForm: {
count: 0,
rmark: '',
rmark: "",
},
dialogScrapVisible: false,
scrapInfo: {},
scrapForm: {
count: 0,
rmark: '',
rmark: "",
},
dialogLogVisible: false,
activeName: 'first',
activeName: "first",
tableData: [],
ckTable: [
{str1: '3', str2: '2025-04-09', str3: '部门一',str4:'操作人1'},
{str1: '37', str2: '2025-04-03', str3: '部门一',str4:'操作人1'}
{ str1: "3", str2: "2025-04-09", str3: "部门一", str4: "操作人1" },
{ str1: "37", str2: "2025-04-03", str3: "部门一", str4: "操作人1" },
],
rkTable: [
{str1: '5',str2: '2025-03-19',str3: '部门二',str4:'操作人1'},
{str1: '12',str2: '2025-03-19',str3: '部门二',str4:'操作人1'},
{ str1: "5", str2: "2025-03-19", str3: "部门二", str4: "操作人1" },
{ str1: "12", str2: "2025-03-19", str3: "部门二", str4: "操作人1" },
],
bfTable: [
{str1: '9',str2: '2025-03-19',str3: '部门三',str4:'操作人1'},
{str1: '19',str2: '2025-03-19',str3: '部门三',str4:'操作人1'},
{ str1: "9", str2: "2025-03-19", str3: "部门三", str4: "操作人1" },
{ str1: "19", str2: "2025-03-19", str3: "部门三", str4: "操作人1" },
],
};
},
computed: {
...mapGetters(["userInfo", "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(",");
}
},
mounted() {
this.tableData = this.ckTable
this.tableData = this.ckTable;
},
methods: {
handleLog() {
this.dialogLogVisible = true
this.dialogLogVisible = true;
},
handleTabClick(tab, event) {
console.log(tab, event);
if(this.activeName=='first'){
this.tableData = this.ckTable
if (this.activeName == "first") {
this.tableData = this.ckTable;
}
if(this.activeName=='second'){
this.tableData = this.rkTable
if (this.activeName == "second") {
this.tableData = this.rkTable;
}
if(this.activeName=='third'){
this.tableData = this.bfTable
if (this.activeName == "third") {
this.tableData = this.bfTable;
}
},
handlePreview(name) {
this.$router.push({ path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.design.reportUrl}/preview?_u=blade-${name}` });
this.$router.push({
path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.design.reportUrl}/preview?_u=blade-${name}`,
});
},
handleDesign(name) {
this.$router.push({ path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}` });
this.$router.push({
path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}`,
});
},
searchReset() {
@ -268,53 +326,42 @@ export default {
},
onLoad(page, params = {}) {
this.loading = true;
this.data.push({
no: '00100001',
name: '物品1',
xh: '1',
lb: '易耗品',
unit: '11',
number: '1',
dj: '11',
pice: '11'
}, {
no: '00100002',
name: '物品2',
xh: '2',
lb: '耐用品',
unit: '22',
number: '2',
dj: '11',
pice: '22'
})
this.loading = false
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
).then((res) => {
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
});
this.loading = false;
},
//
handleReturn(row) {
this.dialogReturnVisible = true
this.returnInfo = JSON.parse(JSON.stringify(row))
this.dialogReturnVisible = true;
this.returnInfo = JSON.parse(JSON.stringify(row));
},
returnSave() {
this.dialogReturnVisible = false
this.dialogReturnVisible = false;
this.$message({
type: "success",
message: "归还成功"
message: "归还成功",
});
},
//
handleScrap(row) {
this.dialogScrapVisible = true
this.scrapInfo = JSON.parse(JSON.stringify(row))
this.dialogScrapVisible = true;
this.scrapInfo = JSON.parse(JSON.stringify(row));
},
scrapSave() {
this.dialogScrapVisible = false
this.dialogScrapVisible = false;
this.$message({
type: "success",
message: "报废成功"
message: "报废成功",
});
}
}
},
},
};
</script>

@ -7,10 +7,10 @@
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @row-click="rowSelect">
<template slot-scope="scope" slot="menuLeft">
<el-button size="small" plain @click.stop="handleDesign()">新增出库单
</el-button>
<el-button size="small" plain @click.stop="handleExport()">出库单导出
<el-button size="small" @click.stop="handleDesign()" type="primary" >新增出库单
</el-button>
<!-- <el-button size="small" plain @click.stop="handleExport()">出库单导出
</el-button> -->
</template>
<template slot-scope="scope" slot="xuqiudanmingcheng">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.xuqiudanmingcheng!=''">{{scope.row.xuqiudanmingcheng}}</el-button>
@ -35,6 +35,8 @@ import { getList, remove } from "@/api/report/report";
import { mapGetters } from "vuex";
import outDialog from './components/outDialog.vue';
import needDialog from './components/needDialog.vue';
import { getQuarterList, getDepartmentList, getDetailedList, getDetailedItems, submitData, getMaterialList, editList } from "@/api/firstOrder/outbound";
export default {
components: {
@ -80,15 +82,20 @@ export default {
filterBtn: false,
columnBtn: false,
menu: false,
menuAlign: "left",
searchMenuPosition: "right",
excelBtn: true,
column: [
{
label: "需求单名称",
prop: "xuqiudanmingcheng",
width:180,
},
// {
// label: "",
// prop: "xuqiudanmingcheng",
// width:180,
// },
{
label: "部门",
prop: "bumen",
headerAlign: "center",
align: "center",
},
// {
// label: "",
@ -97,23 +104,31 @@ export default {
{
label: "出库单号",
prop: "str2",
headerAlign: "center",
align: "center",
},
{
label: "出库时间",
prop: "str3",
search: true,
type: "datetime",
headerAlign: "center",
align: "center",
},
{
label: "出库人",
prop: "str4",
search: true,
headerAlign: "center",
align: "center",
},
{
label: "部门",
prop: "str8",
search: true,
type: 'select',
headerAlign: "center",
align: "center",
dicData: [{
label: '部门一',
value: 0
@ -125,15 +140,21 @@ export default {
{
label: "审批人",
prop: "str5",
headerAlign: "center",
align: "center",
},
{
label: "来源",
prop: "str6",
search: false,
headerAlign: "center",
align: "center",
},
{
label: "状态",
prop: "str7",
headerAlign: "center",
align: "center",
},
]

Loading…
Cancel
Save