zhangdi 4 months ago
commit c292cbad6b
  1. 1
      src/api/materials/list.js
  2. 1281
      src/views/authority/datascope.vue
  3. 27
      src/views/demandOrder/index.vue
  4. 113
      src/views/firstOrder/components/approvalProcessDialog.vue
  5. 99
      src/views/firstOrder/components/inDialog.vue
  6. 262
      src/views/firstOrder/components/outDialog.vue
  7. 46
      src/views/firstOrder/inbound.vue
  8. 106
      src/views/firstOrder/list.vue
  9. 35
      src/views/firstOrder/outbound.vue
  10. 2
      src/views/materials/expend.vue
  11. 96
      src/views/materials/index.vue
  12. 46
      src/views/purchaseOrders/index.vue
  13. 2
      src/views/secondOrder/list.vue
  14. 2
      src/views/secondOrder/outbound.vue

@ -1,6 +1,7 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
console.log(params,'params')
return request({
url: '/smartpark/material/list',
method: 'get',

File diff suppressed because it is too large Load Diff

@ -29,11 +29,11 @@ export default {
total: 0
},
option: {
height: 'auto',
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 18,
border: true,
index: true,
selection: true,
@ -48,6 +48,7 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
searchMenuPosition: "right",
column: [
{
label: "需求单号",
@ -109,16 +110,16 @@ export default {
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: '部门三' },
],
};
},
@ -149,13 +150,13 @@ export default {
},
handleTabClick(tab, event) {
console.log(tab, event);
if(this.activeName=='first'){
if (this.activeName == 'first') {
this.tableData = this.ckTable
}
if(this.activeName=='second'){
if (this.activeName == 'second') {
this.tableData = this.rkTable
}
if(this.activeName=='third'){
if (this.activeName == 'third') {
this.tableData = this.bfTable
}
},
@ -216,8 +217,8 @@ export default {
// this.loading = false;
// this.selectionClear();
// });
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log(123,res.data.result)
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log(123, res.data.result)
// const data = res.data.data;
this.data = res.data.result.list;
this.loading = false;

@ -1,84 +1,97 @@
<template>
<div>
<el-dialog
:close-on-click-modal="false"
:title="inDialogTiltle"
:visible.sync="inDialogVisible"
:append-to-body="true"
width="20%"
@close="handleCloseDetail"
>
<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-step v-for="(item, index) in processedApproveList"
:key="item.id"
:title="item.userName"
:description="`状态:${item.statusText}\n${item.formattedTime}`"
></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,
},
approveList: {
type: Array,
default: () => [],
},
},
data() {
return {
inDialogVisible: false,
inDialogTiltle: "审批流程",
approvalList: [
{
name: "张三",
time: "2021-01-01 10:10:10",
status: "通过",
},
{
name: "张三1",
time: "",
status: "待审核",
},
{
name: "张三3",
time: "",
status: "待审核",
},
],
};
watch: {
showDialog(val) {
this.inDialogVisible = val;
},
},
mounted() {
this.inDialogVisible = this.showDialog;
computed: {
//
processedApproveList() {
return this.approveList.map(item => {
// 1.
let formattedTime = ''
if (item.optTime) {
const date = new Date(item.optTime);
const pad = (num) => num.toString().padStart(2, '0');
formattedTime = `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
}
let statusText = '待审核'
if (item.status !== '' && item.status !== undefined) {
const statusMap = {
0: '审批中',
1: '已完成',
2: '已驳回',
};
statusText = statusMap[item.status] || '';
}
return {
...item,
formattedTime,
statusText,
};
});
},
activeStep() {
return this.processedApproveList.findIndex((item, index, array) => {
return index === array.length - 1 && item.statusText !== '审批中';
}) || 0;
}
},
methods: {
handleCloseDetail() {
this.inDialogVisible = false;
this.$emit("closeDialog");
},
}
},
data() {
return {
inDialogVisible: false,
inDialogTiltle: "审批流程"
};
},
mounted() {
this.inDialogVisible = this.showDialog;
}
};
</script>
<style lang="scss" scoped>
.form-title {
font-size: 16px;
font-weight: 600;
padding: 18px 0;
}
.teps-con{
margin:0 auto 0
.teps-con {
margin: 0 auto 0
}
:deep(.el-dialog__body) {
height: 300px;
}

@ -6,9 +6,9 @@
<el-form :model="sizeForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
<div class="form-title"> 基本信息</div>
<el-row>
<el-col :span="12" v-show="sizeForm.options == 1 && inDialogType != 'add'">
<el-col :span="12" v-show="sizeForm.options == 1 && inDialogType != 'add'">
<el-form-item label="入库单号">
<el-input v-model="sizeForm.orderNo" disabled ></el-input>
<el-input v-model="sizeForm.orderNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@ -84,7 +84,7 @@
{{ scope.row.requiredQuantity || 0 }}
</template>
</el-table-column>
<el-table-column prop="inboundQuantity" label="已入库数量" v-if="sizeForm.option == 1" >
<el-table-column prop="inboundQuantity" label="已入库数量" v-if="sizeForm.option == 1">
<template slot-scope="scope">
{{ scope.row.inboundQuantity || 0 }}
</template>
@ -93,7 +93,7 @@
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" v-if='inDialogType != "details"'></el-input-number>
<span v-else>{{ scope.row.theInboundQuantity || 0}}</span>
<span v-else>{{ scope.row.theInboundQuantity || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
@ -117,8 +117,7 @@
<el-table-column prop="type" label="类别 ">
<template slot-scope="scope">
<el-select v-model="scope.row.type" placeholder="请选择" style="width: 100%;"
@change="handleTypeChange(scope.row)"
v-if='inDialogType !== "details"'>
@change="handleTypeChange(scope.row)" v-if='inDialogType !== "details"'>
<el-option label="耐用品" value="NY"></el-option>
<el-option label="易耗品" value="YH"></el-option>
</el-select>
@ -399,38 +398,38 @@ export default {
}
},
async inInit() {
if (this.inDialogType == 'details' || this.inDialogType == 'edit') {
try {
const res = await editList(this.id);
const { ldOnePutStorage, ldOnePutStorageDetailList = [] } = res.data.result || {};
if (this.inDialogType == 'details' || this.inDialogType == 'edit') {
try {
const res = await editList(this.id);
const { ldOnePutStorage, ldOnePutStorageDetailList = [] } = res.data.result || {};
if (!ldOnePutStorage) {
this.$message.error("回显数据异常");
return;
}
const handledDetailList = ldOnePutStorageDetailList.map(item => ({
...item,
theInboundQuantity: item.inboundQuantity || 0
}))
this.sizeForm = {
...this.sizeForm,
...ldOnePutStorage,
inDate: ldOnePutStorage.inDate ? new Date(ldOnePutStorage.inDate) : '',
option: Number(ldOnePutStorage.options) || 1,
quarterName: ldOnePutStorage.purchaseEndInfo,
}
if (this.sizeForm.option === 1) {
this.sizeForm.inTableData = handledDetailList;
} else {
this.sizeForm.singleData = handledDetailList;
}
if (!ldOnePutStorage) {
this.$message.error("回显数据异常");
return;
}
const handledDetailList = ldOnePutStorageDetailList.map(item => ({
...item,
theInboundQuantity: item.inboundQuantity || 0
}))
this.sizeForm = {
...this.sizeForm,
...ldOnePutStorage,
inDate: ldOnePutStorage.inDate ? new Date(ldOnePutStorage.inDate) : '',
option: Number(ldOnePutStorage.options) || 1,
quarterName: ldOnePutStorage.purchaseEndInfo,
}
if (this.sizeForm.option === 1) {
this.sizeForm.inTableData = handledDetailList;
} else {
this.sizeForm.singleData = handledDetailList;
}
} catch (error) {
console.error("回显失败:", error);
this.$message.error("获取详情数据失败");
}
}
},
} catch (error) {
console.error("回显失败:", error);
this.$message.error("获取详情数据失败");
}
}
},
addInit() {
//
// const randomNum = Math.floor(Math.random() * 100000000) + 1;
@ -485,6 +484,7 @@ export default {
return
}
this.sizeForm.quarterName = selectedOption.quarterName
this.sizeForm.purchaseEndInfo = selectedOption
this.loading = true
const res = await getPurchasesByIds(this.batchType);
@ -623,18 +623,23 @@ export default {
this.sizeForm.options = this.sizeForm.option
this.sizeForm.option = ''
}
const res = await submitData(this.sizeForm)
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功"
});
//
this.$emit('submitSuccess');
this.handleCloseDetail();
} else {
this.$message.error(res.data.message || "提交失败");
try {
const res = await submitData(this.sizeForm)
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功"
});
//
this.$emit('submitSuccess');
this.handleCloseDetail();
} else {
this.$message.error(res.data.message || "提交失败");
}
} catch (error) {
this.$message.error(error.message || "服务器错误");
}
},
// 1 2

@ -7,7 +7,7 @@
<div class="form-title"> 基本信息</div>
<el-row>
<el-col :span="12" v-show="sizeForm.options == 1 && outDialogType != 'add'">
<el-form-item label="库单号">
<el-form-item label="库单号">
<el-input v-model="sizeForm.orderNo" disabled></el-input>
</el-form-item>
</el-col>
@ -71,7 +71,7 @@
</el-table-column>
<el-table-column prop="unit" label="单位">
</el-table-column>
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options == 2">
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options === 2">
<template slot-scope="scope">
<el-select v-model="scope.row.department" placeholder="请选择部门名称" style="width: 100%;"
v-if='inDialogType != "details"'>
@ -85,12 +85,15 @@
<el-table-column prop="applicationQuantity" label="申请数量" v-if="sizeForm.options == 1">
</el-table-column>
<el-table-column prop="outboundQuantity" label="已出库数量" v-if="sizeForm.options == 1">
<template slot-scope="scope">
{{ scope.row.outboundQuantity || 0 }}
</template>
</el-table-column>
<el-table-column prop="theInboundQuantity" label="本次入库数量">
<el-table-column prop="theOutboundQuantity" label="本次库数量">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;"
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number>
<!-- <span v-else>{{ scope.row.theInboundQuantity || 0 }}</span> -->
<!-- <span v-else>{{ scope.row.theOutboundQuantity || 0 }}</span> -->
</template>
</el-table-column>
<!-- <el-table-column prop="status" label="出库情况">
@ -121,21 +124,20 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column prop="str6" label="数量" v-if="sizeForm.options == 1">
</el-table-column> -->
<el-table-column prop="theInboundQuantity" label="本次出库数量">
<el-table-column prop="theOutboundQuantity" label="本次出库数量">
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库信息" v-if="sizeForm.options == 1">
<el-table-column prop="outboundQuantity" label="数量">
<template slot-scope="scope">
{{ scope.row.outboundQuantity || 0 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库后库存" v-if="sizeForm.options == 1">
<!-- <el-table-column prop="date" label="出库后库存" v-if="sizeForm.options == 1">
<el-table-column prop="str10" label="数量">
</el-table-column>
</el-table-column>
</el-table-column> -->
</el-table>
</el-form>
<span slot="footer" class="dialog-footer">
@ -176,6 +178,47 @@
<el-button type="primary" @click="batchSubmit()"> </el-button>
</span>
</el-dialog>
<!-- 选择弹窗 -->
<el-dialog :close-on-click-modal="false" title="选择耐用品" :visible.sync="goodsVisible" :append-to-body="true"
width="70%">
<el-table :data="goodsList" border style="width: 100%" @selection-change="goodsListSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="materialCode" label="物资编码">
</el-table-column>
<el-table-column prop="materialName" label="物资名称">
</el-table-column>
<el-table-column prop="model" label="规格">
</el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }}
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
</el-table-column>
<el-table-column prop="departmentName" label="部门">
</el-table-column>
<el-table-column prop="applicationQuantity" label="申请数量">
</el-table-column>
<el-table-column prop="outboundQuantity" label="已出库数量">
<template slot-scope="scope">
{{ scope.row.outboundQuantity || 0 }}
</template>
</el-table-column>
<el-table-column prop="theOutboundQuantity" label="本次出库数量">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="goodsVisible = false"> </el-button>
<el-button type="primary" @click="goodsSubmit()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -205,18 +248,19 @@ export default {
},
data() {
return {
goodsVisible: false,
quarterList: [],
departmentList: [],
outDialogVisible: false,
sizeForm: {
orderNo: '',//
orderNo: '',//
reason: '',//
// inAccountsTableData: [],//
inTableData: [],
ldOneOutStorageDetailVOList: [],
demandEndInfo: '',//
outDate: '',//
options: '',//
options: 2,//
materialType: '1',//
status: '',//1 2
// materialld: '',//Id
@ -227,6 +271,8 @@ export default {
},
uniqueListDialogVisible: false, //
uniqueList: [],
goodsList: [],
goodsSelectList: [],
inTableData: [],
inBatchDialogVisible: false,//
batchType: '',//
@ -258,9 +304,9 @@ export default {
this.getMaterialList()
},
methods: {
//
//
syncInboundQuantity(row) {
row.theInboundQuantity = Number(row.theInboundQuantity);
row.theOutboundQuantity = Number(row.theOutboundQuantity);
},
//
handleCloseDetail() {
@ -325,34 +371,53 @@ export default {
this.$message.error('请选择部门');
return;
}
const res = await getDetailedList({
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department
})
if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result.duplicateList
const selectedDept = this.departmentList.find(
dept => dept.departmentId === this.inBatchForm.department
);
const deptName = selectedDept ? selectedDept.department : '';
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department,
department: deptName
}));
this.inBatchDialogVisible = false;
const selectedQuarter = this.quarterList.find(
item => item.ids === this.inBatchForm.batchType
)
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
} else {
this.$message.warning('未获取到详细数据');
const res = await getDetailedList({
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department
})
if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result.duplicateList
const selectedDept = this.departmentList.find(
dept => dept.departmentId === this.inBatchForm.department
);
const deptName = selectedDept ? selectedDept.department : '';
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department,
department: deptName
}));
this.inBatchDialogVisible = false;
const selectedQuarter = this.quarterList.find(
item => item.ids === this.inBatchForm.batchType
)
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
if (res.data.result.uniqueList != null && res.data.result.uniqueList.length > 0) {
this.goodsVisible = true
this.goodsList = res.data.result.uniqueList
}
} else {
this.$message.warning('未获取到详细数据');
}
},
//
goodsListSelectionChange(val) {
this.goodsSelectList = val
},
//
goodsSubmit() {
if (this.goodsSelectList.length > 0) {
this.sizeForm.inTableData.push(...this.goodsSelectList);
this.$forceUpdate();
} else {
this.$message.warning('请先勾选需要添加的数据');
}
this.goodsVisible = false
},
//
async getDetailedItems() {
this.loading = true
@ -427,19 +492,23 @@ export default {
this.sizeForm.ldOneOutStorageDetailVOList.departmentName = this.sizeForm.inTableData.department
this.sizeForm.inTableData = []
const res = await submitData(this.sizeForm)
console.log(res, '暂存提交数据')
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功"
});
//
this.$emit('submitSuccess');
this.handleCloseDetail();
} else {
this.$message.error(res.data.message || "提交失败");
try {
const res = await submitData(this.sizeForm)
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功"
});
this.$emit('submitSuccess');
this.handleCloseDetail();
} else {
this.$message.error(res.data.message || "提交失败");
}
} catch (error) {
this.$message.error(error.message || "服务器错误");
}
},
//
async inInit() {
@ -454,7 +523,7 @@ export default {
}
const handledDetailList = ldOneOutStorageDetails.map(item => ({
...item,
// theInboundQuantity: item.theInboundQuantity || 0
outboundQuantity: item.outboundQuantity || 0
}))
this.sizeForm = {
...this.sizeForm,
@ -471,97 +540,22 @@ export default {
}
},
addInit() {
// //
// const randomNum = Math.floor(Math.random() * 100000000) + 1;
// this.sizeForm.code = String(randomNum).padStart(8, '0');//
this.sizeForm.outDate = new Date()//
this.sizeForm.outDate = new Date()//
},
//
//
inTableAdd() {
this.sizeForm.inTableData.push({})
},
// //
// // 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.bumen = ''
// this.sizeForm.xuqiudanmingcheng = '2025'
// this.sizeForm.inTableData.push({
// // str1: '000001',
// // str2: '1',
// // str3: '1',
// // str4: '1',
// // str5: '1',
// // str6: '11',
// // str7: '22',
// // str8: '3',
// // str9: '',
// // name: '',
// // status: '1',//
// // yichuku: 98,
// })
// this.inBatchDialogVisible = false
// },
//
async radioChange() {
this.sizeForm.inTableData = []
if (this.sizeForm.options == 1) {
await this.getQuarterList() //
if (this.sizeForm.options === 1) {
await this.getQuarterList()
this.inBatchDialogVisible = true
this.$forceUpdate()
}
},
//
// 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 = 22
// item.str8 = '3'
// item.str9 = ''
// item.name = ''
// item.status = '1'
// this.$set(item, 'str7', 22)
// }
// })
// console.log(888888, this.sizeForm.inTableData)
// },
numberChange() {
this.$forceUpdate();//
console.log(77777, this.sizeForm.inTableData)
}
},
watch: {
//

@ -16,20 +16,16 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
<!-- @row-click="rowSelect" -->
<template slot-scope="scope" slot="menuLeft">
<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 != ''"
v-if="scope.row.purchaseEndInfo && scope.row.purchaseEndInfo !== ''"
>{{ scope.row.purchaseEndInfo }}</el-button
>
<span v-else></span>
@ -76,13 +72,13 @@
:showDialog="approvalProcessShow"
v-if="approvalProcessShow"
@closeDialog="closeDialog"
:approveList="approveList"
></approvalProcessDialog>
</basic-container>
</template>
<script>
import { getList } from "@/api/firstOrder/inbound";
// import { mapGetters } from "vuex";
import { getList, editList } from "@/api/firstOrder/inbound";
import inDialog from "./components/inDialog.vue";
import purchaseDialog from "./components/purchaseDialog.vue";
import approvalProcessDialog from "./components/approvalProcessDialog.vue";
@ -94,7 +90,7 @@ export default {
},
data() {
return {
// form: {},
approveList:[],
form: { inDate: [], inOperatorName: "", inOperator: "" },
selectionList: [],
query: {},
@ -109,7 +105,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
viewBtn: false,
@ -128,6 +124,7 @@ export default {
menuWidth: 190,
menu: true,
menuAlign: "left",
searchMenuAlign: "right",
searchMenuPosition: "right",
excelBtn: true,
column: [
@ -137,6 +134,7 @@ export default {
width: 180,
headerAlign: "center",
align: "center",
slot: "purchaseEndInfo"
},
{
label: "入库单号",
@ -158,8 +156,6 @@ export default {
width: 140,
headerAlign: "center",
align: "center",
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
{
label: "入库人",
@ -175,6 +171,17 @@ export default {
search: false,
headerAlign: "center",
align: "center",
type: "select",
dicData: [
{
label: "采购申请",
value: 'cg',
},
{
label: "其他来源",
value: 'qt',
},
],
},
{
label: "事由",
@ -201,12 +208,6 @@ export default {
},
],
},
{
label: "审批人员",
prop: "approvers",
headerAlign: "center",
align: "center",
},
{
label: "状态",
prop: "status",
@ -242,8 +243,11 @@ export default {
},
computed: {},
methods: {
approvalProcessFn(row) {
async approvalProcessFn(row) {
this.approvalProcessShow = true;
const res = await editList(row.id);
this.approveList = res.data.result.approveList
console.log(this.approveList,'1111122')
},
handleDesign() {
this.inDialogType = "add";
@ -256,7 +260,6 @@ export default {
this.inDialogType = "details";
this.inDialogTiltle = "详情";
this.id = row.id;
console.log(this.id, "id");
},
//
handleEdit(row) {
@ -344,7 +347,6 @@ export default {
delete queryParams.inDate;
}
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;
@ -354,4 +356,6 @@ export default {
};
</script>
<style></style>
<style>
</style>

@ -1,48 +1,31 @@
<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="50%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-dialog title="记录" :visible.sync="dialogLogVisible" width="50%" :close-on-click-modal="false"
:append-to-body="true">
<el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="出库" name="1"></el-tab-pane>
<el-tab-pane label="出库" name="1"></el-tab-pane>
<el-tab-pane label="入库" name="2"></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 prop="quantity" label="数量" >
<el-table-column prop="quantity" label="数量">
</el-table-column>
<el-table-column prop="money" label="单价" v-if="transactionType == '2'">
</el-table-column>
<el-table-column prop="operatorName" label="操作人" >
</el-table-column>
<el-table-column prop="operationTime" label="时间" >
<el-table-column prop="operationTime" label="时间" :formatter="formatTime">
</el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table>
@ -73,7 +56,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
selection: true,
@ -158,6 +141,13 @@ export default {
prop: "remark",
headerAlign: "center",
align: "center",
formatter: (row, column) => {
const value = row.remark;
if (value === null || value === undefined || value === "") {
return "无";
}
return value;
}
},
],
},
@ -189,38 +179,54 @@ export default {
},
},
mounted() {
this.tableData = this.ckTable;
this.tableData = this.rkTable;
this.ckTable = [];
this.rkTable = [];
this.tableData = [];
},
methods: {
formatTime(row, column, cellValue) {
if (!cellValue) return '';
return cellValue.replace('T', ' ');
},
async handleLog(row) {
this.dialogLogVisible = true;
this.currentRow = row;
this.loadTransactionData();
},
handleTabClick() {
this.loadTransactionData();
},
async loadTransactionData() {
if (!this.currentRow) return;
const params = {
oneFromId: row.id,
transactionType: this.transactionType,
oneFromId: this.currentRow.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)
);
this.tableData = res.data.result.list;
},
handleTabClick() {
//
if (this.transactionType == "1") {
this.tableData = this.ckTable;
}
//
if (this.transactionType == "2") {
this.tableData = this.rkTable;
this.loading = true;
try {
const res = await recordList(
pageNum,
pageSize,
Object.assign({}, this.query, params)
);
if (this.transactionType === "1") {
this.ckTable = res.data.result.list;
} else {
this.rkTable = res.data.result.list;
}
this.tableData = res.data.result.list;
} catch (error) {
console.error("获取记录数据失败:", error);
} finally {
this.loading = false;
}
},
searchReset() {
this.query = {};
this.onLoad(this.page);

@ -12,9 +12,9 @@
</el-button> -->
</template>
<template slot-scope="scope" slot="purchaseEndInfo">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.purchaseEndInfo != ''">{{
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.purchaseEndInfo != ''">{{
scope.row.purchaseEndInfo }}</el-button>
<span v-else></span>
<span>{{ scope.row.purchaseEndInfo || '无' }}</span>
</template>
<template #menu="scope">
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button>
@ -35,7 +35,6 @@
<script>
import { getList } from "@/api/firstOrder/outbound";
// import { mapGetters } from "vuex";
import outDialog from './components/outDialog.vue';
import needDialog from './components/needDialog.vue';
export default {
@ -45,7 +44,6 @@ export default {
},
data() {
return {
// form: {},
form: { outDate: [] },
selectionList: [],
query: {},
@ -60,7 +58,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
selection: true,
@ -89,11 +87,18 @@ export default {
width: 180,
headerAlign: "center",
align: "center",
formatter: (row, column) => {
const value = row.demandEndInfo;
if (value === null || value === undefined || value === "") {
return "无";
}
return value;
}
},
{
label: "出库单号",
prop: "orderNo",
width: 110,
width: 140,
headerAlign: "center",
align: "center",
},
@ -110,8 +115,6 @@ export default {
width: 140,
headerAlign: "center",
align: "center",
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
{
label: "事由",
@ -139,16 +142,23 @@ export default {
{
label: "部门",
prop: "department",
headerAlign: "center",
align: "center",
headerAlign: "center",
formatter: (row, column) => {
const value = row.department;
if (value === null || value === undefined || value === "") {
return "无";
}
return value;
}
},
{
label: "出库人",
prop: "shipperName",
search: true,
headerAlign: "center",
searchParam: 'inOperator',
align: "center",
searchParam: 'inOperator'
headerAlign: "center",
},
// {
@ -268,10 +278,7 @@ export default {
},
//
handleSubmitSuccess() {
console.log(2)
console.log('父组件更新')
this.onLoad(this.page)
console.log('父组件更新完成')
},
//
onLoad(page, params = {}) {

@ -84,7 +84,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
selection: true,

@ -1,30 +1,9 @@
<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">
<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="handleReturn(scope.row)">编辑
</el-button>
</template>
</avue-crud> -->
<avue-crud
:option="option"
v-model="form"
:data="data"
@row-del="rowDel"
@on-load="onLoad"
:table-loading="loading"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
:page.sync="page"
></avue-crud>
<avue-crud :option="option" v-model="form" :data="data" @row-del="rowDel" @on-load="onLoad"
:table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
@search-reset="searchReset" :page.sync="page"></avue-crud>
</basic-container>
</div>
</template>
@ -38,6 +17,7 @@ export default {
selectionList: [],
query: {},
loading: true,
codeList: [],
page: {
pageSize: 10,
currentPage: 1,
@ -48,7 +28,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 18,
border: true,
index: true,
selection: true,
@ -63,7 +43,7 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
menuAlign: "center",
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
@ -94,14 +74,6 @@ export default {
label: "label",
value: "value",
},
// formatter: (row, value, label, column) => {
// // valuelabel
// const typeMap = {
// 1: '',
// 2: ''
// };
// return typeMap[value] || value;
// },
dataType: "string",
},
{
@ -110,25 +82,25 @@ export default {
headerAlign: "center",
align: "center",
},
{
label: "描述",
prop: "remark",
headerAlign: "center",
align: "center",
formatter: (row, column) => {
const value = row.remark;
if (value === null || value === undefined || value === "") {
return "无";
}
return value;
}
},
],
},
data: [],
dialogLogVisible: false,
activeName: "first",
tableData: [],
ckTable: [
{ 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: "部门二" },
],
bfTable: [
{ str1: "9", str2: "2025-03-19", str3: "部门三" },
{ str1: "19", str2: "2025-03-19", str3: "部门三" },
],
};
},
computed: {
@ -161,7 +133,6 @@ export default {
label: item.name,
value: item.code,
}));
console.log("materialCode字典数据:", dicData);
const targetColumn = this.option.column.find(
(col) => col.prop === "materialCode"
);
@ -170,7 +141,6 @@ export default {
}
})
.catch((error) => {
console.error("获取materialCode字典数据失败:", error);
this.$message.error("加载类别数据失败,请刷新重试");
});
},
@ -218,7 +188,14 @@ export default {
},
//
rowSave(row, done, loading) {
// const submitData = {
// ...row,
// code: row.materialCode,
// materialCode: undefined
// };
// console.log(submitData,'submitData')
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
@ -281,32 +258,11 @@ 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) => {
// const data = res.data.data;
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;

@ -33,7 +33,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 18,
border: true,
index: true,
selection: true,
@ -48,6 +48,7 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
searchMenuPosition: "right",
column: [
{
label: "采购单号",
@ -68,12 +69,6 @@ export default {
headerAlign: "center",
align: "center",
},
{
label: "类别",
prop: "type",
headerAlign: "center",
align: "center",
},
{
label: "单位",
prop: "unit",
@ -98,20 +93,7 @@ export default {
dialogLogVisible: false,
activeName: 'first',
tableData: [],
// ckTable: [
// {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: ''},
// ],
// bfTable: [
// {str1: '9',str2: '2025-03-19',str3: ''},
// {str1: '19',str2: '2025-03-19',str3: ''},
// ],
};
}
},
computed: {
...mapGetters(["userInfo", "permission"]),
@ -179,27 +161,7 @@ export default {
this.onLoad(this.page, this.query);
},
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
this.loading = true
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log(898989,res.data.result)
this.data = res.data.result.list;

@ -58,7 +58,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
selection: true,

@ -100,7 +100,7 @@ export default {
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchMenuSpan: 12,
border: true,
index: true,
selection: true,

Loading…
Cancel
Save