引入采购部门 收货仓库 接口

ywj_dev
CTP 2 years ago
parent e573afc3cb
commit ef27491d40

@ -1,21 +1,38 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :model="filterQuery" class="query-form" label-width="100px" size="mini" v-show="showSearch"> <el-form
:model="filterQuery"
class="query-form"
label-width="100px"
size="mini"
v-show="showSearch"
>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购订单号"> <el-form-item label="采购订单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input> <el-input
v-model="filterQuery.billNo"
style="width: 90%"
placeholder="请输入单据号"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购部门"> <el-form-item label="采购部门">
<el-select v-model="filterQuery.invCode" style="width: 90%" placeholder="请选择采购部门"> <el-select
v-model="filterQuery.invCode"
style="width: 90%"
placeholder="请选择采购部门"
clearable
>
<el-option <el-option
v-for="item in invList" v-for="item in invList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code"
>
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -23,7 +40,12 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="收货仓库"> <el-form-item label="收货仓库">
<el-select v-model="filterQuery.deptCode" placeholder="请选择收货仓库" style="width: 90%"> <el-select
v-model="filterQuery.deptCode"
placeholder="请选择收货仓库"
style="width: 90%"
clearable
>
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
:key="item.code" :key="item.code"
@ -37,13 +59,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="query-form-item" label="处理状态:"> <el-form-item class="query-form-item" label="处理状态:">
<el-select v-model="filterQuery.dealStatus" <el-select
placeholder="请选择处理状态" v-model="filterQuery.dealStatus"
clearable placeholder="请选择处理状态"
style="width: 90%" clearable
style="width: 90%"
> >
<el-option label="未处理" :value="0"></el-option> <el-option label="未处理" :value="0"></el-option>
<el-option label="已处理" :value="1"></el-option> <el-option label="已处理" :value="1"></el-option>
@ -96,22 +118,55 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display: flex">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> >显示/隐藏搜索栏</el-button
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> >
<el-button type="primary" icon="el-icon-share" v-if="this.Menustatus === 1" @click="help"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-share"
v-if="this.Menustatus === 1"
@click="help"
>帮助</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true" <el-table
@current-change="handleDetail"> v-loading="loading"
:data="list"
style="width: 100%"
border
highlight-current-row="true"
@current-change="handleDetail"
>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="采购订单号" prop="billNo" width="150" show-overflow-tooltip></el-table-column> <el-table-column
<el-table-column label="发布时间" prop="auditTime" width="150" show-overflow-tooltip></el-table-column> label="采购订单号"
<el-table-column label="供应商" prop="supName" show-overflow-tooltip="true" width="180" prop="billNo"
v-if="showSup"></el-table-column> width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="发布时间"
prop="auditTime"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="供应商"
prop="supName"
show-overflow-tooltip="true"
width="180"
v-if="showSup"
></el-table-column>
<el-table-column label="处理状态" prop="emergency" width="120"> <el-table-column label="处理状态" prop="emergency" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dealStatus[scope.row.emergency] }} {{ dealStatus[scope.row.emergency] }}
@ -123,40 +178,106 @@
{{ emergencyMap[scope.row.emergency] }} {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货时间" prop="arrivalTime" width="150" show-overflow-tooltip></el-table-column> <el-table-column
<el-table-column label="订单说明" prop="remark" width="180" show-overflow-tooltip></el-table-column> label="到货时间"
<el-table-column label="采购部门" prop="deptName" width="150" show-overflow-tooltip></el-table-column> prop="arrivalTime"
<el-table-column label="收货仓库" prop="invName" width="150" show-overflow-tooltip></el-table-column> width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="订单说明"
prop="remark"
width="180"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="采购部门"
prop="deptName"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="收货仓库"
prop="invName"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right" width="100"> <el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="newDistributionForm(scope.row)" <el-button
>处理 type="text"
size="small"
@click.native.stop="newDistributionForm(scope.row)"
>处理
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row="true"> <el-table
v-loading="loading"
:data="detailList"
style="width: 100%"
border
highlight-current-row="true"
>
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip width="150"></el-table-column> <el-table-column
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip width="160"></el-table-column> label="物资名称"
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip width="100"></el-table-column> prop="productName"
<el-table-column label="计划数量" prop="planCount" width="100"></el-table-column> show-overflow-tooltip
<el-table-column label="订单数量" prop="count" width="100"></el-table-column> width="150"
<el-table-column label="计量单位" prop="spec" show-overflow-tooltip="true" width="100"></el-table-column> ></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
width="160"
></el-table-column>
<el-table-column
label="计量单位"
prop="measname"
show-overflow-tooltip
width="100"
></el-table-column>
<el-table-column
label="计划数量"
prop="planCount"
width="100"
></el-table-column>
<el-table-column
label="订单数量"
prop="count"
width="100"
></el-table-column>
<el-table-column
label="计量单位"
prop="spec"
show-overflow-tooltip="true"
width="100"
></el-table-column>
<el-table-column label=" <el-table-column
" prop="manufactory" show-overflow-tooltip="true" width="160"></el-table-column> label=" 生产企业
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip="true" width="160"></el-table-column> "
prop="manufactory"
show-overflow-tooltip="true"
width="160"
></el-table-column>
<el-table-column
label="注册/备案号"
prop="zczbhhzbapzbh"
show-overflow-tooltip="true"
width="160"
></el-table-column>
<!-- <el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column>--> <!-- <el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column>-->
</el-table> </el-table>
</el-card> </el-card>
@ -166,7 +287,7 @@
:visible.sync="newSpDistributionVisible" :visible.sync="newSpDistributionVisible"
width="80%" width="80%"
v-if="newSpDistributionVisible" v-if="newSpDistributionVisible"
@close='closeDialog' @close="closeDialog"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
> >
@ -175,18 +296,21 @@
:idQuery="idQuery" :idQuery="idQuery"
:editType="editType" :editType="editType"
></purPlanEdit> ></purPlanEdit>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import purPlanEdit from "./purOrderDetailDialog"; import purPlanEdit from "./purOrderDetailDialog";
import {delApply, listOrder, listOrderDetail, delOrderDetailAll} from "@/api/purchase/purOrder"; import {
import {selectAuthMenu} from "@/api/system/sysMenuHelp"; delApply,
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; listOrder,
listOrderDetail,
delOrderDetailAll,
} from "@/api/purchase/purOrder";
import { selectAuthMenu } from "@/api/system/sysMenuHelp";
import { getBasicUnitMaintains } from "@/api/basic/basicUnitMaintain";
import { getDeptListByUser } from "@/api/auth/authDept";
import { getInvListByUser } from "@/api/system/invWarehouse";
export default { export default {
data() { data() {
return { return {
@ -220,7 +344,7 @@ export default {
1: "草稿", 1: "草稿",
2: "未审核", 2: "未审核",
3: "已审核", 3: "已审核",
4: "已拒绝" 4: "已拒绝",
}, },
emergencyMap: { emergencyMap: {
1: "普通", 1: "普通",
@ -234,8 +358,8 @@ export default {
3: "作废", 3: "作废",
}, },
showSup: false, showSup: false,
invList: {}, invList: {}, //
deptList: {}, deptList: {}, //
idQuery: {}, idQuery: {},
editType: 1, editType: 1,
total: 0, total: 0,
@ -343,7 +467,9 @@ export default {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
help() { help() {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.filePath); window.open(this.certFileUrl + this.filePath);
}, },
getList() { getList() {
@ -373,7 +499,7 @@ export default {
}); });
}, },
handleDetail(row) { handleDetail(row) {
let query = {orderIdFk: row.id}; let query = { orderIdFk: row.id };
this.loading = true; this.loading = true;
listOrderDetail(query) // listOrderDetail(query) //
.then((response) => { .then((response) => {
@ -406,23 +532,21 @@ export default {
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {});
});
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
this.getList(); this.getList();
}, },
selectAuthMenu() { selectAuthMenu() {
let params = {menuName: this.$route.meta.title} let params = { menuName: this.$route.meta.title };
selectAuthMenu(params).then((res) => { selectAuthMenu(params).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.Menustatus = res.data.status; this.Menustatus = res.data.status;
this.filePath = res.data.filePath; this.filePath = res.data.filePath;
} }
}) });
}, },
findMethod(key) { findMethod(key) {
@ -432,17 +556,18 @@ export default {
key: key, key: key,
corpType: 2, corpType: 2,
page: 1, page: 1,
limit: 20 limit: 20,
}; };
getBasicUnitMaintains(params).then((res) => { getBasicUnitMaintains(params)
this.corpLoading = false; .then((res) => {
this.fromOptions = res.data.list || []; this.corpLoading = false;
}).catch(() => { this.fromOptions = res.data.list || [];
this.corpLoading = false; })
}) .catch(() => {
this.corpLoading = false;
});
}, },
closeDialog() { closeDialog() {
this.newSpDistributionVisible = false; this.newSpDistributionVisible = false;
this.getList(); this.getList();
@ -450,32 +575,29 @@ export default {
}, },
getInvList() { getInvList() {
getInvListByUser().then((res) => { getInvListByUser().then((res) => {
// console.log("res1", res);
this.invList = res.data || []; this.invList = res.data || [];
this.getBusType(); });
})
}, },
getDeptList() { getDeptList() {
getDeptListByUser().then((res) => { getDeptListByUser().then((res) => {
// console.log("res2", res);
this.deptList = res.data || []; this.deptList = res.data || [];
}); });
}, },
newDistributionForm(row) { newDistributionForm(row) {
this.idQuery.id = ''; this.idQuery.id = "";
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id; this.idQuery.id = row.id;
this.idQuery.formData = row; this.idQuery.formData = row;
this.formName = "update"; this.formName = "update";
} else } else this.formName = "add";
this.formName = "add";
this.newSpDistributionVisible = true; this.newSpDistributionVisible = true;
}, },
},
}
,
components: { components: {
purPlanEdit, purPlanEdit,
} },
,
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
@ -484,21 +606,15 @@ export default {
4: "danger", 4: "danger",
}; };
return statusMap[status]; return statusMap[status];
} },
, },
} mounted() {},
,
mounted() {
}
,
created() { created() {
let supId = this.$store.getters.customerId; let supId = this.$store.getters.customerId;
if (supId == "110") { if (supId == "110") {
this.showSup = true; this.showSup = true;
} }
this.selectAuthMenu(); this.selectAuthMenu();
let end = new Date(); let end = new Date();
@ -508,12 +624,7 @@ export default {
this.getList(); this.getList();
this.getInvList(); this.getInvList();
this.getDeptList(); this.getDeptList();
} },
, };
}
;
</script> </script>
<style scoped> <style scoped></style>
</style>

Loading…
Cancel
Save