库存对比相关修改

zyy_db
anthonywj 1 year ago
parent 95848a6a23
commit 20c07311de

@ -43,7 +43,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://192.168.6.189:9150/UDI_WMS_MC/'
# 三明大田医院
VUE_APP_BASE_API = 'http://172.20.124.4:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://172.20.124.4:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.207:9150/UDI_WMS_MC/'
@ -60,6 +60,10 @@ VUE_APP_BASE_API = 'http://172.20.124.4:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.207:9160/UDI_WMS_MC/'
# 云霄妇幼保健
# VUE_APP_BASE_API = 'http://192.168.0.11:9150/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://192.168.0.67:9150/UDI_WMS_MC/'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/UDI_WMS_NEW/'

@ -16,6 +16,7 @@ export function selectInvProductDetail(params) {
});
}
export function stockCompareSave(params) {
return axios({
url: "/udiwms/stockCompare/save",
@ -47,6 +48,23 @@ export function stockCompareDetailPage(params) {
});
}
export function stockCompareResultPage(params) {
return axios({
url: "/udiwms/stockCompare/detail/result",
method: "POST",
data: params
});
}
export function dlThrCpProduct(params) {
return axios({
url: "/udiwms/stockCompare/addThrProduct",
method: "POST",
data: params
});
}
export function stockCompareDetailDel(params) {
return axios({
url: "/udiwms/stockCompare/detail/del",
@ -54,3 +72,22 @@ export function stockCompareDetailDel(params) {
data: params
});
}
export function uploadCompare(compareId) {
return axios({
url: `/udiwms/stockCompare/compare/${compareId}`,
method: "POST",
});
}
export function compareExportExcel(data) {
return axios({
url: "/udiwms/stockCompare/compare/exportExcel",
method: "post",
responseType: 'blob',
data: data
});
}

@ -1392,7 +1392,7 @@
<el-collapse-item name="6">
<template slot="title">
<p class="form-title">版本信息</p>
<p class="form-title">国家DI标识数据库版本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">

@ -1299,7 +1299,7 @@
<el-collapse-item name="6">
<template slot="title">
<p class="form-title">版本信息</p>
<p class="form-title">国家DI标识数据库版本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">

@ -1237,7 +1237,7 @@
<el-collapse-item name="6">
<template slot="title">
<p class="form-title">版本信息</p>
<p class="form-title">国家DI标识数据库版本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">

@ -1,11 +1,16 @@
import {
compareExportExcel,
dlThrCpProduct,
dlThrProduct,
selectInvProductDetail, stockCompareAddProduct,
stockCompareDelete, stockCompareDetailDel, stockCompareDetailPage,
stockComparePage,
stockCompareSave
stockComparePage, stockCompareResultPage,
stockCompareSave, uploadCompare
} from "@/api/inventory/stockCompareApi";
import {mainActionMap, stockCompareStatusEnum} from "@/utils/data";
import data from "@/views/system/dict/data.vue";
import fa from "element-ui/src/locale/lang/fa";
import {postExcelInoutImport} from "@/api/inout/orderDetailResult";
let filterQuery = {
page: 1,
@ -115,6 +120,8 @@ export default {
},
firstDayOfWeek: 1
},
currentRow: null,
}
},
created() {
@ -134,8 +141,8 @@ export default {
}
this.$message.success(res.message)
this.showAddProductDialog = false
this.stockCompareDetailQuery.page = 1
this.getStockCompareDetailList()
let query = {compareId: this.compareId,};
this.getResultList(query)
})
},
addProductSelectionChange(row) {
@ -151,10 +158,35 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
let query = {
compareId: this.compareId
}
dlThrCpProduct(query).then(res => {
loading.close();
}, 2000);
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.getResultList(query)
}).catch(e => {
loading.close();
})
},
uploadCompare() {
uploadCompare(this.compareId).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
return
} else {
this.$message.success("提交成功!");
this.showDialog = false;
this.getList()
}
})
},
showAddProduct() {
this.selectProductQuery = {...selectProductQuery, compareId: this.compareId}
this.productList = []
@ -165,18 +197,19 @@ export default {
},
getStockCompareDetailList() {
this.stockCompareDetailQuery.compareId = this.compareId
this.stockCompareDetailLoading = true
stockCompareDetailPage(this.stockCompareDetailQuery).then(res => {
this.stockCompareDetailLoading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.stockCompareDetailList = res.data.list || []
this.stockCompareDetailTotal = res.data.total || 0
}).catch(e => {
this.stockCompareDetailLoading = false
})
// this.stockCompareDetailLoading = true
// stockCompareDetailPage(this.stockCompareDetailQuery).then(res => {
// this.stockCompareDetailLoading = false
// if (res.code != 20000) {
// this.$message.error(res.message)
// return
// }
// this.stockCompareDetailList = res.data.list || []
// this.stockCompareDetailTotal = res.data.total || 0
// }).catch(e => {
// this.stockCompareDetailLoading = false
// })
this.getResultList(this.stockCompareDetailQuery)
},
selectInvProductDetailList() {
this.productLoading = true
@ -305,6 +338,43 @@ export default {
}).catch(res => {
this.loading = false
})
},
handleSelectionChange(val) {
this.currentRow = val;
let query = {
compareId: this.currentRow.id
}
this.getResultList(query);
},
getResultList(query) {
stockCompareResultPage(query).then(res => {
this.loading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.stockCompareDetailList = res.data || []
this.total = res.data.total || 0
}).catch(res => {
this.loading = false
})
},
exportExcel(row) {
let printParams = {
compareId: row.id
};
compareExportExcel(printParams).then((response) => {
let blob = new Blob([response], {type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // 创建一个临时的url指向blob对象
let a = document.createElement("a");
a.href = url;
a.click();
this.$message("生成文件成功!")
})
}
}
}

@ -11,7 +11,8 @@
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="状态:">
<el-select v-model="filterQuery.status" @clear="filterQuery.status=null" placeholder="请选择状态" style="width: 90%" clearable>
<el-select v-model="filterQuery.status" @clear="filterQuery.status=null" placeholder="请选择状态"
style="width: 90%" clearable>
<el-option v-for="item in stockCompareStatusEnum" :key="item.key" :label="item.desc" :value="item.key"/>
</el-select>
</el-form-item>
@ -66,11 +67,11 @@
<el-table
v-loading="loading"
:data="list"
@row-click="handleSelectionChange"
style="width: 100%; margin-top: 20px"
highlight-current-row
border
max-height="300"
height="300">
>
<el-table-column label="序号" width="50" type="index"></el-table-column>
<el-table-column label="记录号" width="160" prop="id"/>
<el-table-column label="备注描述" width="160" prop="remark"/>
@ -97,7 +98,8 @@
<el-table-column label="操作人" width="110" prop="createUserName"/>
<el-table-column fixed="right" width="100" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)"></el-button>
<el-button type="text" @click="edit(scope.row)" v-if="scope.row.status == 'DRAFT'"></el-button>
<el-button type="text" @click="exportExcel(scope.row)" v-if="scope.row.status == 'FINISHED'"></el-button>
<el-button type="text" @click="del(scope.row)"></el-button>
</template>
</el-table-column>
@ -111,14 +113,80 @@
@pagination="getList"
></pagination>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane>
<span slot="label"> {{ currentRow == null ? '' : currentRow.id }}-库存对比结果</span>
<el-table v-loading="stockCompareDetailLoading"
:data="stockCompareDetailList"
highlight-current-row
max-height="300"
height="300">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="DI/物资编码" width="120" prop="nameCode" show-overflow-tooltip/>
<!-- <el-table-column label="第三方产品编码" width="120" prop="nameCode" show-overflow-tooltip/>-->
<el-table-column label="产品名称" width="120" prop="productName" show-overflow-tooltip/>
<el-table-column label="规格型号" width="120" prop="ggxh" show-overflow-tooltip/>
<el-table-column label="批次号" width="110" prop="batchNo" show-overflow-tooltip/>
<el-table-column label="出入库类型" width="90" prop="mainAction" show-overflow-tooltip>
<template scope="scope">
{{ mainActionMap[scope.row.mainAction] }}
</template>
</el-table-column>
<el-table-column label="数量" header-align="center">
<el-table-column header-align="center"
label="UDI" width="100"
prop="count"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="第三方" width="100"
prop="thrCount"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="价格" header-align="center">
<el-table-column header-align="center"
label="UDI" width="100"
prop="price"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="第三方" width="100"
prop="thrPrice"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="产品描述" width="110" prop="cpms" show-overflow-tooltip/>
<el-table-column label="生产厂家" width="110" prop="manufactory" show-overflow-tooltip/>
<el-table-column label="注册/备案人名称" width="220" prop="ylqxzcrbarmc" show-overflow-tooltip/>
<el-table-column label="注册/备案证号" width="220" prop="zczbhhzbapzbh" show-overflow-tooltip/>
<!-- <el-table-column label="操作" v-if="editRow&&editRow.status==stockCompareStatusEnum.DRAFT.key" width="80"-->
<!-- fixed="right">-->
<!-- <template scope="scope">-->
<!-- <el-button type="text" @click="removeDetail(scope.row)"></el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="stockCompareDetailTotal>0"
:total="stockCompareDetailTotal"
:limit.sync="stockCompareDetailQuery.limit"
:page.sync="stockCompareDetailQuery.page"
@pagination="getList"
></pagination>
</el-tab-pane>
</el-tabs>
<el-dialog
append-to-body
:title="compareId?'编辑对比':'新增对比'"
:visible="true"
v-if="showDialog"
@close="showDialog = false;filterQuery.page = 1;getList()"
width="60%"
width="80%"
>
<el-card class="dialogCard">
<el-form :model="param" ref="stockCompare" :disabled="compareId" :rules="paramRules" class="query-form"
@ -177,10 +245,15 @@
<el-card v-if="compareId" class="dialogSecCard">
<el-row v-if="editRow&&editRow.status==stockCompareStatusEnum.DRAFT.key">
<el-col align="right">
<el-button icon="el-icon-refresh" @click="stockCompareDetailQuery.page=1;getStockCompareDetailList()">
</el-button>
<el-button type="primary" @click="showAddProduct"></el-button>
<el-button type="primary" @click="compareFunc"></el-button>
<el-button-group>
<el-button type="primary" icon="el-icon-plus" @click="showAddProduct"></el-button>
<el-button type="primary" icon="el-icon-download" @click="compareFunc"></el-button>
<el-button type="primary" icon="el-icon-upload2"
@click="uploadCompare">提交比对
</el-button>
</el-button-group>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
@ -190,19 +263,46 @@
max-height="300"
height="300">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="最小销售标识" width="110" prop="nameCode"/>
<el-table-column label="产品名称" width="110" prop="productName"/>
<el-table-column label="规格型号" width="110" prop="ggxh"/>
<el-table-column label="出入库类型" width="90" prop="mainAction">
<el-table-column label="DI/物资编码" width="120" prop="nameCode" show-overflow-tooltip/>
<!-- <el-table-column label="第三方产品编码" width="120" prop="nameCode" show-overflow-tooltip/>-->
<el-table-column label="产品名称" width="120" prop="productName" show-overflow-tooltip/>
<el-table-column label="规格型号" width="120" prop="ggxh" show-overflow-tooltip/>
<el-table-column label="出入库类型" width="90" prop="mainAction" show-overflow-tooltip>
<template scope="scope">
{{ mainActionMap[scope.row.mainAction] }}
</template>
</el-table-column>
<el-table-column label="数量" width="80" prop="count"/>
<el-table-column label="产品描述" width="110" prop="cpms"/>
<el-table-column label="生产厂家" width="110" prop="manufactory"/>
<el-table-column label="医疗器械注册/备案人名称" width="220" prop="ylqxzcrbarmc"/>
<el-table-column label="注册证/备案批准编号" width="220" prop="zczbhhzbapzbh"/>
<el-table-column label="批次号" width="110" prop="batchNo" show-overflow-tooltip/>
<el-table-column label="数量" header-align="center">
<el-table-column header-align="center"
label="UDI" width="100"
prop="count"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="第三方" width="100"
prop="thrCount"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="价格" header-align="center">
<el-table-column header-align="center"
label="UDI" width="100"
prop="price"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="第三方" width="100"
prop="thrPrice"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="产品描述" width="110" prop="cpms" show-overflow-tooltip/>
<el-table-column label="生产厂家" width="110" prop="manufactory" show-overflow-tooltip/>
<el-table-column label="注册/备案人名称" width="220" prop="ylqxzcrbarmc" show-overflow-tooltip/>
<el-table-column label="注册/备案证号" width="220" prop="zczbhhzbapzbh" show-overflow-tooltip/>
<el-table-column label="操作" v-if="editRow&&editRow.status==stockCompareStatusEnum.DRAFT.key" width="80"
fixed="right">
<template scope="scope">
@ -233,12 +333,13 @@
<el-row>
<el-col :span="12" align="left">选择产品</el-col>
<el-col :span="12" align="right">
<el-button icon="el-icon-refresh" @click="selectProductQuery.page = 1;selectInvProductDetailList()">刷新
</el-button>
<el-button icon="el-icon-check" type="primary" :disabled="!checkProductList.length"
@click="checkProduct(false)">选中选入
</el-button>
<el-button icon="el-icon-check" type="primary" @click="checkProduct(true)"></el-button>
<el-button icon="el-icon-refresh" @click="selectProductQuery.page = 1;selectInvProductDetailList()">刷新
</el-button>
</el-col>
</el-row>
</template>
@ -265,8 +366,8 @@
<el-table-column label="数量" width="80" prop="count"/>
<el-table-column label="产品描述" width="120" prop="cpms"/>
<el-table-column label="生产厂家" width="110" prop="manufactory"/>
<el-table-column label="医疗器械注册/备案人名称" width="220" prop="ylqxzcrbarmc"/>
<el-table-column label="注册证/备案批准编号" width="220" prop="zczbhhzbapzbh"/>
<el-table-column label="注册/备案人名称" width="220" prop="ylqxzcrbarmc" show-overflow-tooltip/>
<el-table-column label="注册/备案证号" width="220" prop="zczbhhzbapzbh" show-overflow-tooltip/>
</el-table>
<pagination
v-show="productTotal>0"

Loading…
Cancel
Save