采购订单管理配置

20231126-yw
yuanwei 1 year ago
parent dd3b01e1d5
commit 059ad7a1b4

@ -1,69 +1,134 @@
<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>
<el-form v-if="queryList && queryList.length > 0" :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.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.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-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-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
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</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-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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-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-col>
</template>
</el-row>
</el-form>
@ -79,38 +144,126 @@
<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" 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" 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] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <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" 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] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>-->
<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>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
<!-- <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>-->
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </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>
@ -125,16 +278,103 @@
</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="price" 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-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="price" 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>-->
<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-card>
@ -161,8 +401,12 @@
import purPlanEdit from "./purOrderEditDialog";
import {inserThrOrderWeb, listOrderDetail, delOrderDetailAll, listOrder} from "@/api/purchase/purOrder";
import {getInvListByUser} from '@/api/system/invWarehouse'
import {getDeptListByUser} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse";
import {getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -206,6 +450,16 @@ export default {
deptList: {},
idQuery: {},
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
@ -269,7 +523,7 @@ export default {
deptCode: this.invCodebe,
};
this.actDateRange = [];
this.getInvList();
this.getInvList(this);
this.getList();
},
handleClose() {
@ -341,18 +595,18 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
let query = {orderIdFk: row.id};
this.loading = true;
_this.loading = true;
listOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
_this.detailList = response.data.list || [];
_this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
_this.loading = false;
_this.detailList = [];
_this.total = 0;
});
},
submitOrder(row) {
@ -384,8 +638,8 @@ export default {
.catch(() => {
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -393,17 +647,17 @@ export default {
.then(() => {
delOrderDetailAll({id: row.id})
.then((response) => {
this.loading = false;
_this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList = null;
_this.$message.success("删除成功");
_this.getList();
_this.detailList = null;
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
_this.loading = false;
});
})
@ -420,37 +674,48 @@ export default {
this.getList();
this.detailList = [];
},
getInvList() {
getInvList(_this) {
var query = {
parentId: this.filterQuery.deptCode
parentId: _this.filterQuery.deptCode
}
filterSubAll(query).then((res) => {
this.invList = res.data || [];
filterSubAllOptimize(query).then((res) => {
_this.options.getInvList = res.data || [];
})
},
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
getDeptList(_this) {
getDeptListByUserOptimize().then((res) => {
_this.options.getDeptList = res.data || [];
if( _this.options.getDeptList.length>0){
_this.filterQuery.deptCode= _this.options.getDeptList[0].code
_this.invCodebe = _this.filterQuery.deptCode
}
this.getList();
this.getInvList();
_this.getList();
_this.getInvList(_this);
});
},
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";
newDistributionForm(_this, row) {
if(_this == null){
_this = this
}
_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;
_this.formName = "add";
_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: {
@ -472,7 +737,21 @@ export default {
}
,
created() {
this.getDeptList();
this.getDeptList(this);
getHead("purOrder-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purOrder-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>
<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-form v-if="queryList && queryList.length > 0" :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.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.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" clearable style="width: 90%" placeholder="请选择所属仓库">
<!-- <el-col :span="8">-->
<!-- <el-form-item label="采购仓库">-->
<!-- <el-select v-model="filterQuery.invCode" clearable 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-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 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
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</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-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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-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-col>
</template>
</el-row>
</el-form>
@ -78,37 +143,125 @@
<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" 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" 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] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
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)">审核
</el-button>
</template>
</el-table-column>
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <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" 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] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- 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)">审核-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </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>
<pagination
@ -158,8 +311,12 @@
import purPlanEdit from "./purOrderDetailDialog";
import {delOrder, auditListOrder, listOrderDetail} from "@/api/purchase/purOrder";
import {getInvListByUser} from '@/api/system/invWarehouse'
import {getDeptListByUser} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse";
import {getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -201,6 +358,16 @@ export default {
idQuery: {},
editType: 1,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
@ -264,7 +431,7 @@ export default {
deptCode: this.invCodebe,
};
this.actDateRange = [];
this.getInvList();
this.getInvList(this);
this.getList();
},
@ -312,21 +479,21 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
let query = {orderIdFk: row.id};
this.loading = true;
_this.loading = true;
listOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
_this.detailList = response.data.list || [];
_this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
_this.loading = false;
_this.detailList = [];
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -334,16 +501,16 @@ export default {
.then(() => {
delOrder(row.id)
.then((response) => {
this.loading = false;
_this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
_this.$message.success("删除成功");
_this.getList();
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
_this.loading = false;
});
})
@ -360,37 +527,45 @@ export default {
this.getList();
this.detailList = [];
},
getInvList() {
getInvList(_this) {
var query = {
parentId: this.filterQuery.deptCode
parentId: _this.filterQuery.deptCode
}
filterSubAll(query).then((res) => {
this.invList = res.data || [];
filterSubAllOptimize(query).then((res) => {
_this.options.getInvList = res.data || [];
})
},
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
getDeptList(_this) {
getDeptListByUserOptimize().then((res) => {
_this.options.getDeptList = res.data || [];
if( _this.options.getDeptList.length>0){
_this.filterQuery.deptCode= _this.options.getDeptList[0].code
_this.invCodebe = _this.filterQuery.deptCode
}
this.getList();
this.getInvList();
_this.getList();
_this.getInvList(_this);
});
},
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";
newDistributionForm(_this, 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;
_this.formName = "add";
_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: {
@ -412,7 +587,21 @@ export default {
}
,
created() {
this.getDeptList();
this.getDeptList(this);
getHead("purOrderAudit-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purOrderAudit-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>
<div>
<el-card>
<el-form :model="filterQuery" class="query-form" label-width="100px" size="mini" 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 v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" size="mini" 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.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-col>
<el-col :span="8">
<el-form-item label="采购部门">
<el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%">
<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
v-for="item in deptList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</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-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<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>
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actAuditDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerAuditOptions"
:picker-options="pickerOptions"
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-date-picker>
</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-form>
@ -94,42 +171,130 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@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" 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" 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] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <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" 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] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>-->
<!-- <el-table-column label="审核时间" prop="auditTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>-->
<el-table-column label="操作" width="90" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="90" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </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>
@ -181,10 +346,14 @@
import purPlanEdit from "./purOrderDetailDialog";
import {delApply, listOrder, listOrderDetail, delOrderDetailAll} from "@/api/purchase/purOrder";
import {getInvListByUser} from '@/api/system/invWarehouse'
import {getDeptListByUser} from '@/api/auth/authDept'
import {selectAuthMenu} from "@/api/system/sysMenuHelp";
import {filterSubAll} from "@/api/system/invSubWarehouse";
import {printOrder} from "@/api/purchase/purOrder";
import {getDeptListByUserOptimize} from '@/api/auth/authDept'
import {filterSubAll, filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
@ -229,6 +398,16 @@ export default {
idQuery: {},
editType: 1,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
thirdSys: [],
invCodebe: null,
thirdSysDetail: null,
@ -326,7 +505,7 @@ export default {
};
this.actAuditDateRange = [];
this.actDateRange = [];
this.getInvList();
this.getInvList(this);
this.getList();
},
@ -387,22 +566,22 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
let query = {orderIdFk: row.id};
this.loading = true;
_this.loading = true;
listOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
_this.detailList = response.data.list || [];
_this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
_this.loading = false;
_this.detailList = [];
_this.total = 0;
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -410,16 +589,16 @@ export default {
.then(() => {
delOrderDetailAll(row)
.then((response) => {
this.loading = false;
_this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
_this.$message.success("删除成功");
_this.getList();
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
_this.loading = false;
});
})
@ -447,37 +626,37 @@ export default {
this.detailList = [];
},
getInvList() {
getInvList(_this) {
var query = {
parentId: this.filterQuery.deptCode
parentId: _this.filterQuery.deptCode
}
filterSubAll(query).then((res) => {
this.invList = res.data || [];
filterSubAllOptimize(query).then((res) => {
_this.options.getInvList = res.data || [];
})
},
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
getDeptList(_this) {
getDeptListByUserOptimize().then((res) => {
_this.options.getDeptList = res.data || [];
if( _this.options.getDeptList.length>0){
_this.filterQuery.deptCode= _this.options.getDeptList[0].code
_this.invCodebe = _this.filterQuery.deptCode
}
this.getList();
this.getInvList();
_this.getList();
_this.getInvList(_this);
});
},
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";
newDistributionForm(_this, 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;
_this.formName = "add";
_this.newSpDistributionVisible = true;
},
printOrder(row) {
printOrder(_this,row) {
printOrder(row)
.then((response) => {
const binaryData = [];
@ -486,14 +665,22 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
this.getList();
_this.getList();
})
.catch(() => {
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
}
,
components: {
@ -517,7 +704,21 @@ export default {
,
created() {
this.selectAuthMenu();
this.getDeptList();
this.getDeptList(this);
getHead("purOrderSearch-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("purOrderSearch-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
}
,
}

@ -1,66 +1,131 @@
<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="6">
<el-form-item label="采购单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <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="6">
<el-form-item label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="DI/物资编码:">-->
<!-- <el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="6">
<el-form-item label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="注册/备案号:">-->
<!-- <el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="生产企业:">-->
<!-- <el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="创建时间:">
<!-- <el-col :span="6">-->
<!-- <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
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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-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-col>
</template>
</el-row>
</el-form>
@ -74,19 +139,106 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo" width="140" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="140" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="物资名称" prop="productName" width="140" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" width="160" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="采购数量" prop="count" width="100" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" width="100" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="价格" prop="price" width="100"
show-overflow-tooltip="true"></el-table-column>
<el-table-column label="供应商" prop="supName" width="160" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="160" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc" width="160" show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="采购单号" prop="billNo" width="140" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode" width="140" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="productName" width="140" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="spec" width="160" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="采购数量" prop="count" width="100" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname" width="100" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="价格" prop="price" width="100"-->
<!-- show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName" width="160" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="生产企业" prop="manufactory" width="160" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="注册/备案人" prop="ylqxzcrbarmc" width="160" show-overflow-tooltip="true"></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>
<pagination
@ -102,6 +254,9 @@
</template>
<script>
import {getDetailList} from "@/api/purchase/purOrder";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -120,6 +275,9 @@ export default {
limit: 10,
},
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
list: [],
loading: false,
actDateRange: [],
@ -246,6 +404,15 @@ export default {
this.filterQuery.page = val.page;
this.getList();
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
filters: {
statusFilterType(status) {
@ -260,7 +427,14 @@ export default {
mounted() {
},
created() {
this.getList();
getHead("purOrderSearchDetails","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
},
}
;

@ -1,66 +1,131 @@
<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="6">
<el-form-item label="采购单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-form v-if="queryList && queryList.length > 0":model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <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="6">
<el-form-item label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="DI/物资编码:">-->
<!-- <el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="6">
<el-form-item label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="注册/备案号:">-->
<!-- <el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="生产企业:">-->
<!-- <el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="创建时间:">
<!-- <el-col :span="6">-->
<!-- <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
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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-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-col>
</template>
</el-row>
</el-form>
@ -74,17 +139,104 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName"></el-table-column>
<el-table-column label="规格型号" prop="spec"></el-table-column>
<el-table-column label="采购数量" prop="count"></el-table-column>
<el-table-column label="计量单位" prop="measname"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="生产企业" prop="manufactory"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="采购单号" prop="billNo"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="productName"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="spec"></el-table-column>-->
<!-- <el-table-column label="采购数量" prop="count"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<!-- <el-table-column label="生产企业" prop="manufactory"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>-->
<!-- <el-table-column label="注册/备案人" prop="ylqxzcrbarmc"></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>
<pagination
@ -100,6 +252,9 @@
</template>
<script>
import {getDetailList} from "@/api/purchase/purPlan";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -118,6 +273,9 @@ export default {
limit: 10,
},
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
list: [],
loading: false,
actDateRange: [],
@ -244,6 +402,15 @@ export default {
this.filterQuery.page = val.page;
this.getList();
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
filters: {
statusFilterType(status) {
@ -258,7 +425,14 @@ export default {
mounted() {
},
created() {
this.getList();
getHead("purPlanSearchDetails","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
},
}
;

@ -6,6 +6,9 @@
<el-form-item class="query-form-item" label="业务标识:">
<el-input v-model="query.businessType" clearable placeholder="业务标识"></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="备注:">
<el-input v-model="query.remark" clearable placeholder="备注"></el-input>
</el-form-item>
<el-form-item label="表单类型:" prop="type">
<el-select v-model="query.type" placeholder="请选择类型" style="width: 90%">
<el-option label="列表" :value="1" />
@ -45,6 +48,13 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getList"
/>
</el-card>
<!--仓库编辑对话框-->
@ -142,7 +152,10 @@
//----------------------------------
query: {
name: null,
remark: null,
type: null,
page: 1,
limit: 10,
},
loading: true,
list: [],
@ -180,6 +193,9 @@
this.query = {
name: "",
type: "",
remark: "",
page: 1,
limit: 10,
};
this.getList();
@ -275,6 +291,7 @@
}
},
forSubmit() {
this.query.page = 1;
// ---
this.$refs["dataForm"].validate((valid) => {
if (valid) {

Loading…
Cancel
Save