@@ -208,79 +267,80 @@
border
highlight-current-row
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ type="index" :label="item.columnDesc"
+ >
-
+
@@ -310,8 +370,9 @@
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
-
- {{ item.lableRuleObj[scope.row[item.columnName]] }}
+
+ {{ item.lableRuleObj[scope.row[item.columnName]] }}
-
-
- {{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}
+
+
+ {{
+ item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
+ }}
@@ -360,7 +425,8 @@
:key="item.columnName"
>
- {{ scope.row[item.columnName] }}
+ {{ scope.row[item.columnName] }}
@@ -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";
+ getHead, executeFuc
+} 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 = "是否确定草稿保存?";
- }else if(val == 3 && this.inputQuery.auditStatus == 0) {
- var str = "是否确定提交审核?";
- }else if(val == 3 && this.inputQuery.auditStatus == 2){
- var str = "企业信息已拒绝审核,是否确认重新提交审核?";
- }else if(val == 3 && this.inputQuery.auditStatus == 3){
- var str = "企业信息更变未确认,是否确认重新提交审核?";
- }else if(val ==6 && this.inputQuery.auditStatus == 1){
- var str = "企业信息已通过审核,是否确认重新提交审核?";
+ if (val == 0 && this.inputQuery.auditStatus == 0) {
+ var str = '是否确定草稿保存?'
+ } else if (val == 3 && this.inputQuery.auditStatus == 0) {
+ var str = '是否确定提交审核?'
+ } else if (val == 3 && this.inputQuery.auditStatus == 2) {
+ var str = '企业信息已拒绝审核,是否确认重新提交审核?'
+ } else if (val == 3 && this.inputQuery.auditStatus == 3) {
+ var str = '企业信息更变未确认,是否确认重新提交审核?'
+ } else if (val == 6 && this.inputQuery.auditStatus == 1) {
+ 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,185 +823,221 @@ 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) {
+ showImgViewer(_this, row) {
// let newWindow = window.open();
// 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) {
- if(_this == null){
+ addCert(_this, row) {
+ if (_this == null) {
_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,
+ explainCompanyCert(_this, row) {
+ _this.$confirm(row.auditComment, '拒绝原因', {
+ confirmButtonText: '确定',
+ type: 'warning',
+ showCancelButton: false
}).then(() => {
- });
+ })
},
- deleteCompanyCert(_this,row) {
- _this.$confirm("是否删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
+ deleteCompanyCert(_this, row) {
+ _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);
+ executeFuc(row, type, clickFuc, value) {
+ return executeFuc(this, row, type, clickFuc, value)
},
- executeEval(row,expression,defaultRet){
- if(expression){
- return eval(expression);
+ executeEval(row, expression, defaultRet) {
+ if (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]
+ }
+ }
-};
+}