领用管理提交

20231126-yw
yuanwei 1 year ago
parent e89765c167
commit e0ec2f32a1

@ -1,4 +1,14 @@
import axios from "@/utils/request";
import {filterCompanyOptimize} from "@/api/basic/product/udiInfo";
export function filterSubAllOptimize(query) {
return axios({
url: "/spms/sub/inv/warehouse/filterOptimize",
method: "get",
params: query
});
}
export function filterSubAll(query) {
@ -19,6 +29,15 @@ export function findInvByUser(query) {
});
}
//获取用户所有关联仓库
export function findInvByUserOptimize(query) {
return axios({
url: "/spms/inv/warehouse/findByUserOptimize",
method: "get",
params: query
});
}
export function filterGroupBySpuse(params) {
return axios({
@ -30,6 +49,14 @@ export function filterGroupBySpuse(params) {
//获取除了自己所有其他仓库
export function findByFromOptimize(query) {
return axios({
url: "/spms/inv/warehouse/findByFromOptimize",
method: "get",
params: query
});
}
export function findByFrom(query) {
return axios({
url: "/spms/inv/warehouse/findByFrom",

@ -1,65 +1,105 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用单号:">-->
<!-- <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="往来信息:">-->
<!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCorpList"-->
<!-- :loading="loading"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in corpList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :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-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;">
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="item in invList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="往来信息:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
filterable
remote
reserve-keyword
:remote-method="finCorpList"
:loading="loading"
style="width: 100%;">
<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 corpList"
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.name"
:value="item.name">
</el-option>
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
<!-- <el-option-->
<!-- v-for="item in originTypes"-->
<!-- :key="item.originAction"-->
<!-- :label="item.originName"-->
<!-- :value="item.originAction">-->
<!-- <span style="float: left;font-size: 13px">{{ item.originName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
<!-- item.thirdSysName-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
@ -68,10 +108,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</el-col>
</template>
</el-row>
</el-form>
@ -89,35 +138,123 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true" border
@current-change="handleDetail"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo" width="140"></el-table-column>
<el-table-column label="领用部门" prop="deptName" width="100"></el-table-column>
<el-table-column label="领用仓库" prop="invName" width="100"></el-table-column>
<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true" width="180"></el-table-column>
<el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<!-- <el-table-column label="领用类型" prop="billType"></el-table-column>-->
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.status==3 "
@click.native="newDistributionForm(scope.$index, scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="领用单号" prop="billNo" width="140"></el-table-column>-->
<!-- <el-table-column label="领用部门" prop="deptName" width="100"></el-table-column>-->
<!-- <el-table-column label="领用仓库" prop="invName" width="100"></el-table-column>-->
<!-- <el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true" width="180"></el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status)">-->
<!-- {{ statusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" show-overflow-tooltip="true" width="160"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>-->
<!-- &lt;!&ndash; <el-table-column label="领用类型" prop="billType"></el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="操作" width="160" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" :disabled="scope.row.status==3 "-->
<!-- @click.native="newDistributionForm(scope.$index, scope.row)">编辑-->
<!-- </el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"-->
<!-- >打印-->
<!-- </el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
@ -130,15 +267,102 @@
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="领用数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<!-- <el-table-column label="领用数量" prop="count"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>-->
<!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<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>
<el-dialog
@ -169,7 +393,10 @@ import {selectIp} from "@/api/param/systemParamConfig";
import thrOrderNew from "./DialogNewReceive";
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import {getBusChange} from "@/api/basic/busTypeChange";
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
import {filterSubAllOptimize, findInvByUserOptimize} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -203,6 +430,16 @@ export default {
idQuery: {},
corpList: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
finCurInv:[],
finCorpList:[],
},
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
@ -317,22 +554,22 @@ export default {
});
},
handleDetail(row) {
handleDetail(_this,row) {
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
_this.detailList = response.data.list || [];
})
.catch(() => {
this.detailList = [];
_this.detailList = [];
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -344,11 +581,11 @@ export default {
delReceive(dQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList = null;
_this.$message.success("删除成功");
_this.getList();
_this.detailList = null;
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
@ -380,34 +617,34 @@ export default {
.catch(() => {
});
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
newDistributionForm(_this, row) {
_this.idQuery.id = '';
if (_this.$isNotBlank(row) && _this.$isNotBlank(row.id)) {
_this.idQuery.id = row.id;
_this.idQuery.formData = row;
_this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
_this.formName = "add";
_this.newSpDistributionVisible = true;
},
finCurInv() {
this.invList = [];
finCurInv(_this) {
let query = {
filter: 3
};
findInvByUser(query)
findInvByUserOptimize(query)
.then((response) => {
this.invList = response.data || [];
if (this.invList.length > 0) {
this.filterQuery.invCode = this.invList[0].code
this.invCodebe = this.filterQuery.invCode
_this.options.finCurInv = response.data || [];
if (_this.options.finCurInv.length > 0) {
_this.filterQuery.invCode = this.options.finCurInv[0].code
_this.invCodebe = this.filterQuery.invCode
}
this.getList();
_this.getList();
})
.catch(() => {
this.options.finCurInv = [];
});
},
printOrder(row) {
printOrder(_this,row) {
printOrder(row)
.then((response) => {
const binaryData = [];
@ -416,30 +653,38 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
this.getList();
_this.getList();
})
.catch(() => {
});
},
finCorpList(val) {
finCorpList(_this,val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
filterSubAllOptimize(query)
.then((response) => {
this.loading = false;
this.corpList = response.data || [];
_this.loading = false;
_this.options.finCorpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.corpList = [];
_this.loading = false;
_this.options.finCorpList = [];
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {
thrOrderNew,
@ -447,9 +692,23 @@ export default {
mounted() {
},
created() {
this.finCurInv();
this.finCurInv(this);
this.getBusType();
// this.finCorpList();
getHead("receiveAdd-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("receiveAdd-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,35 +1,92 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用单号:">-->
<!-- <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库"-->
<!-- filterable-->
<!-- clearable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCurInv"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :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-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库"
filterable
clearable
remote
reserve-keyword
:remote-method="finCurInv"
style="width: 100%;">
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in invList"
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
@ -38,46 +95,20 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<!--<el-col :span="8">-->
<!-- <el-form-item label="往来信息:">-->
<!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCorpList"-->
<!-- :loading="loading"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in corpList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
<!-- <el-option-->
<!-- v-for="item in originTypes"-->
<!-- :key="item.originAction"-->
<!-- :label="item.originName"-->
<!-- :value="item.originAction">-->
<!-- <span style="float: left;font-size: 13px">{{ item.originName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
<!-- item.thirdSysName-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
@ -91,33 +122,120 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column>
<el-table-column label="领用仓库" prop="invName"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<!--<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.status!=2"
@click.native.stop="auditDialog(scope.row)"
>审核
</el-button>
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
</template>
</el-table-column>
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" :default-sort="defaultSort" @sort-change="handleSortChange">
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="领用单号" prop="billNo"></el-table-column>-->
<!-- <el-table-column label="领用部门" prop="deptName"></el-table-column>-->
<!-- <el-table-column label="领用仓库" prop="invName"></el-table-column>-->
<!-- <el-table-column label="备注" prop="remark"></el-table-column>-->
<!-- &lt;!&ndash;<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="单据状态" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status)">-->
<!-- {{ statusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" :disabled="scope.row.status!=2"-->
<!-- @click.native.stop="auditDialog(scope.row)"-->
<!-- >审核-->
<!-- </el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(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
@ -131,15 +249,102 @@
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="领用数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<!-- <el-table-column label="领用数量" prop="count"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>-->
<!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<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>
<el-dialog
@ -161,7 +366,15 @@
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
import {filterSub, filterSubAll, findByFrom, findInvByUser} from "@/api/system/invSubWarehouse";
import {
filterSub,
filterSubAllOptimize,
findInvByUserOptimize,
findByFromOptimize
} from "@/api/system/invSubWarehouse";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
data() {
@ -189,6 +402,16 @@ export default {
idQuery: null,
newSpDistributionVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
finCurInv:[],
finCorpList:[],
},
thirdSys: [],
invList: [],
corpList: [],
@ -282,7 +505,7 @@ export default {
this.filterQuery.orderBy = column.prop;
this.getList();
},
printOrder(row) {
printOrder(_this,row) {
printOrder(row)
.then((response) => {
const binaryData = [];
@ -291,9 +514,9 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
this.getList();
_this.getList();
})
.catch(() => {
});
@ -326,44 +549,44 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
_this.detailList = response.data.list || [];
})
.catch(() => {
this.detailList = [];
_this.detailList = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
auditDialog(row) {
this.idQuery = row;
this.newSpDistributionVisible = true;
auditDialog(_this,row) {
_this.idQuery = row;
_this.newSpDistributionVisible = true;
},
finCorpList(val) {
finCorpList(_this,val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
filterSubAllOptimize(query)
.then((response) => {
this.loading = false;
this.corpList = response.data || [];
_this.loading = false;
_this.options.finCorpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.corpList = [];
_this.loading = false;
_this.options.finCorpList = [];
});
},
finCurInv(keyWord) {
this.filterQuery = {
finCurInv(_this,keyWord) {
_this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
@ -378,15 +601,15 @@ export default {
editStatus: 2,
};
this.invList = [];
_this.invList = [];
let query = {
filter: 3,
name: keyWord,
locInvCode: this.$store.getters.locInvCode
};
findByFrom(query)
findByFromOptimize(query)
.then((response) => {
this.invList = response.data || [];
_this.options.finCurInv = response.data || [];
// if (this.invList.length > 0) {
// this.filterQuery.targetInvCode = this.invList[0].code
// this.invCodebe = this.filterQuery.targetInvCode
@ -394,8 +617,18 @@ export default {
// this.getList();
})
.catch(() => {
this.options.finCurInv = [];
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {
auditDetail
@ -403,9 +636,22 @@ export default {
mounted() {
},
created() {
this.finCurInv();
this.getList();
this.finCurInv(this);
getHead("receiveAudit-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
getHead("receiveAudit-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,65 +1,122 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用单号:">-->
<!-- <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="往来信息:">-->
<!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCorpList"-->
<!-- :loading="loading"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in corpList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :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-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="审核时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :picker-options="pickerAuditOptions"-->
<!-- v-model="actAuditDateRange"-->
<!-- type="daterange"-->
<!-- format="yyyy 年 MM 月 dd 日"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="item in invList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="往来信息:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
filterable
remote
reserve-keyword
:remote-method="finCorpList"
:loading="loading"
style="width: 100%;">
<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 corpList"
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.name"
:value="item.name">
</el-option>
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
<!-- <el-option-->
<!-- v-for="item in originTypes"-->
<!-- :key="item.originAction"-->
<!-- :label="item.originName"-->
<!-- :value="item.originAction">-->
<!-- <span style="float: left;font-size: 13px">{{ item.originName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
<!-- item.thirdSysName-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
@ -68,16 +125,11 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actAuditDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerAuditOptions"
:picker-options="pickerOptions"
v-model="actAuditDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
@ -85,10 +137,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
@ -103,36 +164,122 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column>
<el-table-column label="领用仓库" prop="invName"></el-table-column>
<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="领用单号" prop="billNo"></el-table-column>-->
<!-- <el-table-column label="领用部门" prop="deptName"></el-table-column>-->
<!-- <el-table-column label="领用仓库" prop="invName"></el-table-column>-->
<!-- <el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="领用备注" prop="remark"></el-table-column>
<el-table-column label="审核说明" prop="auditRemark"></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<!-- <el-table-column label="领用备注" prop="remark"></el-table-column>-->
<!-- <el-table-column label="审核说明" prop="auditRemark"></el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status)">-->
<!-- {{ statusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<!-- <el-table-column label="审核时间" prop="auditTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(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
@ -146,15 +293,102 @@
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="领用数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<!-- <el-table-column label="领用数量" prop="count"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>-->
<!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<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>
<el-dialog
@ -176,7 +410,12 @@
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
import {delReceive} from "@/api/thrsys/thrOrderReceive";
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
import {
filterSub,
filterSubAllOptimize,
findInvByUserOptimize,
findByFromOptimize} from "@/api/system/invSubWarehouse";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
data() {
@ -206,6 +445,16 @@ export default {
invCodebe: null,
newSpDistributionVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
finCurInv:[],
finCorpList:[],
},
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
@ -318,8 +567,8 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -331,11 +580,11 @@ export default {
delReceive(dQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList = null;
_this.$message.success("删除成功");
_this.getList();
_this.detailList = null;
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
@ -390,58 +639,58 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
_this.detailList = response.data.list || [];
})
.catch(() => {
this.detailList = [];
_this.detailList = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
finCorpList(val) {
finCorpList(_this,val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
filterSubAllOptimize(query)
.then((response) => {
this.loading = false;
this.corpList = response.data || [];
_this.loading = false;
_this.options.finCorpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.corpList = [];
_this.loading = false;
_this.options.finCorpList = [];
});
},
finCurInv() {
this.invList = [];
finCurInv(_this) {
let query = {
filter: 3
};
findInvByUser(query)
findInvByUserOptimize(query)
.then((response) => {
this.invList = response.data || [];
if (this.invList.length > 0) {
this.filterQuery.invCode = this.invList[0].code
this.invCodebe = this.filterQuery.invCode
_this.options.finCurInv = response.data || [];
if (_this.options.finCurInv.length > 0) {
_this.filterQuery.invCode = this.options.finCurInv[0].code
_this.invCodebe = this.filterQuery.invCode
}
this.getList();
_this.getList();
})
.catch(() => {
this.options.finCurInv = [];
});
},
printOrder(row) {
printOrder(_this,row) {
printOrder(row)
.then((response) => {
const binaryData = [];
@ -450,9 +699,9 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
this.getList();
_this.getList();
})
.catch(() => {
});
@ -461,7 +710,15 @@ export default {
closeDialog() {
this.newSpDistributionVisible = false;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {
@ -470,8 +727,22 @@ export default {
mounted() {
},
created() {
this.finCurInv();
this.getList();
this.finCurInv(this);
getHead("receiveMySearch-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
getHead("receiveMySearch-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,71 +1,129 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用单号:">-->
<!-- <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="领用仓库:">-->
<!-- <el-select v-model="filterQuery.invCode"-->
<!-- filterable-->
<!-- clearable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCurInv"-->
<!-- placeholder="请选择领用仓库" style="width: 90%;">-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="往来信息:">-->
<!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCorpList"-->
<!-- :loading="loading"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in corpList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :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-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="审核时间:">-->
<!-- <el-date-picker-->
<!-- style="width: 90%"-->
<!-- :picker-options="pickerAuditOptions"-->
<!-- v-model="actAuditDateRange"-->
<!-- type="daterange"-->
<!-- format="yyyy 年 MM 月 dd 日"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode"
filterable
clearable
remote
reserve-keyword
:remote-method="finCurInv"
placeholder="请选择领用仓库" style="width: 90%;">
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="item in invList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="往来信息:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
filterable
remote
reserve-keyword
:remote-method="finCorpList"
:loading="loading"
style="width: 100%;">
<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 corpList"
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.name"
:value="item.name">
</el-option>
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
<!-- <el-option-->
<!-- v-for="item in originTypes"-->
<!-- :key="item.originAction"-->
<!-- :label="item.originName"-->
<!-- :value="item.originAction">-->
<!-- <span style="float: left;font-size: 13px">{{ item.originName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
<!-- item.thirdSysName-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
@ -74,16 +132,11 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核时间:">
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actAuditDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
style="width: 90%"
:picker-options="pickerAuditOptions"
:picker-options="pickerOptions"
v-model="actAuditDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
@ -91,10 +144,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
@ -108,36 +170,123 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column>
<el-table-column label="领用仓库" prop="invName"></el-table-column>
<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="领用备注" prop="remark"></el-table-column>
<el-table-column label="审核说明" prop="auditRemark"></el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="领用单号" prop="billNo"></el-table-column>-->
<!-- <el-table-column label="领用部门" prop="deptName"></el-table-column>-->
<!-- <el-table-column label="领用仓库" prop="invName"></el-table-column>-->
<!-- <el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status)">-->
<!-- {{ statusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="领用备注" prop="remark"></el-table-column>-->
<!-- <el-table-column label="审核说明" prop="auditRemark"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<!-- <el-table-column label="审核时间" prop="auditTime"-->
<!-- sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"-->
<!-- >打印-->
<!-- </el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
@ -151,15 +300,102 @@
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="领用数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<!-- <el-table-column label="序号" type="index" width="60"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>-->
<!-- <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>-->
<!-- <el-table-column label="领用数量" prop="count"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>-->
<!-- <el-table-column label="生产厂家" prop="manufactory"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName"></el-table-column>-->
<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>
<el-dialog
@ -181,7 +417,12 @@
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
import {delReceive} from "@/api/thrsys/thrOrderReceive";
import {filterSub, filterSubAll, findByFrom, findInvByUser} from "@/api/system/invSubWarehouse";
import {
filterSub,
filterSubAllOptimize,
findInvByUserOptimize,
findByFromOptimize} from "@/api/system/invSubWarehouse";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
data() {
@ -210,6 +451,16 @@ export default {
invCodebe: null,
newSpDistributionVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
finCurInv:[],
finCorpList:[],
},
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
@ -321,8 +572,8 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -334,11 +585,11 @@ export default {
delReceive(dQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList = null;
_this.$message.success("删除成功");
_this.getList();
_this.detailList = null;
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
})
.catch(() => {
@ -392,48 +643,48 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
handleDetail(_this,row) {
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
_this.detailList = response.data.list || [];
})
.catch(() => {
this.detailList = [];
_this.detailList = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
finCorpList(val) {
finCorpList(_this,val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
filterSubAllOptimize(query)
.then((response) => {
this.loading = false;
this.corpList = response.data || [];
_this.loading = false;
_this.options.finCorpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.corpList = [];
_this.loading = false;
_this.options.finCorpList = [];
});
},
finCurInv(keyWord) {
this.invList = [];
finCurInv(_this,keyWord) {
_this.invList = [];
let query = {
name: keyWord,
locInvCode: this.$store.getters.locInvCode,
filter: 3
};
findByFrom(query)
findByFromOptimize(query)
.then((response) => {
this.invList = response.data || [];
_this.options.finCurInv = response.data || [];
// if (this.invList.length > 0) {
// this.filterQuery.targetInvCode = this.invList[0].code
// this.invCodebe = this.filterQuery.targetInvCode
@ -441,11 +692,12 @@ export default {
// this.getList();
})
.catch(() => {
_this.options.finCurInv = [];
});
},
printOrder(row) {
printOrder(_this,row) {
printOrder(row)
.then((response) => {
const binaryData = [];
@ -454,9 +706,9 @@ export default {
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
_this.loading = false;
window.open(url);//pdf
this.getList();
_this.getList();
})
.catch(() => {
});
@ -464,7 +716,15 @@ export default {
closeDialog() {
this.newSpDistributionVisible = false;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {
auditDetail
@ -472,8 +732,22 @@ export default {
mounted() {
},
created() {
this.finCurInv();
this.getList();
this.finCurInv(this);
getHead("receiveSearch-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
getHead("receiveSearch-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

Loading…
Cancel
Save