计划管理配置

20231126-yw
yuanwei 1 year ago
parent 9620345b5f
commit dd3b01e1d5

@ -49,6 +49,14 @@ export function getDeptListByUser(params) {
}); });
} }
export function getDeptListByUserOptimize(params) {
return axios({
url: "/spms/inv/warehouse/filterByUserOptimize",
method: "get",
params: params
});
}

@ -546,7 +546,7 @@ export default {
}; };
this.initActDateRange() this.initActDateRange()
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {
this.getInvList() this.getInvList(this)
} }
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -740,7 +740,7 @@ export default {
_this.invCodebe = _this.filterQuery.targetDeptCode _this.invCodebe = _this.filterQuery.targetDeptCode
} }
_this.getList(); _this.getList();
_this.getInvList(); _this.getInvList(_this);
}); });
}, },
initActDateRange() { initActDateRange() {
@ -798,7 +798,6 @@ export default {
this.initActDateRange() this.initActDateRange()
this.getCurInvList(this); this.getCurInvList(this);
this.getDeptList(this); this.getDeptList(this);
this.getInvList(this);
} }
, ,
} }

@ -539,7 +539,7 @@ export default {
targetInvCode: null targetInvCode: null
}; };
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {
this.getInvList() this.getInvList(this)
} }
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -673,7 +673,7 @@ export default {
}, },
deptChange() { deptChange() {
this.getInvList(); this.getInvList(this);
this.getList(); this.getList();
}, },
getInvList(_this) { getInvList(_this) {
@ -688,7 +688,7 @@ export default {
getDeptList(_this) { getDeptList(_this) {
filterDeptsOptimize().then((res) => { filterDeptsOptimize().then((res) => {
_this.options.getDeptList = res.data || []; _this.options.getDeptList = res.data || [];
_this.getInvList(); _this.getInvList(_this);
_this.getList(); _this.getList();
}); });
}, },
@ -753,7 +753,6 @@ export default {
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getCurInvList(this); this.getCurInvList(this);
this.getDeptList(this); this.getDeptList(this);
this.getInvList(this);
} }
, ,
} }

@ -597,7 +597,7 @@ export default {
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
}; };
if (targetDeptCode != this.invCodebe) { if (targetDeptCode != this.invCodebe) {
this.getInvList() this.getInvList(this)
} }
this.actDateRange = []; this.actDateRange = [];
this.actAuditDateRange = []; this.actAuditDateRange = [];
@ -764,7 +764,7 @@ export default {
_this.invCodebe = _this.filterQuery.targetDeptCode _this.invCodebe = _this.filterQuery.targetDeptCode
} }
_this.getList(); _this.getList();
_this.getInvList(); _this.getInvList(_this);
}); });
}, },
printOrder(_this,row) { printOrder(_this,row) {
@ -830,7 +830,6 @@ export default {
}); });
this.getCurInvList(this); this.getCurInvList(this);
this.getDeptList(this); this.getDeptList(this);
this.getInvList(this);
} }
, ,
} }

@ -596,7 +596,7 @@ export default {
deptCode: this.invCodebe, deptCode: this.invCodebe,
}; };
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {
this.getInvList() this.getInvList(this)
} }
this.actDateRange = []; this.actDateRange = [];
this.actAuditDateRange = []; this.actAuditDateRange = [];
@ -770,7 +770,7 @@ export default {
_this.invCodebe = _this.filterQuery.deptCode _this.invCodebe = _this.filterQuery.deptCode
} }
_this.getList(); _this.getList();
_this.getInvList(); _this.getInvList(_this);
}); });
}, },
getCurInvList(_this) { getCurInvList(_this) {
@ -830,7 +830,6 @@ export default {
}); });
this.getCurInvList(this); this.getCurInvList(this);
this.getDeptList(this); this.getDeptList(this);
this.getInvList(this);
} }
, ,

@ -1,72 +1,136 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" 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.deptCode" @change="getInvList" placeholder="请选择申购部门" style="width: 90%"> <!-- <el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择申购部门" style="width: 90%">-->
<el-option <!-- <el-option-->
v-for="item in deptList" <!-- v-for="item in deptList"-->
:key="item.code" <!-- :key="item.code"-->
: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>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="采购仓库">-->
<!-- <el-select v-model="filterQuery.invCode" 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-row>-->
<el-form-item label="采购仓库"> <!-- <el-col :span="8">-->
<el-select v-model="filterQuery.invCode" style="width: 90%" clearable placeholder="请选择所属仓库"> <!-- <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 style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option <el-option
v-for="item in invList" v-for="dict in item.lableRuleObj"
:key="item.name" :key="dict.value"
:label="item.name" :label="dict.label"
:value="item.code"> :value="dict.value"
<span style="float: left">{{ item.name }}</span> />
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
</el-row> <el-select
v-model="filterQuery[item.columnName]"
<el-row> :placeholder="item.columnDesc"
<el-col :span="8"> :disabled="executeEval(null,item.disabledFuc,false)"
<el-form-item label="紧急程度:" prop="emergency"> filterable
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> remote
<el-option label="正常" :value=1></el-option> :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
<el-option label="较急" :value=2></el-option> clearable>
<el-option label="特急" :value=3></el-option> <el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
@ -81,34 +145,122 @@
<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 <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="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
<el-table-column label="序号" type="index" width="60"></el-table-column> :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="采购单号" prop="billNo"></el-table-column> <!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<el-table-column label="采购部门" prop="deptName"></el-table-column> <!-- <el-table-column label="采购单号" prop="billNo"></el-table-column>-->
<el-table-column label="采购仓库" prop="invName"></el-table-column> <!-- <el-table-column label="采购部门" prop="deptName"></el-table-column>-->
<el-table-column label="紧急程度" prop="emergency"> <!-- <el-table-column label="采购仓库" prop="invName"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="紧急程度" prop="emergency">-->
{{ emergencyMap[scope.row.emergency] }} <!-- <template slot-scope="scope">-->
</template> <!-- {{ emergencyMap[scope.row.emergency] }}-->
</el-table-column> <!-- </template>-->
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <!-- </el-table-column>-->
<el-table-column label="单据状态" prop="status"> <!-- <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="单据状态" prop="status">-->
<el-tag :type="(scope.row.status) | statusFilterType"> <!-- <template slot-scope="scope">-->
{{ statusMap[scope.row.status] }} <!-- <el-tag :type="(scope.row.status) | statusFilterType">-->
</el-tag> <!-- {{ statusMap[scope.row.status] }}-->
</template> <!-- </el-tag>-->
</el-table-column> <!-- </template>-->
<el-table-column label="创建时间" prop="createTime" <!-- </el-table-column>-->
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> <!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<el-table-column label="操作" width="120"> <!-- <el-table-column label="操作" width="120">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑 <!-- <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑-->
</el-button> <!-- </el-button>-->
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> <!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
@ -123,15 +275,102 @@
</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> <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="序号" type="index" width="60"></el-table-column>-->
<el-table-column label="DI/物资编码" prop="nameCode"></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="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="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="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<el-table-column label="申购数量" prop="count"></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="zczbhhzbapzbh"></el-table-column>-->
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<el-table-column label="供应商" prop="supName"></el-table-column> <!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
</el-card> </el-card>
@ -159,8 +398,11 @@ import purPlanEdit from "./purPlanEditDialog";
import {delApply, inserThrOrderWeb, listPlan, listApplyDetail, delPlanDetailAll} from "@/api/purchase/purPlan"; import {delApply, inserThrOrderWeb, listPlan, listApplyDetail, delPlanDetailAll} from "@/api/purchase/purPlan";
import {delApplyDetailAll} from "@/api/purchase/purApply"; import {delApplyDetailAll} from "@/api/purchase/purApply";
import { getInvListByUser } from '@/api/system/invWarehouse' import { getInvListByUser } from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept' import {getDeptListByUser, getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse"; import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
data() { data() {
@ -197,6 +439,16 @@ export default {
}, },
idQuery: {}, idQuery: {},
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
busTypes: [], busTypes: [],
@ -268,7 +520,7 @@ export default {
invCode:null invCode:null
}; };
this.actDateRange = []; this.actDateRange = [];
this.getInvList() this.getInvList(this)
this.getList(); this.getList();
}, },
handleClose() { handleClose() {
@ -341,18 +593,18 @@ export default {
this.total = 0; this.total = 0;
}); });
}, },
handleDetail(row) { handleDetail(_this,row) {
let query = {orderIdFk: row.id}; let query = {orderIdFk: row.id};
this.loading = true; _this.loading = true;
listApplyDetail(query) // listApplyDetail(query) //
.then((response) => { .then((response) => {
this.detailList = response.data.list || []; _this.detailList = response.data.list || [];
this.loading = false; _this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
this.detailList = []; _this.detailList = [];
this.total = 0; _this.total = 0;
}); });
}, },
submitOrder(row) { submitOrder(row) {
@ -384,8 +636,8 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
deleteDialog(row) { deleteDialog(_this,row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { _this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -393,16 +645,16 @@ export default {
.then(() => { .then(() => {
delPlanDetailAll({id: row.id}) delPlanDetailAll({id: row.id})
.then((response) => { .then((response) => {
this.loading = false; _this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); _this.$message.success("删除成功");
this.getList(); _this.getList();
} else { } else {
this.$message.error(response.message); _this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
}); });
}) })
@ -419,39 +671,50 @@ export default {
this.getList(); this.getList();
this.detailList = []; this.detailList = [];
}, },
getInvList() { getInvList(_this) {
var query={ var query={
parentId:this.filterQuery.deptCode parentId:this.filterQuery.deptCode
} }
this.filterQuery.invCode = null this.filterQuery.invCode = null
filterSubAll(query).then((res) => { filterSubAllOptimize(query).then((res) => {
this.invList = res.data || []; _this.options.getInvList = res.data || [];
}) })
}, },
getDeptList() { getDeptList(_this) {
getDeptListByUser().then((res) => { getDeptListByUserOptimize().then((res) => {
this.deptList = res.data || []; _this.options.getDeptList = res.data || [];
if(this.deptList.length>0){ if( _this.options.getDeptList.length>0){
this.filterQuery.deptCode=this.deptList[0].code _this.filterQuery.deptCode= _this.options.getDeptList[0].code
this.invCodebe=this.filterQuery.deptCode _this.invCodebe=this.filterQuery.deptCode
} }
this.getList(); _this.getList();
this. getInvList(); _this.getInvList(_this);
}); });
}, },
newDistributionForm(index, row) { newDistributionForm(_this, row) {
this.idQuery.id = ''; if(_this == null){
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { _this = this
this.idQuery.id = row.id; }
this.idQuery.formData = row; _this.idQuery.id = '';
this.formName = "update"; if (_this.$isNotBlank(row) && _this.$isNotBlank(row.id)) {
_this.idQuery.id = row.id;
_this.idQuery.formData = row;
_this.formName = "update";
} else } else
this.formName = "add"; _this.formName = "add";
this.newSpDistributionVisible = true; _this.newSpDistributionVisible = true;
}, },
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
} }
, ,
components: { components: {
@ -473,7 +736,22 @@ export default {
} }
, ,
created() { created() {
this.getDeptList(); this.getDeptList(this);
// this.finCorpList();
getHead("purPlan-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purPlan-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
} }
, ,
} }

@ -1,70 +1,135 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" 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.deptCode" placeholder="请选择申购部门" @change="getInvList" style="width: 90%"> <!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择申购部门" @change="getInvList" style="width: 90%">-->
<el-option <!-- <el-option-->
v-for="item in deptList" <!-- v-for="item in deptList"-->
:key="item.code" <!-- :key="item.code"-->
: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>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="采购仓库">-->
<!-- <el-select v-model="filterQuery.invCode" style="width: 90%" 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-row>-->
<el-form-item label="采购仓库"> <!-- <el-col :span="8">-->
<el-select v-model="filterQuery.invCode" style="width: 90%" placeholder="请选择所属仓库"> <!-- <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 style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option <el-option
v-for="item in invList" v-for="dict in item.lableRuleObj"
:key="item.name" :key="dict.value"
:label="item.name" :label="dict.label"
:value="item.code"> :value="dict.value"
<span style="float: left">{{ item.name }}</span> />
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
</el-row> <el-select
v-model="filterQuery[item.columnName]"
<el-row> :placeholder="item.columnDesc"
<el-col :span="8"> :disabled="executeEval(null,item.disabledFuc,false)"
<el-form-item label="紧急程度:" prop="emergency"> filterable
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> remote
<el-option label="正常" :value=1></el-option> :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
<el-option label="较急" :value=2></el-option> clearable>
<el-option label="特急" :value=3></el-option> <el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> ></el-date-picker>
</el-date-picker> </el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </template>
</el-row> </el-row>
</el-form> </el-form>
@ -78,35 +143,123 @@
<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 <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="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
<el-table-column label="序号" type="index" width="60"></el-table-column> :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="采购单号" prop="billNo"></el-table-column> <!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<el-table-column label="采购部门" prop="deptName"></el-table-column> <!-- <el-table-column label="采购单号" prop="billNo"></el-table-column>-->
<el-table-column label="采购仓库" prop="invName"></el-table-column> <!-- <el-table-column label="采购部门" prop="deptName"></el-table-column>-->
<el-table-column label="紧急程度" prop="emergency"> <!-- <el-table-column label="采购仓库" prop="invName"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="紧急程度" prop="emergency">-->
{{ emergencyMap[scope.row.emergency] }} <!-- <template slot-scope="scope">-->
</template> <!-- {{ emergencyMap[scope.row.emergency] }}-->
</el-table-column> <!-- </template>-->
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <!-- </el-table-column>-->
<el-table-column label="单据状态" prop="status"> <!-- <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="单据状态" prop="status">-->
<el-tag :type="(scope.row.status) | statusFilterType"> <!-- <template slot-scope="scope">-->
{{ statusMap[scope.row.status] }} <!-- <el-tag :type="(scope.row.status) | statusFilterType">-->
</el-tag> <!-- {{ statusMap[scope.row.status] }}-->
</template> <!-- </el-tag>-->
</el-table-column> <!-- </template>-->
<el-table-column label="创建时间" prop="createTime" <!-- </el-table-column>-->
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> <!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<el-table-column label="操作" width="60px"> <!-- <el-table-column label="操作" width="60px">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button type="text" :disabled="scope.row.status!=2" <!-- <el-button type="text" :disabled="scope.row.status!=2"-->
@click.native="newDistributionForm(scope.$index, scope.row)">审核 <!-- @click.native="newDistributionForm(scope.$index, scope.row)">审核-->
</el-button> <!-- </el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<pagination <pagination
@ -122,15 +275,102 @@
</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> <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="序号" type="index" width="60"></el-table-column>-->
<el-table-column label="DI/物资编码" prop="nameCode"></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="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="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="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<el-table-column label="申购数量" prop="count"></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="zczbhhzbapzbh"></el-table-column>-->
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<el-table-column label="供应商" prop="supName"></el-table-column> <!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
</el-card> </el-card>
@ -155,8 +395,11 @@
import purPlanEdit from "./purPlanDetailDialog"; import purPlanEdit from "./purPlanDetailDialog";
import {delApply, auditListPlan, listApplyDetail} from "@/api/purchase/purPlan"; import {delApply, auditListPlan, listApplyDetail} from "@/api/purchase/purPlan";
import { getInvListByUser } from '@/api/system/invWarehouse' import { getInvListByUser } from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept' import {getDeptListByUser, getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse"; import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
data() { data() {
@ -198,6 +441,16 @@ export default {
idQuery: {}, idQuery: {},
editType: 1, editType: 1,
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
busTypes: [], busTypes: [],
@ -262,7 +515,7 @@ export default {
deptCode: this.invCodebe, deptCode: this.invCodebe,
invCode:null invCode:null
}; };
this.getInvList() this.getInvList(this)
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
}, },
@ -313,21 +566,21 @@ export default {
this.total = 0; this.total = 0;
}); });
}, },
handleDetail(row) { handleDetail(_this,row) {
let query = {orderIdFk: row.id}; let query = {orderIdFk: row.id};
this.loading = true; _this.loading = true;
listApplyDetail(query) // listApplyDetail(query) //
.then((response) => { .then((response) => {
this.detailList = response.data.list || []; _this.detailList = response.data.list || [];
this.loading = false; _this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
this.detailList = []; _this.detailList = [];
}); });
}, },
deleteDialog(row) { deleteDialog(_this,row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { _this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -335,16 +588,16 @@ export default {
.then(() => { .then(() => {
delApply(row.id) delApply(row.id)
.then((response) => { .then((response) => {
this.loading = false; _this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); _this.$message.success("删除成功");
this.getList(); _this.getList();
} else { } else {
this.$message.error(response.message); _this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
}); });
}) })
@ -363,36 +616,45 @@ export default {
}, },
newDistributionForm(index, row) { newDistributionForm(_this, 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;
}, },
getInvList() { getInvList(_this) {
var query={ var query={
parentId:this.filterQuery.deptCode parentId:_this.filterQuery.deptCode
} }
this.filterQuery.invCode = null _this.filterQuery.invCode = null
filterSubAll(query).then((res) => { filterSubAllOptimize(query).then((res) => {
this.invList = res.data || []; _this.options.getInvList = res.data || [];
}) })
}, },
getDeptList() { getDeptList(_this) {
getDeptListByUser().then((res) => { getDeptListByUserOptimize().then((res) => {
this.deptList = res.data || []; _this.options.getDeptList = res.data || [];
if(this.deptList.length>0){ if( _this.options.getDeptList.length>0){
this.filterQuery.deptCode=this.deptList[0].code _this.filterQuery.deptCode= _this.options.getDeptList[0].code
this.invCodebe=this.filterQuery.deptCode _this.invCodebe=this.filterQuery.deptCode
} }
this.getList(); _this.getList();
this. getInvList(); _this.getInvList(_this);
}); });
}, },
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
} }
, ,
components: { components: {
@ -414,7 +676,21 @@ export default {
} }
, ,
created() { created() {
this.getDeptList(); this.getDeptList(this);
getHead("purPlanAudit-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purPlanAudit-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
} }
, ,
} }

@ -1,84 +1,161 @@
<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 v-if="queryList && queryList.length > 0" :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-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="采购部门">-->
<!-- <el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" 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.invCode" 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-col :span="8">-->
<!-- <el-form-item label="审核时间:">-->
<!-- <el-date-picker-->
<!-- :picker-options="pickerAuditOptions"-->
<!-- v-model="actAuditDateRange"-->
<!-- 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 style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8"> <el-select v-model="filterQuery[item.columnName]"
<el-form-item label="采购部门"> :placeholder="item.columnDesc"
<el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%"> :disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option <el-option
v-for="item in deptList" v-for="dict in item.lableRuleObj"
:key="item.code" :key="dict.value"
:label="item.name" :label="dict.label"
:value="item.code" :value="dict.value"
> />
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8"> <el-select
<el-form-item label="采购仓库"> v-model="filterQuery[item.columnName]"
<el-select v-model="filterQuery.invCode" style="width: 90%" clearable placeholder="请选择所属仓库"> :placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option <el-option
v-for="item in invList" v-for="item in options[item.clickFuc]"
:key="item.name" :key="item.code"
:label="item.name" :label="item.label"
:value="item.code"> :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-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actAuditDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="8">
<el-form-item label="审核时间:">
<el-date-picker <el-date-picker
:picker-options="pickerAuditOptions" :picker-options="pickerOptions"
v-model="actAuditDateRange" v-model="actAuditDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row> </el-row>
</el-form> </el-form>
@ -93,36 +170,124 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true" <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="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
<el-table-column label="序号" type="index" width="60"></el-table-column> :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="采购计划单号" prop="billNo"></el-table-column> <!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<el-table-column label="采购部门" prop="deptName"></el-table-column> <!-- <el-table-column label="采购计划单号" prop="billNo"></el-table-column>-->
<el-table-column label="采购仓库" prop="invName"></el-table-column> <!-- <el-table-column label="采购部门" prop="deptName"></el-table-column>-->
<el-table-column label="紧急程度" prop="emergency"> <!-- <el-table-column label="采购仓库" prop="invName"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="紧急程度" prop="emergency">-->
{{ emergencyMap[scope.row.emergency] }} <!-- <template slot-scope="scope">-->
</template> <!-- {{ emergencyMap[scope.row.emergency] }}-->
</el-table-column> <!-- </template>-->
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <!-- </el-table-column>-->
<el-table-column label="状态" prop="status"> <!-- <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>-->
<template slot-scope="scope"> <!-- <el-table-column label="状态" prop="status">-->
<el-tag :type="(scope.row.status) | statusFilterType"> <!-- <template slot-scope="scope">-->
{{ statusMap[scope.row.status] }} <!-- <el-tag :type="(scope.row.status) | statusFilterType">-->
</el-tag> <!-- {{ statusMap[scope.row.status] }}-->
</template> <!-- </el-tag>-->
</el-table-column> <!-- </template>-->
<el-table-column label="创建时间" prop="createTime" <!-- </el-table-column>-->
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> <!-- <el-table-column label="创建时间" prop="createTime"-->
<el-table-column label="审核时间" prop="auditTime" <!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
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="操作"> <!-- <el-table-column label="操作">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" <!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
>删除 <!-- >删除-->
</el-button> <!-- </el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
@ -138,15 +303,102 @@
</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="60"></el-table-column> <!-- <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="DI/物资编码" prop="nameCode"></el-table-column>-->
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></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="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="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<el-table-column label="申购数量" prop="count"></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="zczbhhzbapzbh"></el-table-column>-->
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<el-table-column label="供应商" prop="supName"></el-table-column> <!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
</el-card> </el-card>
@ -173,8 +425,11 @@
import purPlanEdit from "./purPlanDetailDialog"; import purPlanEdit from "./purPlanDetailDialog";
import {delApply, listPlan, listApplyDetail, delPlanDetailAll, delApplyDetail} from "@/api/purchase/purPlan"; import {delApply, listPlan, listApplyDetail, delPlanDetailAll, delApplyDetail} from "@/api/purchase/purPlan";
import { getInvListByUser } from '@/api/system/invWarehouse' import { getInvListByUser } from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept' import {getDeptListByUser, getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse"; import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
data() { data() {
@ -216,6 +471,16 @@ export default {
idQuery: {}, idQuery: {},
editType: 1, editType: 1,
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
busTypes: [], busTypes: [],
@ -310,7 +575,7 @@ export default {
editStatus: 1, editStatus: 1,
deptCode: this.invCodebe, deptCode: this.invCodebe,
}; };
this.getInvList(); this.getInvList(this);
this.actDateRange = []; this.actDateRange = [];
this.actAuditDateRange = []; this.actAuditDateRange = [];
this.getList(); this.getList();
@ -369,22 +634,22 @@ export default {
this.total = 0; this.total = 0;
}); });
}, },
handleDetail(row) { handleDetail(_this,row) {
let query = {orderIdFk: row.id}; let query = {orderIdFk: row.id};
this.loading = true; _this.loading = true;
listApplyDetail(query) // listApplyDetail(query) //
.then((response) => { .then((response) => {
this.detailList = response.data.list || []; _this.detailList = response.data.list || [];
this.loading = false; _this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
this.detailList = []; _this.detailList = [];
this.total = 0; _this.total = 0;
}); });
}, },
deleteDialog(row) { deleteDialog(_this,row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { _this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -392,16 +657,16 @@ export default {
.then(() => { .then(() => {
delPlanDetailAll(row) delPlanDetailAll(row)
.then((response) => { .then((response) => {
this.loading = false; _this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); _this.$message.success("删除成功");
this.getList(); _this.getList();
} else { } else {
this.$message.error(response.message); _this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; _this.loading = false;
}); });
}) })
@ -418,37 +683,45 @@ export default {
this.getList(); this.getList();
this.detailList = []; this.detailList = [];
}, },
getInvList() { getInvList(_this) {
var query={ var query={
parentId:this.filterQuery.deptCode parentId:_this.filterQuery.deptCode
} }
filterSubAll(query).then((res) => { filterSubAllOptimize(query).then((res) => {
this.invList = res.data || []; _this.options.getInvList = res.data || [];
}) })
}, },
getDeptList() { getDeptList(_this) {
getDeptListByUser().then((res) => { getDeptListByUserOptimize().then((res) => {
this.deptList = res.data || []; _this.options.getDeptList = res.data || [];
if(this.deptList.length>0){ if( _this.options.getDeptList.length>0){
this.filterQuery.deptCode=this.deptList[0].code _this.filterQuery.deptCode= _this.options.getDeptList[0].code
this.invCodebe=this.filterQuery.deptCode _this.invCodebe=this.filterQuery.deptCode
} }
this.getList(); _this.getList();
this. getInvList(); _this.getInvList(_this);
}); });
}, },
newDistributionForm(index, row) { newDistributionForm(_this, 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;
}, },
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
} }
, ,
components: { components: {
@ -471,7 +744,21 @@ export default {
} }
, ,
created() { created() {
this.getDeptList(); this.getDeptList(this);
getHead("purPlanSearch-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purPlanSearch-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
} }
, ,
} }

Loading…
Cancel
Save