阳光采购平台数据同步

master
hongtianzai 3 years ago
parent 37f07077c6
commit b0114b45bd

@ -7,3 +7,10 @@ export function GetList(param){
data: param
});
}
export function UdplatSync(tbName){
return request({
url: "/udplat/log/udplatSync",
method: "post",
params:{tbName}
});
}

@ -58,12 +58,12 @@
>
<el-table-column label="选择" width="50px">
<template slot-scope="scope">
<el-radio :label="scope.row.deliveryGoodId" v-model="selectValue.deliveryGoodId">&nbsp;</el-radio>
<el-radio :label="scope.row.projectGoodsCode" v-model="selectValue.projectGoodsCode">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column label="ID" prop="deliveryGoodId"/>
<el-table-column label="ID" prop="deliveryGoodsId"/>
<el-table-column label="产品名称" prop="productName"/>
<el-table-column label="目录编码" prop="deliveryGoodsCode"/>
<el-table-column label="目录编码" prop="projectGoodsCode"/>
<el-table-column label="医保编码" prop="medicalCode"/>
</el-table>
@ -98,7 +98,7 @@ export default {
data(){
return{
selectValue:{
deliveryGoodId:"",
projectGoodsCode:"",
medicalCode:""
}
}
@ -126,7 +126,7 @@ export default {
},
rowClick(row){
console.log(row);
this.selectValue.deliveryGoodId = row.deliveryGoodId;
this.selectValue.projectGoodsCode = row.projectGoodsCode;
this.selectValue.medicalCode = row.medicalCode;
},
selectAction(){

@ -51,8 +51,8 @@
style="width: 100%"
>
<el-table-column label="序号" type="index"/>
<el-table-column label="ID" prop="deliveryGoodId"/>
<el-table-column label="目录编码" prop="deliveryGoodsCode"/>
<el-table-column label="ID" prop="deliveryGoodsId"/>
<el-table-column label="目录编码" prop="projectGoodsCode"/>
<el-table-column label="生产企业" prop="manufactureName"/>
<el-table-column label="配送企业" prop="distributorName"/>
<el-table-column label="产品名称" prop="productName"/>

@ -6,7 +6,7 @@
:model="queryParams"
size="mini"
>
<el-form-item label="名称或注册名称">
<el-form-item label="产品或注册名称">
<el-input
v-model="queryParams.name"
size="mini"
@ -83,7 +83,7 @@
<el-table-column label="注册/备案证号" prop="zczbhhzbapzbh"/>
<!-- <el-table-column label="产品描述" prop="cpms"/>-->
<el-table-column label="产品key" prop="deviceRecordKey"/>
<el-table-column label="阳光编码" prop="deliveryGoodId"/>
<el-table-column label="阳光编码" prop="projectGoodsCode"/>
<el-table-column label="医保编码" prop="medicalCode"/>
<el-table-column label="操作" fixed="right" width="80">
<template slot-scope="scope">
@ -221,7 +221,7 @@
<el-row :gutter="25">
<el-col :span="12">
<el-form-item label="产品对照码">
<el-input v-model="dialog.productDetail.deliveryGoodId">
<el-input v-model="dialog.productDetail.projectGoodsCode">
<el-button style="padding-right:10px" slot="suffix" type="text" @click="select"></el-button>
</el-input>
@ -313,8 +313,8 @@ export default {
},
selectAction(value){
console.log(value);
if(value.deliveryGoodId && value.deliveryGoodId != ''){
this.dialog.productDetail.deliveryGoodId = value.deliveryGoodId;
if(value.projectGoodsCode && value.projectGoodsCode != ''){
this.dialog.productDetail.projectGoodsCode = value.projectGoodsCode;
}
if(value.medicalCode && value.medicalCode != '')
this.dialog.productDetail.medicalCode = value.medicalCode;
@ -325,7 +325,7 @@ export default {
save(){
let param={
deviceRecordKey: this.dialog.productDetail.deviceRecordKey,
deliveryGoodId: this.dialog.productDetail.deliveryGoodId,
projectGoodsCode: this.dialog.productDetail.projectGoodsCode,
medicalCode: this.dialog.productDetail.medicalCode
}
Save(param).then(result => {

@ -64,7 +64,7 @@
</el-button-group>
</el-form-item>
<el-form-item>
<el-button @click="dialog2.visible = true">按时间段下载</el-button>
<el-button @click="downloadAll"></el-button>
</el-form-item>
</el-form>
<el-table
@ -86,9 +86,7 @@
</el-table-column>
<el-table-column label="表名" prop="tbName"/>
<el-table-column label="日期" prop="actionDate"/>
<el-table-column label="提示行数" prop="totalCount"/>
<el-table-column label="实际行数" prop="realCount"/>
<el-table-column label="插入行数" prop="insertCount"/>
<el-table-column label="执行行数" prop="totalCount"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="操作" fixed="right" width="130">
@ -97,7 +95,7 @@
v-if="scope.row.downloadType != 'import'"
type="text"
size="small"
@click.native.s.stop="downloadData(scope.row.downloadDate)">
@click.native.s.stop="downloadData(scope.row.tbName)">
重新下载
</el-button>
<el-button
@ -131,7 +129,7 @@
</template>
<script>
import {GetList} from "@/api/udplat/udplatLog";
import {GetList,UdplatSync} from "@/api/udplat/udplatLog";
import myMinix from './minixs/commMinixs';
export default {
@ -189,8 +187,53 @@ export default {
this.dialog.content = row.content;
this.dialog.visible = true;
},
downloadData(fdate){
downloadData(tbName){
let _this=this;
this.$confirm("是否重新下载当前表:"+tbName+"的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
UdplatSync(tbName).then(res=>{
console.log(res);
_this.$message({
type: 'info',
message:res.message
});
});
})
.catch(() => {
_this.$message({
type: 'error',
message:"发生错误!"
});
});
},
downloadAll() {
let _this=this;
this.$confirm("是否重新下载全部的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
UdplatSync("").then(res=>{
console.log(res);
_this.$message({
type: 'info',
message:res.message
});
});
})
.catch(() => {
_this.$message({
type: 'error',
message:"发生错误!"
});
});
}
}
}

Loading…
Cancel
Save