出入库单管理配置

20231126-yw
yuanwei 1 year ago
parent 059ad7a1b4
commit 9e9d02b99c

@ -1,4 +1,5 @@
import axios from "@/utils/request";
import {getDeptListByUserOptimize} from "@/api/auth/authDept";
//获取数据
export function getBusTypeList(params) {
@ -18,6 +19,14 @@ export function getLocalJoinByUser(params) {
});
}
export function getLocalJoinByUserOptimize(params) {
return axios({
url: "/udiwms/localBusType/filterJoinByUserOptimize",
method: "get",
params: params
});
}
export function getOrderDetailBus(params) {
return axios({

File diff suppressed because it is too large Load Diff

@ -1,89 +1,149 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery"
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery"
:rules="rules"
ref="form"
class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="单号:">
<el-input v-model="filterQuery.billNo" placeholder="单号"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="出入库类型:" prop="mainAction">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:" prop="mainAction">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.action" placeholder="请选择单据类型"
style="width: 90%"
clearable>
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- v-for="item in busTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="采购仓库:">-->
<!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="采购仓库:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; <el-option&ndash;&gt;-->
<!-- &lt;!&ndash; v-for="item in deptList"&ndash;&gt;-->
<!-- &lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :value="item.code">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-option>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="往来单位:">-->
<!-- <el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="往来单位:">
<el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"
style="width: 90%"
clearable="true"></el-input>
<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"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -93,13 +153,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</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">
@ -130,61 +196,148 @@
border :default-sort="defaultSort"
@sort-change="handleSortChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip
sortable="custom"
:sort-orders="['ascending', 'descending']">
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220">
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label= prop="invName" width="120">
</el-table-column>
<el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="来源" prop="fromType" width="140">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="单据状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{
checkStatus[scope.row.status]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.billNo)"
>删除
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.status == 1"-->
<!-- @click.native.stop="onUpload(scope.row.billNo)"-->
<!-- >提交校验-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- :sort-orders="['ascending', 'descending']">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="往来单位" prop="fromName" width="220">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属部门" prop="deptName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label= prop="invName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="来源" prop="fromType" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ fromTypeMap[scope.row.fromType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editOrder(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.billNo)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- &lt;!&ndash; <el-button&ndash;&gt;-->
<!-- &lt;!&ndash; type="text"&ndash;&gt;-->
<!-- &lt;!&ndash; size="small"&ndash;&gt;-->
<!-- &lt;!&ndash; v-if="scope.row.status == 1"&ndash;&gt;-->
<!-- &lt;!&ndash; @click.native.stop="onUpload(scope.row.billNo)"&ndash;&gt;-->
<!-- &lt;!&ndash; >提交校验&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- </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>
<el-dialog
:title="titleMap[title]"
@ -246,13 +399,16 @@ import {
getOrderList, submitBiz
} from "../../api/inout/order";
import addOrder from "./DialogCreateOrder";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import selectThrOrder from "./DialogSelectThrOrder";
import selectReceiveOrderDialog from "./DialogSelectReceiveOrder";
import {getCorrespondence} from "@/api/basic/basicUnitMaintain";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
@ -300,6 +456,13 @@ export default {
list: [],
addOrderVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
getDeptList:[],
},
loading: false,
index: null,
formName: null,
@ -405,15 +568,15 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
getBusType() {
getBusType(_this) {
let query = {
code: this.filterQuery.invCode,
enabled: true,
};
getLocalJoinByUser(query)
getLocalJoinByUserOptimize(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getList();
_this.options.getBusType = response.data || [];
_this.getList();
})
.catch(() => {
});
@ -424,10 +587,10 @@ export default {
this.addOrderVisible = true;
},
editOrder(row) {
this.idQuery = row;
this.title = "edit";
this.addOrderVisible = true;
editOrder(_this,row) {
_this.idQuery = row;
_this.title = "edit";
_this.addOrderVisible = true;
},
closeDialog() {
@ -493,14 +656,14 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(_this,rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
_this.deleteOrders(rowId);
})
.catch(() => {
});
@ -523,18 +686,18 @@ export default {
this.loading = false;
});
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
invChange(_this) {
_this.filterQuery.action = null;
_this.getBusType(_this);
},
findMethod(query) {
this.fromOptions = [];
@ -572,7 +735,15 @@ export default {
selectReceive() {
this.selectReceiveVisible = true;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
mounted() {
@ -582,9 +753,16 @@ export default {
};
},
created() {
this.getInvList();
this.getBusType();
this.getList();
this.getInvList(this);
this.getBusType(this);
getHead("IoCreateBusOrder","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {

@ -1,60 +1,135 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="单号:">
<el-input v-model="filterQuery.billNo" placeholder="单号"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- v-for="item in busTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="审核时间:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-date-picker&ndash;&gt;-->
<!-- &lt;!&ndash; :picker-options="pickerOptions"&ndash;&gt;-->
<!-- &lt;!&ndash; v-model="auditDateRange"&ndash;&gt;-->
<!-- &lt;!&ndash; type="daterange"&ndash;&gt;-->
<!-- &lt;!&ndash; format="yyyy 年 MM 月 dd 日"&ndash;&gt;-->
<!-- &lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!-- &lt;!&ndash; range-separator="至"&ndash;&gt;-->
<!-- &lt;!&ndash; start-placeholder="开始日期"&ndash;&gt;-->
<!-- &lt;!&ndash; end-placeholder="结束日期"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; </el-date-picker>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </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 class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.action" 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 busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<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"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -64,28 +139,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="审核时间:">-->
<!-- <el-date-picker-->
<!-- :picker-options="pickerOptions"-->
<!-- v-model="auditDateRange"-->
<!-- type="daterange"-->
<!-- format="yyyy 年 MM 月 dd 日"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </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,61 +174,148 @@
border :default-sort="defaultSort"
@sort-change="handleSortChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip
sortable="custom"
:sort-orders="['ascending', 'descending']">
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220">
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label= prop="invName" width="120">
</el-table-column>
<el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="来源" prop="fromType" width="140">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="校验状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{
checkStatus[scope.row.status]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.billNo)"
>删除
</el-button
>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- :sort-orders="['ascending', 'descending']">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="往来单位" prop="fromName" width="220">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属部门" prop="deptName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label= prop="invName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="来源" prop="fromType" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ fromTypeMap[scope.row.fromType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="校验状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.status == 1"-->
<!-- @click.native.stop="onUpload(scope.row.billNo)"-->
<!-- >校验提交-->
<!-- @click.native.stop="editOrder(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.billNo)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!--&lt;!&ndash; <el-button&ndash;&gt;-->
<!--&lt;!&ndash; type="text"&ndash;&gt;-->
<!--&lt;!&ndash; size="small"&ndash;&gt;-->
<!--&lt;!&ndash; v-if="scope.row.status == 1"&ndash;&gt;-->
<!--&lt;!&ndash; @click.native.stop="onUpload(scope.row.billNo)"&ndash;&gt;-->
<!--&lt;!&ndash; >校验提交&ndash;&gt;-->
<!--&lt;!&ndash; </el-button&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!-- </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>
<el-dialog
:title="titleMap[title]"
@ -198,9 +351,13 @@ import {
getOrderList, submitCodes
} from "../../api/inout/order";
import addOrder from "./DialogCreateOrder";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "IoCreateScanOrder",
@ -244,6 +401,13 @@ export default {
list: [],
addOrderVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
getDeptList:[],
},
loading: false,
index: null,
formName: null,
@ -346,15 +510,15 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
getBusType() {
getBusType(_this) {
let query = {
code: this.filterQuery.invCode,
enabled: true,
};
getLocalJoinByUser(query)
getLocalJoinByUserOptimize(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getList();
_this.options.getBusType = response.data || [];
_this.getList();
})
.catch(() => {
});
@ -365,10 +529,10 @@ export default {
this.addOrderVisible = true;
},
editOrder(row) {
this.idQuery = row;
this.title = "edit";
this.addOrderVisible = true;
editOrder(_this,row) {
_this.idQuery = row;
_this.title = "edit";
_this.addOrderVisible = true;
},
closeDialog() {
@ -432,14 +596,14 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(_this,rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
_this.deleteOrders(rowId);
})
.catch(() => {
});
@ -461,18 +625,18 @@ export default {
this.loading = false;
});
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
invChange(_this) {
_this.filterQuery.action = null;
_this.getBusType(_this);
},
statusFilterType(status) {
@ -484,7 +648,15 @@ 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;
}
},
mounted() {
document.body.ondrop = function (event) {
@ -493,9 +665,16 @@ export default {
};
},
created() {
this.getInvList();
this.getBusType();
this.getList();
this.getInvList(this);
this.getBusType(this);
getHead("IoCreateErrorOrder","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {

@ -1,110 +1,170 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="单号:">
<el-input v-model="filterQuery.billNo" placeholder="单号"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.action" placeholder="请选择单据类型"
style="width: 90%"
clearable>
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="采购仓库:">-->
<!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="收货仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择收货仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- v-for="item in busTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="采购仓库:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; <el-option&ndash;&gt;-->
<!-- &lt;!&ndash; v-for="item in deptList"&ndash;&gt;-->
<!-- &lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :value="item.code">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-option>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<el-col :span="8">
<!-- <el-form-item label="往来单位:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.keyWords"-->
<!-- style="width: 90%"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择往来单位"-->
<!-- :remote-method="findMethod"-->
<!-- :loading="loading"-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="收货仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择收货仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.erpId"-->
<!-- >-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item class="query-form-item" label="往来单位:">
<el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!--&lt;!&ndash; <el-form-item label="往来单位:">&ndash;&gt;-->
<!--&lt;!&ndash; <el-select&ndash;&gt;-->
<!--&lt;!&ndash; v-model="filterQuery.keyWords"&ndash;&gt;-->
<!--&lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!--&lt;!&ndash; filterable&ndash;&gt;-->
<!--&lt;!&ndash; remote&ndash;&gt;-->
<!--&lt;!&ndash; clearable="true"&ndash;&gt;-->
<!--&lt;!&ndash; reserve-keyword&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请选择往来单位"&ndash;&gt;-->
<!--&lt;!&ndash; :remote-method="findMethod"&ndash;&gt;-->
<!--&lt;!&ndash; :loading="loading"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <el-option&ndash;&gt;-->
<!--&lt;!&ndash; v-for="item in fromOptions"&ndash;&gt;-->
<!--&lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!--&lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!--&lt;!&ndash; :value="item.erpId"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!--&lt;!&ndash; </el-option>&ndash;&gt;-->
<!--&lt;!&ndash; </el-select>&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- <el-form-item class="query-form-item" label="往来单位:">-->
<!-- <el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -114,13 +174,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</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">
@ -145,62 +211,149 @@
border :default-sort="defaultSort"
@sort-change="handleSortChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip
sortable="custom"
:sort-orders="['ascending', 'descending']">
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220">
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label= prop="invName" width="120">
</el-table-column>
<el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="来源" prop="fromType" width="140">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="单据状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{
checkStatus[scope.row.status]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- :sort-orders="['ascending', 'descending']">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="往来单位" prop="fromName" width="220">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属部门" prop="deptName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label= prop="invName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>-->
<!-- <el-table-column label="来源" prop="fromType" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ fromTypeMap[scope.row.fromType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.billNo)"
>删除
</el-button
>
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="scope.row.status == 1"-->
<!-- @click.native.stop="onUpload(scope.row.billNo)"-->
<!-- >提交校验-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editOrder(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.billNo)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!--&lt;!&ndash; <el-button&ndash;&gt;-->
<!-- &lt;!&ndash; type="text"&ndash;&gt;-->
<!-- &lt;!&ndash; size="small"&ndash;&gt;-->
<!-- &lt;!&ndash; v-if="scope.row.status == 1"&ndash;&gt;-->
<!-- &lt;!&ndash; @click.native.stop="onUpload(scope.row.billNo)"&ndash;&gt;-->
<!-- &lt;!&ndash; >提交校验&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- </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>
<el-dialog
:title="titleMap[title]"
@ -249,10 +402,14 @@ import {
} from "../../api/inout/order";
import addOrder from "./DialogCreateOrder";
import errOrder from "./IoCreateErrorOrder";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getCorrespondence} from "@/api/basic/basicUnitMaintain";
import {
getHead,executeFuc
} from "@/utils/customConfig";
import {getDeptListByUserOptimize} from "@/api/auth/authDept";
export default {
name: "IoCreateScanOrder",
@ -299,6 +456,13 @@ export default {
addOrderVisible: false,
errOrderVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
getDeptList:[],
},
loading: false,
index: null,
formName: null,
@ -401,15 +565,15 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
getBusType() {
getBusType(_this) {
let query = {
code: this.filterQuery.invCode,
enabled: true,
};
getLocalJoinByUser(query)
getLocalJoinByUserOptimize(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getList();
_this.options.getBusType = response.data || [];
_this.getList();
})
.catch(() => {
});
@ -420,10 +584,10 @@ export default {
this.addOrderVisible = true;
},
editOrder(row) {
this.idQuery = row;
this.title = "edit";
this.addOrderVisible = true;
editOrder(_this,row) {
_this.idQuery = row;
_this.title = "edit";
_this.addOrderVisible = true;
},
closeDialog() {
@ -487,14 +651,14 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(_this,rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
_this.deleteOrders(rowId);
})
.catch(() => {
});
@ -517,18 +681,18 @@ export default {
this.loading = false;
});
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
this.getList();
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
invChange(_this) {
_this.filterQuery.action = null;
_this.getBusType(_this);
},
findMethod(query) {
@ -562,7 +726,15 @@ export default {
errOrderDialog() {
this.errOrderVisible = true;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
mounted() {
document.body.ondrop = function (event) {
@ -571,9 +743,16 @@ export default {
};
},
created() {
this.getInvList();
this.getBusType();
this.getList();
this.getInvList(this);
this.getBusType(this);
getHead("IoCreateScanOrder","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {

@ -1,86 +1,146 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="单号:">
<el-input v-model="filterQuery.billNo" placeholder="单号"
style="width: 90%"
clearable="true"></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- v-for="item in busTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="采购仓库:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; <el-option&ndash;&gt;-->
<!-- &lt;!&ndash; v-for="item in deptList"&ndash;&gt;-->
<!-- &lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :value="item.code">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-option>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="往来单位:">-->
<!-- <el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </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 class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.action" 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 busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="采购仓库:">-->
<!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<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"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="往来单位:">
<el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -90,13 +150,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</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">
@ -117,71 +183,158 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row
@row-click="handleSelectionChange"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border
:default-sort="defaultSort"
@sort-change="handleSortChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="150">
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="150" show-overflow-tooltip
sortable="custom"
:sort-orders="['ascending', 'descending']">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220" show-overflow-tooltip>
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label="所属仓库" prop="invName" width="120">
</el-table-column>
<el-table-column label="来源单号" prop="corpOrderId" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="来源" prop="fromType" width="140">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="单据状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{
checkStatus[scope.row.status]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="addOrders(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.billNo)"
>删除
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="onUpload(scope.row.billNo)"-->
<!-- >校验提交-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="180"></el-table-column>-->
<!-- <el-table-column label="单据类型" prop="billTypeName" width="150">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime" width="150" show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- :sort-orders="['ascending', 'descending']">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span>{{ scope.row.createTime }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="往来单位" prop="fromName" width="220" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属部门" prop="deptName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属仓库" prop="invName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="来源单号" prop="corpOrderId" show-overflow-tooltip width="180"></el-table-column>-->
<!-- <el-table-column label="来源" prop="fromType" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ fromTypeMap[scope.row.fromType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="addOrders(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.billNo)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- &lt;!&ndash; <el-button&ndash;&gt;-->
<!-- &lt;!&ndash; type="text"&ndash;&gt;-->
<!-- &lt;!&ndash; size="small"&ndash;&gt;-->
<!-- &lt;!&ndash; @click.native.stop="onUpload(scope.row.billNo)"&ndash;&gt;-->
<!-- &lt;!&ndash; >校验提交&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- </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>
<el-dialog
title="编辑单据"
@ -355,12 +508,14 @@ import {getBasicUnitMaintains, getCorrespondence} from "../../api/basic/basicUni
import draggable from "vuedraggable";
import addOrder from "./DialogCreateOrder";
import store from "../../store";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {isBlank} from "@/utils/strUtil";
import {getBizDetailList, getCheckDetailList} from "@/api/inout/orderDetailBiz";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "IoDealOrder",
@ -404,6 +559,13 @@ export default {
codeDetailVisible: false,
addOrderVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
getDeptList:[],
},
loading: false,
index: null,
formName: null,
@ -534,26 +696,26 @@ export default {
closeDetailDialog(val) {
this.codeDetailVisible = false;
},
getBusType() {
getBusType(_this) {
let query = {
code: this.filterQuery.invCode,
code: _this.filterQuery.invCode,
enabled: true,
vueType: "waitDeal",
};
getLocalJoinByUser(query)
getLocalJoinByUserOptimize(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getList();
_this.options.getBusType = response.data || [];
_this.getList();
})
.catch(() => {
});
},
addOrders(row) {
this.currentRow = row;
this.idQuery = {};
this.idQuery = row;
addOrders(_this,row) {
_this.currentRow = row;
_this.idQuery = {};
_this.idQuery = row;
this.addOrderVisible = true;
_this.addOrderVisible = true;
},
closeDialog() {
this.addOrderVisible = false;
@ -618,16 +780,16 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(_this,rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
this.currentRow = null;
this.bizDetailList = [];
_this.deleteOrders(rowId);
_this.currentRow = null;
_this.bizDetailList = [];
})
.catch(() => {
});
@ -651,17 +813,18 @@ export default {
this.loading = false;
});
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
invChange(_this) {
_this.filterQuery.action = null;
_this.getBusType(_this);
},
findMethod(query) {
this.fromOptions = [];
@ -721,9 +884,9 @@ export default {
this.getBizDetailList();
},
handleSelectionChange(val) {
this.currentRow = val;
this.getBizDetailList();
handleSelectionChange(_this,val) {
_this.currentRow = val;
_this.getBizDetailList();
},
getBizDetailList() {
if (this.currentRow == null || isBlank(this.currentRow.billNo)) {
@ -747,7 +910,15 @@ export default {
this.bizTotal = 0;
})
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
mounted() {
document.body.ondrop = function (event) {
@ -756,8 +927,16 @@ export default {
};
},
created() {
this.getInvList();
this.getBusType();
this.getInvList(this);
this.getBusType(this);
getHead("IoDealOrder","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
@ -765,7 +944,6 @@ export default {
}
}
});
this.getList();
},
};

@ -1,80 +1,140 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="单号:">
<el-input v-model="filterQuery.billNo" placeholder="单号"
style="width: 90%"
clearable="true"></el-input>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- v-for="item in busTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="采购仓库:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; <el-option&ndash;&gt;-->
<!-- &lt;!&ndash; v-for="item in deptList"&ndash;&gt;-->
<!-- &lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :value="item.code">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-option>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </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 class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.action" 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 busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="采购仓库:">-->
<!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<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"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -84,13 +144,19 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</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">
@ -111,71 +177,158 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row
@row-click="handleSelectionChange"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border
:default-sort="defaultSort"
@sort-change="handleSortChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="150">
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="150" show-overflow-tooltip
sortable="custom"
:sort-orders="['ascending', 'descending']" >
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220">
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label="所属仓库" prop="invName" width="120">
</el-table-column>
<el-table-column label="来源单号" prop="corpOrderId" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="来源" prop="fromType" width="140">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="单据状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{
checkStatus[scope.row.status]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="addOrders(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.billNo)"
>删除
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="onUpload(scope.row.billNo)"
>校验提交
</el-button
>
</template>
</el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="180"></el-table-column>-->
<!-- <el-table-column label="单据类型" prop="billTypeName" width="150">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="创建时间" prop="createTime" width="150" show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- :sort-orders="['ascending', 'descending']" >-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span>{{ scope.row.createTime }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="往来单位" prop="fromName" width="220">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属部门" prop="deptName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="所属仓库" prop="invName" width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="来源单号" prop="corpOrderId" show-overflow-tooltip width="180"></el-table-column>-->
<!-- <el-table-column label="来源" prop="fromType" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ fromTypeMap[scope.row.fromType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="单据状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="addOrders(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.billNo)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="onUpload(scope.row.billNo)"-->
<!-- >校验提交-->
<!-- </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>
<el-dialog
title="编辑单据"
@ -248,49 +401,135 @@
:row-style="rowStyle"
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="DI/物资编码" width="150"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="物资名称" width="150"
prop="coName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号" width="150"
prop="spec"
></el-table-column>
<el-table-column
header-align="center"
label="单据数量" width="100"
prop="count"
></el-table-column>
<el-table-column
header-align="center"
label="扫码数量" width="100"
prop="scanCount"
></el-table-column>
<el-table-column
label="价格"
prop="price" width="100"
></el-table-column>
<el-table-column width="100" label="计量单位" prop="measname">
</el-table-column>
<el-table-column
label="生产企业"
prop="manufacturer" width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案号" width="160"
prop="certCode"
show-overflow-tooltip
></el-table-column>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column-->
<!-- label="DI/物资编码" width="150"-->
<!-- prop="nameCode"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="物资名称" width="150"-->
<!-- prop="coName"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="规格型号" width="150"-->
<!-- prop="spec"-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- label="单据数量" width="100"-->
<!-- prop="count"-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- label="扫码数量" width="100"-->
<!-- prop="scanCount"-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="价格"-->
<!-- prop="price" width="100"-->
<!-- ></el-table-column>-->
<!-- <el-table-column width="100" label="计量单位" prop="measname">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="生产企业"-->
<!-- prop="manufacturer" width="160"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="注册/备案号" width="160"-->
<!-- prop="certCode"-->
<!-- 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>
</el-tab-pane>
</el-tabs>
@ -310,11 +549,14 @@ import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import draggable from "vuedraggable";
import addOrder from "./DialogCreateOrder";
import store from "../../store";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {isBlank} from "@/utils/strUtil";
import {getBizDetailList, getWaitAllocateList} from "@/api/inout/orderDetailBiz";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
@ -356,6 +598,16 @@ export default {
codeDetailVisible: false,
addOrderVisible: false,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getDeptList:[],
},
loading: false,
index: null,
formName: null,
@ -484,26 +736,26 @@ export default {
closeDetailDialog(val) {
this.codeDetailVisible = false;
},
getBusType() {
getBusType(_this) {
let query = {
code: this.filterQuery.invCode,
enabled: true,
vueType: "supDelivery",
};
getLocalJoinByUser(query)
getLocalJoinByUserOptimize(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getList();
_this.options.getBusType = response.data || [];
_this.getList();
})
.catch(() => {
});
},
addOrders(row) {
this.currentRow = row;
this.idQuery = {};
this.idQuery = row;
addOrders(_this,row) {
_this.currentRow = row;
_this.idQuery = {};
_this.idQuery = row;
this.addOrderVisible = true;
_this.addOrderVisible = true;
},
closeDialog() {
this.addOrderVisible = false;
@ -568,48 +820,49 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(_this,rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
_this.deleteOrders(rowId);
})
.catch(() => {
});
},
onUpload(data) {
this.loading = true;
onUpload(_this,data) {
_this.loading = true;
var idQuery = {
billNo: "",
};
idQuery.billNo = data;
submitAllocateBiz(idQuery)
.then((response) => {
this.loading = false;
_this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功");
this.getList();
this.bizDetailList = [];
_this.$message.success("提交成功");
_this.getList();
_this.bizDetailList = [];
} else {
this.$message.error(response.message);
_this.$message.error(response.message);
}
this.loading = false;
_this.loading = false;
});
},
getInvList() {
getInvListByUser()
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
this.invList = response.data || [];
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
invChange(_this) {
_this.filterQuery.action = null;
_this.getBusType(_this);
},
statusFilterType(status) {
@ -649,9 +902,9 @@ export default {
this.getBizDetailList();
},
handleSelectionChange(val) {
this.currentRow = val;
this.getBizDetailList();
handleSelectionChange(_this,val) {
_this.currentRow = val;
_this.getBizDetailList();
},
getBizDetailList() {
if (this.currentRow == null || isBlank(this.currentRow.billNo)) {
@ -675,7 +928,15 @@ export default {
this.bizTotal = 0;
})
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
mounted() {
document.body.ondrop = function (event) {
@ -684,8 +945,23 @@ export default {
};
},
created() {
this.getInvList();
this.getBusType();
this.getInvList(this);
this.getBusType(this);
getHead("IoWaitAllocateOrder","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("IoWaitAllocateOrder-jy","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
@ -693,7 +969,6 @@ export default {
}
}
});
this.getList();
},
};

@ -35,6 +35,7 @@
<el-table-column prop="clickFuc" label="事件"></el-table-column>
<el-table-column prop="disabledFuc" label="禁用eval表达式"></el-table-column>
<el-table-column prop="expression" label="是否展示eval表达式"></el-table-column>
<el-table-column prop="checkRules" label="change事件"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@ -154,6 +155,15 @@
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="change事件" prop="checkRules" class="query-form-item">
<el-input v-model="subData.checkRules" style="width: 80%" placeholder="请输入change事件"
auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>

Loading…
Cancel
Save