taozi 4 months ago
commit c9a11dd5ac
  1. 14
      src/api/secondOrder/list.js
  2. 14
      src/views/firstOrder/list.vue
  3. 85
      src/views/materials/components/returnDialog.vue
  4. 86
      src/views/materials/components/scrapDialog.vue
  5. 186
      src/views/materials/expend.vue
  6. 2
      src/views/secondOrder/components/inDialog.vue
  7. 73
      src/views/secondOrder/components/recordDialog.vue
  8. 2
      src/views/secondOrder/inbound.vue
  9. 207
      src/views/secondOrder/list.vue
  10. 305
      src/views/secondOrder/outbound.vue

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

@ -28,28 +28,24 @@
<el-dialog <el-dialog
title="记录" title="记录"
:visible.sync="dialogLogVisible" :visible.sync="dialogLogVisible"
width="60%" width="50%"
:close-on-click-modal="false" :close-on-click-modal="false"
:append-to-body="true" :append-to-body="true"
> >
<el-tabs v-model="transactionType" @tab-click="handleTabClick"> <el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="出库" name="1"></el-tab-pane>
<el-tab-pane label="入库" name="2"></el-tab-pane> <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-tabs>
<el-table :data="tableData" style="width: 100%"> <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 prop="quantity" label="数量" >
</el-table-column> </el-table-column>
<el-table-column prop="operatorName" label="操作人" width="180"> <el-table-column prop="operatorName" label="操作人" >
</el-table-column> </el-table-column>
<el-table-column prop="operationTime" label="时间" width="180"> <el-table-column prop="operationTime" label="时间" >
</el-table-column> </el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column> <el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table> </el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogLogVisible = false"> </el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>

@ -0,0 +1,85 @@
<template>
<el-dialog
:title="purchaseTitle"
append-to-body
:visible.sync="openShow"
width="30%"
@close="closeDialog"
>
<avue-form ref="form" :option="option"></avue-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
},
data() {
return {
purchaseTitle:'归还',
openShow: false,
option: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: "归还数量",
prop: "name",
span: 24,
type: "number",
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
{
label: "归还理由",
prop: "sex",
span: 24,
type:'textarea',
rows:5,
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
],
},
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit("closeDialog");
},
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.$emit("submit", this.formData);
}
});
},
},
};
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,86 @@
<template>
<el-dialog
:title="purchaseTitle"
append-to-body
:visible.sync="openShow"
width="30%"
@close="closeDialog"
>
<avue-form ref="form" :option="option"></avue-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
},
data() {
return {
purchaseTitle:'报废',
openShow: false,
option: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: "报废数量",
prop: "name",
span: 24,
type: "number",
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
{
label: "报废理由",
prop: "sex",
span: 24,
type:'textarea',
rows:5,
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
],
},
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit("closeDialog");
},
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.$emit("submit", this.formData);
}
});
},
},
};
</script>
<style lang="scss" scoped></style>

@ -36,71 +36,41 @@
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<!-- 归还 -->
<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-form-item>
<el-form-item label="归还理由">
<el-input
v-model="returnForm.rmark"
type="textarea"
:rows="3"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogReturnVisible = false"> </el-button>
<el-button type="primary" @click="returnSave()"> </el-button>
</span>
</el-dialog>
<!-- 归还 -->
<returnDialog
v-if="returnShow"
:showDialog="returnShow"
:rowDta="returnInfo"
@closeDialog="closeDialog"
></returnDialog>
<!-- 报废 --> <!-- 报废 -->
<el-dialog <scrapDialog
title="报废" v-if="scrapShow"
:visible.sync="dialogScrapVisible" :showDialog="scrapShow"
width="30%" :rowDta="scrapInfo"
:close-on-click-modal="false" @closeDialog="closeDialog"
:append-to-body="true" ></scrapDialog>
>
<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> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getList } from "@/api/materials/expend"; import { getList } from "@/api/materials/expend";
import returnDialog from "./components/returnDialog.vue";
import scrapDialog from "./components/scrapDialog.vue";
export default { export default {
components: {
returnDialog,
scrapDialog,
},
data() { data() {
return { return {
returnShow: false, //
scrapShow: false, //
form: {}, form: {},
selectionList: [], selectionList: [],
query: {}, query: {},
@ -119,7 +89,10 @@ export default {
border: true, border: true,
index: true, index: true,
selection: true, selection: true,
viewBtn: true, viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
dialogClickModal: false, dialogClickModal: false,
menu: true, menu: true,
selection: false, selection: false,
@ -246,55 +219,16 @@ export default {
], ],
}; };
}, },
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() { mounted() {
this.tableData = this.ckTable; this.tableData = this.ckTable;
}, },
methods: { methods: {
handleLog() { //
this.dialogLogVisible = true; closeDialog() {
}, this.returnShow = false;
handleTabClick(tab, event) { this.scrapShow = false;
console.log(tab, event);
if (this.activeName == "first") {
this.tableData = this.ckTable;
}
if (this.activeName == "second") {
this.tableData = this.rkTable;
}
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}`,
});
},
handleDesign(name) {
this.$router.push({
path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}`,
});
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.onLoad(this.page); this.onLoad(this.page);
@ -305,14 +239,6 @@ export default {
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
}, },
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
}, },
@ -324,59 +250,19 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data.push(
{
no: "00100001",
name: "物品1",
xh: "1",
lb: "耐用品",
unit: "11",
number: "1",
dj: "11",
pice: "11",
status: "未归还",
str8: "部门一",
},
{
no: "00100002",
name: "物品2",
xh: "2",
lb: "耐用品",
unit: "22",
number: "1",
dj: "11",
pice: "22",
status: "已归还",
time: "2024-01-04",
str8: "部门二",
}
);
this.loading = false; this.loading = false;
}, },
// //
handleReturn(row) { handleReturn(row) {
this.dialogReturnVisible = true; this.returnShow = true;
this.returnInfo = JSON.parse(JSON.stringify(row)); this.returnInfo = JSON.parse(JSON.stringify(row));
}, },
returnSave() {
this.dialogReturnVisible = false;
this.$message({
type: "success",
message: "归还成功",
});
},
// //
handleScrap(row) { handleScrap(row) {
this.dialogScrapVisible = true; this.scrapShow = true;
this.scrapInfo = JSON.parse(JSON.stringify(row)); this.scrapInfo = JSON.parse(JSON.stringify(row));
}, },
scrapSave() {
this.dialogScrapVisible = false;
this.$message({
type: "success",
message: "报废成功",
});
},
}, },
}; };
</script> </script>

@ -73,7 +73,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> </el-table-column> <el-table-column prop="unitPrice" label="单价"> </el-table-column>
<el-table-column prop="demandDepartmentName" label="需求部门"> <el-table-column prop="demandDepartment" label="需求部门">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>

@ -0,0 +1,73 @@
<template>
<el-dialog
:title="purchaseTitle"
append-to-body
:visible.sync="openShow"
width="50%"
@close="closeDialog"
>
<el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="出库" name="1"></el-tab-pane>
<el-tab-pane label="入库" name="2"></el-tab-pane>
<el-tab-pane label="报废" name="3"></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>
<el-table-column prop="operatorName" label="操作人"> </el-table-column>
<el-table-column prop="operationTime" label="时间"> </el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { recordList } from "@/api/secondOrder/list";
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
rowData:{
type: Object,
default: () => ({})
}
},
data() {
return {
openShow: false,
transactionType: "1",
tableData: [],
purchaseTitle:'记录',
};
},
mounted() {
this.openShow = this.showDialog;
console.log('二级出入库记录 rowData',this.rowData);
},
methods: {
handleTabClick() {
this.tableData = [];
//
if (this.transactionType == "1") {
// recordList().then((res) => {});
}
//
if (this.transactionType == "2") {
// recordList().then((res) => {});
}
//
if (this.transactionType == "3") {
// recordList().then((res) => {});
}
},
closeDialog() {
this.openShow = false;
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped></style>

@ -189,7 +189,7 @@ export default {
handleCloseDetail(table) { handleCloseDetail(table) {
this.inDialogVisible = false; this.inDialogVisible = false;
}, },
// //
rowSelect(row) { rowSelect(row) {
this.inDialogVisible = true; this.inDialogVisible = true;
this.inDialogType = "inbound"; this.inDialogType = "inbound";

@ -8,117 +8,42 @@
ref="crud" ref="crud"
v-model="form" v-model="form"
:page.sync="page" :page.sync="page"
:permission="permissionList"
@row-del="rowDel"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template slot-scope="scope" slot="menu"> <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> </el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<!-- 归还 -->
<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-form-item>
<el-form-item label="归还理由">
<el-input
v-model="returnForm.rmark"
type="textarea"
:rows="3"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogReturnVisible = false"> </el-button>
<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>
<!-- 记录 --> <!-- 记录 -->
<el-dialog <recordDialog
title="记录" v-if="recordShow"
:visible.sync="dialogLogVisible" :showDialog="recordShow"
width="60%" @closeDialog="closeDialog"
:close-on-click-modal="false" :rowData="rowData"
:append-to-body="true" ></recordDialog>
>
<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 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>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogLogVisible = false"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getList } from "@/api/secondOrder/list.js"; import { getList } from "@/api/secondOrder/list.js";
import { mapGetters } from "vuex"; import recordDialog from "./components/recordDialog.vue";
export default { export default {
components: {
recordDialog,
},
data() { data() {
return { return {
recordShow: false, //
rowData: {}, //
form: {}, form: {},
selectionList: [], selectionList: [],
query: {}, query: {},
@ -160,26 +85,15 @@ export default {
search: true, search: true,
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
// type: "select",
// dicData: [
// {
// label: "",
// value: 0,
// },
// {
// label: "",
// value: 1,
// },
// ],
}, },
{ {
label: "物资编号", label: "存货编号",
prop: "materialCode", prop: "materialCode",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
}, },
{ {
label: "物资名称", label: "存货名称",
prop: "materialName", prop: "materialName",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -235,66 +149,18 @@ export default {
], ],
}, },
data: [], data: [],
dialogReturnVisible: false,
returnInfo: {},
returnForm: {
count: 0,
rmark: "",
},
dialogScrapVisible: false,
scrapInfo: {},
scrapForm: {
count: 0,
rmark: "",
},
dialogLogVisible: false,
activeName: "first",
tableData: [],
ckTable: [
{ 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" },
],
bfTable: [
{ str1: "9", str2: "2025-03-19", str3: "部门三", str4: "操作人1" },
{ str1: "19", str2: "2025-03-19", str3: "部门三", str4: "操作人1" },
],
}; };
}, },
mounted() { mounted() {},
this.tableData = this.ckTable;
},
methods: { methods: {
handleLog() { //
this.dialogLogVisible = true; closeDialog() {
this.recordShow = false;
}, },
handleTabClick(tab, event) { handleLog(row) {
console.log(tab, event); this.recordShow = true;
if (this.activeName == "first") { this.rowData = row;
this.tableData = this.ckTable;
}
if (this.activeName == "second") {
this.tableData = this.rkTable;
}
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}`,
});
},
handleDesign(name) {
this.$router.push({
path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}`,
});
}, },
searchReset() { searchReset() {
@ -307,13 +173,6 @@ export default {
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
}, },
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
@ -337,30 +196,6 @@ export default {
}); });
this.loading = false; this.loading = false;
}, },
//
handleReturn(row) {
this.dialogReturnVisible = true;
this.returnInfo = JSON.parse(JSON.stringify(row));
},
returnSave() {
this.dialogReturnVisible = false;
this.$message({
type: "success",
message: "归还成功",
});
},
//
handleScrap(row) {
this.dialogScrapVisible = true;
this.scrapInfo = JSON.parse(JSON.stringify(row));
},
scrapSave() {
this.dialogScrapVisible = false;
this.$message({
type: "success",
message: "报废成功",
});
},
}, },
}; };
</script> </script>

@ -1,56 +1,76 @@
<template> <template>
<basic-container> <basic-container>
<el-row :gutter="24"> <avue-crud
<el-col :span="24"> :option="option"
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" :table-loading="loading"
:permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :data="data"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" ref="crud"
@refresh-change="refreshChange" @on-load="onLoad" @row-click="rowSelect"> v-model="form"
<template slot-scope="scope" slot="menuLeft"> :page.sync="page"
<el-button size="small" @click.stop="handleDesign()" type="primary" >新增出库单 :permission="permissionList"
</el-button> @search-change="searchChange"
<!-- <el-button size="small" plain @click.stop="handleExport()">出库单导出 @search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menuLeft">
<el-button size="small" @click.stop="handleDesign()" type="primary"
>新增出库单
</el-button>
<!-- <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
<span v-else></span> type="text"
</template> @click.stop="purchaseFn(scope.row)"
</avue-crud> v-if="scope.row.xuqiudanmingcheng != ''"
</el-col> >{{ scope.row.xuqiudanmingcheng }}</el-button
</el-row> >
<span v-else></span>
</template>
</avue-crud>
<outDialog v-if="outDialogVisible" :repairVisible='outDialogVisible' :outDialogTiltle="outDialogTiltle" <outDialog
:outDialogType="outDialogType" @handleCloseDetail="handleCloseDetail" type="二级库"> v-if="outDialogVisible"
:repairVisible="outDialogVisible"
:outDialogTiltle="outDialogTiltle"
:outDialogType="outDialogType"
@handleCloseDetail="handleCloseDetail"
type="二级库"
>
</outDialog> </outDialog>
<!-- 需求单明细 --> <!-- 需求单明细 -->
<needDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog" :purchaseTitle="purchaseTitle"></needDialog> <needDialog
</basic-container> :showDialog="purchaseOpen"
v-if="purchaseOpen"
@closeDialog="closeDialog"
:purchaseTitle="purchaseTitle"
></needDialog>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { getList, remove } from "@/api/report/report"; import outDialog from "./components/outDialog.vue";
import { mapGetters } from "vuex"; import needDialog from "./components/needDialog.vue";
import outDialog from './components/outDialog.vue'; import { getList } from "@/api/secondOrder/outbound";
import needDialog from './components/needDialog.vue';
import { getQuarterList, getDepartmentList, getDetailedList, getDetailedItems, submitData, getMaterialList, editList } from "@/api/firstOrder/outbound";
export default { export default {
components: { components: {
outDialog, outDialog,
needDialog needDialog,
}, },
data() { data() {
return { return {
purchaseOpen:false, purchaseOpen: false,
purchaseTitle:'', purchaseTitle: "",
treeData: [],// treeData: [], //
defaultProps: { defaultProps: {
children: 'children', children: "children",
label: 'label' label: "label",
}, },
form: {}, form: {},
@ -60,10 +80,10 @@ export default {
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0 total: 0,
}, },
option: { option: {
height: 'auto', height: "auto",
calcHeight: 30, calcHeight: 30,
tip: false, tip: false,
searchShow: true, searchShow: true,
@ -122,132 +142,69 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
}, },
{
label: "部门",
prop: "str8",
search: true,
type: 'select',
headerAlign: "center",
align: "center",
dicData: [{
label: '部门一',
value: 0
}, {
label: '部门二',
value: 1
}]
},
{ {
label: "审批人", label: "审批人",
prop: "str5", prop: "approvers",
headerAlign: "center",
align: "center",
},
{
label: "来源",
prop: "str6",
search: false,
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
}, },
{ {
label: "状态", label: "状态",
prop: "str7", prop: "status",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
type: "select",
align: "center",
dicData: [
{
label: "暂存",
value: 1,
},
{
label: "待审批",
value: 2,
},
{
label: "已审批",
value: 3,
},
],
}, },
],
]
}, },
data: [], data: [],
outDialogVisible: false, outDialogVisible: false,
outDialogTiltle: '出库', outDialogTiltle: "出库",
outDialogType: '', outDialogType: "",
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value: ''
}; };
}, },
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: { 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() {
// this.$router.push({ path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.design.reportUrl}/preview?_u=blade-${name}` });
}, },
handleDesign() { handleDesign() {
this.outDialogVisible = true this.outDialogVisible = true;
this.outDialogType = 'add' this.outDialogType = "add";
this.outDialogTiltle = '新增出库' this.outDialogTiltle = "新增出库";
}, },
// //
rowSelect(row) {
this.outDialogVisible = true
this.outDialogType = 'outbound'
this.outDialogTiltle = '出库'
},
handleCloseDetail() { handleCloseDetail() {
this.outDialogVisible = false this.outDialogVisible = false;
}, },
handleExport(name) { handleExport(name) {
this.$message({ this.$message({
type: "success", type: "success",
message: "出库单导出成功!" message: "出库单导出成功!",
}); });
}, },
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.onLoad(this.page); this.onLoad(this.page);
@ -255,42 +212,13 @@ export default {
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
// this.onLoad(this.page, params); this.onLoad(this.page, params);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
done(); 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) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
}, },
@ -302,35 +230,24 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data.push({ const queryParams = {
xuqiudanmingcheng:'2025年一季度需求单', ...params,
bumen :"部门一", ...this.query,
str1: '类型一', pageSize: page.pageSize,
str2: '00000001', pageNum: page.currentPage,
str3: '2025-03-01', };
str4: '员工一', if (queryParams.outDate && Array.isArray(queryParams.outDate)) {
str5: '员工二', queryParams.startTime = queryParams.outDate[0];
str6: '需求', queryParams.endTime = queryParams.outDate[1];
str7: '部分出库', delete queryParams.outDate;
str8: '部门一' }
}, { getList(page.currentPage, page.pageSize, queryParams).then((res) => {
xuqiudanmingcheng:'', this.data = res.data.result.list;
bumen :"", this.loading = false;
str1: '类型二', this.page.total = res.data.result.total;
str2: '00000002', });
str3: '2025-03-02',
str4: '员工一',
str5: '员工二',
str6: '单项',
str7: '全部出库',
str8: '部门二'
})
this.loading = false
}, },
handleNodeClick(data) { },
console.log(data);
}
}
}; };
</script> </script>

Loading…
Cancel
Save