第三方产品信息编辑

master
anthonywj 2 years ago
parent 48421d57f5
commit 03ac334c1d

@ -6,7 +6,6 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://116.204.71.86:9150/UDI_WMS_MC/'
#林纪裕
# VUE_APP_BASE_API = 'http://101.43.77.55:9150/UDI_SPMS_SERVER/'
VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:82/UDI_SPMS_SERVER/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_SPMS_SERVER/'

@ -1,42 +1,50 @@
import axios from "@/utils/request";
export function getThrProducts(query) {
return axios({
url: "/udiwms/thrsys/getThrProducts",
method: "get",
params: query
});
return axios({
url: "/udiwms/thrsys/getThrProducts",
method: "get",
params: query
});
}
export function delThrProducts(query) {
return axios({
url: "/udiwms/thrsys/delThrProducts",
method: "post",
data: query
});
return axios({
url: "/udiwms/thrsys/delThrProducts",
method: "post",
data: query
});
}
export function downloadAll(query) {
return axios({
url: "/udiwms/thrsys/products/downloadAll",
method: "get",
params: query
});
return axios({
url: "/udiwms/thrsys/products/downloadAll",
method: "get",
params: query
});
}
export function productsDlAll(query) {
return axios({
url: "/udiwms/thrsys/products/productsDlAll",
method: "post",
data: query
});
return axios({
url: "/udiwms/thrsys/products/productsDlAll",
method: "post",
data: query
});
}
export function saveNewProduct(data) {
return axios({
url: '/udiwms/udiinfo/erp/products/saveProduct',
method: 'post',
data: data
})
return axios({
url: '/udiwms/udiinfo/erp/products/saveProduct',
method: 'post',
data: data
})
}
export function updateProduct(data) {
return axios({
url: '/udiwms/udiinfo/erp/products/update',
method: 'post',
data: data
})
}

@ -5,7 +5,8 @@
<el-row>
<el-col :span="6">
<el-form-item label="产品编码:">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable @keyup.enter.native="keyupErp_submit($event)"></el-input>
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable
@keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -22,7 +23,8 @@
<el-row>
<el-col :span="6">
<el-form-item label="注册/备案号:">
<el-input v-model="filterQuery.registerNo" clearable style="width: 90%" placeholder="请输入注册/备案号"></el-input>
<el-input v-model="filterQuery.registerNo" clearable style="width: 90%"
placeholder="请输入注册/备案号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -48,14 +50,16 @@
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true" :disabled="!configParms.basicThirdProducts">新增</el-button>
</el-button-group>
</div>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true"
:disabled="!configParms.basicThirdProducts">新增
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
@ -70,7 +74,9 @@
<el-table-column label="操作" width="180px">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="detailDialog(scope.row)">详情</el-button>
<el-button type="text" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0" :disabled="!configParms.basicThirdProducts">
<el-button type="text" @click.native.stop="editDialog(scope.row)">编辑</el-button>
<el-button type="text" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0"
:disabled="!configParms.basicThirdProducts">删除
</el-button>
</template>
</el-table-column>
@ -112,21 +118,40 @@
class="dialog-two"
top="5vh"
>
<ThrProductsAdd
:newType="newType"
:closeAddDialog="closeAddDialog"></ThrProductsAdd>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="产品信息编辑"
:visible.sync="thrProductsEditVisible"
width="60%"
class="dialog-two"
top="5vh"
v-if="thrProductsEditVisible"
>
<thrProductsEdit
:newProductData="thisData"
:closeAddDialog="closeAddDialog"
></thrProductsEdit>
</el-dialog>
</div>
</template>
<script>
import {delThrProducts, saveNewProduct
import {
delThrProducts, saveNewProduct
} from "@/api/thrsys/thrProducts";
import {getInvbasdoc} from "@/api/thrsys/getErps";
import {getBasicThirdSys, filterDetailByKey} from "@/api/thrsys/basicThirdSys";
import {selectIp} from "@/api/system/systemParamConfig";
import thrProductsDetail from "./thrProductsDetail";
import ThrProductsAdd from "@/views/thirdSys/product/thrProductsAdd";
import thrProductsEdit from "@/views/thirdSys/product/thrProductsEdit";
import {findConfig} from "@/api/sync/spsSyncStatus";
export default {
@ -143,7 +168,7 @@ export default {
page: 1,
limit: 20,
},
mainThirdSys:'',
mainThirdSys: '',
total: 0,
thirdSys: [],
thirdSysDetail: null,
@ -155,6 +180,7 @@ export default {
},
newType: 1,
thrProductsDetailVisible: false,
thrProductsEditVisible: false,
thisData: null,
loading: false,
addProductVisible: false,
@ -206,7 +232,7 @@ export default {
this.getList();
},
getList() {
if (this.filterQuery.thirdSys == null ) {
if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
@ -261,6 +287,12 @@ export default {
this.thisData = row;
this.thrProductsDetailVisible = true;
},
editDialog(row) {
this.thisData = row;
this.thrProductsEditVisible = true;
},
getBasicThirdSys() {
let query = {
enabled: true,
@ -268,8 +300,8 @@ export default {
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
for(var i=0;i<this.thirdSys.length;i++){
if(this.thirdSys[i].mainSys){
for (var i = 0; i < this.thirdSys.length; i++) {
if (this.thirdSys[i].mainSys) {
this.filterQuery.thirdSys = this.thirdSys[i].thirdId;
this.mainThirdSys = this.thirdSys[i].thirdId;
}
@ -316,6 +348,8 @@ export default {
})
},
closeAddDialog(val) {
this.thrProductsEditVisible = false;
this.thrProductsDetailVisible = false;
this.addProductVisible = false;
if (val) {
this.getList();
@ -334,7 +368,7 @@ export default {
},
},
components: {
thrProductsDetail, ThrProductsAdd
thrProductsDetail, ThrProductsAdd, thrProductsEdit
},
mounted() {
},

@ -0,0 +1,221 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
disabled
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入产品编码"
disabled
v-model.trim="newProductData.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="规格型号:" prop="spec">
<el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入计量单位"
v-model.trim="newProductData.measname"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业"
v-model.trim="newProductData.manufactory"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册证号:" prop="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入注册证号"
v-model.trim="newProductData.registerNo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人"
v-model.trim="newProductData.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称"
v-model.trim="newProductData.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="产品类别:" prop="cplb">
<el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="统一社会信用号:" prop="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
v-model.trim="newProductData.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="器械类别:" prop="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" class="el-col">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述"
v-model.trim="newProductData.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import {updateProduct} from "@/api/thrsys/thrProducts";
import {getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
export default {
name: "thrProductsEdit",
props: {
newProductData: {
type: Object,
required: true,
},
closeAddDialog: {
type: Function,
required: true,
},
},
data() {
return {
thirdSys: [],
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false;
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning("第三方系统不能为空!");
return;
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning("产品编码为空!");
return;
}
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning("产品名称不能为空!");
return;
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning("规格型号不能为空");
return;
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning("计量单位不能为空!");
return;
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning("生产企业不能为空!");
return;
}
if (this.$isBlank(this.newProductData.registerNo)) {
this.$message.warning("注册证号不能为空!");
return;
}
updateProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!");
this.closeAddDialog(true);
} else {
this.$message.error(res.message);
}
}).catch((error) => {
})
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
created() {
this.getBasicThirdSys();
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save