代码提交

master
zhangdi 4 months ago
parent 70f63b7751
commit f7f4384ca7
  1. 15
      src/api/materials/expend.js
  2. 25
      src/api/secondOrder/inbound.js
  3. 15
      src/api/secondOrder/list.js
  4. 28
      src/views/materials/expend.vue
  5. 333
      src/views/secondOrder/components/inDialog.vue
  6. 209
      src/views/secondOrder/inbound.vue
  7. 8
      src/views/secondOrder/outbound.vue

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

@ -0,0 +1,25 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/smartpark/twoPutStorage/list',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}
// 入库单详情
export const getDetails = (params) => {
return request({
url: '/smartpark/twoPutStorage/detail',
method: 'get',
params: params,
})
}

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

@ -65,11 +65,39 @@
<el-button type="primary" @click="returnSave()"> </el-button>
</span>
</el-dialog>
<!-- 报废 -->
<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-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogScrapVisible = false"> </el-button>
<el-button type="primary" @click="scrapSave()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { getList } from "@/api/materials/expend";
export default {
data() {
return {

@ -20,18 +20,24 @@
<el-row>
<el-col :span="12">
<el-form-item label="仓库名称">
<el-input v-model="sizeForm.waNmae" :disabled="true"></el-input>
<el-input
v-model="sizeForm.ldTwoPutStorage.warehouseName"
:disabled="true"
></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-input
v-model="sizeForm.ldTwoPutStorage.orderNo"
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.ldTwoPutStorage.inDate"
type="date"
placeholder="选择日期"
style="width: 100%"
@ -43,110 +49,52 @@
<el-col :span="12">
<el-form-item label="事由">
<el-input
v-model="sizeForm.argument"
v-model="sizeForm.ldTwoPutStorage.reason"
:disabled="inDialogType != 'add'"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物资类型">
<el-select
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>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="填报人">
<el-input
v-model="sizeForm.submitName"
:disabled="inDialogType != 'add'"
></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="inDialogType != '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-col :span="12" v-if="sizeForm.radio == 1">
<el-form-item label="采购单名称">
<el-input v-model="sizeForm.caigoudanmingcheng" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="form-title">2025年04月05日入库信息</div>
<!-- <el-button type="primary" size="mini" style="margin-bottom: 18px;" @click="inTableAdd()">新增</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">
<template slot-scope="scope">
<el-select
v-model="scope.row.str2"
placeholder="请选择"
style="width: 100%"
size="mini"
@change="changeName(scope.$index)"
>
<el-option label="物资1" value="1"></el-option>
<el-option label="物资2" value="2"></el-option>
</el-select>
</template>
<div class="form-title">{{ inDate }}入库信息</div>
<el-table
:data="sizeForm.ldTwoPutStorageDetails"
border
style="width: 100%"
>
<el-table-column prop="twoPutStorageNo" 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="类别"> </el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="applicationQuantity" label="需求数量">
</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="yirukushuliang" label="已入库数量" width="100">
<el-table-column prop="yirukushuliang" label="已入库数量">
</el-table-column>
<el-table-column prop="str7" label="入库数量" width="140">
<el-table-column prop="inboundQuantity" label="入库数量" width="140">
<template slot-scope="scope">
<el-input-number
size="mini"
v-model="scope.row.str7"
v-model="scope.row.inboundQuantity"
:min="1"
style="width: 100%"
:disabled="scope.row.status != 1"
></el-input-number>
</template>
</el-table-column>
<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="status" label="入库情况">
<template slot-scope="scope">
<el-button
type="text"
@click="putIn(scope.row)"
v-if="scope.row.status == 1"
>入库</el-button
>
<span v-else>已入库</span>
</template>
</el-table-column>-->
<el-table-column prop="amount" label="单价"> </el-table-column>
<el-table-column prop="demandDepartmentName" 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="twoPutStorageNo" label="编码">
</el-table-column>
<el-table-column prop="materialName" label="名称">
<template slot-scope="scope">
<el-select
v-if="sizeForm.radio == 2"
@ -158,58 +106,44 @@
<el-option label="办公室物资" value="1"></el-option>
<el-option label="其他物资" value="2"></el-option>
</el-select>
<span v-else>{{ scope.row.str2 }}</span>
<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="str7" label="单价" width="100"> </el-table-column>
<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="applicationQuantity" label="数量">
</el-table-column>
<el-table-column prop="inboundQuantity" 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="amount" label="数量"> </el-table-column>
<el-table-column prop="department" label="单价"> </el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库后库存" width="100">
<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="date" label="入库后库存">
<el-table-column prop="twoPutStorageNo0" label="数量">
</el-table-column>
<el-table-column prop="twoPutStorageNo1" label="单价">
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库信息" width="100">
<el-table-column prop="str12" label="入库人" width="100"> </el-table-column>
<el-table-column prop="str13" label="入库时间" width="100"> </el-table-column>
<el-table-column prop="date" label="入库信息">
<el-table-column prop="twoPutStorageNo2" label="入库人">
</el-table-column>
<el-table-column prop="twoPutStorageNo3" label="入库时间">
</el-table-column>
</el-table-column>
</el-table>
</el-form>
<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-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 { getDetails } from "@/api/secondOrder/inbound";
export default {
props: {
repairVisible: {
@ -228,6 +162,10 @@ export default {
type: String,
default: "",
},
inDialogData: {
type: Object,
default: {},
},
},
data() {
return {
@ -241,11 +179,17 @@ export default {
inAccountsTableData: [], //
inTableData: [],
},
inTableData: [],
inBatchDialogVisible: false, //
batchType: "", //
};
},
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() {
this.inDialogVisible = this.repairVisible;
if (this.inDialogType == "add") {
@ -256,29 +200,9 @@ export default {
},
methods: {
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",
yirukushuliang: "4",
str7: "5",
str8: "3",
str9: "部门一",
name: "审批人",
status: "1", //
getDetails({ twoPutStorageId: this.inDialogData.id }).then((res) => {
console.log(9898989, res.data.result);
this.sizeForm = res.data.result;
});
},
addInit() {
@ -294,107 +218,11 @@ export default {
this.inDialogVisible = false;
this.$emit("handleCloseDetail");
},
//
inTableAdd() {
this.sizeForm.inTableData.push({
str1: "",
str2: "",
str3: "",
str4: "",
str5: "",
str6: "",
str7: 0,
str8: "",
str9: "",
name: "",
status: "", //
});
},
//
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: "低值耐用品",
str5: "单位1",
str6: "11",
str7: "3",
str8: "3",
str9: "部门一",
name: "审批人",
status: "1", //
},
{
str1: "000001",
str2: "物品1",
str3: "规格1",
str4: "易耗品",
str5: "单位1",
str6: "15",
str7: "3",
str8: "3",
str9: "部门一",
name: "审批人",
status: "1", //
}
);
this.inBatchDialogVisible = false;
},
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);
},
//
save() {
this.$message({
type: "success",
message: "保存成功",
});
this.handleCloseDetail();
},
//
sumbit() {
this.$message({
@ -403,13 +231,6 @@ export default {
});
this.handleCloseDetail(this.sizeForm.inTableData);
},
//
radioChange(val) {
this.sizeForm.inTableData = [];
if (this.sizeForm.radio == 1) {
this.inBatchDialogVisible = true;
}
},
},
};
</script>

@ -10,7 +10,6 @@
:permission="permissionList"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@ -21,7 +20,12 @@
<!-- <el-button size="small" plain @click.stop="handleExport()">入库单导出 </el-button> -->
</template>
<template slot-scope="scope" slot="menu">
<el-button type="text" @click="rowSelect(scope.row)">入库</el-button>
<el-button
type="text"
v-if="scope.row.status !== 1"
@click="rowSelect(scope.row)"
>入库</el-button
>
</template>
<template slot-scope="scope" slot="caigoudanmingcheng">
<el-button
@ -33,18 +37,18 @@
<span v-else></span>
</template>
</avue-crud>
<!-- 新增 -->
<!-- 入库 -->
<inDialog
v-if="inDialogVisible"
:repairVisible="inDialogVisible"
:inDialogTiltle="inDialogTiltle"
:inDialogType="inDialogType"
:inDialogData="inDialogData"
@handleCloseDetail="handleCloseDetail"
type="二级库"
>
</inDialog>
<!-- -->
<!-- 采购单详情 -->
<purchaseDialog
:showDialog="purchaseOpen"
@ -56,10 +60,10 @@
</template>
<script>
import { getList, remove } from "@/api/report/report";
import { mapGetters } from "vuex";
import inDialog from "./components/inDialog.vue";
import purchaseDialog from "./components/purchaseDialog.vue";
import { getList } from "@/api/secondOrder/inbound";
export default {
components: {
inDialog,
@ -88,6 +92,7 @@ export default {
viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
dialogClickModal: false,
selection: false,
printBtn: false,
@ -101,107 +106,85 @@ export default {
menuWidth: 100,
column: [
{
label: "采购单名称",
prop: "caigoudanmingcheng",
label: "需求单名称",
prop: "demandEndInfo",
width: 180,
},
{
label: "仓库类型",
prop: "str1",
},
// {
// label: "",
// prop: "str1",
// },
{
label: "入库单号",
prop: "str2",
prop: "orderNo",
},
{
label: "入库时间",
prop: "str3",
prop: "inDate",
search: true,
type: "datetime",
type: "date",
searchRange: true,
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
{
label: "入库人",
prop: "str4",
prop: "inOperatorName",
search: true,
},
{
label: "部门",
prop: "str8",
prop: "departments",
search: true,
// type: "select",
// dicData: [
// {
// label: "",
// value: 0,
// },
// {
// label: "",
// value: 1,
// },
// ],
},
// {
// label: "",
// prop: "str5",
// },
// {
// label: "",
// prop: "str6",
// search: false,
// },
{
label: "状态",
prop: "status",
type: "select",
dicData: [
{
label: "部门一",
value: 0,
label: "已入库",
value: 2,
},
{
label: "部门二",
label: "未入库",
value: 1,
},
],
},
{
label: "审批人",
prop: "str5",
},
{
label: "来源",
prop: "str6",
search: false,
},
{
label: "状态",
prop: "str7",
},
],
},
data: [
{
caigoudanmingcheng: "2025年一季度采购单",
str1: "类型一",
str2: "00000001",
str3: "2025-03-01",
str4: "员工一",
str5: "员工二",
str6: "采购",
str7: "部分入库",
},
{
caigoudanmingcheng: "",
str1: "类型二",
str2: "00000002",
str3: "2025-03-02",
str4: "员工一",
str5: "员工二",
str6: "单项",
str7: "全部入库",
},
],
data: [],
inDialogVisible: false,
inDialogTiltle: "入库",
inDialogType: "", //
purchaseOpen: false,
purchaseTitle: "",
inDialogData: {}, //
};
},
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(",");
},
},
methods: {
//
purchaseFn(row) {
@ -218,38 +201,6 @@ export default {
},
handleCloseDetail(table) {
this.inDialogVisible = false;
//
// if(table.length>0){
// this.data.push({
// caigoudanmingcheng:'',
// str1: '',
// str2: '00000003',
// str3: '2025-03-02',
// str4: '',
// str5: '',
// str6: '',
// str7: '',
// },{
// caigoudanmingcheng:'',
// str1: '',
// str2: '00000004',
// str3: '2025-03-02',
// str4: '',
// str5: '',
// str6: '',
// str7: '',
// },{
// caigoudanmingcheng:'',
// str1: '',
// str2: '00000005',
// str3: '2025-03-02',
// str4: '',
// str5: '',
// str6: '',
// str7: '',
// })
// }
},
handleExport(name) {
this.$message({
@ -262,6 +213,7 @@ export default {
this.inDialogVisible = true;
this.inDialogType = "inbound";
this.inDialogTiltle = "入库";
this.inDialogData = row;
},
searchReset() {
this.query = {};
@ -273,35 +225,7 @@ export default {
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!",
});
this.$refs.crud.toggleSelection();
});
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
@ -313,8 +237,23 @@ export default {
},
onLoad(page, params = {}) {
this.loading = true;
this.loading = false;
const queryParams = {
...params,
...this.query,
pageSize: page.pageSize,
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);
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
});
},
},
};

@ -90,10 +90,10 @@ export default {
label: "部门",
prop: "bumen",
},
{
label: "仓库类型",
prop: "str1",
},
// {
// label: "",
// prop: "str1",
// },
{
label: "出库单号",
prop: "str2",

Loading…
Cancel
Save