添加注释

ywj_dev
CTP 2 years ago
parent fdb4ec6be6
commit 4509e12005

@ -1,16 +1,32 @@
<template> <template>
<!-- 单据类型设置 -->
<div> <div>
<el-card> <el-card>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch"> <el-form
:model="filterQuery"
class="query-form"
size="mini"
label-width="100px"
v-show="showSearch"
>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="单据类型:"> <el-form-item class="query-form-item" label="单据类型:">
<el-input v-model="filterQuery.name" placeholder="请输入单据类型" clearable style="width: 90%"></el-input> <el-input
v-model="filterQuery.name"
placeholder="请输入单据类型"
clearable
style="width: 90%"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="出入库类型:"> <el-form-item class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" style="width: 90%" placeholder="请选择出入库类型"> <el-select
v-model="filterQuery.mainAction"
style="width: 90%"
placeholder="请选择出入库类型"
>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option> <el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option> <el-option label="出库" value="WareHouseOut"></el-option>
@ -19,7 +35,11 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="是否启用:"> <el-form-item class="query-form-item" label="是否启用:">
<el-select v-model="filterQuery.enable" style="width: 90%" placeholder="是否启用"> <el-select
v-model="filterQuery.enable"
style="width: 90%"
placeholder="是否启用"
>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="已启用" value="1"></el-option> <el-option label="已启用" value="1"></el-option>
<el-option label="未启用" value="0"></el-option> <el-option label="未启用" value="0"></el-option>
@ -28,7 +48,11 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="仓库类型:"> <el-form-item class="query-form-item" label="仓库类型:">
<el-select v-model="filterQuery.actionType" style="width: 90%" placeholder="请选择仓库类型"> <el-select
v-model="filterQuery.actionType"
style="width: 90%"
placeholder="请选择仓库类型"
>
<el-option label="入账库" :value="1"></el-option> <el-option label="入账库" :value="1"></el-option>
<el-option label="预验收库" :value="2"></el-option> <el-option label="预验收库" :value="2"></el-option>
<el-option label="寄售库" :value="3"></el-option> <el-option label="寄售库" :value="3"></el-option>
@ -38,14 +62,26 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn">
<div class="top-right-btn" >
<el-button-group style="width: 600px"> <el-button-group style="width: 600px">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> >显示/隐藏搜索栏</el-button
<el-button type="primary" icon="el-icon-search" @click="search"></el-button> >
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"
<el-button type="primary" icon="el-icon-download" @click="exportJsonFile"></el-button> >重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="search"
>查询</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"
>新增</el-button
>
<el-button
type="primary"
icon="el-icon-download"
@click="exportJsonFile"
>导出单据类型</el-button
>
<el-upload <el-upload
:action="uploadFileUrl" :action="uploadFileUrl"
multiple multiple
@ -55,13 +91,21 @@
:on-success="handleChange" :on-success="handleChange"
:file-list="fileList" :file-list="fileList"
> >
<el-button icon="el-icon-upload2" type="primary">导入单据类型</el-button> <el-button icon="el-icon-upload2" type="primary"
>导入单据类型</el-button
>
</el-upload> </el-upload>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row> <el-table
v-loading="loading"
:data="list"
style="width: 100%"
border
highlight-current-row
>
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="单据类型" prop="name"></el-table-column> <el-table-column label="单据类型" prop="name"></el-table-column>
<el-table-column label="出入库类型" prop="mainAction"> <el-table-column label="出入库类型" prop="mainAction">
@ -96,17 +140,14 @@
type="text" type="text"
@click.native.stop="handleModifyClick(scope.row)" @click.native.stop="handleModifyClick(scope.row)"
>编辑 >编辑
</el-button </el-button>
>
<el-button <el-button
type="text" type="text"
:disabled="!configParams.typeScan" :disabled="!configParams.typeScan"
@click.native.stop="deleteDialog(scope.row)" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除
</el-button </el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -124,14 +165,9 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- :disabled="!configParams.typeScan"--> <!-- :disabled="!configParams.typeScan"-->
<el-button type="primary" size="small" @click="onAddSubmit" <el-button type="primary" size="small" @click="onAddSubmit"
>提交 >提交
</el-button </el-button>
> <el-button size="small" @click="cancelDialog"> </el-button>
<el-button size="small" @click="cancelDialog"
>取消
</el-button
>
</div> </div>
</el-dialog> </el-dialog>
@ -144,22 +180,31 @@
v-if="modifyDialogVisible" v-if="modifyDialogVisible"
:before-close="cancelDialog" :before-close="cancelDialog"
> >
<modifyDialog :inputQuery="inputQuery" :modifySubmit="onModifySubmit"></modifyDialog> <modifyDialog
<div style="text-align: center;margin-top: 12px"> :inputQuery="inputQuery"
<el-button type="primary" size="small" icon="search" @click="onModifySubmit" :modifySubmit="onModifySubmit"
></modifyDialog>
<div style="text-align: center; margin-top: 12px">
<el-button
type="primary"
size="small"
icon="search"
@click="onModifySubmit"
:disabled="!configParams.typeScan" :disabled="!configParams.typeScan"
>提交 >提交
</el-button </el-button>
> <el-button
<el-button type="primary" size="small" icon="search" @click="cancelDialog" type="primary"
size="small"
icon="search"
@click="cancelDialog"
>取消 >取消
</el-button </el-button>
>
</div> </div>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
@ -169,12 +214,18 @@
</div> </div>
</template> </template>
<script> <script>
import { getBusTypeList, deleteBusType, updateBusType, insertBusType, exportFile } from '@/api/basic/busType' import {
import modifyDialog from './bussinessTypeModify' getBusTypeList,
import axios from 'axios' deleteBusType,
import store from '@/store' updateBusType,
import { findConfig } from '@/api/sync/spsSyncStatus' insertBusType,
import { isBlank } from '@/utils/strUtil' exportFile,
} from "@/api/basic/busType";
import modifyDialog from "./bussinessTypeModify";
import axios from "axios";
import store from "@/store";
import { findConfig } from "@/api/sync/spsSyncStatus";
import { isBlank } from "@/utils/strUtil";
export default { export default {
data() { data() {
@ -182,22 +233,22 @@ export default {
filterQuery: { filterQuery: {
name: null, name: null,
mainAction: null, mainAction: null,
enable: '1', enable: "1",
page: 1, page: 1,
limit: 20 limit: 20,
}, },
showSearch:true, showSearch: true,
addDialogVisible: false, addDialogVisible: false,
modifyDialogVisible: false, modifyDialogVisible: false,
list: [], list: [],
inputQuery: { inputQuery: {
action: '', action: "",
name: '', name: "",
enable: null, enable: null,
remark: '', remark: "",
mainAction: '', mainAction: "",
thirdSysFk: '', thirdSysFk: "",
id: '', id: "",
checkEnable: false, checkEnable: false,
genUnit: false, genUnit: false,
innerOrder: false, innerOrder: false,
@ -260,16 +311,15 @@ export default {
advancePreIn: false, advancePreIn: false,
checkVailDate: 0, // checkVailDate: 0, //
checkExpire: true, // checkExpire: true, //
checkCertExpire: false // checkCertExpire: false, //
}, },
enableMap: { enableMap: {
true: '是', true: "是",
false: '否' false: "否",
}, },
mainActionMap: { mainActionMap: {
WareHouseIn: '入库', WareHouseIn: "入库",
WareHouseOut: '出库' WareHouseOut: "出库",
}, },
fileList: [], fileList: [],
total: 0, total: 0,
@ -277,96 +327,99 @@ export default {
uploadFileUrl: null, uploadFileUrl: null,
headers: {}, headers: {},
configParams: {}, configParams: {},
loading: false loading: false,
};
}
}, },
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: '' path: "",
}) });
this.filterQuery = { this.filterQuery = {
name: null, name: null,
mainAction: null, mainAction: null,
enable: '1', enable: "1",
page: 1, page: 1,
limit: 20 limit: 20,
} };
this.getList() this.getList();
}, },
cancelDialog() { cancelDialog() {
this.modifyDialogVisible = false this.modifyDialogVisible = false;
this.addDialogVisible = false this.addDialogVisible = false;
this.getList() this.getList();
}, },
search() { search() {
this.filterQuery.page = 1 this.filterQuery.page = 1;
this.getList() this.getList();
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
getList() { getList() {
this.loading = true this.loading = true;
getBusTypeList(this.filterQuery) getBusTypeList(this.filterQuery)
.then((response) => { .then((response) => {
console.log("this.filterQuery", this.filterQuery);
console.log("response", response);
if (response.code === 20000) { if (response.code === 20000) {
this.list = response.data.list || [] this.list = response.data.list || [];
this.total = response.data.total || 0 this.total = response.data.total || 0;
} else { } else {
this.$message.error(response.message) this.$message.error(response.message);
} }
this.loading = false this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
this.list = [] this.list = [];
this.total = 0 this.total = 0;
}) });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val this.filterQuery.page = val;
this.getList() this.getList();
}, },
onAddSubmit() { onAddSubmit() {
// //
if (this.inputQuery.corpType == null) { if (this.inputQuery.corpType == null) {
this.inputQuery.corpType = 2 this.inputQuery.corpType = 2;
} }
if (isBlank(this.inputQuery.name)) { if (isBlank(this.inputQuery.name)) {
this.$message.error('单据类型名称不能为空!') this.$message.error("单据类型名称不能为空!");
return return;
} }
if (this.inputQuery.mainAction == '' || this.inputQuery.mainAction == null) { if (
this.$message.error('出入库类型不能为空!') this.inputQuery.mainAction == "" ||
return this.inputQuery.mainAction == null
) {
this.$message.error("出入库类型不能为空!");
return;
} }
if (isBlank(this.inputQuery.name)) { if (isBlank(this.inputQuery.name)) {
this.$message.error('单据类型名称不能为空!') this.$message.error("单据类型名称不能为空!");
return return;
} }
// if (isBlank(this.inputQuery.actionType)) { // if (isBlank(this.inputQuery.actionType)) {
// this.$message.error(""); // this.$message.error("");
// return; // return;
// } // }
if (isBlank(this.inputQuery.inStock)) { if (isBlank(this.inputQuery.inStock)) {
this.$message.error('请选择是否更改库存!') this.$message.error("请选择是否更改库存!");
return return;
} }
if (this.inputQuery.preInBack == 1) { if (this.inputQuery.preInBack == 1) {
if (isBlank(this.inputQuery.backPreinType)) { if (isBlank(this.inputQuery.backPreinType)) {
this.$message.error('请选择预验收剩余库存退库方式!') this.$message.error("请选择预验收剩余库存退库方式!");
return return;
} }
if (isBlank(this.inputQuery.preInBackAction)) { if (isBlank(this.inputQuery.preInBackAction)) {
this.$message.error('请选择预验收退库单据类型!') this.$message.error("请选择预验收退库单据类型!");
return return;
} }
} }
// if (isBlank(this.inputQuery.busType)) { // if (isBlank(this.inputQuery.busType)) {
// this.$message.error(""); // this.$message.error("");
@ -375,39 +428,41 @@ export default {
insertBusType(this.inputQuery) insertBusType(this.inputQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.loading = false this.loading = false;
this.cancelDialog() this.cancelDialog();
this.getList() this.getList();
} else { } else {
this.$message.error(response.message) this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
onModifySubmit() { onModifySubmit() {
if (isBlank(this.inputQuery.name)) { if (isBlank(this.inputQuery.name)) {
this.$message.error('单据类型名称不能为空!') this.$message.error("单据类型名称不能为空!");
return return;
} }
if (this.inputQuery.mainAction == '' || this.inputQuery.mainAction == null) { if (
this.$message.error('出入库类型不能为空!') this.inputQuery.mainAction == "" ||
return this.inputQuery.mainAction == null
) {
this.$message.error("出入库类型不能为空!");
return;
} }
if (isBlank(this.inputQuery.name)) { if (isBlank(this.inputQuery.name)) {
this.$message.error('单据类型名称不能为空!') this.$message.error("单据类型名称不能为空!");
return return;
} }
// if (isBlank(this.inputQuery.actionType)) { // if (isBlank(this.inputQuery.actionType)) {
// this.$message.error(""); // this.$message.error("");
// return; // return;
// } // }
if (isBlank(this.inputQuery.inStock)) { if (isBlank(this.inputQuery.inStock)) {
this.$message.error('请选择是否更改库存!') this.$message.error("请选择是否更改库存!");
return return;
} }
// if (isBlank(this.inputQuery.busType)) { // if (isBlank(this.inputQuery.busType)) {
// this.$message.error(""); // this.$message.error("");
@ -417,48 +472,50 @@ export default {
updateBusType(this.inputQuery) updateBusType(this.inputQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.loading = false this.loading = false;
this.cancelDialog() this.cancelDialog();
this.getList() this.getList();
} else { } else {
this.$message.error(response.message) this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
this.cancelDialog() this.cancelDialog();
}) });
}, },
exportJsonFile() { exportJsonFile() {
exportFile().then((response) => { exportFile()
const binaryData = [] .then((response) => {
binaryData.push(response) const binaryData = [];
binaryData.push(response);
let url = window.URL.createObjectURL( let url = window.URL.createObjectURL(
new Blob(binaryData, { type: 'application/json' }) new Blob(binaryData, { type: "application/json" })
) );
this.loading = false this.loading = false;
const eleLink = document.createElement('a') const eleLink = document.createElement("a");
// var timestamp = "yyyy-MM-dd_hh:mm"; // var timestamp = "yyyy-MM-dd_hh:mm";
eleLink.download = '扫码单据类型导出' + '.json' eleLink.download = "扫码单据类型导出" + ".json";
eleLink.style.display = 'none' eleLink.style.display = "none";
eleLink.href = url eleLink.href = url;
document.body.appendChild(eleLink) document.body.appendChild(eleLink);
eleLink.click() eleLink.click();
document.body.removeChild(eleLink) document.body.removeChild(eleLink);
}).catch(() => {
this.loading = false
}) })
.catch(() => {
this.loading = false;
});
}, },
handleAddClick() { handleAddClick() {
this.inputQuery = { this.inputQuery = {
action: '', action: "",
name: '', name: "",
enable: true, enable: true,
remark: '', remark: "",
mainAction: 'WareHouseIn', mainAction: "WareHouseIn",
thirdSysFk: '', thirdSysFk: "",
id: '', id: "",
checkEnable: false, checkEnable: false,
genUnit: false, genUnit: false,
innerOrder: false, innerOrder: false,
@ -523,87 +580,83 @@ export default {
checkExpire: 2, // checkExpire: 2, //
checkCertExpire: 0, // checkCertExpire: 0, //
backPreinType: 1, backPreinType: 1,
sortNum: 999 sortNum: 999,
} };
this.addDialogVisible = true this.addDialogVisible = true;
}, },
handleModifyClick(row) { handleModifyClick(row) {
this.inputQuery = row this.inputQuery = row;
this.modifyDialogVisible = true this.modifyDialogVisible = true;
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm('此操作将永久删除该扫码类型信息, 是否继续?', '提示', { this.$confirm("此操作将永久删除该扫码类型信息, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}) })
.then(() => { .then(() => {
this.deleteOrders(rowId) this.deleteOrders(rowId);
})
.catch(() => {
}) })
.catch(() => {});
}, },
deleteOrders(data) { deleteOrders(data) {
this.loading = true this.loading = true;
let tquery = { let tquery = {
id: data.id + '' id: data.id + "",
} };
deleteBusType(tquery) deleteBusType(tquery)
.then((response) => { .then((response) => {
this.getList() this.getList();
if (response.code == 20000) { if (response.code == 20000) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '删除成功!' message: "删除成功!",
}) });
} else { } else {
this.$message.error(response.message) this.$message.error(response.message);
} }
})
.catch(() => {
}) })
.catch(() => {});
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message) this.$message.error(response.message);
} else { } else {
this.$message.success(response.data) this.$message.success(response.data);
this.getList() this.getList();
} }
}, },
init() { init() {
this.uploadFileUrl = process.env.VUE_APP_BASE_API + '/udiwms/bussinessType/file/upload' this.uploadFileUrl =
process.env.VUE_APP_BASE_API + "/udiwms/bussinessType/file/upload";
this.headers = { this.headers = {
ADMIN_ID: store.getters.adminId, ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token ADMIN_TOKEN: store.getters.token,
} };
}, },
getSyncConfig() { getSyncConfig() {
findConfig() findConfig()
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.configParams = response.data this.configParams = response.data;
} }
}) })
.catch(() => { .catch(() => {});
})
}
}, },
components: {
modifyDialog
}, },
mounted() { components: {
modifyDialog,
}, },
mounted() {},
created() { created() {
this.init() this.init();
this.getSyncConfig() this.getSyncConfig();
this.getList() this.getList();
} },
} };
</script> </script>
<style scoped> <style scoped>

@ -1,22 +1,40 @@
<template> <template>
<!-- 首营品种资质 -->
<div> <div>
<!---生产企业资质-----> <!---生产企业资质----->
<el-card> <el-card>
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form
:model="filterQuery"
class="query-form"
label-width="100px"
v-show="showSearch"
>
<el-row> <el-row>
<el-col span="6"> <el-col span="6">
<el-form-item label="企业名称:"> <el-form-item label="企业名称:">
<el-input v-model="filterQuery.companyName" style="width: 90%" placeholder="请输入企业名称"></el-input> <el-input
v-model="filterQuery.companyName"
style="width: 90%"
placeholder="请输入企业名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="社会信用号:"> <el-form-item label="社会信用号:">
<el-input v-model="filterQuery.creditCode" style="width: 90%" placeholder="请输入社会信用号"></el-input> <el-input
v-model="filterQuery.creditCode"
style="width: 90%"
placeholder="请输入社会信用号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="处理状态:"> <el-form-item label="处理状态:">
<el-select v-model="filterQuery.auditStatus" style="width: 90%" placeholder="请输入处理状态"> <el-select
v-model="filterQuery.auditStatus"
style="width: 90%"
placeholder="请输入处理状态"
>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="草稿" value="0"></el-option> <el-option label="草稿" value="0"></el-option>
<el-option label="未审核" value="6"></el-option> <el-option label="未审核" value="6"></el-option>
@ -30,21 +48,38 @@
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display: flex">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> >显示/隐藏搜索栏</el-button
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> >
<el-button type="primary" icon="el-icon-plus" @click="addInfoDialog()"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
>查询</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="addInfoDialog()"
>添加</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row v-loading="loading"
@current-change="supManufacturerClick"> :data="list"
style="width: 100%"
border
highlight-current-row
@current-change="supManufacturerClick"
>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="企业名称" prop="companyName" width="250"></el-table-column> <el-table-column
label="企业名称"
prop="companyName"
width="250"
></el-table-column>
<el-table-column label="社会信用号" prop="creditCode"></el-table-column> <el-table-column label="社会信用号" prop="creditCode"></el-table-column>
<el-table-column label="企业类型" prop="bussinessStatus" width="120"> <el-table-column label="企业类型" prop="bussinessStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -52,11 +87,19 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所在地区" prop="placeArea"></el-table-column> <el-table-column label="所在地区" prop="placeArea"></el-table-column>
<el-table-column label="所在地址" prop="placeAddress" :show-overflow-tooltip="true"></el-table-column> <el-table-column
<el-table-column label="所属供应商" prop="supName" show-overflow-tooltip></el-table-column> label="所在地址"
prop="placeAddress"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="所属供应商"
prop="supName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120"> <el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType"> <el-tag :type="scope.row.auditStatus | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }} {{ checkFlag[scope.row.auditStatus] }}
</el-tag> </el-tag>
</template> </template>
@ -64,20 +107,32 @@
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="addInfoDialog(scope.row)">编辑</el-button> <el-button
<el-button type="text" size="small" :disabled="scope.row.auditStatus === 1" type="text"
@click.native.stop="deleteDialog(scope.row)">删除 size="small"
@click.native.stop="addInfoDialog(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.auditStatus === 1"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button> </el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus === 2" <el-button
@click.native.stop="rejectInfo(scope.row)">说明 type="text"
size="small"
v-if="scope.row.auditStatus === 2"
@click.native.stop="rejectInfo(scope.row)"
>说明
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@ -91,7 +146,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="addInfoVisible" v-if="addInfoVisible"
@close='closeDialog' @close="closeDialog"
> >
<suppliersEnterpriseBasicAdd <suppliersEnterpriseBasicAdd
:addCloseDialog="closeDialog" :addCloseDialog="closeDialog"
@ -100,83 +155,139 @@
:fromType="fromType" :fromType="fromType"
></suppliersEnterpriseBasicAdd> ></suppliersEnterpriseBasicAdd>
</el-dialog> </el-dialog>
</el-card> </el-card>
<!---配送企业资质-----> <!---配送企业资质----->
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="registrationQuery" class="query-form" style="margin-top: 5px" v-show="showSearch2" <el-form
label-width="100px"> :model="registrationQuery"
class="query-form"
style="margin-top: 5px"
v-show="showSearch2"
label-width="100px"
>
<el-row> <el-row>
<el-col span="6"> <el-col span="6">
<el-form-item label="物资名称:"> <el-form-item label="物资名称:">
<el-input v-model="registrationQuery.recordProductName" style="width: 90%" clearable <el-input
placeholder="物资名称"></el-input> v-model="registrationQuery.recordProductName"
style="width: 90%"
clearable
placeholder="物资名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="注册备案号:"> <el-form-item label="注册备案号:">
<el-input v-model="registrationQuery.recordCode" style="width: 90%" clearable <el-input
placeholder="注册备案号"></el-input> v-model="registrationQuery.recordCode"
style="width: 90%"
clearable
placeholder="注册备案号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="注册备案人:"> <el-form-item label="注册备案人:">
<el-input v-model="registrationQuery.recordPeopleName" style="width: 90%" clearable <el-input
placeholder="注册备案人"></el-input> v-model="registrationQuery.recordPeopleName"
style="width: 90%"
clearable
placeholder="注册备案人"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display: flex">
<el-button icon="el-icon-view" type="primary" @click="hideSearch2">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch2"
<el-button type="primary" icon="el-icon-refresh" @click="onReset2"></el-button> >显示/隐藏搜索栏</el-button
<el-button type="primary" icon="el-icon-search" @click="onSubmit2"></el-button> >
<el-button type="primary" icon="el-icon-plus" @click="registrationDialog()"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset2"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="onSubmit2"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="registrationDialog()"
>添加</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table
<el-table v-loading="registrationLoading" :data="registrationList" style="width: 100%" border v-loading="registrationLoading"
highlight-current-row> :data="registrationList"
style="width: 100%"
border
highlight-current-row
>
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="注册/备案产品名称" prop="recordProductName" show-overflow-tooltip></el-table-column> <el-table-column
<el-table-column label="注册/备案号" prop="recordCode" show-overflow-tooltip></el-table-column> label="注册/备案产品名称"
<el-table-column label="注册/备案人名称" prop="recordPeopleName" show-overflow-tooltip></el-table-column> prop="recordProductName"
<el-table-column label="生产企业" prop="manufacturerName" show-overflow-tooltip></el-table-column> show-overflow-tooltip
<el-table-column label="所属供应商" prop="supName" show-overflow-tooltip></el-table-column> ></el-table-column>
<el-table-column
label="注册/备案号"
prop="recordCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案人名称"
prop="recordPeopleName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产企业"
prop="manufacturerName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属供应商"
prop="supName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120"> <el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType"> <el-tag :type="scope.row.auditStatus | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }} {{ checkFlag[scope.row.auditStatus] }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="registrationDialog(scope.row)">编辑</el-button> <el-button
<el-button type="text" size="small" :disabled="scope.row.auditStatus === 1" type="text"
@click.native="deleteRegistration(scope.row)">删除 size="small"
@click.native.stop="registrationDialog(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.auditStatus === 1"
@click.native="deleteRegistration(scope.row)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="certTotal>0" v-show="certTotal > 0"
:total="certTotal" :total="certTotal"
:page.sync="registrationQuery.page" :page.sync="registrationQuery.page"
:limit.sync="registrationQuery.limit" :limit.sync="registrationQuery.limit"
@pagination="certHandleCurrentChange" @pagination="certHandleCurrentChange"
></pagination> ></pagination>
<el-dialog <el-dialog
:title="formProductMap[formName]" :title="formProductMap[formName]"
:visible.sync="registrationVisible" :visible.sync="registrationVisible"
@ -184,7 +295,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="registrationVisible" v-if="registrationVisible"
@close='closeProductDialog' @close="closeProductDialog"
> >
<suppliersRegistrationBasic <suppliersRegistrationBasic
:closeRegistrationDialog="closeProductDialog" :closeRegistrationDialog="closeProductDialog"
@ -194,14 +305,20 @@
></suppliersRegistrationBasic> ></suppliersRegistrationBasic>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {deleteCompany, getCompanyList, getCompanyBySup} from "../../../api/purchase/supManufacturer" import {
deleteCompany,
getCompanyList,
getCompanyBySup,
} from "../../../api/purchase/supManufacturer";
import suppliersEnterpriseBasicAdd from "@/views/purchase/manufacturer/supManufacturerEditDialog"; import suppliersEnterpriseBasicAdd from "@/views/purchase/manufacturer/supManufacturerEditDialog";
import {getRegistrationList, deleteRegistration} from "../../../api/purchase/suppliersRegistrationBasic"; import {
getRegistrationList,
deleteRegistration,
} from "../../../api/purchase/suppliersRegistrationBasic";
import suppliersRegistrationBasic from "@/views/purchase/product/supProductEditDialog"; import suppliersRegistrationBasic from "@/views/purchase/product/supProductEditDialog";
export default { export default {
@ -224,7 +341,7 @@ export default {
total: 0, total: 0,
companyTypeMap: { companyTypeMap: {
1: "境内企业", 1: "境内企业",
2: "境外企业" 2: "境外企业",
}, },
productManageTypeMap: { productManageTypeMap: {
1: "Ⅰ类", 1: "Ⅰ类",
@ -243,18 +360,16 @@ export default {
addInfoVisible: false, addInfoVisible: false,
fileUrl: "", fileUrl: "",
inputQuery: { inputQuery: {
auditStatus: 6,
auditStatus: 6
}, },
editType: 1, editType: 1,
fromType: 1,//1:2: fromType: 1, //1:2:
formMap: { formMap: {
add: "新增生产企业资质信息", add: "新增生产企业资质信息",
update: "编辑生产企业资质信息", update: "编辑生产企业资质信息",
}, },
currentManufacturer: null, currentManufacturer: null,
/**------------------配送企业资质--------------------*/ /**------------------配送企业资质--------------------*/
registrationVisible: false, registrationVisible: false,
enterpriseId: "", enterpriseId: "",
@ -266,7 +381,7 @@ export default {
recordCode: "", recordCode: "",
recordPeopleName: "", recordPeopleName: "",
page: 1, page: 1,
limit: 20 limit: 20,
}, },
registrationList: [], registrationList: [],
certTotal: 0, certTotal: 0,
@ -280,7 +395,7 @@ export default {
limit: 10, limit: 10,
}, },
curProductQuery: { curProductQuery: {
auditStatus: 6 auditStatus: 6,
}, },
editProductType: 0, editProductType: 0,
formName: "add", formName: "add",
@ -329,10 +444,10 @@ export default {
this.registrationList = []; this.registrationList = [];
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1 this.filterQuery.page = 1;
this.getList(); this.getList();
this.registrationList = []; this.registrationList = [];
this.currentManufacturer=null; this.currentManufacturer = null;
}, },
toViewRegistrationCert(row, num) { toViewRegistrationCert(row, num) {
let path = num === 1 ? row.filePath : row.instructions; let path = num === 1 ? row.filePath : row.instructions;
@ -340,7 +455,7 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.filterQuery.customerId = this.$store.getters.customerId this.filterQuery.customerId = this.$store.getters.customerId;
getCompanyBySup(this.filterQuery) getCompanyBySup(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
@ -369,7 +484,7 @@ export default {
this.enterpriseId = null; this.enterpriseId = null;
this.editType = 0; this.editType = 0;
this.inputQuery = { this.inputQuery = {
auditStatus: 0 auditStatus: 0,
}; };
} }
@ -384,7 +499,6 @@ export default {
this.registrationList = []; this.registrationList = [];
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.filterQuery.limit = val; this.filterQuery.limit = val;
this.getList(); this.getList();
@ -403,10 +517,7 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
type: "warning", type: "warning",
showCancelButton: false, showCancelButton: false,
}) }).then(() => {});
.then(() => {
});
}, },
deleteDialog(row) { deleteDialog(row) {
@ -423,8 +534,7 @@ export default {
this.getList(); this.getList();
}); });
}) })
.catch(() => { .catch(() => {});
});
}, },
supManufacturerClick(row) { supManufacturerClick(row) {
@ -447,7 +557,7 @@ export default {
recordPeopleName: "", recordPeopleName: "",
auditStatus: null, auditStatus: null,
page: 1, page: 1,
limit: 20 limit: 20,
}; };
this.getRegistrationList(); this.getRegistrationList();
} }
@ -455,7 +565,7 @@ export default {
onSubmit2() { onSubmit2() {
if (this.currentManufacturer == null) { if (this.currentManufacturer == null) {
this.$message.error("请先选中生产企业!"); this.$message.error("请先选中生产企业!");
return return;
} }
this.registrationQuery.page = 1; this.registrationQuery.page = 1;
this.getRegistrationList(); this.getRegistrationList();
@ -463,14 +573,15 @@ export default {
registrationDialog(row) { registrationDialog(row) {
if (this.currentManufacturer == null) { if (this.currentManufacturer == null) {
this.$message.error("请先选中生产企业!"); this.$message.error("请先选中生产企业!");
return return;
} }
if (this.$isNotBlank(row)) { if (this.$isNotBlank(row)) {
this.registrationId = row.id; this.registrationId = row.id;
this.curProductQuery = row; this.curProductQuery = row;
this.curProductQuery.cuStatus = this.currentManufacturer.auditStatus; this.curProductQuery.cuStatus = this.currentManufacturer.auditStatus;
this.curProductQuery.manufacturerId = this.registrationQuery.manufacturerIdFk this.curProductQuery.manufacturerId =
this.registrationQuery.manufacturerIdFk;
this.formName = "update"; this.formName = "update";
this.editProductType = 1; this.editProductType = 1;
} else { } else {
@ -479,7 +590,7 @@ export default {
this.curProductQuery = { this.curProductQuery = {
auditStatus: 0, auditStatus: 0,
cuStatus: this.currentManufacturer.auditStatus, cuStatus: this.currentManufacturer.auditStatus,
manufacturerId: this.registrationQuery.manufacturerIdFk manufacturerId: this.registrationQuery.manufacturerIdFk,
}; };
} }
this.registrationVisible = true; this.registrationVisible = true;
@ -489,7 +600,8 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
this.certLoading = true; this.certLoading = true;
let tQuery = { let tQuery = {
id: row.id, id: row.id,
@ -512,8 +624,8 @@ export default {
.catch(() => { .catch(() => {
this.certLoading = false; this.certLoading = false;
}); });
}).catch(() => { })
}); .catch(() => {});
}, },
closeProductDialog() { closeProductDialog() {
this.registrationVisible = false; this.registrationVisible = false;
@ -541,22 +653,20 @@ export default {
certHandleCurrentChange(val) { certHandleCurrentChange(val) {
this.registrationQuery.page = val.page; this.registrationQuery.page = val.page;
this.getRegistrationList(); this.getRegistrationList();
}
}, },
components: {
suppliersEnterpriseBasicAdd, suppliersRegistrationBasic
}, },
mounted() { components: {
suppliersEnterpriseBasicAdd,
suppliersRegistrationBasic,
}, },
mounted() {},
created() { created() {
this.fileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image4&name="; this.fileUrl =
this.BASE_URL + "/udiwms/image/register/file/getImage?type=image4&name=";
this.getList(); this.getList();
// this.getRegistrationList(); // this.getRegistrationList();
}, },
} };
</script> </script>
<style scoped> <style scoped></style>
</style>

@ -1,4 +1,5 @@
<template> <template>
<!-- 本企业资质页面 -->
<div> <div>
<el-form <el-form
:model="inputQuery" :model="inputQuery"
@ -7,17 +8,16 @@
label-width="100px" label-width="100px"
> >
<el-card class="el-card"> <el-card class="el-card">
<div> <div>
<span> <span>
本企业信息审核状态 本企业信息审核状态
<el-tag :type="(inputQuery.auditStatus) | statusFilterType"> <el-tag :type="inputQuery.auditStatus | statusFilterType">
{{ checkSupFlag[inputQuery.auditStatus] }} {{ checkSupFlag[inputQuery.auditStatus] }}
</el-tag> </el-tag>
</span> </span>
</div> </div>
<div style="float:right ;margin-top: -20px"> <div style="float: right; margin-top: -20px">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@ -25,31 +25,41 @@
v-if="inputQuery.auditStatus == 0" v-if="inputQuery.auditStatus == 0"
@click="onModifySubmit(0)" @click="onModifySubmit(0)"
>草稿保存 >草稿保存
</el-button </el-button>
>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
icon="search" icon="search"
v-if="inputQuery.auditStatus == 0|| inputQuery.auditStatus == 6" v-if="inputQuery.auditStatus == 0 || inputQuery.auditStatus == 6"
@click="onModifySubmit(6)" @click="onModifySubmit(6)"
>提交审核 >提交审核
</el-button </el-button>
>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
icon="search" icon="search"
v-if="inputQuery.auditStatus == 3|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2" v-if="
inputQuery.auditStatus == 3 ||
inputQuery.auditStatus == 1 ||
inputQuery.auditStatus == 2
"
@click="onModifySubmit(3)" @click="onModifySubmit(3)"
>提交审核 >提交审核
</el-button </el-button>
>
</div> </div>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 25px"> <el-row
:gutter="20"
class="el-row"
type="flex"
style="margin-top: 25px"
>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="企业名称:" label-width="150px" prop="companyName"> <el-form-item
label="企业名称:"
label-width="150px"
prop="companyName"
>
<el-input <el-input
size="small" size="small"
splaceholder="请输入内容" splaceholder="请输入内容"
@ -58,7 +68,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="统一社会信用代码:" label-width="150px" prop="creditNum"> <el-form-item
label="统一社会信用代码:"
label-width="150px"
prop="creditNum"
>
<el-input <el-input
size="small" size="small"
splaceholder="请输入内容" splaceholder="请输入内容"
@ -75,9 +89,13 @@
size="small" size="small"
v-model="inputQuery.classes" v-model="inputQuery.classes"
placeholder="企业类别" placeholder="企业类别"
style="width: 100%;" style="width: 100%"
> >
<el-option v-if="classesDisplay" label="医院" value="1"></el-option> <el-option
v-if="classesDisplay"
label="医院"
value="1"
></el-option>
<el-option label="经营企业" value="2"></el-option> <el-option label="经营企业" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -104,12 +122,16 @@
size="small" size="small"
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.contacts" v-model="inputQuery.contacts"
@blur="inputQuery.contacts=$event.target.value.trim()" @blur="inputQuery.contacts = $event.target.value.trim()"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="详细地址:" label-width="150px" prop="detailAddr"> <el-form-item
label="详细地址:"
label-width="150px"
prop="detailAddr"
>
<el-input <el-input
size="small" size="small"
placeholder="请输入内容" placeholder="请输入内容"
@ -140,48 +162,76 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" v-show="inputQuery.auditStatus==2" class="el-row" type="flex" style="margin-top: 0px"> <el-row
:gutter="20"
v-show="inputQuery.auditStatus == 2"
class="el-row"
type="flex"
style="margin-top: 0px"
>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="结果说明:" label-width="150px" prop="mobile"> <el-form-item label="结果说明:" label-width="150px" prop="mobile">
<el-input size="small" v-model="inputQuery.auditComment" disabled></el-input> <el-input
size="small"
v-model="inputQuery.auditComment"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<div style="float: right;text-align: right;margin-bottom: 8px;"> <div style="float: right; text-align: right; margin-bottom: 8px">
<el-button type="primary" size="mini" icon="search" @click="selectCert" <el-button
style="text-align:right" type="primary"
size="mini"
icon="search"
@click="selectCert"
style="text-align: right"
>选入资质证书 >选入资质证书
</el-button </el-button>
>
<el-button type="primary" size="mini" icon="search" @click="addCert()" <el-button
style="text-align:right" type="primary"
size="mini"
icon="search"
@click="addCert()"
style="text-align: right"
>添加资质证书 >添加资质证书
</el-button </el-button>
>
</div> </div>
<el-table v-loading="certLoading" :data="certList" style="width: 100%" border highlight-current-row> <el-table
<el-table-column type="index" label="序号" width="50"></el-table-column> v-loading="certLoading"
:data="certList"
style="width: 100%"
border
highlight-current-row
>
<el-table-column
type="index"
label="序号"
width="50"
></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column> <el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="证书编号" prop="code"></el-table-column> <el-table-column label="证书编号" prop="code"></el-table-column>
<el-table-column label="生效期" prop="vailDate"></el-table-column> <el-table-column label="生效期" prop="vailDate"></el-table-column>
<el-table-column label="失效期" prop="expireDate"></el-table-column> <el-table-column label="失效期" prop="expireDate"></el-table-column>
<el-table-column label="确认状态" prop="auditStatus" width="120"> <el-table-column label="确认状态" prop="auditStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType"> <el-tag :type="scope.row.auditStatus | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }} {{ checkFlag[scope.row.auditStatus] }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="确认说明" prop="auditComment" show-overflow-tooltip></el-table-column> <el-table-column
label="确认说明"
prop="auditComment"
show-overflow-tooltip
></el-table-column>
<el-table-column label="状态" prop="status" width="120"> <el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusType"> <el-tag :type="scope.row.status | statusType">
{{ statusFlag[scope.row.status] }} {{ statusFlag[scope.row.status] }}
</el-tag> </el-tag>
</template> </template>
@ -191,17 +241,48 @@
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native="addCert(scope.row)">编辑</el-button> <el-button
<el-button type="text" size="small" @click.native="showImgViewer(scope.row)">预览</el-button> type="text"
<el-button type="text" size="small" v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6" @click.native="deleteCompanyCert(scope.row)"></el-button> size="small"
<el-button type="text" size="small" v-if="scope.row.auditStatus == 2" @click.native="explainCompanyCert(scope.row)"></el-button> @click.native="addCert(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click.native="showImgViewer(scope.row)"
>预览</el-button
>
<el-button
type="text"
size="small"
v-if="
scope.row.auditStatus == 0 ||
scope.row.auditStatus == 2 ||
scope.row.auditStatus == 6
"
@click.native="deleteCompanyCert(scope.row)"
>删除</el-button
>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus == 2"
@click.native="explainCompanyCert(scope.row)"
>说明</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/> <el-image-viewer
v-if="imgViewerVisible"
style="z-index: 9999"
:on-close="closeImgViewer"
:url-list="imgList"
/>
<pagination <pagination
v-show="certTotal>0" v-show="certTotal > 0"
:total="certTotal" :total="certTotal"
:limit.sync="certQuery.limit" :limit.sync="certQuery.limit"
:page.sync="certQuery.page" :page.sync="certQuery.page"
@ -209,7 +290,6 @@
></pagination> ></pagination>
</el-card> </el-card>
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:visible.sync="addCertVisible" :visible.sync="addCertVisible"
@ -218,7 +298,7 @@
width="60%" width="60%"
v-if="addCertVisible" v-if="addCertVisible"
append-to-body append-to-body
@close='closeLocalDialog' @close="closeLocalDialog"
> >
<companyAddCert <companyAddCert
:closeDialog="closeLocalDialog" :closeDialog="closeLocalDialog"
@ -228,7 +308,6 @@
></companyAddCert> ></companyAddCert>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="选入资质证书" title="选入资质证书"
:visible.sync="selectCertVisible" :visible.sync="selectCertVisible"
@ -237,7 +316,7 @@
width="60%" width="60%"
v-if="selectCertVisible" v-if="selectCertVisible"
append-to-body append-to-body
@close='closeLocalDialog' @close="closeLocalDialog"
> >
<supCertSetSelectDialog <supCertSetSelectDialog
:certType="certType" :certType="certType"
@ -257,34 +336,39 @@
> >
<el-form-item label="拒绝原因:"><el-input v-model="explainMsg" placeholder="请输入内容"></el-input></el-form-item> <el-form-item label="拒绝原因:"><el-input v-model="explainMsg" placeholder="请输入内容"></el-input></el-form-item>
</el-dialog> --> </el-dialog> -->
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import {modifyCompany, addCompany, getSubCompany} from "@/api/supplier/supCompany"; import {
modifyCompany,
addCompany,
getSubCompany,
} from "@/api/supplier/supCompany";
import store from "@/store/index"; import store from "@/store/index";
import {regionDataPlus, CodeToText,} from "element-china-area-data"; import { regionDataPlus, CodeToText } from "element-china-area-data";
import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert"; import {
filterCompanyCert,
deleteCompanyCert,
updateCompanyCert,
} from "@/api/purchase/companyCert";
import companyAddCert from "@/views/purchase/cert/supCertAddDialog"; import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog"; import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {getCompany} from "@/api/supplier/company"; import { getCompany } from "@/api/supplier/company";
import { previewImage } from '@/api/purchase/supCompany'; import { previewImage } from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default { export default {
name: "supCompanyEdit", name: "supCompanyEdit",
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
inputQuery: {}, inputQuery: {},
headers: {}, headers: {},
imgViewerVisible:false, imgViewerVisible: false,
imgList:[], imgList: [],
classesDisplay: false, classesDisplay: false,
selectedOptions: [], selectedOptions: [],
options: regionDataPlus, options: regionDataPlus,
@ -293,74 +377,74 @@ export default {
{ {
required: true, required: true,
message: "请输入企业名称", message: "请输入企业名称",
trigger: "blur" trigger: "blur",
} },
], ],
creditNum: [ creditNum: [
{ {
required: true, required: true,
message: "请输入统一社会信用代码", message: "请输入统一社会信用代码",
trigger: "blur" trigger: "blur",
} },
], ],
classes: [ classes: [
{ {
required: true, required: true,
message: "请选择企业类别", message: "请选择企业类别",
trigger: "change" trigger: "change",
} },
], ],
area: [ area: [
{ {
required: true, required: true,
message: "请选择所属地区", message: "请选择所属地区",
trigger: "change" trigger: "change",
} },
], ],
detailAddr: [ detailAddr: [
{ {
required: true, required: true,
message: "请输入详细地址", message: "请输入详细地址",
trigger: "change" trigger: "change",
} },
], ],
contacts: [ contacts: [
{ {
required: true, required: true,
message: "请输入联系人", message: "请输入联系人",
trigger: "change" trigger: "change",
} },
], ],
mobile: [ mobile: [
{ {
required: true, required: true,
message: "请输入联系电话", message: "请输入联系电话",
trigger: "change" trigger: "change",
} },
], ],
email: [ email: [
{ {
required: true, required: true,
message: "请输入邮箱", message: "请输入邮箱",
trigger: "change" trigger: "change",
} },
], ],
updateCause: [ updateCause: [
{ {
required: true, required: true,
message: "请输入变更原因", message: "请输入变更原因",
trigger: "change" trigger: "change",
} },
], ],
}, },
uploadUrl: "", uploadUrl: "",
fileUrl: "", fileUrl: "",
certFileUrl: "", certFileUrl: "",
url: 'http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg', url: "http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg",
certQuery: { certQuery: {
type: 1, type: 1,
page: 1, page: 1,
limit: 20 limit: 20,
}, },
certList: [], certList: [],
certTotal: 0, certTotal: 0,
@ -370,14 +454,14 @@ export default {
salesmanQuery: { salesmanQuery: {
name: "", name: "",
page: 1, page: 1,
limit: 20 limit: 20,
}, },
salesmanList: [], salesmanList: [],
salesmanTotal: 0, salesmanTotal: 0,
salesmanLoading: false, salesmanLoading: false,
addSalesmanVisible: false, addSalesmanVisible: false,
certTypeMap: { certTypeMap: {
1: '身份证' 1: "身份证",
}, },
selectLocalVisible: false, selectLocalVisible: false,
productQuery: { productQuery: {
@ -385,7 +469,7 @@ export default {
cpmctymc: "", cpmctymc: "",
ggxh: "", ggxh: "",
page: 1, page: 1,
limit: 20 limit: 20,
}, },
productList: [], productList: [],
productTotal: 0, productTotal: 0,
@ -393,7 +477,7 @@ export default {
uuid: null, uuid: null,
companyApplyUpdateVisible: false, companyApplyUpdateVisible: false,
explainCertVisible: false, explainCertVisible: false,
explainMsg: '', explainMsg: "",
companyEditDisabled: true, companyEditDisabled: true,
companyEditButtonStr: "编辑", companyEditButtonStr: "编辑",
addType: "1", //1:2.3. addType: "1", //1:2.3.
@ -432,13 +516,16 @@ export default {
}; };
}, },
components: { components: {
draggable, companyAddCert, supCertSetSelectDialog, ElImageViewer draggable,
companyAddCert,
supCertSetSelectDialog,
ElImageViewer,
}, },
methods: { methods: {
getCompanyInfo() { getCompanyInfo() {
let query = { let query = {
customerId: this.$store.getters.customerId customerId: this.$store.getters.customerId,
} };
getCompany(query) getCompany(query)
.then((response) => { .then((response) => {
this.inputQuery = response.data; this.inputQuery = response.data;
@ -448,24 +535,25 @@ export default {
this.getCompanyCertList(); this.getCompanyCertList();
this.selectedOptions = this.inputQuery.areaCode.split(","); this.selectedOptions = this.inputQuery.areaCode.split(",");
}) })
.catch(() => { .catch(() => {});
});
}, },
onModifySubmit(val) { onModifySubmit(val) {
var status = this.inputQuery.auditStatus; var status = this.inputQuery.auditStatus;
if (this.editType == 0) { // if (this.editType == 0) {
//
this.$refs["inputQuery"].validate(valid => { this.$refs["inputQuery"].validate((valid) => {
if (valid) { if (valid) {
this.$confirm("是否确定提交保存?", "提示", { this.$confirm("是否确定提交保存?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
this.loading = true; this.loading = true;
this.inputQuery.auditStatus = val; this.inputQuery.auditStatus = val;
addCompany(this.inputQuery).then(response => { addCompany(this.inputQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功"); this.$message.success("提交成功");
@ -475,13 +563,14 @@ export default {
this.inputQuery.auditStatus = status; this.inputQuery.auditStatus = status;
} }
}); });
}).catch(() => { })
}); .catch(() => {});
} else { } else {
return false; return false;
} }
}); });
} else { // } else {
//
if (val == 0) { if (val == 0) {
var str = "是否确定草稿保存?"; var str = "是否确定草稿保存?";
} else if (val == 6) { } else if (val == 6) {
@ -489,16 +578,17 @@ export default {
} else { } else {
var str = "企业信息已通过审核,是否确认重新提交审核?"; var str = "企业信息已通过审核,是否确认重新提交审核?";
} }
this.$refs["inputQuery"].validate(valid => { this.$refs["inputQuery"].validate((valid) => {
if (valid) { if (valid) {
this.$confirm(str, "提示", { this.$confirm(str, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
this.loading = true; this.loading = true;
this.inputQuery.auditStatus = val; this.inputQuery.auditStatus = val;
modifyCompany(this.inputQuery).then(response => { modifyCompany(this.inputQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功"); this.$message.success("提交成功");
@ -508,8 +598,8 @@ export default {
this.inputQuery.auditStatus = status; this.inputQuery.auditStatus = status;
} }
}); });
}).catch(() => { })
}); .catch(() => {});
} else { } else {
return false; return false;
} }
@ -517,13 +607,11 @@ export default {
} }
}, },
onAuditSubmit() { onAuditSubmit() {},
},
disableCert(row, status) { disableCert(row, status) {
row.status = status; row.status = status;
updateCompanyCert(row).then(response => { updateCompanyCert(row).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("更新成功!"); this.$message.success("更新成功!");
@ -532,27 +620,35 @@ export default {
this.$message.error(response.message); this.$message.error(response.message);
} }
}); });
}, },
showImgViewer(row){ showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl =
this.imgList=[]; this.BASE_URL +
previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
previewImage({
imageUrl: row.filePath,
certFileUrl: this.certFileUrl,
}).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.imgList=response.data; this.imgList = response.data;
} }
console.log(this.imgList) console.log(this.imgList);
this.imgViewerVisible = true; this.imgViewerVisible = true;
}); });
const m = (e) => { e.preventDefault() }; const m = (e) => {
document.body.style.overflow = 'hidden'; e.preventDefault();
};
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
}, },
closeImgViewer(){ closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() }; const m = (e) => {
document.body.style.overflow = 'auto'; e.preventDefault();
};
document.body.style.overflow = "auto";
document.removeEventListener("touchmove", m, true); document.removeEventListener("touchmove", m, true);
}, },
@ -575,7 +671,7 @@ export default {
addCert(row) { addCert(row) {
if (this.$isNotBlank(row)) { if (this.$isNotBlank(row)) {
this.formName = 2 this.formName = 2;
this.inputQuery.formData = row; this.inputQuery.formData = row;
this.editTye = 2; this.editTye = 2;
} else { } else {
@ -591,7 +687,9 @@ export default {
}, },
toViewCompanyCert(row) { toViewCompanyCert(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath); window.open(this.certFileUrl + row.filePath);
}, },
@ -605,7 +703,6 @@ export default {
this.certQuery.customerId = this.inputQuery.customerId; this.certQuery.customerId = this.inputQuery.customerId;
filterCompanyCert(this.certQuery) filterCompanyCert(this.certQuery)
.then((response) => { .then((response) => {
this.certLoading = false; this.certLoading = false;
this.certList = response.data.list || []; this.certList = response.data.list || [];
this.certTotal = response.data.total; this.certTotal = response.data.total;
@ -620,17 +717,15 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
type: "warning", type: "warning",
showCancelButton: false, showCancelButton: false,
}).then(() => { }).then(() => {});
});
}, },
deleteCompanyCert(row) { deleteCompanyCert(row) {
this.$confirm("是否删除?", "提示", { this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
this.certLoading = true; this.certLoading = true;
let tquery = { let tquery = {
id: row.id, id: row.id,
@ -652,10 +747,9 @@ export default {
.catch(() => { .catch(() => {
this.certLoading = false; this.certLoading = false;
}); });
}).catch(() => { })
}); .catch(() => {});
}, },
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
@ -669,7 +763,6 @@ export default {
return statusMap[status]; return statusMap[status];
}, },
statusType(status) { statusType(status) {
const statusMap = { const statusMap = {
0: "success", 0: "success",
@ -677,8 +770,6 @@ export default {
}; };
return statusMap[status]; return statusMap[status];
}, },
}, },
}; };
</script> </script>

@ -1,38 +1,59 @@
<template> <template>
<!-- 物资入院申请 -->
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" label-width="100px" v-show="showSearch"> <el-form :model="filterQuery" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="DI产品标识:"> <el-form-item label="DI产品标识:">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入DI产品标识" clearable <el-input
v-model="filterQuery.code"
style="width: 90%"
placeholder="请输入DI产品标识"
clearable
@keyup.enter.native="keyupErp_submit($event)" @keyup.enter.native="keyupErp_submit($event)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="物资名称:"> <el-form-item label="物资名称:">
<el-input v-model="filterQuery.name" style="width: 90%" clearable placeholder="请输入物资名称"></el-input> <el-input
v-model="filterQuery.name"
style="width: 90%"
clearable
placeholder="请输入物资名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="规格型号:"> <el-form-item label="规格型号:">
<el-input v-model="filterQuery.spec" style="width: 90%" clearable placeholder="请输入规格型号"></el-input> <el-input
v-model="filterQuery.spec"
style="width: 90%"
clearable
placeholder="请输入规格型号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="注册证编号:"> <el-form-item label="注册证编号:">
<el-input v-model="filterQuery.registerNo" style="width: 90%" clearable <el-input
placeholder="请输入注册证编号"></el-input> v-model="filterQuery.registerNo"
style="width: 90%"
clearable
placeholder="请输入注册证编号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="审核状态:"> <el-form-item label="审核状态:">
<el-select v-model="filterQuery.checkStatus" style="width: 90%" placeholder="请选择审核状态"> <el-select
v-model="filterQuery.checkStatus"
style="width: 90%"
placeholder="请选择审核状态"
>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="已审核" value="2"></el-option> <el-option label="已审核" value="2"></el-option>
<el-option label="未审核" value="1"></el-option> <el-option label="未审核" value="1"></el-option>
@ -43,25 +64,66 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display: flex">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> >显示/隐藏搜索栏</el-button
<el-button type="primary" icon="el-icon-search" @click="search"></el-button> >
<el-button type="primary" icon="el-icon-plus" @click="addDiProductVisible=true">DI</el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true"></el-button> >重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="search"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="addDiProductVisible = true"
>选入DI信息</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="addProductVisible = true"
>添加院内字典</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="list" style="width: 100%" v-loading="loading" border highlight-current-row="true"> <el-table
:data="list"
style="width: 100%"
v-loading="loading"
border
highlight-current-row="true"
>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="code" show-overflow-tooltip></el-table-column> <el-table-column
<el-table-column label="物资名称" prop="name" show-overflow-tooltip></el-table-column> label="产品标识"
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> prop="code"
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> show-overflow-tooltip
<el-table-column label="注册证编号" prop="registerNo" show-overflow-tooltip></el-table-column> ></el-table-column>
<el-table-column
label="物资名称"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="医疗器械注册人"
prop="ylqxzcrbarmc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册证编号"
prop="registerNo"
show-overflow-tooltip
></el-table-column>
<el-table-column label="审核状态" prop="status" show-overflow-tooltip> <el-table-column label="审核状态" prop="status" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ checkMap[scope.row.status] }}</span> <span>{{ checkMap[scope.row.status] }}</span>
@ -69,23 +131,28 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="detail(scope.row)"></el-button> <el-button type="text" size="small" @click="detail(scope.row)"
<el-button type="text" size="small" :disabled="scope.row.status ==2" @click="deleteProduct(scope.row.id)"> >详情</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.status == 2"
@click="deleteProduct(scope.row.id)"
>
删除 删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-dialog <el-dialog
@ -133,10 +200,7 @@
append-to-body append-to-body
v-if="detailDialog" v-if="detailDialog"
> >
<selectDiDetail <selectDiDetail :editQuery="diDetails" :remark="delect.remark">
:editQuery="diDetails"
:remark="delect.remark"
>
</selectDiDetail> </selectDiDetail>
</el-dialog> </el-dialog>
@ -148,20 +212,20 @@
width="80%" width="80%"
v-if="thrProductsDetailVisible" v-if="thrProductsDetailVisible"
> >
<thrProductsDetail <thrProductsDetail :data="thisDetail"></thrProductsDetail>
:data="thisDetail"
></thrProductsDetail>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {
import {getThrDiProducts, delThrDiProducts, getDiProductDetail} from '@/api/supplier/supProductsAddDi' getThrDiProducts,
import thrAddDiProductSelectUdi from '@/views/supplier/products/supAddDiProductSelectUdi' delThrDiProducts,
import thrAddProductSelectUdi from '@/views/supplier/products/supProductsAdd' getDiProductDetail,
import selectDiDetail from './selectDIDetailDialog' } from "@/api/supplier/supProductsAddDi";
import thrProductsDetail from '@/views/supplier/products/supProductsDetail' import thrAddDiProductSelectUdi from "@/views/supplier/products/supAddDiProductSelectUdi";
import thrAddProductSelectUdi from "@/views/supplier/products/supProductsAdd";
import selectDiDetail from "./selectDIDetailDialog";
import thrProductsDetail from "@/views/supplier/products/supProductsDetail";
export default { export default {
data() { data() {
@ -176,11 +240,11 @@ export default {
manufactory: null, manufactory: null,
checkStatus: null, checkStatus: null,
page: 1, page: 1,
limit: 20 limit: 20,
}, },
total: 0, total: 0,
thirdSys: [], thirdSys: [],
delect:null, delect: null,
thirdSysDetail: null, thirdSysDetail: null,
list: [], list: [],
addDiProductVisible: false, addDiProductVisible: false,
@ -193,25 +257,25 @@ export default {
thisData: { thisData: {
nameCode: null, nameCode: null,
cpmctymc: null, cpmctymc: null,
ggxh: null ggxh: null,
}, },
loading: false, loading: false,
checkMap: { checkMap: {
1: '未审核', 1: "未审核",
2: '已审核', 2: "已审核",
3: '未通过' 3: "未通过",
}, },
curRow: null, curRow: null,
diDetails: null, diDetails: null,
detailDialog: false detailDialog: false,
} };
}, },
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: '' path: "",
}) });
this.filterQuery = { this.filterQuery = {
code: null, code: null,
spec: null, spec: null,
@ -220,55 +284,55 @@ export default {
checkStatus: null, checkStatus: null,
name: null, name: null,
page: 1, page: 1,
limit: 20 limit: 20,
} };
this.getList() this.getList();
}, },
search() { search() {
this.filterQuery.page = 1 this.filterQuery.page = 1;
this.getList() this.getList();
}, },
checDialog(row) { checDialog(row) {
this.checkVisible = true this.checkVisible = true;
this.curRow = row this.curRow = row;
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
getList() { getList() {
this.loading = true this.loading = true;
getThrDiProducts(this.filterQuery) getThrDiProducts(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || [] this.list = response.data.list || [];
this.total = response.data.total || 0 this.total = response.data.total || 0;
} else { } else {
this.$message.error(response.message) this.$message.error(response.message);
} }
this.loading = false this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
this.list = [] this.list = [];
this.total = 0 this.total = 0;
}) });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page this.filterQuery.page = val.page;
this.getList() this.getList();
}, },
detail(row) { detail(row) {
if (row.type == 1) { if (row.type == 1) {
let query = {uuid: row.uuid} let query = { uuid: row.uuid };
getDiProductDetail(query).then((res) => { getDiProductDetail(query).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.delect=row; this.delect = row;
this.diDetails = res.data this.diDetails = res.data;
this.detailDialog = true this.detailDialog = true;
} else { } else {
this.$message.error('参数错误') this.$message.error("参数错误");
} }
}) });
} else { } else {
this.thisDetail = row; this.thisDetail = row;
this.thrProductsDetailVisible = true; this.thrProductsDetailVisible = true;
@ -276,38 +340,40 @@ export default {
}, },
deleteProduct(id) { deleteProduct(id) {
let query = { let query = {
id: id id: id,
} };
delThrDiProducts(query).then((res) => { delThrDiProducts(query).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.$message.success('删除成功') this.$message.success("删除成功");
this.getList() this.getList();
} else { } else {
this.$message.error('删除失败') this.$message.error("删除失败");
} }
}) });
}, },
closeDialog() { closeDialog() {
this.selectErpDialogVisible = false this.selectErpDialogVisible = false;
this.selectLocalVisible = false this.selectLocalVisible = false;
this.selectVersionVisible = false this.selectVersionVisible = false;
this.addProductVisible = false this.addProductVisible = false;
this.getList(); this.getList();
}, },
closeUdi(val) { closeUdi(val) {
this.addDiProductVisible = false this.addDiProductVisible = false;
if (val) { if (val) {
this.getList() this.getList();
}
} }
}, },
components: {
thrAddDiProductSelectUdi, selectDiDetail, thrAddProductSelectUdi, thrProductsDetail
}, },
mounted() { components: {
thrAddDiProductSelectUdi,
selectDiDetail,
thrAddProductSelectUdi,
thrProductsDetail,
}, },
mounted() {},
created() { created() {
this.getList() this.getList();
} },
} };
</script> </script>

@ -1,4 +1,5 @@
<template> <template>
<!-- 运行参数设置 -->
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
@ -186,7 +187,7 @@ export default {
} else { } else {
callback(); callback();
} }
}else{ } else {
callback(); callback();
} }
}; };
@ -252,6 +253,10 @@ export default {
this.loading = true; this.loading = true;
systemParamConfigList(this.query) systemParamConfigList(this.query)
.then((response) => { .then((response) => {
console.log("response", response);
console.log("this.query", this.query);
console.log("this.query.page", this.query.page);
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
@ -351,4 +356,3 @@ export default {
}, },
}; };
</script> </script>

Loading…
Cancel
Save