集成动态表单

20231126-yw
yuanwei 1 year ago
parent 0edb66eaeb
commit a1ada9e0b0

@ -200,6 +200,14 @@ export function getGgxhList(params) {
});
}
export function getGgxhListOptimize(params) {
return axios({
url: "/udiwms/udiinfo/getGgxhListOptimize",
method: "get",
params: params
});
}

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
@ -42,6 +42,75 @@
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
</el-row>
</el-form>
@ -55,9 +124,9 @@
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
@ -90,7 +159,94 @@
</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
v-show="total>0"
@ -104,7 +260,7 @@
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
@ -124,19 +280,94 @@
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></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 label="操作" fixed="right" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="showCode(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </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
v-show="detailTotal>0"
@ -166,14 +397,17 @@
</template>
<script>
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {
getCountOrderList,
deleteCountOrder,
updateCountOrderStatus, getCountOrderDetailList
} from "@/api/inventory/invCountOrder";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "InvCountOrderAudit",
@ -190,6 +424,16 @@ export default {
},
list: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getSpaceList:[],
},
invList: [],
spaceList: [],
loading: false,
@ -247,7 +491,7 @@ export default {
};
this.spaceList = [];
this.getList();
this.getSpaceList();
this.getSpaceList(this);
},
onSubmit() {
this.filterQuery.page = 1;
@ -272,26 +516,26 @@ export default {
this.total = 0;
})
},
invChange() {
this.spaceList = [];
this.filterQuery.fromInvSpaceCode = null;
this.getSpaceList();
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.fromInvSpaceCode = null;
_this.getSpaceList(_this);
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
this.getSpaceList();
_this.getSpaceList(_this);
},
getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
this.getList();
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
})
},
addCountOrder(type) {
@ -300,33 +544,33 @@ export default {
this.countOrder = {};
this.countType = type;
},
deleteDialog(rowId) {
this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
deleteDialog(_this,rowId) {
_this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
this.loading = true;
_this.loading = true;
deleteCountOrder(params).then((res) => {
this.loading = false;
_this.loading = false;
if (res.code === 20000) {
this.$message.success("删除成功!");
this.getList();
_this.$message.success("删除成功!");
_this.getList();
} else {
this.$message.error(res.message);
_this.$message.error(res.message);
}
}).catch(() => {
this.loading = false;
_this.loading = false;
});
});
},
auditCountOrder(row) {
auditCountOrder(_this,row) {
let params = {
id: row.id,
status: null
};
this.$confirm('请选择审核意见', '提示', {
_this.$confirm('请选择审核意见', '提示', {
confirmButtonText: '通过',
cancelButtonText: '驳回',
type: 'warning',
@ -338,11 +582,11 @@ export default {
params.status = 2; //
updateCountOrderStatus(params).then((res) => {
if (res.code === 20000) {
this.$message.success("审核通过");
this.getList();
this.onRestDetail();
_this.$message.success("审核通过");
_this.getList();
_this.onRestDetail();
} else {
this.$message.error(res.message);
_this.$message.error(res.message);
}
}).catch(() => {
});
@ -352,11 +596,11 @@ export default {
params.status = 0; //
updateCountOrderStatus(params).then((res) => {
if (res.code === 20000) {
this.$message.warning("已驳回");
this.getList();
this.onRestDetail();
_this.$message.warning("已驳回");
_this.getList();
_this.onRestDetail();
} else {
this.$message.error(res.message);
_this.$message.error(res.message);
}
}).catch(() => {
});
@ -375,10 +619,10 @@ export default {
this.detailList = [];
this.detailTotal = 0;
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getCountOrderDetailList()
handleChange(_this,row) {
_this.detailQuery.orderIdFk = row.orderId;
_this.detailQuery.page = 1;
_this.getCountOrderDetailList()
},
getCountOrderDetailList() {
this.detailLoading = true;
@ -397,15 +641,24 @@ export default {
this.detailTotal = 0;
});
},
showCode(row) {
this.codeQuery = {
showCode(_this,row) {
_this.codeQuery = {
orderIdFk: row.orderIdFk,
relId: row.relId,
batchNo: row.batchNo,
edit: false
};
this.codesVisible = true;
_this.codesVisible = 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: {
invCountCodes
@ -417,7 +670,21 @@ export default {
};
},
created() {
this.getInvList();
this.getInvList(this);
getHead("InvCountOrderAudit-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderAudit-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
@ -42,6 +42,75 @@
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
</el-row>
</el-form>
@ -54,9 +123,9 @@
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
@ -71,7 +140,94 @@
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</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
v-show="total>0"
@ -85,7 +241,7 @@
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
@ -116,7 +272,94 @@
</el-button
>
</template>
</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>
<pagination
v-show="detailTotal>0"
@ -146,13 +389,16 @@
</template>
<script>
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {
getCountOrderList,
getCountOrderDetailList
} from "@/api/inventory/invCountOrder";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "InvCountOrderCompleted",
@ -169,6 +415,16 @@ export default {
},
list: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getSpaceList:[],
},
invList: [],
spaceList: [],
loading: false,
@ -222,7 +478,7 @@ export default {
};
this.spaceList = [];
this.getList();
this.getSpaceList();
this.getSpaceList(this);
},
@ -252,26 +508,26 @@ export default {
this.total = 0;
})
},
invChange() {
this.spaceList = [];
this.filterQuery.fromInvSpaceCode = null;
this.getSpaceList();
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.fromInvSpaceCode = null;
_this.getSpaceList(_this);
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
this.getSpaceList();
_this.getSpaceList(_this);
},
getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
this.getList();
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
})
},
addCountOrder(type) {
@ -289,10 +545,10 @@ export default {
this.detailList = [];
this.detailTotal = 0;
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getCountOrderDetailList()
handleChange(_this,row) {
_this.detailQuery.orderIdFk = row.orderId;
_this.detailQuery.page = 1;
_this.getCountOrderDetailList()
},
getCountOrderDetailList() {
this.detailLoading = true;
@ -311,15 +567,24 @@ export default {
this.detailTotal = 0;
});
},
showCode(row) {
this.codeQuery = {
showCode(_this,row) {
_this.codeQuery = {
orderIdFk: row.orderIdFk,
relId: row.relId,
batchNo: row.batchNo,
edit: false
};
this.codesVisible = true;
_this.codesVisible = 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: {
invCountCodes
@ -331,7 +596,21 @@ export default {
};
},
created() {
this.getInvList();
this.getInvList(this);
getHead("InvCountOrderCompleted-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderCompleted-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" size="mini" label-width="120px" v-show="showSearch">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
@ -42,6 +42,75 @@
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
@ -56,9 +125,9 @@
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="100"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="100"></el-table-column>
@ -97,7 +166,94 @@
>删除
</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
v-show="total>0"
@ -111,7 +267,7 @@
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
@ -122,27 +278,94 @@
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>-->
<!-- <el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>-->
<!-- <el-table-column label="盈亏状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>-->
<!-- {{ countStatusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="showCode(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></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>
<pagination
v-show="detailTotal>0"
@ -173,8 +396,8 @@
</template>
<script>
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {
getCountOrderList,
deleteCountOrder,
@ -183,6 +406,9 @@ import {
printOrder, getCountOrderDetailList
} from "@/api/inventory/invCountOrder";
import invCountOrderModify from "@/views/inventory/count/InvCountOrderModify.vue";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "InvCountOrderNew",
@ -199,6 +425,16 @@ export default {
},
list: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getSpaceList:[],
},
invList: [],
spaceList: [],
loading: false,
@ -252,7 +488,7 @@ export default {
};
this.spaceList = [];
this.getList();
this.getSpaceList();
this.getSpaceList(this);
},
onSubmit() {
this.filterQuery.page = 1;
@ -277,26 +513,26 @@ export default {
this.total = 0;
})
},
invChange() {
this.spaceList = [];
this.filterQuery.fromInvSpaceCode = null;
this.getSpaceList();
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.fromInvSpaceCode = null;
_this.getSpaceList(_this);
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
this.getSpaceList();
_this.getSpaceList(_this);
},
getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invStorageCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
this.getList();
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
})
},
addCountOrder(type) {
@ -307,9 +543,9 @@ export default {
countType: this.countType
};
},
printOrder(row) {
printOrder(_this,row) {
let query = {moduleId: 6};
this.loading = true;
_this.loading = true;
verifyTemplateFile(query).then((res) => {
if (res.code === 20000) {
let printParams = {
@ -324,22 +560,22 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
})
} else {
this.loading = false;
this.$message.error(res.message);
_this.loading = false;
_this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
_this.loading = false;
_this.$message.error(error.message);
})
},
editOrder(row) {
this.formVisible = true;
this.formName = "edit_" + row.countType;
this.countOrder = row;
editOrder(_this,row) {
_this.formVisible = true;
_this.formName = "edit_" + row.countType;
_this.countOrder = row;
},
submitAudit(row) {
let params = {id: row.id};
@ -354,24 +590,24 @@ export default {
this.$message.error(error.message);
});
},
deleteDialog(rowId) {
this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
deleteDialog(_this,rowId) {
_this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
this.loading = true;
_this.loading = true;
deleteCountOrder(params).then((res) => {
this.loading = false;
_this.loading = false;
if (res.code === 20000) {
this.$message.success("删除成功!");
this.getList();
_this.$message.success("删除成功!");
_this.getList();
} else {
this.$message.error(res.message);
_this.$message.error(res.message);
}
}).catch(() => {
this.loading = false;
_this.loading = false;
});
});
},
@ -379,10 +615,10 @@ export default {
this.formVisible = false;
this.getList();
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getCountOrderDetailList()
handleChange(_this,row) {
_this.detailQuery.orderIdFk = row.orderId;
_this.detailQuery.page = 1;
_this.getCountOrderDetailList()
},
getCountOrderDetailList() {
this.detailLoading = true;
@ -401,6 +637,15 @@ export default {
this.detailTotal = 0;
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {
invCountOrderModify
@ -412,7 +657,21 @@ export default {
};
},
created() {
this.getInvList();
this.getInvList(this);
getHead("InvCountOrderNew-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderNew-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

@ -3,10 +3,12 @@
<el-card class="el-card">
<el-form
:model="filterQuery"
label-width="120px"
v-if="queryList && queryList.length > 0 && searchVisible"
size="mini"
v-if="searchVisible"
v-show="showSearch"
>
<el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item class="query-form-item" label-width="100px" label="UDI码:">
<el-input
@ -54,18 +56,94 @@
</el-button-group>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary"icon="el-icon-search" @click="getList"
>查询
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
border
style="width: 100%"
@row-click="getOrderDetail"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="扫码单据类型" prop="action">
<template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span>
@ -108,7 +186,107 @@
</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' && item.columnName !='action' && 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 == 'laber' && item.columnName =='action' && 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>{{ getActionName(scope.row.action) }}</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>
@ -129,7 +307,7 @@
:data="detailList"
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="产品通用名"
prop="coName"
@ -174,7 +352,94 @@
label="注册/备案凭证号"
prop="certCode"
:show-overflow-tooltip="true"
></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>
@ -208,8 +473,11 @@ import codeDetail from "../../inout/IOFinishCode";
import store from "../../../store";
import {getBussinessType} from "../../../api/basic/bussinessType";
import {filterOrderTrace} from "@/api/inventory/invCodeTrace";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getBasicUnitMaintainsOptimize} from "@/api/basic/basicUnitMaintain";
import A from "../../../plugins/KeyScaner"
import {
getHead,executeFuc
} from "@/utils/customConfig";
const formJson = {
site_id: "",
@ -236,6 +504,7 @@ export default {
data() {
return {
showSearch: true,
filterQuery: {
code: "",
batchNo: null,
@ -279,6 +548,15 @@ export default {
unitquery: {key: "", page: 1, limit: 20},
unitlist: [],
list: [],
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
findMethod:[],
},
detailList: [],
unitUpdateQuery: {
id: "",
@ -379,10 +657,11 @@ export default {
this.actDateRange = [];
this.getList();
},
enterKey(event) {
this.$refs.inputRef.select();
this.onSubmit();
hideSearch() {
this.showSearch = !this.showSearch;
},
enterKey(_this,event) {
_this.onSubmit();
},
onSubmit() {
this.getList();
@ -396,19 +675,19 @@ export default {
this.getList();
},
findMethod(query) {
findMethod(_this,query) {
console.log(query);
this.fromOptions = [];
_this.fromOptions = [];
let cQuery = {
key: query,
};
getBasicUnitMaintains(cQuery)
getBasicUnitMaintainsOptimize(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
_this.loading = false;
_this.options.findMethod = response.data.list || [];
})
.catch(() => {
this.loading = false;
_this.loading = false;
});
},
//
@ -441,12 +720,12 @@ export default {
});
},
//
getOrderDetail(row) {
this.loading = true;
this.detailQuery = {
getOrderDetail(_this,row) {
_this.loading = true;
_this.detailQuery = {
orderIdFk: row.billNo,
};
this.refresgOrderDetail();
_this.refresgOrderDetail();
},
refresgOrderDetail() {
orderDetail(this.detailQuery)
@ -465,10 +744,10 @@ export default {
this.curIndex = row.id;
// this.dialogTableVisible = true;
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
this.idQuery.billNo = row.billNo;
intentDetail(_this,row) {
_this.codeDetailVisible = true;
_this.idQuery.id = row.id;
_this.idQuery.billNo = row.billNo;
},
closeDialog() {
this.successOrderExportPDFSettingVisible = false;
@ -674,6 +953,15 @@ export default {
}
}
},
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) {
@ -685,30 +973,24 @@ export default {
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
that.filterQuery.code = "";
return;
}
if (that.sitcomScan) {
that.filterQuery.code = that.filterQuery.code;
} else {
that.filterQuery.code = text;
}
};
inputer.focus();//divtabindexdocumentBody
},
created() {
getHead("invUdiTraceOrder-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("invUdiTraceOrder-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
if (this.$isNotBlank(this.udiCode)) {
if (!this.diloadTrue) {

@ -2,8 +2,8 @@
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini" @submit.native.prevent>
<el-form-item class="query-form-item" label-width="100px">
<el-form v-if="queryList && queryList.length > 0" :inline="true" :model="filterQuery" class="query-form" size="mini" @submit.native.prevent>
<!-- <el-form-item class="query-form-item" label-width="100px">
<el-input
v-model="filterQuery.sickAd"
placeholder="请输入病人住院号"
@ -19,18 +19,95 @@
>查询
</el-button>
</el-button-group>
</el-form-item> -->
<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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary"icon="el-icon-search" @click="getList"
>查询
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
border
@row-click="getOrderDetail"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
highlight-current-row
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="扫码单据类型" prop="billTypeName">
</el-table-column>
<el-table-column
@ -55,7 +132,94 @@
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</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>
@ -76,7 +240,7 @@
:data="detailList"
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="UDI码"
prop="code"
@ -132,7 +296,94 @@
</el-button
>
</template>
</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>
@ -159,6 +410,9 @@ import udiCodeTrace from "./invUdiTraceOrder"
import {filterSickTrace} from "@/api/inventory/invSickTrace";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getCodeList} from "@/api/inout/code";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "sickerUdiTraceOrder",
@ -202,6 +456,15 @@ export default {
},
//
list: [],
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
},
detailList: [],
filterQuery: {
sickAd: null,
@ -269,8 +532,8 @@ export default {
//this.getList();
},
enterKey(event) {
this.onSubmit();
enterKey(_this,event) {
_this.onSubmit();
},
onSubmit() {
this.getList();
@ -332,13 +595,13 @@ export default {
});
},
//
getOrderDetail(row) {
this.loading = true;
this.detailQuery = {
getOrderDetail(_this,row) {
_this.loading = true;
_this.detailQuery = {
orderId: row.billNo,
showType: 1,
};
this.refresgOrderDetail();
_this.refresgOrderDetail();
},
refresgOrderDetail() {
getCodeList(this.detailQuery)
@ -351,10 +614,10 @@ export default {
this.detailList = [];
});
},
intentDetail(row) {
this.udiCode = row.code;
this.udiCodeTraceVisible = true;
this.idQuery.id = row.id;
intentDetail(_this,row) {
_this.udiCode = row.code;
_this.udiCodeTraceVisible = true;
_this.idQuery.id = row.id;
},
@ -369,6 +632,15 @@ export default {
this.orderId = row.id;
this.addDialogVisible = true;
},
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) {
@ -387,6 +659,20 @@ export default {
let query = this.$route.query;
this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit);
getHead("sickerUdiTraceOrder-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("sickerUdiTraceOrder-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<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 class="query-form-item" label="仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
@ -88,20 +88,6 @@
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="忽略状态:">-->
<!-- <el-select v-model="filterQuery.ignoreStatus"-->
<!-- placeholder="请选择消息忽略状态"-->
<!-- clearable-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option label="不忽略" :value="0"></el-option>-->
<!-- <el-option label="忽略7天" :value="1"></el-option>-->
<!-- <el-option label="忽略15天" :value="2"></el-option>-->
<!-- <el-option label="忽略30天" :value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item class="query-form-item" label="预警类型:">
@ -119,8 +105,88 @@
</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' && item.columnName !='queryName' && 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 == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-autocomplete
class="inline-input"
style="width: 90%"
v-model="queryName"
:fetch-suggestions="queryProductName"
placeholder="请输入内容"
clearable
@select="handleSelect"
@clear="clearQueryProduct"
></el-autocomplete>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
@ -133,7 +199,7 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<!-- <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="仓库名称" prop="invName" width="120"></el-table-column>
<el-table-column label="货位名称" prop="invSpaceName" width="120"></el-table-column>
<el-table-column label="物资名称" prop="productName" width="180" show-overflow-tooltip></el-table-column>
@ -148,11 +214,6 @@
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="忽略预警" prop="ignoreStatus" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>{{ ignoreStatusMap[scope.row.ignoreStatus] }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="预警类型" prop="type" width="120">
<template slot-scope="scope">
<el-tag type="danger">{{ typeMap[scope.row.type] }}</el-tag>
@ -177,15 +238,95 @@
@click.native="confirmMsg(scope.row)"
>确认
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.ignoreStatus === 0"-->
<!-- @click.native="ignoreMsg(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
v-show="total>0"
@ -291,10 +432,13 @@
<script>
import {getInvRemindMsgList, confirmMsg, ignoreMsg} from "@/api/system/invRemindMsg";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {filterProductNames} from "@/api/inventory/invPorduct";
import {getGgxhList} from "@/api/basic/product/udiRelevance";
import {getGgxhListOptimize} from "@/api/basic/product/udiRelevance";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "invRemindMsg",
@ -305,7 +449,7 @@ export default {
relId: null,
batchNo: null,
ggxh: null,
status: 1,
status: '1',
ignoreStatus: 0,
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
@ -335,6 +479,15 @@ export default {
3: "忽略30天"
},
queryName: null,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
getSpaceList:[],
getGgxhList:[],
},
invList: [],
invCodeList:[],
spaceList: [],
@ -363,8 +516,8 @@ export default {
};
this.queryName = null;
this.getList();
this.spaceList = [];
this.ggxhList = [];
this.options.getInvSpaceList = [];
this.options.getGgxhList = [];
},
search() {
this.filterQuery.page = 1;
@ -389,30 +542,30 @@ export default {
this.total = 0;
});
},
invChange() {
this.spaceList = [];
this.filterQuery.invSpaceCode = null;
this.getSpaceList();
this.getList();
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.invSpaceCode = null;
_this.getSpaceList(_this);
_this.getList();
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
_this.options.getInvList = response.data || [];
for(var i=0;i<response.data.length;i++){
this.invCodeList.push(response.data[i].code)
_this.invCodeList.push(response.data[i].code)
}
this.getSpaceList();
this.getList();
_this.getSpaceList(_this);
_this.getList();
})
.catch(() => {
});
},
getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
})
},
invSpaceChange() {
@ -430,7 +583,7 @@ export default {
this.filterQuery.relId = null;
this.queryName = null;
this.filterQuery.ggxh = null;
this.ggxhList = [];
this.options.getGgxhList = [];
this.productList = null;
},
queryProductName(productName, cb) {
@ -458,21 +611,25 @@ export default {
handleSelect(item) {
this.queryName = item.value;
this.filterQuery.relId = item.relId;
let params = {relId: item.relId};
getGgxhList(params).then((res) => {
this.ggxhList = res.data || [];
this.getGgxhList(this,item.relId);
},
getGgxhList(_this,relId) {
let params = {relId: relId};
getGgxhListOptimize(params).then((res) => {
_this.options.getGgxhList = res.data || [];
});
},
clearQueryProduct() {
this.queryName = null;
this.filterQuery.relId = null;
},
confirmMsg(row) {
this.rowData = row;
let typeName = this.typeMap[row.type];
this.rowData.typeName = typeName;
this.handleMsg = null;
this.confirmMsgVisible = true;
confirmMsg(_this,row) {
_this.rowData = row;
let typeName = _this.typeMap[row.type];
_this.rowData.typeName = typeName;
_this.handleMsg = null;
_this.confirmMsgVisible = true;
},
ignoreMsg(row) {
this.ignoreVisible = true;
@ -530,12 +687,27 @@ export default {
};
return statusMap[status];
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
created() {
this.getInvList();
this.getInvList(this);
//
getHead("invRemindMsg","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
console.log("==="+ this.invCodeList);
});
},
};
</script>

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<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 class="query-form-item" label="名称:">
<el-input v-model="filterQuery.name" placeholder="名称"
@ -23,20 +23,6 @@
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="忽略状态:">-->
<!-- <el-select v-model="filterQuery.ignoreStatus"-->
<!-- placeholder="请选择消息忽略状态"-->
<!-- clearable-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option label="不忽略" :value="0"></el-option>-->
<!-- <el-option label="忽略7天" :value="1"></el-option>-->
<!-- <el-option label="忽略15天" :value="2"></el-option>-->
<!-- <el-option label="忽略30天" :value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item class="query-form-item" label="预警类型:">
@ -53,7 +39,88 @@
</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' && item.columnName !='queryName' && 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 == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-autocomplete
class="inline-input"
style="width: 90%"
v-model="queryName"
:fetch-suggestions="queryProductName"
placeholder="请输入内容"
clearable
@select="handleSelect"
@clear="clearQueryProduct"
></el-autocomplete>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</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 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
@ -66,7 +133,7 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<!-- <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column :label="msgName" prop="name" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="证书名称" prop="certName" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="有效期" prop="vailDate" width="120"></el-table-column>
@ -76,11 +143,7 @@
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="忽略预警" prop="ignoreStatus" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>{{ ignoreStatusMap[scope.row.ignoreStatus] }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="预警次数" prop="remindCount" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="预警类型" prop="type" width="120">
@ -99,15 +162,96 @@
@click.native="confirmMsg(scope.row)"
>确认
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.ignoreStatus === 0"-->
<!-- @click.native="ignoreMsg(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
v-show="total>0"
@ -204,6 +348,9 @@
<script>
import {getSupCertRemindMsgList, confirmMsg, ignoreMsg} from "@/api/purchase/supCertRedmindMsg";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "supCertRemindMsg",
@ -212,9 +359,9 @@ export default {
showSearch: true,
filterQuery: {
name: null,
status: 1,
status: "1",
ignoreStatus: 0,
type: 1,
type: "1",
page: 1,
limit: 20,
},
@ -265,7 +412,7 @@ export default {
page: 1,
limit: 20,
};
this.typeChange(this.filterQuery.type);
this.typeChange(this,this.filterQuery.type);
this.getList();
},
search() {
@ -293,9 +440,9 @@ export default {
},
confirmMsg(row) {
this.confirmVisible = true;
this.confirmQuery = row;
confirmMsg(_this,row) {
_this.confirmVisible = true;
_this.confirmQuery = row;
},
postConfirm() {
confirmMsg(this.confirmQuery).then((res) => {
@ -335,13 +482,29 @@ export default {
this.currentId = null;
})
},
typeChange(val) {
this.msgName = this.msgNameMap[val];
typeChange(_this,val) {
_this.msgName = this.msgNameMap[val];
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
created() {
//
getHead("supCertRemindMsg","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
},
};
</script>

Loading…
Cancel
Save