Merge remote-tracking branch 'origin/master'

master
schry 2 years ago
commit b4cf299f8c

@ -5,9 +5,9 @@ VUE_APP_TITLE = UDI管理系统
ENV = 'development'
# 开发环境
VUE_APP_BASE_API = 'http://127.0.0.1:9991'
VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001"
VUE_APP_SYNC_API ="http://192.168.0.166:10001"
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'

@ -8,7 +8,7 @@ ENV = 'production'
#林纪裕cd
# VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:81/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
@ -31,7 +31,10 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/'
# 漳州中医院
VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
# 片仔癀诊断
# VUE_APP_BASE_API = 'http://192.168.0.100:9160/UDI_WMS_MC/'
# 应用访问路径 例如使用前缀 /admin/

@ -2,7 +2,7 @@ import axios from "@/utils/request";
export function filterDepts(query) {
return axios({
url: "/udi/auth/dept/filter",
url: "/spms/inv/warehouse/filterAll",
method: "get",
params: query
});
@ -39,3 +39,8 @@ export function getDeptListByUser(params) {
params: params
});
}

@ -180,10 +180,10 @@
<el-col :span="6">
<el-form-item class="query-form-item" label="是否在用:">
<el-select
v-model="filterQuery.isDisable"
placeholder="请选择是否在用"
clearable
style="width: 90%"
v-model="filterQuery.isDisable"
placeholder="请选择是否在用"
clearable
style="width: 90%"
>
<el-option label="在用" value="false"></el-option>
<el-option label="停用" value="true"></el-option>
@ -307,56 +307,56 @@
show-overflow-tooltip
></el-table-column>
<el-table-column
label="备注字段1"
:label="productRemarkSet.remarkTitle1"
prop="basicPrductRemak1"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak1')"
></el-table-column>
<el-table-column
label="备注字段2"
:label="productRemarkSet.remarkTitle2"
prop="basicPrductRemak2"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak2')"
></el-table-column>
<el-table-column
label="备注字段3"
:label="productRemarkSet.remarkTitle3"
prop="basicPrductRemak3"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak3')"
></el-table-column>
<el-table-column
label="备注字段4"
:label="productRemarkSet.remarkTitle4"
prop="basicPrductRemak4"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak4')"
></el-table-column>
<el-table-column
label="备注字段5"
:label="productRemarkSet.remarkTitle5"
prop="basicPrductRemak5"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak5')"
></el-table-column>
<el-table-column
label="备注字段6"
:label="productRemarkSet.remarkTitle6"
prop="basicPrductRemak6"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak6')"
></el-table-column>
<el-table-column
label="备注字段7"
:label="productRemarkSet.remarkTitle7"
prop="basicPrductRemak7"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak7')"
></el-table-column>
<el-table-column
label="备注字段8"
:label="productRemarkSet.remarkTitle8"
prop="basicPrductRemak8"
width="180"
show-overflow-tooltip
@ -364,10 +364,10 @@
></el-table-column>
<el-table-column
label="是否在用"
prop="isDisable"
width="180"
show-overflow-tooltip
label="是否在用"
prop="isDisable"
width="180"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag :type="scope.row.isDisable | isDisableFilterType">
@ -401,6 +401,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column width="180" label="操作" fixed="right">
<template slot-scope="scope">
<el-button
@ -1644,7 +1645,16 @@ export default {
false: "不可配送",
},
pId: 0,
productRemarkSet: {},
productRemarkSet: {
remarkTitle1: "备注字段1",
remarkTitle2: "备注字段2",
remarkTitle3: "备注字段3",
remarkTitle4: "备注字段4",
remarkTitle5: "备注字段5",
remarkTitle6: "备注字段6",
remarkTitle7: "备注字段7",
remarkTitle8: "备注字段8",
},
relevanceEdit: {
id: null,
thirdId: "",
@ -2148,50 +2158,6 @@ export default {
}
});
},
// selectSysParam() {
// let query = {
// paramKey: "smp_isUploadProuct",
// };
// spcombie().then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isSpCombine = true;
// } else {
// this.isSpCombine = false;
// }
// }
// });
//
// selectSysParamByKey(query).then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isUploadSmp = true;
// } else {
// this.isUploadSmp = false;
// }
// }
// });
// let query1 = {
// paramKey: "upload_pi_file_enabled",
// };
// selectSysParamByKey(query1).then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isImportFile = true;
// }
// }
// });
// let query2 = {
// paramKey: "upload_pi_file_url",
// };
// selectSysParamByKey(query2).then((response) => {
// if (response.code == 20000) {
// this.uploadFileUrl = response.data.paramValue;
// }
// });
// },
editUdiType() {
this.selectUdiTypeVisible = true;
},

@ -1,513 +1,521 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList" style="width: 90%">
<el-option
v-for="item in deptList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList"
style="width: 90%">
<el-option
v-for="item in deptList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="8">
<el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</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-plus" @click="newDistributionForm()" :loading="loading">新增单据</el-button>
</el-button-group>
</div>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</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-plus" @click="newDistributionForm()" :loading="loading">新增单据
</el-button>
</el-button-group>
</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%" @current-change="handleDetail" border highlight-current-row
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" >
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" width="120px">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border
highlight-current-row
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency">
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" width="120px">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
></pagination>
</el-card>
></pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
</el-table>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
</el-table>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close ="handleClose"
>
<pureApplyEdit
:closeDialog="closeDialog"
:idQuery="idQuery"
v-on:cancelDialog="getId"
:isChang="isChang"
></pureApplyEdit>
</el-dialog>
</div>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="handleClose"
>
<pureApplyEdit
:closeDialog="closeDialog"
:idQuery="idQuery"
v-on:cancelDialog="getId"
:isChang="isChang"
></pureApplyEdit>
</el-dialog>
</div>
</template>
<script>
import pureApplyEdit from "./purApplyEditDiaolog";
import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply";
import { getInvListByUser } from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse";
import {getInvListByUser} from '@/api/system/invWarehouse'
import {filterDepts, getDeptListByUser} from '@/api/auth/authDept'
import {filterGroupBySpuse, filterSubAll} from "@/api/system/invSubWarehouse";
export default {
data() {
return {
defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true,
pId:null,
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
emergency:'',
targetDeptCode:'',
targetInvCode:null
},
isChang:false,
formName: null,
formMap: {
add: "新增申购单据",
update: "编辑申购单据",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
data() {
return {
defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true,
pId: null,
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
emergency: '',
targetDeptCode: '',
targetInvCode: null
},
isChang: false,
formName: null,
formMap: {
add: "新增申购单据",
update: "编辑申购单据",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
emergencyMap: {
1: "正常",
2: "较急",
3: "特急",
},
idQuery: {},
total: 0,
thirdSys: [],
invList: {},
invCodebe: null,
deptList: {},
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
createTimes: null,
detailLoading: false,
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
emergencyMap:{
1: "正常",
2: "较急",
3: "特急",
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
idQuery: {},
total: 0,
thirdSys: [],
invList:{},
invCodebe:null,
deptList:{},
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
createTimes:null,
detailLoading: false,
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
};
},
},
],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
targetDeptCode: this.invCodebe,
targetInvCode:null
};
this.initActDateRange()
if(deptCode!=this.invCodebe){
this.getInvList()
}
this.actDateRange = [];
this.getList();
},
getId(id){
if( this.formName=='add' && id!=null){
var data={
id:id
}
this.pId=id
//
delApplyDetailAll(data).then((response)=>{
if(response.code==20000){
this.newSpDistributionVisible=false
}
});
}else{
this.newSpDistributionVisible=false
methods: {
onReset() {
this.$router.push({
path: "",
});
let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
targetDeptCode: this.invCodebe,
targetInvCode: null
};
this.initActDateRange()
if (deptCode != this.invCodebe) {
this.getInvList()
}
this.actDateRange = [];
this.getList();
},
getId(id) {
if (this.formName == 'add' && id != null) {
var data = {
id: id
}
this.pId = id
//
delApplyDetailAll(data).then((response) => {
if (response.code == 20000) {
this.newSpDistributionVisible = false
}
});
} else {
this.newSpDistributionVisible = false
}
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.filterQuery.sort = 'desc'
} else {
this.filterQuery.sort = 'asc'
}
this.filterQuery.orderBy = column.prop;
this.getList();
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.filterQuery.sort = 'desc'
} else {
this.filterQuery.sort = 'asc'
}
this.filterQuery.orderBy = column.prop;
this.getList();
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
console.log(this.filterQuery)
listApply(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.detailList=[]
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.detailLoading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.detailLoading = false;
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
handleClose(){
if( this.formName=='add'){
this.isChang=!this.isChang
}else{
this.newSpDistributionVisible=false
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
console.log(this.filterQuery)
listApply(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.detailList = []
} else {
this.$message.error(response.message);
}
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.detailLoading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.detailLoading = false;
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
handleClose() {
if (this.formName == 'add') {
this.isChang = !this.isChang
} else {
this.newSpDistributionVisible = false
}
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
this.getList();
},
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
getInvList() {
var query={
parentId:this.filterQuery.targetDeptCode
}
this.filterQuery.targetInvCode = null
this.$forceUpdate()
filterSubAll(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
if(this.deptList.length>0){
this.filterQuery.targetDeptCode=this.deptList[0].code
this.invCodebe=this.filterQuery.targetDeptCode
}
this.getList();
this. getInvList();
});
},
initActDateRange(){
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
getInvList() {
var query = {
parentId: this.filterQuery.targetDeptCode,
spUse: true,
}
this.filterQuery.targetInvCode = null
this.$forceUpdate()
filterGroupBySpuse(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
let query = {
spUse: true,
};
filterDepts(query).then((res) => {
this.deptList = res.data || [];
if (this.deptList.length > 0) {
this.filterQuery.targetDeptCode = this.deptList[0].code
this.invCodebe = this.filterQuery.targetDeptCode
}
this.getList();
this.getInvList();
});
},
initActDateRange() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
}
,
components: {
pureApplyEdit,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
1: "warning",
2: "success",
};
return statusMap[status];
}
,
}
,
mounted() {
}
,
created() {
this.initActDateRange()
this.getDeptList();
}
,
components: {
pureApplyEdit,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
1: "warning",
2: "success",
};
return statusMap[status];
}
,
}
,
mounted() {
}
,
created() {
this.initActDateRange()
this.getDeptList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -1,152 +1,156 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" style="width: 90%"
@change="getInvList"
>
<el-option
v-for="item in deptList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购部门">
<el-select v-model="filterQuery.deptCode" placeholder="请选择申购部门" style="width: 90%"
@change="getInvList"
>
<el-option
v-for="item in deptList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" @change="getList" style="width: 90%" clearable placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="8">
<el-form-item label="申购仓库">
<el-select v-model="filterQuery.invCode" @change="getList" style="width: 90%" clearable
placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</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-group>
</div>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</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-group>
</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 @current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" >
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" width="60px">
<template slot-scope="scope">
<el-button type="text" :disabled="scope.row.status!=2" @click.native="newDistributionForm(scope.$index, scope.row)">审核</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购部门" prop="deptName"></el-table-column>
<el-table-column label="申购仓库" prop="invName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency">
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" width="60px">
<template slot-scope="scope">
<el-button type="text" :disabled="scope.row.status!=2"
@click.native="newDistributionForm(scope.$index, scope.row)">审核
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
></pagination>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
</el-table>
</el-card>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
</el-table>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<pureApplyDetail
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></pureApplyDetail>
</el-dialog>
</div>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<pureApplyDetail
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></pureApplyDetail>
</el-dialog>
</div>
</template>
<script>
import pureApplyDetail from "./pureApplyDetailDialog";
@ -156,321 +160,323 @@ import {getDeptListByUser} from "@/api/auth/authDept";
import {filterSubAll} from "@/api/system/invSubWarehouse";
export default {
data() {
return {
defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true,
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
emergency:'',
targetDeptCode:'',
targetInvCode: null
},
formName: null,
formMap: {
add: "新增申购单据",
update: "审核申购单据",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
data() {
return {
defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true,
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
emergency: '',
targetDeptCode: '',
targetInvCode: null,
deptCode: null,
invCode: null,
},
formName: null,
formMap: {
add: "新增申购单据",
update: "审核申购单据",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
emergencyMap: {
1: "正常",
2: "较急",
3: "特急",
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
invCodebe: null,
thirdSysDetail: null,
busTypes: [],
originTypes: [],
invList: {},
deptList: {},
list: [],
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
emergencyMap:{
1: "正常",
2: "较急",
3: "特急",
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
invCodebe:null,
thirdSysDetail: null,
busTypes: [],
originTypes: [],
invList:{},
deptList:{},
list: [],
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
};
},
},
],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
targetDeptCode: this.invCodebe,
targetInvCode: null
};
if(deptCode!=this.invCodebe){
this.getInvList()
}
this.actDateRange = [];
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
methods: {
onReset() {
this.$router.push({
path: "",
});
let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
targetDeptCode: this.invCodebe,
targetInvCode: null
};
if (deptCode != this.invCodebe) {
this.getInvList()
}
this.actDateRange = [];
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.filterQuery.sort = 'desc'
} else {
this.filterQuery.sort = 'asc'
}
this.filterQuery.orderBy = column.prop;
this.getList();
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.filterQuery.sort = 'desc'
} else {
this.filterQuery.sort = 'asc'
}
this.filterQuery.orderBy = column.prop;
this.getList();
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
auditListApply(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.detailList=[]
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
auditOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
auditListApply(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.detailList = []
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
auditOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
deptChange(){
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
deptChange() {
this. getInvList();
this.getList();
},
getInvList() {
var query={
parentId:this.filterQuery.targetDeptCode
}
this.filterQuery.targetInvCode = null
filterSubAll(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
filterAll().then((res) => {
this.deptList = res.data || [];
this. getInvList();
this.getList();
});
},
}
,
components: {
pureApplyDetail,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
2: "warning",
3: "success",
4: "danger",
};
return statusMap[status];
}
,
}
,
mounted() {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getDeptList();
this.getInvList();
this.getList();
},
getInvList() {
var query = {
parentId: this.filterQuery.targetDeptCode
}
this.filterQuery.targetInvCode = null
filterSubAll(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
filterAll().then((res) => {
this.deptList = res.data || [];
this.getInvList();
this.getList();
});
},
}
,
components: {
pureApplyDetail,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
2: "warning",
3: "success",
4: "danger",
};
return statusMap[status];
}
,
}
,
mounted() {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getDeptList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -104,18 +104,13 @@
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
<el-table-column label="状态" prop="status">
<el-table-column label="审核人" prop="auditByName"></el-table-column>
<el-table-column label="审核状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}

@ -81,18 +81,19 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency">
<el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<el-table-column label="单据状态" prop="status">
<el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
@ -100,10 +101,10 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作" width="120">
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
</el-button>

@ -11,7 +11,7 @@
<el-col :span="8">
<el-form-item label="采购部门">
<el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%">
<el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%">
<el-option
v-for="item in deptList"
:key="item.code"
@ -26,7 +26,7 @@
<el-col :span="8">
<el-form-item label="采购仓库">
<el-select v-model="filterQuery.invCode" clearable style="width: 90%" placeholder="请选择所属仓库">
<el-select v-model="filterQuery.invCode" clearable style="width: 90%" placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
:key="item.name"
@ -78,20 +78,22 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency">
<el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="审核人" prop="auditUserName"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<el-table-column label="单据状态" prop="status">
<el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
@ -99,8 +101,8 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" width="60px">
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作" width="60px" fixed="right">
<template slot-scope="scope">
<el-button type="text" :disabled="scope.row.status!=2"
@click.native="newDistributionForm(scope.$index, scope.row)">审核
@ -174,11 +176,11 @@ export default {
corpName: null,
type: 1,
editStatus: 1,
emergency:'',
deptCode:'',
emergency: '',
deptCode: '',
},
formName: null,
invCodebe:null,
invCodebe: null,
formMap: {
add: "新增采购计划",
update: "采购计划审核",
@ -189,7 +191,7 @@ export default {
3: "已审核",
4: "已拒绝"
},
emergencyMap:{
emergencyMap: {
1: "正常",
2: "较急",
3: "特急",
@ -298,7 +300,7 @@ export default {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.detailList=[]
this.detailList = []
} else {
this.$message.error(response.message);
}
@ -359,8 +361,8 @@ export default {
this.detailList = [];
},
getInvList() {
var query={
parentId:this.filterQuery.deptCode
var query = {
parentId: this.filterQuery.deptCode
}
filterSubAll(query).then((res) => {
this.invList = res.data || [];
@ -369,12 +371,12 @@ export default {
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
if(this.deptList.length>0){
this.filterQuery.deptCode=this.deptList[0].code
this.invCodebe=this.filterQuery.deptCode
if (this.deptList.length > 0) {
this.filterQuery.deptCode = this.deptList[0].code
this.invCodebe = this.filterQuery.deptCode
}
this.getList();
this. getInvList();
this.getInvList();
});
},

@ -94,20 +94,22 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange" >
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency">
<el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="审核人" prop="auditUserName"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }}
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<el-table-column label="状态" prop="status">
<el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
@ -115,12 +117,12 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" width="60px" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除

@ -102,7 +102,8 @@
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="用户账号" prop="userName">
<el-input v-model="formData.userName" size="small" style="width: 90%" :disabled="formData.id == 1"></el-input>
<el-input v-model="formData.userName" size="small" style="width: 90%"
:disabled="formData.id == 1"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
@ -206,7 +207,7 @@
<el-row :gutter="20" type="flex">
<el-col :span="11" type="flex">
<el-form-item label="角色" prop="roles">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1" >
<el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1">
<el-checkbox
v-for="item in roles"
:key="item.roleId"
@ -258,7 +259,7 @@ import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import {listRole} from "@/api/system/role";
import {selectSysParamByKey} from "@/api/system/systemParamConfig";
import {filterList, selectInvById,getDeptById} from '@/api/system/invWarehouse'
import {filterList, selectInvById, getDeptById} from '@/api/system/invWarehouse'
const formJson = {
id: "",
@ -384,7 +385,7 @@ export default {
this.query.page = 1;
this.getList();
},
change(){
change() {
this.$forceUpdate();
},
findInv(val) {
@ -403,7 +404,7 @@ export default {
},
getList() {
this.loading = true;
this.query.key='key';
this.query.key = 'key';
authAdminList(this.query)
.then(response => {
this.loading = false;
@ -465,7 +466,7 @@ export default {
roles: row.roles,
depts: row.depts,
dept: row.dept,
locInvCode:row.locInvCode
locInvCode: row.locInvCode
};
}
this.formName = "add";
@ -570,10 +571,10 @@ export default {
};
filterList(query)
.then((response) => {
var deptList=[];
var deptList = [];
this.loading = false;
for(var i=0;i<response.data.list.length;i++){
if(response.data.list[i].id!=1){
for (var i = 0; i < response.data.list.length; i++) {
if (response.data.list[i].id != 1) {
deptList.push(response.data.list[i]);
}
}

Loading…
Cancel
Save