库存盘点功能修改

dev_ksck2.0
anthonywj 1 year ago
parent d9575e989e
commit b7823c7246

@ -5,7 +5,7 @@ VUE_APP_TITLE = UDI管理系统
ENV = 'development'
# 开发环境
VUE_APP_BASE_API = 'http://127.0.0.1:9991'
VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001"

@ -21,7 +21,7 @@ ENV = 'production'
# 平潭正式
VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# 漳州中医院
# VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
@ -30,7 +30,7 @@ VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.100:9160/UDI_WMS_MC/'
# 平和县医院
# VUE_APP_BASE_API = 'http://192.168.0.43:9150/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://192.168.0.43:9150/UDI_WMS_MC/'
@ -65,13 +65,12 @@ VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# 南靖
VUE_APP_BASE_API = 'http://192.168.10.225:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.73.128:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.10.225:9150/UDI_WMS_MC/'
# 测试NIGINX
# VUE_APP_BASE_API = 'https://test.udims.com/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.20.128:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.125:9150/UDI_WMS_MC/'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/UDI_WMS_NEW/'

@ -196,7 +196,7 @@ export default {
showSearch: true,
filterQuery: {
recordKey: null,
type: 4,
type: 5,
startTime: null,
endTime: null,
page: 1,

@ -1,51 +1,53 @@
<template>
<div>
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" size="mini" label-width="120px">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form"
size="mini" label-width="120px">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" 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.invStorageCode" placeholder="请选择盘点仓库" clearable="true" 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.invStorageCode" 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.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
@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.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> -->
</el-col>
</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">
<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"
@ -54,7 +56,8 @@
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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)"
@ -66,10 +69,13 @@
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-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"
@ -85,10 +91,13 @@
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -100,7 +109,8 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-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'}`"
@ -124,42 +134,42 @@
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="180"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="auditCountOrder(scope.row)"
>审核
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column> -->
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="180"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="auditCountOrder(scope.row)"
>审核
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</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)"
@ -180,7 +190,7 @@
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
@ -193,8 +203,10 @@
: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 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
@ -206,9 +218,12 @@
: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>
<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>
@ -243,7 +258,9 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
@ -260,27 +277,27 @@
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="100"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="100"></el-table-column>
<el-table-column label="盈亏状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag>
{{ countStatusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="100"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="100"></el-table-column>
<el-table-column label="盈亏状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag>
{{ countStatusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> -->
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
@ -301,7 +318,7 @@
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
@ -314,8 +331,10 @@
: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 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
@ -327,9 +346,12 @@
: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>
<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>
@ -364,7 +386,9 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
@ -406,7 +430,7 @@ import {
} from "@/api/inventory/invCountOrder";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
import {
getHead,executeFuc
getHead, executeFuc
} from "@/utils/customConfig";
export default {
@ -423,17 +447,17 @@ export default {
limit: 20,
},
list: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
options: {
getInvList:[],
getSpaceList:[],
},
total: 0,
tableHeader: [],
queryList: [],
fromList: [],
tableHeader2: [],
queryList2: [],
fromList2: [],
options: {
getInvList: [],
getSpaceList: [],
},
invList: [],
spaceList: [],
loading: false,
@ -516,41 +540,41 @@ export default {
this.total = 0;
})
},
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.fromInvSpaceCode = null;
_this.getSpaceList(_this);
},
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
_this.getSpaceList(_this);
},
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
})
},
invChange(_this) {
_this.spaceList = [];
_this.filterQuery.fromInvSpaceCode = null;
_this.getSpaceList(_this);
},
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
_this.getSpaceList(_this);
},
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
})
},
addCountOrder(type) {
this.formVisible = true;
this.formName = 'add_' + type;
this.countOrder = {};
this.countType = type;
},
deleteDialog(_this,rowId) {
deleteDialog(_this, row) {
_this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
let params = {id: row.id};
_this.loading = true;
deleteCountOrder(params).then((res) => {
_this.loading = false;
@ -565,7 +589,7 @@ export default {
});
});
},
auditCountOrder(_this,row) {
auditCountOrder(_this, row) {
let params = {
id: row.id,
status: null
@ -619,7 +643,7 @@ export default {
this.detailList = [];
this.detailTotal = 0;
},
handleChange(_this,row) {
handleChange(_this, row) {
_this.detailQuery.orderIdFk = row.orderId;
_this.detailQuery.page = 1;
_this.getCountOrderDetailList()
@ -641,7 +665,7 @@ export default {
this.detailTotal = 0;
});
},
showCode(_this,row) {
showCode(_this, row) {
_this.codeQuery = {
orderIdFk: row.orderIdFk,
relId: row.relId,
@ -650,11 +674,11 @@ export default {
};
_this.codesVisible = true;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row,expression,defaultRet){
if(expression){
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
@ -670,21 +694,21 @@ export default {
};
},
created() {
this.getInvList(this);
getHead("InvCountOrderAudit-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderAudit-2","1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
this.getInvList(this);
getHead("InvCountOrderAudit-1", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderAudit-2", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
},
};
</script>

@ -119,7 +119,7 @@
</el-form>
</el-card>
<!-- :disabled="this.countProductList.length > 0"-->
<el-tabs type="border-card" style="margin: 5px">
<el-tab-pane label="盘点详情">
@ -128,14 +128,13 @@
v-if="countType != 2"
type="primary"
size="mini"
:disabled="this.countProductList.length > 0"
@click.native="startCount(1)"
>录入产品
</el-button>
<el-button
v-if="countType == 2"
type="primary" size="mini"
:disabled="this.countProductList.length > 0"
@click.native="startCount()"
>录入产品
</el-button>
@ -342,7 +341,7 @@ import {
batchAddDetail, submitAudit, updateCountOrderStatus, updateCountOrderDetail
} from "@/api/inventory/invCountOrder";
import {addCode} from "@/api/inventory/invCountCodes";
import {getCountInvProductProduct} from "@/api/inventory/invPorduct";
import {getCountInvProductProduct, getProduct} from "@/api/inventory/invPorduct";
import {isBlank} from "@/utils/strUtil";
import {getInvListByUser} from "@/api/system/invWarehouse";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
@ -488,24 +487,9 @@ export default {
saveOrderDetail() {
let orderDetails = [];
this.countProductList.forEach(product => {
let detailData = {
orderIdFk: this.formData.orderId,
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate,
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invSpaceCode,
invNum: product.reCount,
};
orderDetails.push(detailData);
});
let params = {
orderId: this.formData.orderId,
countOrderDetailList: orderDetails
countOrderDetailList: this.countProductList
}
batchAddDetail(params).then((res) => {
if (res.code === 20000) {
@ -616,8 +600,11 @@ export default {
getList() {
let params = {orderIdFk: this.formData.orderId};
getCountOrderDetailList(params).then((res) => {
debugger
if (res.code === 20000) {
console.log(res.data)
this.countProductList = res.data.list || [];
console.log(this.countProductList)
}
});
},
@ -646,7 +633,7 @@ export default {
queryInvProducts() {
this.filterQuery.invCode = this.formData.invStorageCode;
this.filterQuery.invSpaceCode = this.formData.invWarehouseCode;
getCountInvProductProduct(this.filterQuery).then((res) => {
getProduct(this.filterQuery).then((res) => {
if (res.code === 20000) {
this.productList = res.data.list || [];
this.productTotal = res.data.total || 0;
@ -667,14 +654,26 @@ export default {
return;
}
if (this.countProductList.length === 0) {
//
this.multiProduct.forEach(product => {
this.countProductList.push(product);
});
// this.saveOrderDetail();
this.saveOrder(1);
}
// if (this.countProductList.length === 0) {
//
this.multiProduct.forEach(product => {
let detailData = {
orderIdFk: this.formData.orderId,
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate,
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invSpaceCode,
invNum: product.reCount,
};
this.countProductList.push(detailData);
});
// this.saveOrderDetail();
this.saveOrder(1);
// }
this.selectInvProductVisible = false;
},
getRowKeys(row) {
@ -687,7 +686,7 @@ export default {
});
},
startCount(val) {
this.countProductList = [];
// this.countProductList = [];
if (this.countType === 0 && val === 1) {
if (isBlank(this.formData.invStorageCode)) {
this.$message.warning("请先选择盘点仓库");

@ -1,7 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" size="mini" label-width="120px">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" size="mini"
label-width="120px">
<!-- <el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
@ -44,8 +45,9 @@
</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">
<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"
@ -54,7 +56,8 @@
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<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)"
@ -66,10 +69,13 @@
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-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"
@ -85,10 +91,13 @@
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -100,7 +109,8 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-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'}`"
@ -127,46 +137,46 @@
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
border>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="100"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="100"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="140"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="160"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="140" 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="printOrder(scope.row)"
>打印
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button>
</template>
</el-table-column> -->
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="100"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="100"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="140"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="160"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="140" 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="printOrder(scope.row)"
>打印
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</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)"
@ -187,7 +197,7 @@
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
@ -200,8 +210,10 @@
: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 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
@ -213,9 +225,12 @@
: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>
<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>
@ -250,7 +265,9 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
@ -267,18 +284,18 @@
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> -->
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
@ -299,7 +316,7 @@
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
@ -312,8 +329,10 @@
: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 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
@ -325,9 +344,12 @@
: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>
<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>
@ -362,7 +384,9 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
@ -407,7 +431,7 @@ import {
} from "@/api/inventory/invCountOrder";
import invCountOrderModify from "@/views/inventory/count/InvCountOrderModify.vue";
import {
getHead,executeFuc
getHead, executeFuc
} from "@/utils/customConfig";
export default {
@ -417,23 +441,23 @@ export default {
showSearch: true,
filterQuery: {
orderId: null,
invStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: null,
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
status: 0,
page: 1,
limit: 20,
},
list: [],
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
tableHeader2:[],
queryList2:[],
fromList2:[],
tableHeader: [],
queryList: [],
fromList: [],
tableHeader2: [],
queryList2: [],
fromList2: [],
options: {
getInvList:[],
getSpaceList:[],
getInvList: [],
getSpaceList: [],
},
invList: [],
spaceList: [],
@ -480,8 +504,8 @@ export default {
});
this.filterQuery = {
orderId: null,
invStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: null,
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
status: 0,
page: 1,
limit: 20,
@ -529,7 +553,7 @@ export default {
_this.getSpaceList(_this);
},
getSpaceList(_this) {
let params = {invWarehouseCode: _this.filterQuery.invStorageCode, status: 1};
let params = {invWarehouseCode: _this.filterQuery.invCode, status: 1};
getInvSpaceListOptimize(params).then((res) => {
_this.options.getSpaceList = res.data.list || [];
_this.getList();
@ -543,7 +567,7 @@ export default {
countType: this.countType
};
},
printOrder(_this,row) {
printOrder(_this, row) {
let query = {moduleId: 6};
_this.loading = true;
verifyTemplateFile(query).then((res) => {
@ -572,7 +596,7 @@ export default {
_this.$message.error(error.message);
})
},
editOrder(_this,row) {
editOrder(_this, row) {
_this.formVisible = true;
_this.formName = "edit_" + row.countType;
_this.countOrder = row;
@ -590,13 +614,13 @@ export default {
this.$message.error(error.message);
});
},
deleteDialog(_this,rowId) {
deleteDialog(_this, row) {
_this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
let params = {id: row.id};
_this.loading = true;
deleteCountOrder(params).then((res) => {
_this.loading = false;
@ -615,7 +639,7 @@ export default {
this.formVisible = false;
this.getList();
},
handleChange(_this,row) {
handleChange(_this, row) {
_this.detailQuery.orderIdFk = row.orderId;
_this.detailQuery.page = 1;
_this.getCountOrderDetailList()
@ -637,11 +661,11 @@ export default {
this.detailTotal = 0;
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row,expression,defaultRet){
if(expression){
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
@ -658,14 +682,14 @@ export default {
},
created() {
this.getInvList(this);
getHead("InvCountOrderNew-1","1").then((re) => {
getHead("InvCountOrderNew-1", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
getHead("InvCountOrderNew-2","1").then((re) => {
getHead("InvCountOrderNew-2", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;

@ -224,6 +224,10 @@
>查询
</el-button
>
<el-button type="primary" icon="el-icon-document" @click="selectExport">Excel</el-button>
<el-button type="primary" icon="el-icon-document" @click="searchExport">Excel</el-button>
<el-button type="primary" icon="el-icon-printer" @click="optinPrint"></el-button>
<el-button type="primary" icon="el-icon-printer" @click="selectPrint"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>

Loading…
Cancel
Save