代码提交

master
taozi 5 months ago
parent f79bcbfbb1
commit 70f63b7751
  1. 15
      src/api/demandOrder/demandOrder.js
  2. 39
      src/api/firstOrder/inbound.js
  3. 13
      src/api/firstOrder/list.js
  4. 37
      src/views/demandOrder/index.vue
  5. 291
      src/views/firstOrder/components/inDialog.vue
  6. 126
      src/views/firstOrder/components/purchaseDialog.vue
  7. 184
      src/views/firstOrder/inbound.vue
  8. 55
      src/views/firstOrder/outbound.vue

@ -0,0 +1,15 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/smartpark/demandEnd/list',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}

@ -13,3 +13,42 @@ export const getList = (current, size, params) => {
cryptoData: false cryptoData: false
}) })
} }
export const getPutPurchaseList = (current, size, params) => {
return request({
url: '/smartpark/onePutStorage/getPutPurchaseList',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}
//下拉采购单数据
export const getAllQuarter = () => {
return request({
url: '/smartpark/purchaseEnd/getAllQuarter',
method: 'get',
cryptoToken: false,
cryptoData: false
})
}
export const getPurchasesByIds = (ids) => {
return request({
url: '/smartpark/purchaseEnd/getPurchasesByIds',
method: 'get',
params: { ids },
cryptoToken: false,
cryptoData: false
})
}
export const getMaterialList = () => {
return request({
url: '/smartpark/material/getMaterialList',
method: 'get',
cryptoToken: false,
cryptoData: false
})
}

@ -13,3 +13,16 @@ export const getList = (current, size, params) => {
cryptoData: false cryptoData: false
}) })
} }
export const recordList = (current, size, params) => {
return request({
url: '/smartpark/inventoryRecord/list',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}

@ -13,7 +13,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getList, remove } from "@/api/report/report"; import { getList } from "@/api/demandOrder/demandOrder.js";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
@ -51,28 +51,39 @@ export default {
column: [ column: [
{ {
label: "需求单号", label: "需求单号",
prop: "no", prop: "demandNo",
search: true, search: true,
}, },
{ {
label: "需求时间", label: "提交时间",
prop: "name", prop: "optTime",
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
}, },
{ {
label: "物品名称", label: "物品名称",
prop: "number", prop: "materialName",
}, },
{ {
label: "型号", label: "型号",
prop: "number", prop: "model",
}, },
{ {
label: "数量", label: "数量",
prop: "number", prop: "num",
}, },
{ {
label: "金额", label: "申请年份",
prop: "pice", prop: "year",
},
{
label: "申请季度",
prop: "quarter",
},
{
label: "申请部门",
prop: "department",
} }
] ]
}, },
@ -189,6 +200,14 @@ export default {
// this.loading = false; // this.loading = false;
// this.selectionClear(); // this.selectionClear();
// }); // });
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;
this.page.total = res.data.result.total;
// this.selectionClear();
});
} }
} }
}; };

@ -12,8 +12,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库单号"> <el-form-item label="入库单号" v-if="sizeForm.option == 1">
<el-input v-model="sizeForm.code" disabled></el-input> <el-input v-model="sizeForm.orderNo" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -24,80 +24,81 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="事由"> <el-form-item label="事由">
<el-input v-model="sizeForm.argument" :disabled="inDialogType != 'add'"></el-input> <el-input v-model="sizeForm.reason" :disabled="inDialogType != 'add'"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物资类型"> <el-form-item label="物资类型">
<el-select v-model="sizeForm.type" placeholder="请选择" style="width: 100%;" <el-select v-model="sizeForm.materialType" placeholder="请选择" style="width: 100%;"
:disabled="inDialogType != 'add'"> :disabled="inDialogType != 'add'">
<el-option label="办公室物资" value="1"></el-option> <el-option label="耐用品" value="1"></el-option>
<el-option label="其他物资" value="2"></el-option> <el-option label="易耗品" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="填报人"> <el-form-item label="填报人">
<el-input v-model="sizeForm.submitName" :disabled="inDialogType != 'add'"></el-input> <el-input v-model="sizeForm.submitName" :disabled="inDialogType != 'add'"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="审批人"> <el-form-item label="审批人">
<el-input v-model="sizeForm.applyNmae" disabled></el-input> <el-input v-model="sizeForm.applyNmae" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选项"> <el-form-item label="选项">
<el-radio-group v-model="sizeForm.radio" @change="radioChange()" :disabled="inDialogType != 'add'"> <el-radio-group v-model="sizeForm.option" @change="radioChange()" :disabled="inDialogType != 'add'">
<el-radio :label="1" :disabled="sizeForm.type == 2">批量选择</el-radio> <el-radio :label="1" :disabled="sizeForm.type == 2">批量选择</el-radio>
<el-radio :label="2">单项选择</el-radio> <el-radio :label="2">单项选择</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="sizeForm.radio==1"> <el-col :span="12" v-if="sizeForm.option == 1">
<el-form-item label="采购单名称"> <el-form-item label="采购单名称">
<el-input v-model="sizeForm.caigoudanmingcheng" disabled></el-input> <el-input v-model="sizeForm.quarterName" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="form-title">2025年04月05日入库信息</div> <div class="form-title">{{ inDate }}</div>
<el-button type="primary" size="mini" style="margin-bottom: 18px;" @click="inTableAdd()" v-if="!allDisabled">新增</el-button> <el-button type="primary" size="mini" style="margin-bottom: 18px;" @click="inTableAdd()"
v-if="!allDisabled && sizeForm.option == 2">新增</el-button>
<el-table :data="sizeForm.inTableData" border style="width: 100%"> <el-table :data="sizeForm.inTableData" border style="width: 100%">
<el-table-column prop="materialId" label="物资ID">
<el-table-column prop="str1" label="编码" >
</el-table-column> </el-table-column>
<el-table-column prop="str2" label="名称" > <el-table-column prop="materialName" label="名称" v-if="sizeForm.option == 1">
<template slot-scope="scope">
<el-select v-model="scope.row.str2" placeholder="请选择" style="width: 100%;" size="mini"
@change="changeName(scope.$index)" :disabled="allDisabled">
<el-option label="物资1" value="1"></el-option>
<el-option label="物资2" value="2"></el-option>
</el-select>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="str3" label="规格"> <el-table-column prop="materialName" label="名称" v-if="sizeForm.option == 2">
<el-select v-model="batchType" placeholder="请选择物资名称" style="width: 100%;">
<el-option v-for="item in materials" :key="item.materialId" :label="item.materialName" :value="item.materialId">
</el-option>
</el-select>
</el-table-column> </el-table-column>
<el-table-column prop="str4" label="类别" > <el-table-column prop="model" label="规格">
</el-table-column> </el-table-column>
<el-table-column prop="str5" label="单位" > <el-table-column prop="type" label="类别">
</el-table-column> </el-table-column>
<el-table-column prop="str6" label="计划采购数量" > <el-table-column prop="unit" label="单位">
</el-table-column> </el-table-column>
<el-table-column prop="str6" label="已入库数量" > <el-table-column prop="requiredQuantity" label="计划采购数量" v-if="sizeForm.option == 1">
</el-table-column> </el-table-column>
<!-- <el-table-column prop="str6" label="本次入库数量" width="100"> <el-table-column prop="inboundQuantity" label="已入库数量" v-if="sizeForm.option == 1">
</el-table-column> --> </el-table-column>
<el-table-column prop="str7" label="本次入库数量" > <!-- <el-table-column prop="str7" label="本次入库数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.str7" :min="1" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.str7" :min="1" style="width: 100%;"
:disabled="(scope.row.status != 1)||(allDisabled)" ></el-input-number> :disabled="(scope.row.status != 1) || (allDisabled)"></el-input-number>
</template>
</el-table-column> -->
<el-table-column prop="theInboundQuantity" label="本次入库数量">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="str6" label="需求数量" > <!-- <el-table-column prop="str6" label="需求数量" >
</el-table-column> --> </el-table-column> -->
<el-table-column prop="unitPrice" label="单价">
<el-table-column prop="str8" label="单价" >
</el-table-column> </el-table-column>
<!-- <el-table-column prop="str9" label="需求部门" width="100"> <!-- <el-table-column prop="str9" label="需求部门" width="100">
</el-table-column> --> </el-table-column> -->
@ -108,51 +109,54 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<div class="form-title">入库账目表格</div> <div class="form-title">入库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> <el-table :data="sizeForm.inTableData" border style="width: 100%">
<el-table-column prop="date" label="当前库存" > <el-table-column prop="date" label="当前库存">
<el-table-column prop="str1" label="编码" > <el-table-column prop="materialId" label="物资ID">
</el-table-column> </el-table-column>
<el-table-column prop="str2" label="名称" > <el-table-column prop="materialName" label="名称" v-if=>
<template slot-scope="scope">
<el-select v-if="sizeForm.radio == 2" v-model="sizeForm.type" placeholder="请选择" style="width: 100%;"
:disabled="inDialogType != 'add'">
<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>
<el-table-column prop="str3" label="规格" > <el-table-column prop="model" label="规格">
</el-table-column> </el-table-column>
<el-table-column prop="str4" label="类别" > <el-table-column prop="type" label="类别">
</el-table-column> </el-table-column>
<el-table-column prop="str5" label="单位" > <el-table-column prop="unit" label="单位">
</el-table-column> </el-table-column>
<el-table-column prop="str6" label="数量" > <el-table-column prop="inboundQuantity" label="数量">
</el-table-column> </el-table-column>
<el-table-column prop="str7" label="单价" > <el-table-column prop="unitPrice" label="单价">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库信息" > <el-table-column prop="date" label="入库信息">
<el-table-column prop="str8" label="数量" > <el-table-column prop="theInboundQuantity" label="数量">
</el-table-column> </el-table-column>
<el-table-column prop="str9" label="单价" > <el-table-column prop="unitPrice" label="单价">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库后库存" > <el-table-column prop="date" label="入库后库存">
<el-table-column prop="str10" label="数量" > <el-table-column label="数量">
<template slot-scope="scope">
{{ Number(scope.row.inboundQuantity || 0) + Number(scope.row.theInboundQuantity || 0) }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="str11" label="单价" > <el-table-column prop="unitPrice" label="单价">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库信息" > <el-table-column prop="date" label="入库信息">
<el-table-column prop="str12" label="入库人" > <el-table-column label="入库人">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="str13" label="入库时间" > {{ scope.row.userInfoVO ? scope.row.userInfoVO.name : (sizeForm.submitName || '') }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="inDate" label="入库时间" width="150">
<template slot-scope="scope">
{{ inDate }}
</template>
</el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-if="!allDisabled"> <span slot="footer" class="dialog-footer" v-if="!allDisabled">
@ -164,20 +168,20 @@
<!-- 批量出库 选择 --> <!-- 批量出库 选择 -->
<el-dialog :close-on-click-modal="false" title="选择数据来源" :visible.sync="inBatchDialogVisible" :append-to-body="true" <el-dialog :close-on-click-modal="false" title="选择数据来源" :visible.sync="inBatchDialogVisible" :append-to-body="true"
width="40%" @close="handleBatchClose"> width="40%" @close="handleBatchClose" @open="getBatchOptions">
<el-select v-model="batchType" placeholder="请选择数据来源" style="width: 100%;"> <el-select v-model="batchType" placeholder="请选择数据来源" style="width: 100%;">
<el-option label="2025年1季度" value="1"></el-option> <el-option v-for="item in batchOptions" :key="item.ids" :label="item.quarterName" :value="item.ids">
<el-option label="2025年2季度" value="2"></el-option> </el-option>
<el-option label="2025年3季度" value="3"></el-option>
</el-select> </el-select>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleBatchClose()"> </el-button> <el-button @click="handleBatchClose()"> </el-button>
<el-button type="primary" @click="batchSumbit()"> </el-button> <el-button type="primary" @click="batchSubmit()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getAllQuarter, getPurchasesByIds, getMaterialList } from "@/api/firstOrder/inbound";
export default { export default {
props: { props: {
repairVisible: { repairVisible: {
@ -201,19 +205,31 @@ export default {
return { return {
inDialogVisible: false, inDialogVisible: false,
sizeForm: { sizeForm: {
code: '',// orderNo: '',//
applyNmae: '',// applyNmae: '',//
submitName: '',// submitName: '',//
waNmae: '',// waNmae: '',//
argument: '',// reason: '',//
inAccountsTableData: [],// inAccountsTableData: [],//
inTableData: [], inTableData: [],
}, },
inTableData: [], inTableData: [],
inBatchDialogVisible: false,// inBatchDialogVisible: false,//
batchType: '',// batchType: '',//
allDisabled: false,
allDisabled:false, userInfoVO: {
userId: "用户ID",
name: "用户名称"
}
}
},
computed: {
inDate() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0');
return `${year}${month}${day}`;
} }
}, },
mounted() { mounted() {
@ -223,41 +239,73 @@ export default {
} else { } else {
this.inInit() this.inInit()
} }
if (this.inDialogType == 'details') { if (this.inDialogType == 'details') {
this.allDisabled = true this.allDisabled = true
} }
this.getBatchOptions()
this.getMaterialList()
}, },
methods: { methods: {
syncInboundQuantity(row) {
//
row.theInboundQuantity = Number(row.theInboundQuantity);
},
async getBatchOptions() {
this.loading = true
try {
const res = await getAllQuarter();
this.batchOptions = res.data.result
} catch (error) {
this.$message.error("获取数据来源失败,请重试");
console.error("下拉选项请求失败:", error);
} finally {
this.loading = false;
}
},
async getMaterialList() {
this.loading = true
try {
const res = await getAllQuarter();
this.materials = res.data.result
console.log(this.materials, '获99来源')
} catch (error) {
this.$message.error("获取数据来源失败,请重试");
console.error("下拉选项请求失败:", error);
} finally {
this.loading = false;
}
},
inInit() { inInit() {
const randomNum = Math.floor(Math.random() * 100000000) + 1; const randomNum = Math.floor(Math.random() * 100000000) + 1;
this.sizeForm.code = String(randomNum).padStart(8, '0');// this.sizeForm.orderNo = String(randomNum).padStart(8, '0');//
this.sizeForm.applyNmae = '审批人一' this.sizeForm.applyNmae = '审批人一'
this.sizeForm.submitName = '填报人一' this.sizeForm.submitName = '填报人一'
this.sizeForm.radio = 1 this.sizeForm.option = 1
this.sizeForm.waNmae = '仓库一' this.sizeForm.waNmae = '仓库一'
this.sizeForm.argument = '入库' this.sizeForm.reason = '入库'
this.sizeForm.type = '1' this.sizeForm.materialType = '1'
this.sizeForm.inDate = new Date()// this.sizeForm.inDate = new Date()//
this.sizeForm.inTableData.push({ // this.sizeForm.inTableData.push({
str1: '000001', // str1: '000001',
str2: '物品1', // str2: '1',
str3: '规格1', // str3: '1',
str4: '类别1', // type: '1',
str5: '单位1', // unit: '1',
str6: '11', // str6: '11',
str7: '22', // str7: '22',
str8: '3', // str8: '3',
str9: '部门一', // str9: '',
name: '审批人', // name: '',
status: '1',// // status: '1',//
}) // })
}, },
addInit() { addInit() {
// //
const randomNum = Math.floor(Math.random() * 100000000) + 1; const randomNum = Math.floor(Math.random() * 100000000) + 1;
this.sizeForm.code = String(randomNum).padStart(8, '0');// this.sizeForm.orderNo = String(randomNum).padStart(8, '0');//
this.sizeForm.inDate = new Date()// this.sizeForm.inDate = new Date()//
if (this.type == '一级库') { if (this.type == '一级库') {
this.sizeForm.waNmae = '仓库一' this.sizeForm.waNmae = '仓库一'
@ -267,8 +315,7 @@ export default {
this.inDialogVisible = false this.inDialogVisible = false
this.$emit('handleCloseDetail') this.$emit('handleCloseDetail')
}, },
// async inTableAdd() {
inTableAdd() {
this.sizeForm.inTableData.push({ this.sizeForm.inTableData.push({
str1: '', str1: '',
str2: '', str2: '',
@ -301,7 +348,6 @@ export default {
str11: "3", str11: "3",
str12: "审批人1", str12: "审批人1",
str13: "2025-04-05", str13: "2025-04-05",
}) })
}, },
// //
@ -309,35 +355,28 @@ export default {
this.inBatchDialogVisible = false this.inBatchDialogVisible = false
}, },
// //
batchSumbit() { async batchSubmit() {
this.sizeForm.caigoudanmingcheng='2025年一季度' if (!this.batchType) {
this.sizeForm.inTableData.push({ this.$message.warning("请选择数据来源")
str1: '000001', return
str2: '物品1', }
str3: '规格1', const selectedOption = this.batchOptions.find(option => option.ids === this.batchType);
str4: '类别1', if (!selectedOption) {
str5: '单位1', this.$message.error("未找到对应的采购单信息");
str6: '11', return
str7: '22', }
str8: '3', this.sizeForm.quarterName = selectedOption.quarterName
str9: '部门一', this.loading = true
name: '审批人', const res = await getPurchasesByIds(this.batchType);
status: '1',// console.log("res", res)
},{ if (res.data.success) {
str1: '000001', this.sizeForm.inTableData = res.data.result;
str2: '物品1', this.$message.success("数据获取成功");
str3: '规格1', this.inBatchDialogVisible = false;
str4: '类别1', } else {
str5: '单位1', this.$message.error(res.data.message || "获取数据失败");
str6: '11', }
str7: '22', this.loading = false;
str8: '3',
str9: '部门一',
name: '审批人',
status: '1',//
})
this.inBatchDialogVisible = false
}, },
changeName(index) { changeName(index) {
console.log(9999, index) console.log(9999, index)
@ -371,7 +410,7 @@ export default {
sumbit() { sumbit() {
// status ==1 // status ==1
let flag = this.sizeForm.inTableData.some(item => item.status == 1) let flag = this.sizeForm.inTableData.some(item => item.status == 1)
if(flag){ if (flag) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "" message: ""
@ -387,7 +426,7 @@ export default {
// //
radioChange(val) { radioChange(val) {
this.sizeForm.inTableData = [] this.sizeForm.inTableData = []
if (this.sizeForm.radio == 1) { if (this.sizeForm.option == 1) {
this.inBatchDialogVisible = true this.inBatchDialogVisible = true
} }
} }

@ -1,59 +1,103 @@
<template> <template>
<el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog"> <el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog">
<avue-crud :data="data" :option="option"></avue-crud> <avue-crud
<!-- <template #footer> :data="data"
:option="option"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
:page.sync="page"
@on-load="onLoad"></avue-crud>
<!-- <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit"> </el-button>
</span> </span>
</template> --> </template> -->
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getPutPurchaseList } from "@/api/firstOrder/inbound";
export default { export default {
props: { props: {
showDialog: { showDialog: {
type: Boolean, type: Boolean,
default: false default: false
},
purchaseTitle:{
type:String,
default:''
}
}, },
data() { purchaseTitle: {
return { type: String,
openShow:false, default: ''
option:{
menu:false,
header:false,
align: 'center',
column:[
{
label:'物品名称',
prop:'wupinmingcheng'
}, {
label:'计划采购数量',
prop:'caigoushuliang'
},{
label:'已入库数量',
prop:'yirukushuliang'
}
]
}
}
}, },
mounted(){ id: {
this.openShow = this.showDialog type: Number,
default: null
}
},
data() {
return {
openShow: false,
data: [],
query: {},
loading: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
menu: false,
header: false,
align: 'center',
// page: true,
column: [
{
label: '物资名称',
prop: 'materialName'
}, {
label: '计划采购数量',
prop: 'requiredQuantity'
}, {
label: '已入库数量',
prop: 'inboundQuantity'
}
]
}
}
},
mounted() {
this.openShow = this.showDialog
},
methods: {
closeDialog() {
this.openShow = false
this.$emit('closeDialog');
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
}, },
methods:{ onLoad(page, params = {}) {
closeDialog(){ this.loading = true;
this.openShow = false const queryParams = Object.assign(params, this.query, {
this.$emit('closeDialog'); onePutStorageId: this.id
} });
getPutPurchaseList(page.currentPage, page.pageSize, queryParams).then(res => {
console.log('采购单列表', res.data.result)
// const data = res.data.data;
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
// this.selectionClear();
});
} }
}
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

@ -1,9 +1,14 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" <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" :permission="permissionList"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @search-change="searchChange"
@refresh-change="refreshChange" @on-load="onLoad"> @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<!-- @row-click="rowSelect" --> <!-- @row-click="rowSelect" -->
<template slot-scope="scope" slot="menuLeft"> <template slot-scope="scope" slot="menuLeft">
<el-button size="small" plain @click.stop="handleDesign()">新增入库单 <el-button size="small" plain @click.stop="handleDesign()">新增入库单
@ -11,9 +16,9 @@
<el-button size="small" plain @click.stop="handleExport()">入库单导出 <el-button size="small" plain @click.stop="handleExport()">入库单导出
</el-button> </el-button>
</template> </template>
<template slot-scope="scope" slot="caigoudanmingcheng"> <template slot-scope="scope" slot="purchaseEndInfo">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.caigoudanmingcheng != ''">{{ <el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.purchaseEndInfo != ''">{{
scope.row.caigoudanmingcheng }}</el-button> scope.row.purchaseEndInfo }}</el-button>
<span v-else></span> <span v-else></span>
</template> </template>
<template #menu="scope"> <template #menu="scope">
@ -28,7 +33,7 @@
<!-- 采购单详情 --> <!-- 采购单详情 -->
<purchaseDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog" <purchaseDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog"
:purchaseTitle="purchaseTitle"></purchaseDialog> :purchaseTitle="purchaseTitle" :id='id'></purchaseDialog>
</basic-container> </basic-container>
</template> </template>
@ -44,7 +49,8 @@ export default {
}, },
data() { data() {
return { return {
form: {}, // form: {},
form: { inDate: [], inOperatorName: '', inOperator: '' },
selectionList: [], selectionList: [],
query: {}, query: {},
loading: true, loading: true,
@ -77,7 +83,7 @@ export default {
column: [ column: [
{ {
label: "采购单名称", label: "采购单名称",
prop: "purchaseEneInfo", prop: "purchaseEndInfo",
width: 180, width: 180,
}, },
{ {
@ -97,16 +103,17 @@ export default {
searchRange: true, searchRange: true,
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: "结束时间", endPlaceholder: "结束时间",
format: 'yyyy-MM-DD HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-DD HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss',
width: 120, width: 120,
searchParam: 'startTime', // searchParam: 'startTime',
searchEndParam: 'endTime' // searchEndParam: 'endTime'
}, },
{ {
label: "入库人", label: "入库人",
prop: "inOperatorName", prop: "inOperatorName",
search: true, search: true,
searchParam: 'inOperator'
}, },
{ {
label: "来源", label: "来源",
@ -123,81 +130,80 @@ export default {
prop: "materialType", prop: "materialType",
search: false, search: false,
type: 'select', type: 'select',
// dicData:[{ dicData: [{
// label: '', label: '办公物资',
// value: '1' value: '1'
// }, },
// { {
// label: '', label: '其他物资',
// value: '2' value: '2'
// }] }]
}, },
{ {
label: "审批人员", label: "审批人员",
prop: "approverName", prop: "approvers",
}, },
{ {
label: "状态", label: "状态",
prop: "status", prop: "status",
type: 'select', type: 'select',
// dicData:[ dicData: [
// { {
// label:'', label: '暂存',
// value:1 value: 1
// }, },
// { {
// label:'', label: '待审批',
// value:1 value: 1
// }, },
// { {
// label:'', label: '已审批',
// value:2 value: 2
// }, },
// ] ]
}, },
] ]
}, },
data: [{ data: [
caigoudanmingcheng: "2025年第一季度采购单", // {
str1: '类型一', // caigoudanmingcheng: "2025",
str2: '00000001', // str1: '',
str3: '2025-03-01', // str2: '00000001',
str4: '员工一', // str3: '2025-03-01',
str5: '员工二', // str4: '',
str6: '采购', // str5: '',
str7: '1', // str6: '',
}, { // str7: '1',
caigoudanmingcheng: "2025年第二季度采购单", // }, {
str1: '类型二', // caigoudanmingcheng: "2025",
str2: '00000002', // str1: '',
str3: '2025-03-02', // str2: '00000002',
str4: '员工一', // str3: '2025-03-02',
str5: '员工二', // str4: '',
str6: '采购', // str5: '',
str7: '2', // str6: '',
}, { // str7: '2',
caigoudanmingcheng: "", // }, {
str1: '类型三', // caigoudanmingcheng: "",
str2: '00000002', // str1: '',
str3: '2025-03-02', // str2: '00000002',
str4: '员工一', // str3: '2025-03-02',
str5: '员工二', // str4: '',
str6: '单项', // str5: '',
str7: '3', // str6: '',
}, { // str7: '3',
caigoudanmingcheng: "", // }, {
str1: '类型三', // caigoudanmingcheng: "",
str2: '00000002', // str1: '',
str3: '2025-03-02', // str2: '00000002',
str4: '员工一', // str3: '2025-03-02',
str5: '员工二', // str4: '',
str6: '单项', // str5: '',
str7: '1', // str6: '',
}], // str7: '1',
// }
],
inDialogVisible: false, inDialogVisible: false,
inDialogTiltle: '入库', inDialogTiltle: '入库',
inDialogType: '',// inDialogType: '',//
@ -245,7 +251,9 @@ export default {
// //
purchaseFn(row) { purchaseFn(row) {
this.purchaseOpen = true this.purchaseOpen = true
this.purchaseTitle = row.caigoudanmingcheng + '详情' this.purchaseTitle = row.purchaseEndInfo + '采购单详情'
this.id = row.id
console.log(row, this.id,1)
}, },
closeDialog() { closeDialog() {
this.purchaseOpen = false this.purchaseOpen = false
@ -268,9 +276,17 @@ export default {
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.form.inDate = []
this.form.inOperatorName = ''
this.form.inOperator = ''
this.onLoad(this.page); this.onLoad(this.page);
}, },
searchChange(params, done) { searchChange(params, done) {
if (params && params.inOperatorName && !params.inOperator) {
params.inOperator = params.inOperatorName;
delete params.inOperatorName;
}
this.query = params; this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page, params); this.onLoad(this.page, params);
@ -314,18 +330,6 @@ export default {
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}, },
// onLoad(page, params = {}) {
// this.loading = true;
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// console.log(89122229,res.data.result)
// // const data = res.data.data;
// this.data = res.data.result.list;
// this.loading = false;
// this.page.total = res.data.result.total;
// // this.selectionClear();
// });
// }
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
const queryParams = { const queryParams = {
@ -339,8 +343,8 @@ export default {
queryParams.endTime = queryParams.inDate[1]; queryParams.endTime = queryParams.inDate[1];
delete queryParams.inDate; delete queryParams.inDate;
} }
console.log("处理后的参数:", queryParams);
getList(page.currentPage, page.pageSize, queryParams).then(res => { getList(page.currentPage, page.pageSize, queryParams).then(res => {
console.log('列表', res.data.result)
this.data = res.data.result.list; this.data = res.data.result.list;
this.loading = false; this.loading = false;
this.page.total = res.data.result.total; this.page.total = res.data.result.total;

@ -10,9 +10,10 @@
<el-button size="small" plain @click.stop="handleExport()">出库单导出 <el-button size="small" plain @click.stop="handleExport()">出库单导出
</el-button> </el-button>
</template> </template>
<template slot-scope="scope" slot="xuqiudanmingcheng"> <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> <el-button type="text" @click.stop="purchaseFn(scope.row)"
<span v-else></span> v-if="scope.row.xuqiudanmingcheng != ''">{{ scope.row.xuqiudanmingcheng }}</el-button>
<span v-else></span>
</template> </template>
</avue-crud> </avue-crud>
@ -21,7 +22,9 @@
</outDialog> </outDialog>
<!-- 需求单明细 --> <!-- 需求单明细 -->
<needDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog" :purchaseTitle="purchaseTitle"></needDialog> <needDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog"
:purchaseTitle="purchaseTitle">
</needDialog>
</basic-container> </basic-container>
</template> </template>
@ -71,7 +74,7 @@ export default {
{ {
label: "需求单名称", label: "需求单名称",
prop: "xuqiudanmingcheng", prop: "xuqiudanmingcheng",
width:180, width: 180,
}, },
{ {
label: "部门", label: "部门",
@ -108,18 +111,18 @@ export default {
{ {
label: "状态", label: "状态",
prop: "str7", prop: "str7",
type:'select', type: 'select',
dicData:[ dicData: [
{ {
label:'暂存', label: '暂存',
value:1 value: 1
}, },
{ {
label:'待确认', label: '待确认',
value:2 value: 2
},{ }, {
label:'确认', label: '确认',
value:3 value: 3
} }
] ]
}, },
@ -130,7 +133,7 @@ export default {
outDialogVisible: false, outDialogVisible: false,
outDialogTiltle: '出库', outDialogTiltle: '出库',
outDialogType: '', outDialogType: '',
purchaseOpen:false purchaseOpen: false
}; };
}, },
computed: { computed: {
@ -152,11 +155,11 @@ export default {
} }
}, },
methods: { methods: {
purchaseFn(row){ purchaseFn(row) {
this.purchaseOpen = true this.purchaseOpen = true
this.purchaseTitle = row.xuqiudanmingcheng+'详情' this.purchaseTitle = row.xuqiudanmingcheng + '详情'
}, },
closeDialog(){ closeDialog() {
this.purchaseOpen = false this.purchaseOpen = false
}, },
handlePreview() { handlePreview() {
@ -250,8 +253,8 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data.push({ this.data.push({
xuqiudanmingcheng:'20225年一季度需求单', xuqiudanmingcheng: '20225年一季度需求单',
bumen:'部门1', bumen: '部门1',
str1: '类型一', str1: '类型一',
str2: '00000001', str2: '00000001',
str3: '2025-03-01', str3: '2025-03-01',
@ -260,8 +263,8 @@ export default {
str6: '采购', str6: '采购',
str7: '1', str7: '1',
}, { }, {
xuqiudanmingcheng:'20225年二季度需求单', xuqiudanmingcheng: '20225年二季度需求单',
bumen:'部门2', bumen: '部门2',
str1: '类型二', str1: '类型二',
str2: '00000002', str2: '00000002',
str3: '2025-03-02', str3: '2025-03-02',
@ -270,8 +273,8 @@ export default {
str6: '单项', str6: '单项',
str7: '2', str7: '2',
}, { }, {
xuqiudanmingcheng:'', xuqiudanmingcheng: '',
bumen:'部门3', bumen: '部门3',
str1: '类型二', str1: '类型二',
str2: '00000002', str2: '00000002',
str3: '2025-03-02', str3: '2025-03-02',
@ -280,8 +283,8 @@ export default {
str6: '单项', str6: '单项',
str7: '3', str7: '3',
}, { }, {
xuqiudanmingcheng:'', xuqiudanmingcheng: '',
bumen:'部门3', bumen: '部门3',
str1: '类型二', str1: '类型二',
str2: '00000002', str2: '00000002',
str3: '2025-03-02', str3: '2025-03-02',

Loading…
Cancel
Save