首营功能优化

tagView
anthonywj 3 years ago
parent 54b43356fc
commit 432c5b14aa

@ -1,6 +1,6 @@
{ {
"BASE_URL": "http://192.168.0.109:9906", "BASE_URL": "http://127.0.0.1:9906",
"SERVER_IP": "http://192.168.0.109:9906", "SERVER_IP": "http://127.0.0.1:9906",
"hosp_name": "福建省XX市医院" "hosp_name": "福建省XX市医院"
} }

@ -0,0 +1,11 @@
import axios from "../../utils/axios";
export function filterClassify(query) {
return axios(
{
url: "/spms/classify/code/filter",
method: "get",
params: query
}
);
}

@ -43,10 +43,9 @@
type="primary" type="primary"
size="mini" size="mini"
icon="search" icon="search"
v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2" v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2"
@click="onModifySubmit(4)" @click="onModifySubmit(4)"
>提交变更 >提交审核
</el-button </el-button
> >
</div> </div>
@ -196,10 +195,10 @@
type="text" type="text"
size="small" size="small"
@click.native="addCert(scope.row)" @click.native="addCert(scope.row)"
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
>编辑 >编辑
</el-button </el-button
> >
<!-- v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"-->
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -216,23 +215,23 @@
</el-button </el-button
> >
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
v-if=" scope.row.auditStatus == 1 && scope.row.status==0" <!-- v-if=" scope.row.auditStatus == 1 && scope.row.status==0"-->
@click.native="disableCert(scope.row,1)" <!-- @click.native="disableCert(scope.row,1)"-->
>禁用 <!-- >禁用-->
</el-button <!-- </el-button-->
> <!-- >-->
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
v-if=" scope.row.auditStatus == 1 && scope.row.status==1" <!-- v-if=" scope.row.auditStatus == 1 && scope.row.status==1"-->
@click.native="disableCert(scope.row,0)" <!-- @click.native="disableCert(scope.row,0)"-->
>启用 <!-- >启用-->
</el-button <!-- </el-button-->
> <!-- >-->
</template> </template>
</el-table-column> </el-table-column>
@ -430,12 +429,12 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
statusFlag: { statusFlag: {
0: "正常", 0: "启用",
1: "禁用", 1: "禁用",
}, },
formName: 1, formName: 1,
@ -504,7 +503,7 @@ export default {
} else { // } else { //
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",
@ -651,7 +650,7 @@ export default {
statusType(status) { statusType(status) {
const statusMap = { const statusMap = {
0: "success", 0: "success",
1: "warning", 1: "danger",
}; };
return statusMap[status]; return statusMap[status];
}, },

@ -48,7 +48,7 @@
:header-cell-class-name="cellClass" :header-cell-class-name="cellClass"
@current-change="handleSelectionChange" @current-change="handleSelectionChange"
> >
<el-table-column label width="45"> <el-table-column label width="45">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template> </template>
@ -835,7 +835,7 @@ export default {
}, },
data() { data() {
return { return {
radioCheck:null, radioCheck: null,
filterQuery: { filterQuery: {
customerId: null, customerId: null,
ylqxzcrbarmc: "", ylqxzcrbarmc: "",
@ -898,7 +898,7 @@ export default {
methods: { methods: {
onReset() { onReset() {
this.radioCheck=null; this.radioCheck = null;
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
@ -967,11 +967,11 @@ export default {
}); });
}, },
cellClass(row){ cellClass(row) {
if (row.columnIndex === 0) { if (row.columnIndex === 0) {
return 'disabledCheck' return 'disabledCheck'
} }
}, },
selectExport() { selectExport() {
var selectData = this.multipleSelection; var selectData = this.multipleSelection;
@ -979,7 +979,7 @@ export default {
this.$message.warning("请先选入产品!"); this.$message.warning("请先选入产品!");
return; return;
} }
if (this.repEditQuery.price<0) { if (this.repEditQuery.price < 0) {
this.$message.error("产品价格不能小于0元"); this.$message.error("产品价格不能小于0元");
return; return;
} }
@ -1048,7 +1048,7 @@ export default {
}); });
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.radioCheck=selection.id; this.radioCheck = selection.id;
this.curSelectDi = selection; this.curSelectDi = selection;
if (selection.length > 1) { if (selection.length > 1) {
this.$refs.diList.clearSelection(); this.$refs.diList.clearSelection();
@ -1185,9 +1185,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-table .disabledCheck .cell .el-checkbox .el-checkbox__input{ .el-table .disabledCheck .cell .el-checkbox .el-checkbox__input {
display: none !important; display: none !important;
} }
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;

@ -1,261 +1,265 @@
<template> <template>
<div> <div>
<el-descriptions class="margin-top" title="产品信息" :column="3" :size="size" border> <el-descriptions class="margin-top" title="产品信息" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
产品名称 产品名称
</template> </template>
{{ idQuery.cpmctymc }} {{ idQuery.cpmctymc }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
产品标识 产品标识
</template> </template>
{{ idQuery.nameCode }} {{ idQuery.nameCode }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
批次号 批次号
</template> </template>
{{ idQuery.batchNo }} {{ idQuery.batchNo }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
规格型号 规格型号
</template> </template>
{{ idQuery.ggxh }} {{ idQuery.ggxh }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
生产日期 生产日期
</template> </template>
{{ idQuery.productionDate }} {{ idQuery.productionDate }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
失效日期 失效日期
</template> </template>
{{ idQuery.expireDate }} {{ idQuery.expireDate }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="query.code" placeholder="条码查询"></el-input> <el-input v-model="query.code" placeholder="条码查询"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button type="primary" icon="search" @click="search" <el-button type="primary" icon="search" @click="search"
>查询 >查询
</el-button </el-button
> >
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="codeArry" style="width: 100%"> <el-table v-loading="loading" :data="codeArry" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="条码" label="条码"
prop="originCode" prop="originCode"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column label="单据类型" prop="action" width="150"> <el-table-column label="单据类型" prop="action" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span> <span>{{ getActionName(scope.row.action) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="出入库类型" label="出入库类型"
prop="mainActionStr" prop="mainActionStr"
width="150" width="150"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="入库数量" label="入库数量"
prop="inCount" prop="inCount"
width="150" width="150"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="出库数量" label="出库数量"
prop="outCount" prop="outCount"
width="150" width="150"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="订单日期" label="订单日期"
prop="updateTime" prop="updateTime"
width="150" width="150"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="所属订单" label="所属订单"
prop="orderIdFk" prop="orderIdFk"
width="200" width="200"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
:page-size="query.limit" :page-size="query.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next,total" layout="prev, pager, next,total"
:total="total" :total="total"
:current-page="query.page" :current-page="query.page"
> >
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
import { import {
filterDetailProducts, statDetailProducts filterDetailProducts, statDetailProducts
} from "../../api/inventory/InvPreInProducts"; } from "../../api/inventory/InvPreInProducts";
import store from "../../store"; import store from "../../store";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
export default { export default {
name: "idQuery", name: "idQuery",
props: { props: {
idQuery: { idQuery: {
type: Object, type: Object,
required: true, required: true,
},
}, },
data() { },
return { data() {
query: { return {
batchNo: null, query: {
productIdFk: null, batchNo: null,
customerId: null, productIdFk: null,
page: 1, customerId: null,
limit: 20, page: 1,
}, limit: 20,
codeArry: [], },
total: 0, codeArry: [],
loading: true, total: 0,
index: null, loading: true,
formLoading: false, index: null,
formVisible: false, formLoading: false,
deleteLoading: false, formVisible: false,
orderNo: null, deleteLoading: false,
busTypes: [], orderNo: null,
statData: {}, busTypes: [],
}; statData: {},
};
},
components: {
draggable,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
productIdFk: null,
customerId: null,
page: 1,
limit: 20,
};
this.getCodeList();
}, },
components: { onSubmit() {
draggable, this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
}, },
methods: { handleSizeChange(val) {
onReset() { this.query.limit = val;
this.$router.push({ this.getCodeList();
path: "", },
}); handleCurrentChange(val) {
this.query = { this.query.page = val;
productIdFk: null, this.getCodeList();
customerId: null, },
page: 1, search() {
limit: 20, this.query.page = 1;
}; this.getCodeList();
this.getCodeList(); },
}, getCodeList() {
onSubmit() { this.loading = true;
this.$router.push({ this.query.orderIdFk = this.idQuery.orderIdFk;
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
search() {
this.query.page = 1;
this.getCodeList();
},
getCodeList() {
this.loading = true;
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId;
this.query.invStorageCode = this.idQuery.invStorageCode;
filterDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.codeArry = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getStat() { let query = {
this.query.productIdFk = this.idQuery.relIdFk; orderIdFk: this.idQuery.orderIdFk
this.query.batchNo = this.idQuery.batchNo; }
this.query.customerId = store.getters.customerId; /* this.query.batchNo = this.idQuery.batchNo;
this.query.invStorageCode = this.idQuery.invStorageCode; this.query.supId = this.idQuery.supId;
statDetailProducts(this.query) // this.query.invStorageCode = this.idQuery.invStorageCode;*/
.then((response) => { filterDetailProducts(query) //
this.loading = false; .then((response) => {
this.statData = response.data; this.loading = false;
}) this.codeArry = response.data.list || [];
.catch(() => { this.total = response.data.total || 0;
this.loading = false; })
}); .catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getStat() {
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.customerId = store.getters.customerId;
this.query.invStorageCode = this.idQuery.invStorageCode;
statDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.statData = response.data;
})
.catch(() => {
this.loading = false;
});
}, },
intentBack() { intentBack() {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}}); // this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1); this.$router.go(-1);
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
}, },
filters: {}, getActionName(action) {
mounted() { for (let i = 0; i < this.busTypes.length; i++) {
document.body.ondrop = function (event) { if (this.busTypes[i].action === action) {
event.preventDefault(); return this.busTypes[i].name;
event.stopPropagation(); }
}; }
}, },
created() { getBusType() {
this.getBusType(); let query = {
this.getCodeList(); enabled: true,
this.getStat(); };
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
}, },
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
this.getCodeList();
this.getStat();
},
}; };
</script> </script>

@ -86,14 +86,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip <el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column> width="180"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column> width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup" <el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column> show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="分库" prop="invSubStorageName" v-if="showSup" <el-table-column label="分库" prop="invSubStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column> show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="所属单号" prop="orderIdFk" v-if="showSup"
show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -142,7 +145,7 @@
<script> <script>
import { import {
filterProducts, filterProducts,
deleteProducts,clearAllProducts deleteProducts, clearAllProducts
} from "../../api/inventory/InvPreInProducts"; } from "../../api/inventory/InvPreInProducts";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import codeDetail from "./InvPreInProductsDetail"; import codeDetail from "./InvPreInProductsDetail";
@ -181,7 +184,7 @@ export default {
dialogVisible: false, dialogVisible: false,
deleteLoading: false, deleteLoading: false,
busTypes: [], busTypes: [],
idQuery: null, idQuery: {},
showSup: false, showSup: false,
}; };
}, },
@ -282,14 +285,14 @@ export default {
}, },
clearAll(){ clearAll() {
this.$confirm("此操作将永久清空所有预验收库存信息, 是否继续?", "提示", { this.$confirm("此操作将永久清空所有预验收库存信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let query={id:1}; let query = {id: 1};
clearAllProducts(query) clearAllProducts(query)
.then((response) => { .then((response) => {
@ -335,9 +338,7 @@ export default {
}, },
intentDetail(row) { intentDetail(row) {
this.idQuery = row; this.idQuery = row;
// this.idQuery.supId = null;
this.idQuery.customerId = null; this.idQuery.customerId = null;
this.codeDetailVisible = true; this.codeDetailVisible = true;
}, },

@ -47,6 +47,9 @@
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input> <el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.orderIdFk" placeholder="单据号"></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button
@ -90,27 +93,27 @@
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column> width="120"></el-table-column>
<!-- <el-table-column label="仓库" prop="invStorageName" v-if="showSup"--> <!-- <el-table-column label="仓库" prop="invStorageName" v-if="showSup"-->
<!-- show-overflow-tooltip width="120"></el-table-column>--> <!-- show-overflow-tooltip width="120"></el-table-column>-->
<!-- <el-table-column label="操作" width="120" fixed="right">--> <!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="text"--> <!-- type="text"-->
<!-- size="small"--> <!-- size="small"-->
<!-- @click.native.stop="intentDetail(scope.row)"--> <!-- @click.native.stop="intentDetail(scope.row)"-->
<!-- >详情--> <!-- >详情-->
<!-- </el-button--> <!-- </el-button-->
<!-- >--> <!-- >-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="text"--> <!-- type="text"-->
<!-- size="small"--> <!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"--> <!-- @click.native.stop="deleteDialog(scope.row.id)"-->
<!-- >删除--> <!-- >删除-->
<!-- </el-button--> <!-- </el-button-->
<!-- >--> <!-- >-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
</el-card> </el-card>
@ -140,7 +143,7 @@
<script> <script>
import { import {
filterProducts, filterProducts,
deleteProducts,clearAllProducts deleteProducts, clearAllProducts
} from "../../api/inventory/InvPreInProducts"; } from "../../api/inventory/InvPreInProducts";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import codeDetail from "./InvPreInProductsDetail"; import codeDetail from "./InvPreInProductsDetail";
@ -280,14 +283,14 @@ export default {
}, },
clearAll(){ clearAll() {
this.$confirm("此操作将永久清空所有预验收库存信息, 是否继续?", "提示", { this.$confirm("此操作将永久清空所有预验收库存信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let query={id:1}; let query = {id: 1};
clearAllProducts(query) clearAllProducts(query)
.then((response) => { .then((response) => {

@ -1,144 +1,165 @@
<template> <template>
<div> <div>
<el-form :model="formData" :rules="formRules" ref="dataForm"> <el-form :model="formData" :rules="formRules" ref="dataForm">
<el-card style="margin-top: -30px"> <el-card style="margin-top: -30px">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button <el-button
type="primary" type="primary"
@click.native="submitUpload()" @click.native="submitUpload()"
style="margin: 0 60px 10px auto; height: 35px" style="margin: 0 60px 10px auto; height: 35px"
:loading="loading" :loading="loading"
>提交 >提交
</el-button </el-button
> >
</el-button-group> </el-button-group>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>证书名称</span> <span>证书名称</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="name"> <el-form-item prop="name">
<el-input v-model="formData.name" auto-complete="off"></el-input> <el-input v-model="formData.name" auto-complete="off"
</el-form-item> :disabled="formData.auditStatus == 1"
</el-col> ></el-input>
</el-form-item>
<el-col :span="3"> </el-col>
<div class="ao-text">
<span>证书编号</span> <el-col :span="3">
</div> <div class="ao-text">
</el-col> <span>证书编号</span>
<el-col :span="8"> </div>
<el-form-item prop="name"> </el-col>
<el-input v-model="formData.code" auto-complete="off"></el-input> <el-col :span="8">
</el-form-item> <el-form-item prop="name">
</el-col> <el-input v-model="formData.code" auto-complete="off"
</el-row> :disabled="formData.auditStatus == 1"></el-input>
</el-form-item>
<el-row :gutter="20"> </el-col>
<el-col :span="3"> </el-row>
<div class="ao-text">
<span>有效期</span> <el-row :gutter="20">
</div> <el-col :span="3">
</el-col> <div class="ao-text">
<el-col :span="8"> <span>有效期</span>
<el-form-item prop="vailDate"> </div>
</el-col>
<el-date-picker <el-col :span="8">
v-model="formData.vailDate" <el-form-item prop="vailDate">
type="date"
value-format="yyyy-MM-dd" <el-date-picker
style="width: 100%" v-model="formData.vailDate"
placeholder="请选择有效期"> type="date"
</el-date-picker> :disabled="formData.auditStatus == 1"
</el-form-item> value-format="yyyy-MM-dd"
</el-col> style="width: 100%"
placeholder="请选择有效期">
<el-col :span="3"> </el-date-picker>
<div class="ao-text"> </el-form-item>
<span>失效期</span> </el-col>
</div>
</el-col> <el-col :span="3">
<el-col :span="8"> <div class="ao-text">
<el-form-item prop="expireDate"> <span>失效期</span>
</div>
<el-date-picker </el-col>
v-model="formData.expireDate" <el-col :span="8">
type="date" <el-form-item prop="expireDate">
value-format="yyyy-MM-dd"
style="width: 100%" <el-date-picker
placeholder="请选择失效期"> v-model="formData.expireDate"
</el-date-picker> type="date"
:disabled="formData.auditStatus == 1"
</el-form-item> value-format="yyyy-MM-dd"
</el-col> style="width: 100%"
</el-row> placeholder="请选择失效期">
</el-date-picker>
<el-row :gutter="20"> </el-form-item>
<el-col :span="3"> </el-col>
<div class="ao-text"> </el-row>
<span>备注</span> <el-row :gutter="20">
</div> <el-col :span="3">
</el-col> <div class="ao-text">
<el-col :span="8"> <span>状态</span>
<el-form-item prop="remark"> </div>
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item prop="need">
<el-select v-model="formData.status" style="width: 100%">
<el-col :span="3"> <el-option label="禁用" :value=1></el-option>
<div class="ao-text"> <el-option label="启用" :value=0></el-option>
<span>文件</span> </el-select>
</div> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item>
<el-upload <el-col :span="3">
class="upload-demo" <div class="ao-text">
ref="upload" <span>备注</span>
:action="this.uploadUrl" </div>
:on-preview="uploadHandlePreview" </el-col>
:on-remove="uploadHandleRemove" <el-col :span="8">
:limit="1" <el-form-item prop="remark">
:headers="headers" <el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input>
:on-exceed="uploadHandleExceed" </el-form-item>
accept=".jpg,.png" </el-col>
:on-change="uploadOnchange"
:on-success="uploadHandleSuccess" </el-row>
:on-error="uploadHandleError"
:file-list="fileList" <!-- <el-row :gutter="20">-->
:data="{type:'image2'}" <!-- <el-col :span="4">-->
:auto-upload="false"> <!-- </el-col>-->
<el-button slot="trigger" size="small" type="primary">{{ choiceFile }}</el-button> <!-- <el-col :span="16">-->
<div>只能上传 .jpg,.png 文件且不超过 2 MB</div> <!-- <div style="color: red">-->
</el-upload> <!-- 需要上传档案为营业执照电子档案经营许可证电子档案经营备案证电子档案开户行电子档案-->
<!-- <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"--> <!-- </div>-->
<!-- style="text-align:right"--> <!-- </el-col>-->
<!-- >文件预览--> <!-- </el-row>-->
<!-- </el-button-->
<!-- >--> <el-row :gutter="20">
<el-col :span="3">
</el-form-item> <div class="ao-text">
</el-col> <span>文件</span>
</el-row> </div>
</el-col>
<!-- <el-row :gutter="20">--> <el-col :span="8">
<!-- <el-col :span="4">--> <el-form-item>
<!-- </el-col>--> <el-upload
<!-- <el-col :span="16">--> :disabled="formData.auditStatus == 1"
<!-- <div style="color: red">--> class="upload-demo"
<!-- 需要上传档案为营业执照电子档案经营许可证电子档案经营备案证电子档案开户行电子档案--> ref="upload"
<!-- </div>--> :action="this.uploadUrl"
<!-- </el-col>--> :on-preview="uploadHandlePreview"
<!-- </el-row>--> :on-remove="uploadHandleRemove"
:limit="1"
<el-row :gutter="20"> :headers="headers"
</el-row> :on-exceed="uploadHandleExceed"
</el-card> accept=".jpg,.png"
</el-form> :on-change="uploadOnchange"
</div> :on-success="uploadHandleSuccess"
:on-error="uploadHandleError"
:file-list="fileList"
:data="{type:'image2'}"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }}
</el-button>
<div>只能上传 .jpg,.png 文件且不超过 2 MB</div>
</el-upload>
<!-- <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"-->
<!-- style="text-align:right"-->
<!-- >文件预览-->
<!-- </el-button-->
<!-- >-->
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-form>
</div>
</template> </template>
<script> <script>
@ -147,208 +168,229 @@ import store from "../../store";
import {BASE_URL} from "../../config/app"; import {BASE_URL} from "../../config/app";
import {insertCompanyCert, updateCompanyCert} from "../../api/purchase/companyCert"; import {insertCompanyCert, updateCompanyCert} from "../../api/purchase/companyCert";
import ThrInvWarehouse from "@/views/thrsys/ThrInvWarehouse"; import ThrInvWarehouse from "@/views/thrsys/ThrInvWarehouse";
import {removeRl} from "@/api/basic/udiRelevance";
export default { export default {
name: "supCompanyCertAdd", name: "supCompanyCertAdd",
props: { props: {
closeDialog: { closeDialog: {
type: Function, type: Function,
required: true, required: true,
},
inputQuery: {
type: Object,
required: true,
},
editTye: {
type: Object,//1:2
required: true,
},
addType: {
type: Object,
required: true,
},
}, },
data() { inputQuery: {
return { type: Object,
code: "", required: true,
formData: {
type: 0,
vailDate: null,
expireDate: null,
remark: null,
code: null,
name: null,
manufacturerIdFk: null,
auditStatus: 6
},
formRules: {
name: [
{required: true, message: "电子档名称", trigger: "blur"}
],
},
loading: false,
uploadUrl: "",
fileList: [],
headers: {},
choiceFile: "选取文件",
};
}, },
components: { editTye: {
draggable, type: Object,//1:2
required: true,
}, },
methods: { addType: {
submitUpload() { type: Object,
required: true,
this.$refs["dataForm"].validate(valid => {
if (valid) {
if (this.$isNotBlank(this.formData.filePath)) {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.onSubmit();
}
} else {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.$message.warning(`请选择文件`);
}
}
}
});
},
onSubmit() {
this.loading = true;
this.formData.customerId = this.inputQuery.customerId;
this.formData.type = this.addType;
//1:2.3.
if (this.addType == 2) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerId;
} else if (this.addType == 3) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId;
}
this.formData.auditStatus = "6";
if (this.editTye == 1) {
insertCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
} else {
updateCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
}
},
uploadHandleRemove(file, fileList) {
console.log(file, fileList);
},
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
},
uploadHandleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
uploadOnchange(file, fileList) {
let fileName = file.name;
let uid = file.uid
let pos = fileName.lastIndexOf(".");
let lastName = fileName.substring(pos, fileName.length);
if (lastName.toLowerCase() !== ".jpg" && lastName.toLowerCase() !== ".png") {
this.$message.error("上传文件只能是 .jpg,.png 格式");
for (let i = 0; i < fileList.length; i++) {//list
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
return;
}
//
const isLt = file.size / 1024 / 1024 / 2 <= 1;
if (!isLt) {
this.$message.error("上传文件大小不能超过 2MB");
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
}
return isLt;
},
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
this.formData.filePath = response.data.name;
this.onSubmit();
} else {
this.$message.error("文件上传失败:" + response.message);
}
},
uploadHandleError() {
},
toViewCompanyCert() {
this.certFileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.formData.filePath);
},
}, },
filters: {},
mounted() { },
document.body.ondrop = function (event) { data() {
event.preventDefault(); return {
event.stopPropagation(); code: "",
}; formData: {
type: 0,
vailDate: null,
expireDate: null,
remark: null,
code: null,
name: null,
manufacturerIdFk: null,
auditStatus: 6
},
formRules: {
name: [
{required: true, message: "电子档名称", trigger: "blur"}
],
},
loading: false,
uploadUrl: "",
fileList: [],
headers: {},
choiceFile: "选取文件",
};
},
components: {
draggable,
},
methods: {
submitUpload() {
this.$refs["dataForm"].validate(valid => {
if (valid) {
if (this.formData.auditStatus == 1) {
this.$confirm("该证书已审核通过,是否重新提交审核?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.onConfirmSubmit(1);
})
.catch(() => {
});
} else {
this.onConfirmSubmit();
}
}
});
}, },
created() {
this.uploadUrl = BASE_URL + "/udiwms/upload/register/file"; onConfirmSubmit(val) {
this.headers = { this.formData.repeatUpload = val;
ADMIN_ID: store.getters.adminId, if (this.$isNotBlank(this.formData.filePath)) {
ADMIN_TOKEN: store.getters.token, if (this.$refs.upload.uploadFiles.length > 0) {
}; this.$refs.upload.submit();
if (this.inputQuery.formData == null) { } else {
this.formData = {} this.onSubmit();
} else this.formData = this.inputQuery.formData; }
} else {
if (this.formData.filePath != null) { if (this.$refs.upload.uploadFiles.length > 0) {
this.choiceFile = "更换文件"; this.$refs.upload.submit();
} else { } else {
this.choiceFile = "选取文件"; this.$message.warning(`请选择文件`);
} }
}
},
onSubmit() {
this.loading = true;
this.formData.customerId = this.inputQuery.customerId;
this.formData.type = this.addType;
//1:2.3.
if (this.addType == 2) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerId;
} else if (this.addType == 3) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId;
}
if (this.formData.auditStatus != 1)
this.formData.auditStatus = "6";
if (this.editTye == 1) {
insertCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
} else {
updateCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
}
},
uploadHandleRemove(file, fileList) {
console.log(file, fileList);
},
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
},
uploadHandleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
uploadOnchange(file, fileList) {
let fileName = file.name;
let uid = file.uid
let pos = fileName.lastIndexOf(".");
let lastName = fileName.substring(pos, fileName.length);
if (lastName.toLowerCase() !== ".jpg" && lastName.toLowerCase() !== ".png") {
this.$message.error("上传文件只能是 .jpg,.png 格式");
for (let i = 0; i < fileList.length; i++) {//list
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
return;
}
//
const isLt = file.size / 1024 / 1024 / 2 <= 1;
if (!isLt) {
this.$message.error("上传文件大小不能超过 2MB");
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
}
return isLt;
},
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
this.formData.filePath = response.data.name;
this.onSubmit();
} else {
this.$message.error("文件上传失败:" + response.message);
}
},
uploadHandleError() {
},
toViewCompanyCert() {
this.certFileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.formData.filePath);
}, },
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.uploadUrl = BASE_URL + "/udiwms/upload/register/file";
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
if (this.inputQuery.formData == null) {
this.formData = {}
} else this.formData = this.inputQuery.formData;
if (this.formData.filePath != null) {
this.choiceFile = "更换文件";
} else {
this.choiceFile = "选取文件";
}
},
}; };
</script> </script>
<style> <style>
.ao-text { .ao-text {
width: 100%; width: 100%;
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
float: right; float: right;
text-align: right; text-align: right;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

@ -349,7 +349,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
supCompanyVisible: false, supCompanyVisible: false,

@ -349,7 +349,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
supCompanyVisible: false, supCompanyVisible: false,

@ -57,8 +57,6 @@
<el-form :model="currentSup" :rules="formRules" ref="dataForm"> <el-form :model="currentSup" :rules="formRules" ref="dataForm">
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>证书名称</span> <span>证书名称</span>
@ -77,7 +75,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="require"> <el-form-item prop="need">
<el-select v-model="currentSup.need"> <el-select v-model="currentSup.need">
<el-option label="是" :value=true></el-option> <el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option> <el-option label="否" :value=false></el-option>
@ -132,17 +130,17 @@
<el-table v-loading="loading" :data="manufacturerList" style="width: 100%"> <el-table v-loading="loading" :data="manufacturerList" style="width: 100%">
<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="name"></el-table-column> <el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" s>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="foreign"> <el-table-column label="产地" prop="foreign">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span> <span>{{ foreignMap[scope.row.foreign] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column> <el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="状态" prop="require">
<template slot-scope="scope">
<span>{{ statusMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -177,10 +175,8 @@
v-if="addManufacturerDialogVisible" v-if="addManufacturerDialogVisible"
> >
<el-form :model="currentManufacturer" :rules="formRules" ref="dataForm"> <el-form :model="currentManufacturer" :rules="formManufactureRules" ref="dataManufacturerForm">
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>证书名称</span> <span>证书名称</span>
@ -188,38 +184,38 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="name"> <el-form-item prop="name">
<el-input v-model="currentManufacturer.name" auto-complete="off"></el-input> <el-input v-model="currentManufacturer.name" auto-complete="off"
:disabled="currentManufacturer.need"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>是否必传</span> <span>产地</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="require"> <el-form-item prop="foreign">
<el-select v-model="currentManufacturer.need" style="width: 100%"> <el-select v-model="currentManufacturer.foreign" style="width: 100%"
<el-option label="是" :value=true></el-option> :disabled="currentManufacturer.need">
<el-option label="否" :value=false></el-option> <el-option label="全部" :value="1"></el-option>
<el-option label="国外" :value="2"></el-option>
<el-option label="国内" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>产地</span> <span>是否禁用</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="require"> <el-form-item prop="need">
<el-select v-model="currentManufacturer.foreign" style="width: 100%"> <el-select v-model="currentManufacturer.need" style="width: 100%">
<el-option label="全部" value="1"></el-option> <el-option label="是" :value=true></el-option>
<el-option label="国外" value="2"></el-option> <el-option label="否" :value=false></el-option>
<el-option label="国内" value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -270,11 +266,6 @@
<el-table v-loading="productLoading" :data="productList" style="width: 100%"> <el-table v-loading="productLoading" :data="productList" style="width: 100%">
<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="name"></el-table-column> <el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="need" s>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="imports"> <el-table-column label="产地" prop="imports">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span> <span>{{ foreignMap[scope.row.imports] }}</span>
@ -284,7 +275,16 @@
</el-table-column> </el-table-column>
<el-table-column label="产品类别" prop="hchzsb"> <el-table-column label="产品类别" prop="hchzsb">
</el-table-column> </el-table-column>
<el-table-column label="分类编码" prop="flbm">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column> <el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="状态" prop="need" s>
<template slot-scope="scope">
<span>{{ statusMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -337,14 +337,14 @@
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>是否必传</span> <span>是否禁用</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="require"> <el-form-item prop="need">
<el-select v-model="currentProduct.need" style="width: 100%"> <el-select v-model="currentProduct.need" style="width: 100%">
<el-option label="" :value=true></el-option> <el-option label="禁用" :value=true></el-option>
<el-option label="" :value=false></el-option> <el-option label="启用" :value=false></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -414,6 +414,42 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>分类编码</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-select
v-model="currentProduct.flbmList"
filterable
remote
clearable="true"
style="width: 100%"
multiple
reserve-keyword
placeholder="请选择"
:remote-method="classifySearch"
:loading="loading"
>
<el-option
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddProductSubmit" <el-button type="primary" size="small" icon="search" @click="onAddProductSubmit"
@ -434,6 +470,7 @@
<script> <script>
import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet"; import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet";
import {filterClassify} from "@/api/purchase/classifyCode"
export default { export default {
data() { data() {
@ -459,14 +496,27 @@ export default {
update: "编辑配送企业资质设置", update: "编辑配送企业资质设置",
}, },
/**--------生产企业资质设置 0--------------*/ formRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
],
need: [
{required: true, message: "请选择是否必传", trigger: "blur"}
],
},
/**--------生产企业资质设置 --------------*/
manufacturerList: [], manufacturerList: [],
manufacturerQuery: { manufacturerQuery: {
type: 2, type: 2,
page: 1, page: 1,
limit: 20 limit: 20
}, },
statusMap: {
true: "禁用",
false: "启用",
},
foreignMap: { foreignMap: {
"1": "全部", "1": "全部",
"2": "国外", "2": "国外",
@ -483,6 +533,15 @@ export default {
update: "编辑生产企业资质设置", update: "编辑生产企业资质设置",
}, },
formManufactureRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
],
need: [
{required: true, message: "请选择是否禁用", trigger: "blur"}
],
},
/**--------产品资质设置--------------*/ /**--------产品资质设置--------------*/
productList: [], productList: [],
productQuery: { productQuery: {
@ -500,6 +559,9 @@ export default {
update: "编辑产品资质设置", update: "编辑产品资质设置",
}, },
classifyList: [],
mutilData: [],
inputKey: null,
}; };
}, },
@ -524,6 +586,8 @@ export default {
this.total = 0; this.total = 0;
}); });
}, },
handleEdit(row) { handleEdit(row) {
this.formName = "update"; this.formName = "update";
this.currentSup = row; this.currentSup = row;
@ -547,25 +611,31 @@ export default {
this.addDialogVisible = true; this.addDialogVisible = true;
}, },
onAddSubmit() { onAddSubmit() {
this.addDialogVisible = false; this.$refs["dataForm"].validate(valid => {
if (this.formName == "add") { if (valid) {
this.currentSup.type = 1; this.addDialogVisible = false;
addSupCertSet(this.currentSup) if (this.formName == "add") {
.then((response) => { this.currentSup.type = 1;
this.getList(); addSupCertSet(this.currentSup)
}) .then((response) => {
.catch(() => { this.getList();
}); })
} else { .catch(() => {
modifySupCertSet(this.currentSup).then((res) => { });
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
} else { } else {
this.$message.error(res.message); modifySupCertSet(this.currentSup).then((res) => {
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
} }
}) }
} });
}, },
cancelDialog() { cancelDialog() {
this.addDialogVisible = false; this.addDialogVisible = false;
@ -612,25 +682,31 @@ export default {
this.addManufacturerDialogVisible = true; this.addManufacturerDialogVisible = true;
}, },
onAddManufacturerSubmit() { onAddManufacturerSubmit() {
this.addManufacturerDialogVisible = false;
if (this.formManufacturerName == "add") { this.$refs["dataManufacturerForm"].validate(valid => {
this.currentManufacturer.type = 2; if (valid) {
addSupCertSet(this.currentManufacturer) this.addManufacturerDialogVisible = false;
.then((response) => { if (this.formManufacturerName == "add") {
this.getManufacturerList(); this.currentManufacturer.type = 2;
}) addSupCertSet(this.currentManufacturer)
.catch(() => { .then((response) => {
}); this.getManufacturerList();
} else { })
modifySupCertSet(this.currentManufacturer).then((res) => { .catch(() => {
if (res.code == 20000) { });
this.getManufacturerList();
this.$message.success("保存成功!");
} else { } else {
this.$message.error(res.message); modifySupCertSet(this.currentManufacturer).then((res) => {
if (res.code == 20000) {
this.getManufacturerList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
} }
}) }
} });
}, },
@ -654,6 +730,8 @@ export default {
this.currentProduct = row; this.currentProduct = row;
this.addProductDialogVisible = true; this.addProductDialogVisible = true;
this.classifyFirstSearch(this.currentProduct.flbm);
}, },
handleProductDel(row) { handleProductDel(row) {
let query = { let query = {
@ -672,28 +750,62 @@ export default {
this.addProductDialogVisible = true; this.addProductDialogVisible = true;
}, },
onAddProductSubmit() { onAddProductSubmit() {
this.addProductDialogVisible = false; this.$refs["dataForm"].validate(valid => {
if (this.formProductName == "add") { if (valid) {
this.currentProduct.type = 3; this.addProductDialogVisible = false;
addSupCertSet(this.currentProduct) if (this.formProductName == "add") {
.then((response) => { this.currentProduct.type = 3;
this.getProductList(); addSupCertSet(this.currentProduct)
}) .then((response) => {
.catch(() => { this.getProductList();
}); })
} else { .catch(() => {
modifySupCertSet(this.currentProduct).then((res) => { });
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
} else { } else {
this.$message.error(res.message); modifySupCertSet(this.currentProduct).then((res) => {
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
} }
}) }
} })
}, },
classifyFirstSearch(key) {
let query = {
inFilter: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
classifySearch(key) {
let query = {
key: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {

@ -14,11 +14,34 @@
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<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="name"></el-table-column> <el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" s> <el-table-column label="是否必传" prop="require" v-if="certType == 1">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span> <span>{{ enableMap[scope.row.need] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产地" prop="foreign" v-if="certType == 2">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="imports" v-if="certType == 3">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span>
</template>
</el-table-column>
<el-table-column label="产品类型" prop="cplx" v-if="certType == 3">
</el-table-column>
<el-table-column label="产品类别" prop="hchzsb" v-if="certType == 3">
</el-table-column>
<el-table-column label="分类编码" prop="flbm" v-if="certType == 3">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column> <el-table-column label="说明" prop="remark"></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@ -47,7 +70,7 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
certType: { certType: { //1.2.3)
type: Object, type: Object,
required: true, required: true,
}, },
@ -79,6 +102,12 @@ export default {
list: [], list: [],
total: 0, total: 0,
loading: false, loading: false,
foreignMap: {
"1": "全部",
"2": "国外",
"3": "国内",
},
}; };
}, },
methods: { methods: {

@ -256,7 +256,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
loading: false, loading: false,

@ -155,7 +155,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },

@ -352,7 +352,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
certAuditVisible: false, certAuditVisible: false,

@ -144,7 +144,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },

@ -380,7 +380,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
editTye: 1, editTye: 1,

@ -136,7 +136,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },

@ -163,7 +163,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
loading: false, loading: false,

@ -147,7 +147,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
loading: false, loading: false,

@ -400,7 +400,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
certAuditVisible: false, certAuditVisible: false,

File diff suppressed because it is too large Load Diff

@ -149,7 +149,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
loading: false, loading: false,

@ -176,7 +176,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
list: [], list: [],

@ -160,7 +160,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
list: [], list: [],

@ -420,7 +420,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },

@ -43,7 +43,7 @@
icon="search" icon="search"
v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2" v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2"
@click="onModifySubmit(4)" @click="onModifySubmit(4)"
>提交变更 >提交审核
</el-button </el-button
> >
</div> </div>
@ -104,56 +104,35 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="注册/备案号:" label-width="150px" prop="recordCode"> <el-form-item label="产品通用名称:" label-width="150px" prop="recordProductName">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.recordCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="注册/备案产品名称:" label-width="150px" prop="recordProductName">
<el-input <el-input
size="small" size="small"
disabled
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.recordProductName" v-model="inputQuery.recordProductName"
@input="change()" @input="change()"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="注册/备案人名称:" label-width="150px" prop="recordPeopleName"> <el-form-item label="注册/备案人名称:" label-width="150px" prop="recordPeopleName">
<el-input <el-input
size="small" size="small"
disabled
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.recordPeopleName" v-model="inputQuery.recordPeopleName"
@input="change()" @input="change()"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" class="el-col">
<el-form-item label="代理人名称:" label-width="150px" prop="agentName">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.agentName"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="产品类别:" label-width="150px" prop="hchzsb"> <el-form-item label="产品类别:" label-width="150px" prop="hchzsb">
<el-select <el-select
size="small" size="small"
disabled
v-model="inputQuery.hchzsb" v-model="inputQuery.hchzsb"
placeholder="产品类别" placeholder="产品类别"
style="width: 100%;" style="width: 100%;"
@ -169,6 +148,7 @@
size="small" size="small"
v-model="inputQuery.productType" v-model="inputQuery.productType"
placeholder="器械类别" placeholder="器械类别"
disabled
style="width: 100%;" style="width: 100%;"
> >
<el-option label="器械" value="器械"></el-option> <el-option label="器械" value="器械"></el-option>
@ -180,38 +160,40 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="商品条码:" label-width="150px" prop="sptm"> <el-form-item label="注册/备案号:" label-width="150px" prop="recordCode">
<el-input <el-input
size="small" size="small"
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.sptm" v-model="inputQuery.recordCode"
@input="change()" @input="change()"
></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="ybbm"> <el-form-item label="器械目录分类编码:" label-width="150px" prop="productDirectoryCode">
<el-input <el-input
size="small" size="small"
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.ybbm" disabled
v-model="inputQuery.productDirectoryCode"
@input="change()" @input="change()"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="10" class="el-col">-->
<!-- <el-form-item label="代理人名称:" label-width="150px" prop="agentName">-->
<!-- <el-input-->
<!-- size="small"-->
<!-- placeholder="请输入内容"-->
<!-- v-model="inputQuery.agentName"-->
<!-- @input="change()"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="计量单位:" label-width="150px" prop="measname">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.measname"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="产品描述:" label-width="150px" prop="cpms"> <el-form-item label="产品描述:" label-width="150px" prop="cpms">
<el-input <el-input
@ -222,23 +204,12 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="器械目录分类编码:" label-width="150px" prop="productDirectoryCode">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.productDirectoryCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<el-form-item label="规格型号:" label-width="150px" prop="specification"> <el-form-item label="规格型号:" label-width="150px" prop="specification" >
<el-input <el-input
size="small" size="small"
type="textarea"
autosize
placeholder="请输入内容" placeholder="请输入内容"
v-model="inputQuery.specification" v-model="inputQuery.specification"
@input="change()" @input="change()"
@ -247,6 +218,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col"> <el-col :span="20" class="el-col">
<el-form-item label="备注:" label-width="150px" prop="remark"> <el-form-item label="备注:" label-width="150px" prop="remark">
@ -528,7 +500,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
editTye: 1, editTye: 1,

@ -171,7 +171,7 @@ export default {
0: "草稿", 0: "草稿",
1: "已通过", 1: "已通过",
2: "已拒绝", 2: "已拒绝",
4: "变更未审核", 3: "变更未审核",
6: "未审核", 6: "未审核",
}, },
list: [], list: [],

@ -39,7 +39,7 @@
<el-button-group> <el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button> <el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="combine"></el-button> <el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -54,9 +54,14 @@
@current-change="handleChange" @current-change="handleChange"
ref="multipleTable" ref="multipleTable"
> >
<el-table-column <!-- <el-table-column-->
type="selection" <!-- type="selection"-->
width="55"> <!-- width="55">-->
<!-- </el-table-column>-->
<el-table-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
@ -127,6 +132,21 @@
> >
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog> <udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
</el-dialog> </el-dialog>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form">
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -164,13 +184,13 @@ export default {
erpName: "", erpName: "",
keys: [], keys: [],
}, },
radioCheck: null,
dataList: [], dataList: [],
pageTotal: 1, pageTotal: 1,
total: 1, total: 1,
currentRow: null, currentRow: null,
loading: false, loading: false,
udiRlDetailVisible: false, udiRlDetailVisible: false,
multipleUdiSelection: [],
thirdSys: [], thirdSys: [],
thirdSysFk: null, thirdSysFk: null,
busTypes: [], busTypes: [],
@ -208,6 +228,10 @@ export default {
}, },
orderEditor: false, orderEditor: false,
orderId: "", orderId: "",
currentCert: null,
certList: [],
dialogFormVisible: false,
multipleSelection: null,
}; };
}, },
methods: { methods: {
@ -243,7 +267,9 @@ export default {
this.getList(); this.getList();
}, },
handleChange(val) { handleChange(val) {
this.radioCheck = val.id;
this.currentRow = val; this.currentRow = val;
this.multipleSelection = val
}, },
handleDetailClick(row) { handleDetailClick(row) {
this.currentRow = row; this.currentRow = row;
@ -287,40 +313,59 @@ export default {
intentBack() { intentBack() {
this.closeDialog(); this.closeDialog();
}, },
combine() {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) { confirmSelect() {
if (this.multipleSelection == null) {
this.$message.error('未选择产品'); this.$message.error('未选择产品');
return; return;
} }
let ids = []; let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
},
selection.forEach((obj, index) => { combine() {
let data = { let ids = [];
relId: obj.rlId, let data = {
} relId: this.multipleSelection.rlId,
ids.push(data); }
}); ids.push(data);
this.loading = true; this.loading = true;
let tQuery = { let tQuery = {
datas: ids, datas: ids,
stockOrderLists: this.data.stockOrderLists, stockOrderLists: this.data.stockOrderLists,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
}; };
getStockOrderDetailInstrumentById(tQuery).then((response) => { getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(response.data); this.closeDialog(response.data);
} else { } else {
this.$message.error(response.message); if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val; selectCert() {
if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!");
}
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
}, },
}, },
components: {udiRlDetailDialog}, components: {udiRlDetailDialog},

Loading…
Cancel
Save