供应商增加码上放心企业信息增加阿里健康需要的信息

dev_unify
qiuyt 8 months ago
parent ac864e1743
commit 8b930c8bf6

@ -61,3 +61,10 @@ export function modifyCustomers(data) {
}
export function restAssuredOnCodeAdd(data) {
return axios({
url: "/salewarehouse/customer/restAssuredOnCodeAdd",
method: "post",
data: data
});
}

@ -179,6 +179,65 @@
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card>
<div>
<span>
码上放心企业信息
</span>
</div>
<div style="float: right; margin-top: -20px">
<el-button
type="primary"
size="mini"
icon="search"
@click="restAssuredOnCodeSave()"
>保存信息
</el-button>
</div>
<el-form
:model="restAssuredOnCodeQuery"
:rules="restAssuredOnCodeRules"
ref="restAssuredOnCodeQuery"
label-width="100px"
>
<el-row
:gutter="20"
class="el-row"
type="flex"
style="margin-top: 25px"
>
<el-col :span="10" class="el-col">
<el-form-item
label="应用Key:"
label-width="150px"
prop="appKey"
>
<el-input
size="small"
v-model="restAssuredOnCodeQuery.appKey"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item
label="应用密文:"
label-width="150px"
prop="appSecret"
>
<el-input
size="small"
v-model="restAssuredOnCodeQuery.appSecret"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<div style="float: right; text-align: right; margin-bottom: 8px">
@ -280,7 +339,8 @@
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
type="index" :label="item.columnDesc"
></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
@ -311,7 +371,8 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}"
>{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
@ -324,8 +385,12 @@
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"
>
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
@ -360,7 +425,8 @@
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}"
>{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
@ -435,31 +501,33 @@
import {
modifyCompany,
addCompany,
getSubCompany,
} from "@/api/supplier/supCompany";
import store from "@/store/index";
import {regionDataPlus, CodeToText} from "element-china-area-data";
getSubCompany
} from '@/api/supplier/supCompany'
import store from '@/store/index'
import { regionDataPlus, CodeToText } from 'element-china-area-data'
import {
filterCompanyCert,
deleteCompanyCert,
updateCompanyCert,
} from "@/api/purchase/companyCert";
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
import draggable from "vuedraggable";
import {getCompany} from "@/api/supplier/company";
import {previewImage} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
updateCompanyCert
} from '@/api/purchase/companyCert'
import companyAddCert from '@/views/purchase/cert/supCertAddDialog'
import supCertSetSelectDialog from '@/views/purchase/cert/supCertSetSelectDialog'
import draggable from 'vuedraggable'
import { getCompany } from '@/api/supplier/company'
import { previewImage } from '@/api/purchase/supCompany'
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
import {
getHead, executeFuc
} from "@/utils/customConfig";
} from '@/utils/customConfig'
import { restAssuredOnCodeAdd } from '@/api/auth/customer'
export default {
name: "supCompanyEdit",
name: 'supCompanyEdit',
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
inputQuery: {},
restAssuredOnCodeQuery:{},
headers: {},
imgViewerVisible: false,
imgList: [],
@ -470,75 +538,91 @@ export default {
companyName: [
{
required: true,
message: "请输入企业名称",
trigger: "blur",
},
message: '请输入企业名称',
trigger: 'blur'
}
],
creditNum: [
{
required: true,
message: "请输入统一社会信用代码",
trigger: "blur",
},
message: '请输入统一社会信用代码',
trigger: 'blur'
}
],
classes: [
{
required: true,
message: "请选择企业类别",
trigger: "change",
},
message: '请选择企业类别',
trigger: 'change'
}
],
area: [
{
required: true,
message: "请选择所属地区",
trigger: "change",
},
message: '请选择所属地区',
trigger: 'change'
}
],
detailAddr: [
{
required: true,
message: "请输入详细地址",
trigger: "change",
},
message: '请输入详细地址',
trigger: 'change'
}
],
contacts: [
{
required: true,
message: "请输入联系人",
trigger: "change",
},
message: '请输入联系人',
trigger: 'change'
}
],
mobile: [
{
required: true,
message: "请输入联系电话",
trigger: "change",
},
message: '请输入联系电话',
trigger: 'change'
}
],
email: [
{
required: true,
message: "请输入邮箱",
trigger: "change",
},
message: '请输入邮箱',
trigger: 'change'
}
],
updateCause: [
{
required: true,
message: "请输入变更原因",
trigger: "change",
message: '请输入变更原因',
trigger: 'change'
}
]
},
restAssuredOnCodeRules:{
appKey: [
{
required: true,
message: '请输入应用Key',
trigger: 'change'
}
],
appSecret: [
{
required: true,
message: '请输入应用密文',
trigger: 'change'
}
]
},
uploadUrl: "",
fileUrl: "",
certFileUrl: "",
url: "http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg",
uploadUrl: '',
fileUrl: '',
certFileUrl: '',
url: 'http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg',
certQuery: {
type: 1,
page: 1,
limit: 20,
limit: 20
},
certList: [],
certTotal: 0,
@ -546,24 +630,24 @@ export default {
addCertVisible: false,
certType: 1,
salesmanQuery: {
name: "",
name: '',
page: 1,
limit: 20,
limit: 20
},
salesmanList: [],
salesmanTotal: 0,
salesmanLoading: false,
addSalesmanVisible: false,
certTypeMap: {
1: "身份证",
1: '身份证'
},
selectLocalVisible: false,
productQuery: {
ylqxzcrbarmc: "",
cpmctymc: "",
ggxh: "",
ylqxzcrbarmc: '',
cpmctymc: '',
ggxh: '',
page: 1,
limit: 20,
limit: 20
},
productList: [],
productTotal: 0,
@ -571,120 +655,127 @@ export default {
uuid: null,
companyApplyUpdateVisible: false,
explainCertVisible: false,
explainMsg: "",
explainMsg: '',
companyEditDisabled: true,
companyEditButtonStr: "编辑",
addType: "1", //1:2.3.
companyEditButtonStr: '编辑',
addType: '1', //1:2.3.
editTye: 1,
checkFlag: {
0: "未认证",
1: "已确认",
2: "已拒绝",
3: "变更未确认",
6: "未确认",
0: '未认证',
1: '已确认',
2: '已拒绝',
3: '变更未确认',
6: '未确认'
},
checkSupFlag: {
0: "未认证",
1: "已认证",
2: "已拒绝",
3: "变更未确认",
6: "待认证",
0: '未认证',
1: '已认证',
2: '已拒绝',
3: '变更未确认',
6: '待认证'
},
statusFlag: {
0: "有效",
1: "失效",
0: '有效',
1: '失效'
},
formName: 1,
formMap: {
1: "新增本企业资质证书",
2: "编辑本企业资质证书",
1: '新增本企业资质证书',
2: '编辑本企业资质证书'
},
selectCertVisible: false,
};
selectCertVisible: false
}
},
created() {
getHead("basicCompany","1").then((re) => {
getHead('basicCompany', '1').then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getCompanyInfo();
});
this.tableObj = re.data
this.tableHeader = re.data.tableList
this.queryList = re.data.queryList
this.fromList = re.data.fromList
this.getCompanyInfo()
})
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
ADMIN_TOKEN: store.getters.token
}
},
// mounted(){
// this.restAssuredOnCodeQuery.appKey = this.inputQuery.alihealthAppKey
// this.restAssuredOnCodeQuery.appSecret = this.inputQuery.alihealthAppSecret
// this.restAssuredOnCodeQuery.refEntId = this.inputQuery.alihealthRefEntId
// },
components: {
draggable,
companyAddCert,
supCertSetSelectDialog,
ElImageViewer,
ElImageViewer
},
methods: {
getCompanyInfo() {
let query = {
customerId: this.$store.getters.customerId,
};
customerId: this.$store.getters.customerId
}
getCompany(query)
.then((response) => {
this.inputQuery = response.data;
this.inputQuery = response.data
if (this.inputQuery.auditStatus == null) {
this.inputQuery.auditStatus = 0;
this.inputQuery.auditStatus = 0
}
this.getCompanyCertList();
this.selectedOptions = this.inputQuery.areaCode.split(",");
this.getCompanyCertList()
this.selectedOptions = this.inputQuery.areaCode.split(',')
})
.catch(() => {
});
})
},
onModifySubmit(val) {
//this.$message.error(val);
var status = this.inputQuery.auditStatus;
var status = this.inputQuery.auditStatus
if (this.editType == 0) {
//
this.$refs["inputQuery"].validate((valid) => {
this.$refs['inputQuery'].validate((valid) => {
if (valid) {
this.$confirm("是否确定提交保存?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确定提交保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.loading = true;
this.inputQuery.auditStatus = val;
this.loading = true
this.inputQuery.auditStatus = val
addCompany(this.inputQuery).then((response) => {
this.loading = false;
this.loading = false
if (response.code === 20000) {
this.$message.success("提交成功");
this.closeDialog();
this.$message.success('提交成功')
this.closeDialog()
} else {
this.$message.error(response.message);
this.inputQuery.auditStatus = status;
this.$message.error(response.message)
this.inputQuery.auditStatus = status
}
});
})
})
.catch(() => {
});
})
} else {
return false;
return false
}
});
})
} else {
//
if (val == 0 && this.inputQuery.auditStatus == 0) {
var str = "是否确定草稿保存?";
var str = '是否确定草稿保存?'
} else if (val == 3 && this.inputQuery.auditStatus == 0) {
var str = "是否确定提交审核?";
var str = '是否确定提交审核?'
} else if (val == 3 && this.inputQuery.auditStatus == 2) {
var str = "企业信息已拒绝审核,是否确认重新提交审核?";
var str = '企业信息已拒绝审核,是否确认重新提交审核?'
} else if (val == 3 && this.inputQuery.auditStatus == 3) {
var str = "企业信息更变未确认,是否确认重新提交审核?";
var str = '企业信息更变未确认,是否确认重新提交审核?'
} else if (val == 6 && this.inputQuery.auditStatus == 1) {
var str = "企业信息已通过审核,是否确认重新提交审核?";
var str = '企业信息已通过审核,是否确认重新提交审核?'
}
// else if (val == 1) {
@ -698,33 +789,33 @@ export default {
// }else {
// var str = "";
// }
this.$refs["inputQuery"].validate((valid) => {
this.$refs['inputQuery'].validate((valid) => {
if (valid) {
this.$confirm(str, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm(str, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.loading = true;
this.inputQuery.auditStatus = val;
this.loading = true
this.inputQuery.auditStatus = val
modifyCompany(this.inputQuery).then((response) => {
this.loading = false;
this.loading = false
if (response.code === 20000) {
this.$message.success("提交成功");
this.closeDialog();
this.$message.success('提交成功')
this.closeDialog()
} else {
this.$message.error(response.message);
this.inputQuery.auditStatus = status;
this.$message.error(response.message)
this.inputQuery.auditStatus = status
}
});
})
})
.catch(() => {
});
})
} else {
return false;
return false
}
});
})
}
},
@ -732,16 +823,16 @@ export default {
},
disableCert(row, status) {
row.status = status;
row.status = status
updateCompanyCert(row).then((response) => {
this.loading = false;
this.loading = false
if (response.code === 20000) {
this.$message.success("更新成功!");
this.getCompanyCertList();
this.$message.success('更新成功!')
this.getCompanyCertList()
} else {
this.$message.error(response.message);
this.$message.error(response.message)
}
});
})
},
showImgViewer(_this, row) {
@ -749,48 +840,48 @@ export default {
// newWindow.document.write(row.filePath)
_this.certFileUrl =
_this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name=";
_this.imgList = [];
'/udiwms/image/register/file/getImage?type=image2&name='
_this.imgList = []
previewImage({
imageUrl: row.filePath,
certFileUrl: this.certFileUrl,
certFileUrl: this.certFileUrl
}).then((response) => {
if (response.code === 20000) {
_this.imgList = response.data;
_this.imgList = response.data
}
console.log(this.imgList);
_this.imgViewerVisible = true;
});
console.log(this.imgList)
_this.imgViewerVisible = true
})
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
e.preventDefault()
}
document.body.style.overflow = 'hidden'
document.addEventListener('touchmove', m, false) //
},
closeImgViewer() {
this.imgViewerVisible = false;
this.imgViewerVisible = false
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "auto";
document.removeEventListener("touchmove", m, true);
e.preventDefault()
}
document.body.style.overflow = 'auto'
document.removeEventListener('touchmove', m, true)
},
cancelDialog() {
this.closeDialog();
this.closeDialog()
},
closeLocalDialog() {
this.addCertVisible = false;
this.selectCertVisible = false;
this.getCompanyInfo();
this.getCompanyCertList();
this.addCertVisible = false
this.selectCertVisible = false
this.getCompanyInfo()
this.getCompanyCertList()
},
handleChange(value) {
this.inputQuery.area =
CodeToText[value[0]] + CodeToText[value[1]] + CodeToText[value[2]];
this.inputQuery.areaCode = value.toString();
CodeToText[value[0]] + CodeToText[value[1]] + CodeToText[value[2]]
this.inputQuery.areaCode = value.toString()
},
addCert(_this, row) {
@ -798,119 +889,155 @@ export default {
_this = this
}
if (_this.$isNotBlank(row)) {
_this.formName = 2;
_this.inputQuery.formData = row;
_this.editTye = 2;
_this.formName = 2
_this.inputQuery.formData = row
_this.editTye = 2
} else {
_this.formName = 1;
_this.inputQuery.formData = {};
_this.editTye = 1;
_this.formName = 1
_this.inputQuery.formData = {}
_this.editTye = 1
}
_this.addCertVisible = true;
_this.addCertVisible = true
},
selectCert() {
this.selectCertVisible = true;
this.selectCertVisible = true
},
toViewCompanyCert(row) {
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath);
'/udiwms/image/register/file/getImage?type=image2&name='
window.open(this.certFileUrl + row.filePath)
},
certHandleCurrentChange(val) {
this.certQuery.page = val.page;
this.getCompanyCertList();
this.certQuery.page = val.page
this.getCompanyCertList()
},
getCompanyCertList() {
this.certLoading = true;
this.certQuery.customerId = this.inputQuery.customerId;
this.certLoading = true
this.certQuery.customerId = this.inputQuery.customerId
filterCompanyCert(this.certQuery)
.then((response) => {
this.certLoading = false;
this.certList = response.data.list || [];
this.certTotal = response.data.total;
this.certLoading = false
this.certList = response.data.list || []
this.certTotal = response.data.total
})
.catch(() => {
this.certLoading = false;
this.certList = [];
});
this.certLoading = false
this.certList = []
})
},
explainCompanyCert(_this, row) {
_this.$confirm(row.auditComment, "拒绝原因", {
confirmButtonText: "确定",
type: "warning",
showCancelButton: false,
_this.$confirm(row.auditComment, '拒绝原因', {
confirmButtonText: '确定',
type: 'warning',
showCancelButton: false
}).then(() => {
});
})
},
deleteCompanyCert(_this, row) {
_this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
_this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
_this.certLoading = true;
_this.certLoading = true
let tquery = {
id: row.id,
filePath: row.filePath,
};
filePath: row.filePath
}
deleteCompanyCert(tquery)
.then((response) => {
_this.certLoading = false;
_this.certLoading = false
if (response.code === 20000) {
_this.getCompanyCertList();
_this.getCompanyCertList()
_this.$message({
type: "success",
message: "删除成功!",
});
type: 'success',
message: '删除成功!'
})
} else {
_this.$message.error(response.message);
_this.$message.error(response.message)
}
})
.catch(() => {
_this.certLoading = false;
});
_this.certLoading = false
})
})
.catch(() => {
});
})
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this,row,type,clickFuc,value);
return executeFuc(this, row, type, clickFuc, value)
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
return eval(expression)
}
return defaultRet;
return defaultRet
},
restAssuredOnCodeSave(){
this.$refs['restAssuredOnCodeQuery'].validate((valid) => {
if (valid) {
this.$confirm('是否确定提交保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.restAssuredOnCodeQuery.customerId = this.inputQuery.customerId
this.restAssuredOnCodeQuery.customerName = this.inputQuery.companyName
restAssuredOnCodeAdd(this.restAssuredOnCodeQuery)
.then((response) => {
if (response.code === 20000) {
this.$message({
type: "success",
message: response.data,
});
} else {
this.$message.warning(response.message);
}
})
.catch(() => {
});
})
.catch(() => {
})
} else {
return false
}
})
}
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
3: "warning",
6: "warning",
};
return statusMap[status];
0: 'warning',
1: 'success',
2: 'danger',
3: 'warning',
6: 'warning'
}
return statusMap[status]
},
statusType(status) {
const statusMap = {
0: "success",
1: "danger",
};
return statusMap[status];
},
},
0: 'success',
1: 'danger'
}
return statusMap[status]
}
}
};
}
</script>
<style>
.itemTag {

Loading…
Cancel
Save