<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>资质详情</title>
|
<script src="../../../js/vue/vue.js"></script>
|
<script src="../../../js/vue/element-ui/lib/index.js"></script>
|
<script src="../../../js/vue/axios/dist/axios.min.js"></script>
|
<!-- <script src="../../../js/vue/elementDefault.js"></script> -->
|
<!-- <script src="../../../js/frame.js"></script>
|
<script src="../../../js/foundation.js"></script> -->
|
<script src="../../../js/vue/page.js"></script>
|
<script src="../../../js/myelement.js"></script>
|
<script src="../../../js/common.js"></script>
|
<!-- <script src="../../../data/data.js"></script> -->
|
|
<link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
|
<link href="../../../css/myelement.css" rel="stylesheet">
|
<link href="../../../css/iconfont.css" rel="stylesheet">
|
<link href="../../../css/page.css" rel="stylesheet">
|
<link href="//at.alicdn.com/t/font_2374495_mkoo966o0uo.css" rel="stylesheet">
|
</head>
|
|
<body>
|
<div id="vbody">
|
<div id="page_root">
|
<div ref="popup_body" style="width: 1000px;">
|
<div class="el-dialog__header">
|
<div class="dialog-title">
|
<i class="iconfont icon-customermanagement"></i>
|
<span> {{formAttr.title}} </span>
|
</div>
|
</div>
|
|
<div class="el-dialog__body">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="证照一" name="first">
|
<el-button-group style="margin: 0px 20px;float: right;">
|
<!-- <el-upload action="https://jsonplaceholder.typicode.com/posts/" >
|
</el-upload> -->
|
<!-- <el-button type="primary" @click="showZJDialog('zz1')">点击上传</el-button> -->
|
</el-button-group>
|
<div style="height: 300px;">
|
<div style="width: 50%; float: left;">
|
<!-- <el-image
|
style=" height: 270px"
|
:src="imgUrlsObj.zz1.url"
|
fit="scale-down"
|
:preview-src-list="zz1_list">
|
</el-image> -->
|
|
<el-upload action="#" style="margin-top: 15px;margin-bottom: 15px;"
|
ref="reportUpload1"
|
list-type="picture-card"
|
:file-list="orderForm.zzList"
|
:on-change="(file, fileList) => {uploadFileFun_file(file, fileList)}"
|
:auto-upload="false">
|
<i slot="default" class="el-icon-plus"></i>
|
<div slot="file" slot-scope="{file}">
|
<img class="el-upload-list__item-thumbnail" :src="showThumbnail(file, 'pic')" alt="">
|
<span class="el-upload-list__item-actions">
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
<i class="el-icon-download"></i>
|
</span>
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove_file(file, orderForm.zzList)">
|
<i class="el-icon-delete"></i>
|
</span>
|
</span>
|
</div>
|
</el-upload>
|
|
</div>
|
<div style="width: 49%; float: right; height: 280px; overflow: auto;">
|
<h-form
|
ref="form1"
|
:form-attr="formAttr"
|
:table-fields="formFields1"
|
:form-data="formData1"
|
v-on:show-popup="showPopup"
|
>
|
</h-form>
|
</div>
|
</div>
|
|
|
<div class="el-dialog__footer">
|
<el-button type="default" @click="closeDialog">取 消</el-button>
|
<el-button v-if="notdisabled" type="primary" @click="saveRowTable">保 存</el-button>
|
</div>
|
|
</el-tab-pane>
|
<el-tab-pane label="证照二" name="second">
|
<el-button-group style="margin: 0px 20px;float: right;">
|
<el-upload action="https://jsonplaceholder.typicode.com/posts/" >
|
<el-button type="primary" >点击上传</el-button>
|
</el-upload>
|
</el-button-group>
|
<div style="height: 300px;">
|
<div style="width: 50%; float: left;">
|
<el-image
|
style=" height: 270px"
|
:src="imgUrlsObj.zz2.url"
|
fit="scale-down"
|
:preview-src-list="zz2_list">
|
</el-image>
|
</div>
|
<div style="width: 49%; float: right;">
|
<h-form
|
ref="form2"
|
:form-attr="formAttr"
|
:table-fields="formFields2"
|
:form-data="formData2"
|
v-on:show-popup="showPopup"
|
>
|
</h-form>
|
</div>
|
</div>
|
|
<div class="el-dialog__footer">
|
<el-button type="default" @click="closeDialog">取 消</el-button>
|
<el-button v-if="notdisabled" type="primary" @click="saveRowTable">保 存</el-button>
|
</div>
|
</el-tab-pane>
|
|
|
<el-tab-pane label="证照三" name="third">
|
<el-button-group style="margin: 0px 20px;float: right;">
|
<el-upload action="https://jsonplaceholder.typicode.com/posts/" >
|
<el-button type="primary" >点击上传</el-button>
|
</el-upload>
|
</el-button-group>
|
<div style="height: 300px;">
|
<div style="width: 50%; float: left;">
|
<el-image
|
style=" height: 270px"
|
:src="imgUrlsObj.zz3.url"
|
fit="scale-down"
|
:preview-src-list="zz3_list">
|
</el-image>
|
</div>
|
<div style="width: 49%; float: right;">
|
<h-form
|
ref="form3"
|
:form-attr="formAttr"
|
:table-fields="formFields3"
|
:form-data="formData3"
|
v-on:show-popup="showPopup"
|
>
|
</h-form>
|
</div>
|
</div>
|
|
<div class="el-dialog__footer">
|
<el-button type="default" @click="closeDialog">取 消</el-button>
|
<el-button v-if="notdisabled" type="primary" @click="saveRowTable">保 存</el-button>
|
</div>
|
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</div>
|
|
<el-dialog title="选择" :visible.sync="popupByFieldsDialog" width="80%" top="20px">
|
<div class="topbar-line">
|
<div class="query-icon">
|
<i class="iconfont icon-query"></i>
|
</div>
|
|
<div class="query-bar">
|
<el-form label-position='left' label-width="50px" :inline="true" :model="formInline" class="demo-form-inline">
|
|
<el-form-item label="名称:" style="line-height: 40px;">
|
<el-input size="mini" v-model="formInline.field2" placeholder="请输入" style="width: 140px;"></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button @click="onQuery">查 询</el-button>
|
<el-button @click="onInitQuery">重 置</el-button>
|
</el-form-item>
|
</el-form>
|
</div>
|
</div>
|
<div slot="footer" class="dialog-footer" >
|
<el-button type="default" @click="popupByFieldsDialog = false">取 消</el-button>
|
<el-button type="primary" @click="saveFormValByField">确 定</el-button>
|
</div>
|
</el-dialog>
|
|
|
<el-dialog :loading="dialogLoading" :close-on-click-modal="false" :close-on-press-escape="false"
|
title="上传证件" custom-class="messageDialog_1_1_css" :visible.sync="messageDialog" top="10px" append-to-body>
|
<div>
|
<el-upload v-if="isRefreshwork_report" action="#" style="margin-top: 15px;margin-bottom: 15px;"
|
ref="reportUpload"
|
list-type="picture-card"
|
:file-list="orderForm.zzList"
|
:on-change="(file, fileList) => {uploadFileFun_file(file, fileList)}"
|
:auto-upload="false">
|
<i slot="default" class="el-icon-plus"></i>
|
<div slot="file" slot-scope="{file}">
|
<img class="el-upload-list__item-thumbnail" :src="showThumbnail(file, 'pic')" alt="">
|
<span class="el-upload-list__item-actions">
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
<i class="el-icon-download"></i>
|
</span>
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove_file(file, orderForm.zzList)">
|
<i class="el-icon-delete"></i>
|
</span>
|
</span>
|
</div>
|
</el-upload>
|
</div>
|
</el-dialog>
|
|
</div>
|
|
<div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 100vh;">
|
<div class="spinner">
|
<div class="cube1"></div>
|
<div class="cube2"></div>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
new Vue({
|
el: "#vbody",
|
data: {
|
activeName: 'first',
|
dialogLoading: false,
|
messageDialog: false,
|
isRefreshwork_report: true,
|
|
disabled: false,
|
orderForm: {
|
zzList: []
|
},
|
|
|
role: RootRole,
|
imgUrls: {
|
imgUrl1: "../../../img/Businesslicense.jpg",
|
imgUrl2: "../../../img/Organization.jpg",
|
imgUrl3: "../../../img/Taxregistrationcertificate.jpg",
|
},
|
imgUrlsList: [
|
{id: "1", type: "zz1", url: "../../../img/Businesslicense.jpg"},
|
{id: "2", type: "zz2", url: "../../../img/Organization.jpg"},
|
{id: "3", type: "zz3", url: "../../../img/Taxregistrationcertificate.jpg"},
|
],
|
|
imgUrlsObj:{
|
zz1: {id: "1", type: "zz1", url: "../../../img/Businesslicense.jpg"},
|
zz2: {id: "2", type: "zz2", url: "../../../img/Organization.jpg"},
|
zz3: {id: "3", type: "zz3", url: "../../../img/Taxregistrationcertificate.jpg"}
|
},
|
|
zz1_list: ["../../../img/Businesslicense.jpg"],
|
zz2_list: ["../../../img/Organization.jpg"],
|
zz3_list: ["../../../img/Taxregistrationcertificate.jpg"],
|
|
notdisabled: true,
|
formAttr: {
|
istitle: false,
|
title: "资质详情",
|
columnnumber: 2,
|
labelwidth: "110px",
|
labelposition: "right",
|
size: "medium",
|
border: "0px solid #c6c6c600"
|
},
|
formFields: [
|
{field: "field1", name: "编号", isshow: "T", align: "center", width:"80", required: true},
|
{field: "field2", name: "商业名称", isshow: "T", align: "center", width:"60", required: true},
|
{field: "field12", name: "公司法人", isshow: "T", align: "center", required: true},
|
{field: "field5", name: "类别", isshow: "T", align: "center", width:"140", required: true},
|
{field: "field9", name: "地址", isshow: "T", align: "center"},
|
{field: "field13", name: "资质等级", isshow: "T", align: "center"},
|
],
|
formFields1: [
|
{field: "field1", name: "代码", isshow: "T", align: "center", width:"80", required: true},
|
{field: "field2", name: "机构名称", isshow: "T", align: "center", width:"60", required: true},
|
{field: "field3", name: "机构类型", isshow: "T", align: "center", required: true},
|
{field: "field4", name: "负责人", isshow: "T", align: "center", width:"140", required: true},
|
{field: "field5", name: "地址", isshow: "T", align: "center"},
|
{field: "field6", name: "有效期", isshow: "T", align: "center"},
|
{field: "field7", name: "颁发单位", isshow: "T", align: "center"},
|
{field: "field8", name: "登记号", isshow: "T", align: "center"},
|
],
|
formFields2: [
|
{field: "field1", name: "证书编号", isshow: "T", align: "center"},
|
{field: "field2", name: "企业名称", isshow: "T", align: "center"},
|
{field: "field3", name: "地址", isshow: "T", align: "center"},
|
{field: "field4", name: "认证范围", isshow: "T", align: "center"},
|
{field: "field5", name: "发证机关", isshow: "T", align: "center"},
|
{field: "field6", name: "有效期", isshow: "T", align: "center"},
|
{field: "field7", name: "发证时间", isshow: "T", align: "center"},
|
],
|
formFields3: [
|
{field: "field1", name: "企业名称", isshow: "T", align: "center"},
|
{field: "field2", name: "许可证编号", isshow: "T", align: "center"},
|
{field: "field3", name: "社会信用代码", isshow: "T", align: "center"},
|
{field: "field4", name: "日常监督管理机构", isshow: "T", align: "center"},
|
{field: "field5", name: "注册地址", isshow: "T", align: "center"},
|
{field: "field6", name: "投诉举报电话", isshow: "T", align: "center"},
|
{field: "field7", name: "法定代表人", isshow: "T", align: "center"},
|
{field: "field8", name: "企业负责人", isshow: "T", align: "center"},
|
{field: "field9", name: "质量负责人", isshow: "T", align: "center"},
|
{field: "field10", name: "经营范围", isshow: "T", align: "center"},
|
{field: "field11", name: "经营方式", isshow: "T", align: "center"},
|
{field: "field12", name: "仓库地址", isshow: "T", align: "center"},
|
{field: "field13", name: "发证机关", isshow: "T", align: "center"},
|
{field: "field7", name: "签发人", isshow: "T", align: "center"},
|
{field: "field7", name: "日期", isshow: "T", align: "center"},
|
{field: "field7", name: "有效期", isshow: "T", align: "center"},
|
],
|
formData: {},
|
formData1: {},
|
formData2: {},
|
formData3: {},
|
authorize: {
|
edit: true,
|
},
|
|
|
tableFields: [
|
{field: "field1", name: "备案编号", isshow: "T", type: "input"},
|
{field: "field2", name: "规格", isshow: "T", align: "center", width: "80", type: "input"},
|
{field: "field3", name: "结算价", isshow: "T", align: "center", type: "input"},
|
{field: "field4", name: "开票价", isshow: "T ", align: "center", width: "50", type: "input"},
|
{field: "field5", name: "结算税点", isshow: "T", align: "center", width: "120", type: "input"},
|
{field: "field6", name: "协议保证金", isshow: "T", align: "center", width: "140", type: "input"},
|
{field: "field7", name: "保证金支付方", isshow: "T", align: "center", width: "180", type: "input"},
|
],
|
tableFields1: [
|
{field: "field1", name: "客户代码", isshow: "T", align: "center", required: true},
|
{field: "field2", name: "客户名称", isshow: "T", align: "center", required: true},
|
],
|
tableData_old: [],
|
tableData_new: [],
|
tableData2: [],
|
tableData: [],
|
selectrow: {},
|
|
tableHeight2: 280,
|
urlImg2: "./img/wushuju.png",
|
isEditTableData:true,
|
isWithinEditTableData:false,
|
|
isRefresh: true,
|
selectFormField: {},
|
popupByFieldsDialog: false,
|
|
pagesize: 10,
|
pagenum: 1,
|
total: 0,
|
tableData_cus_new: [],
|
tableData_cus: [],
|
tableData_cus2: [],
|
selectcusrow: {},
|
tableHeight_cus: 280,
|
formInline: {},
|
popupParames: {},
|
},
|
|
created() {
|
this.tableData_new = dataRoot.database.agreementnew;
|
this.tableData_old = clone(dataRoot.database.agreementnew);
|
|
this.tableData_cus_new = dataRoot.database.customer;
|
this.tableData_cus = clone(this.tableData_cus_new);
|
this.popupParames = clone(Root.popupParames);
|
},
|
|
mounted() {
|
if (this.popupParames.sceneCode == "browse") {
|
this.formAttr.disabled = true;
|
this.isEditTableData = false;
|
this.isWithinEditTableData = false;
|
this.notdisabled = false;
|
}
|
if (this.popupParames.data) {
|
this.formData = clone(this.popupParames.data);
|
let result = [];
|
if (this.formData.field4) {
|
result = this.tableData_new.filter(item => {
|
let bo = true;
|
let k_val = this.formData.field4;
|
let bo_ = item.field1.toLowerCase().indexOf(k_val.toLowerCase()) > -1;
|
if (!bo_) {
|
return false;
|
}
|
return bo;
|
});
|
}
|
|
this.tableData2 = result;
|
}
|
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
|
document.getElementById('page_root').style.display = "block";
|
document.getElementById('page_loading').style.display = "none";
|
|
//重新设置弹窗宽高
|
this.$nextTick(function(){
|
let w_ = this.$refs.popup_body.offsetWidth + "px";
|
let h_ = this.$refs.popup_body.offsetHeight - 20 + "px";
|
Root.setPopupWH(w_, h_);
|
})
|
});
|
},
|
|
methods:{
|
handleClick(tab, event) {
|
console.log(tab, event);
|
},
|
closeDialog() {
|
Root.hidePopup();
|
},
|
saveRowTable() {
|
if(this.popupParames.callback) {
|
let obj = {
|
row: this.formData
|
}
|
this.popupParames.callback(obj, function() {
|
Root.hidePopup();
|
});
|
}
|
else {
|
alert("该按键事件缺失!")
|
}
|
},
|
|
doQuery() {
|
let result = [];
|
if (this.formData.field2) {
|
result = this.tableData_new.filter(item => {
|
let bo = true;
|
let k_val = this.formData.field2;
|
let bo_ = item.field1.toLowerCase().indexOf(k_val.toLowerCase()) > -1;
|
if (!bo_) {
|
return false;
|
}
|
return bo;
|
});
|
}
|
this.tableData2 = result;
|
},
|
|
onInitQuery() {
|
this.formInline = {};
|
this.tableData_cus = this.tableData_cus_new;
|
this.onQuery();
|
},
|
|
cellInputChange(scope) {
|
let row = scope.row;
|
let field = scope.column.property;
|
|
this.isRefresh = false;
|
this.$nextTick(function(){
|
this.isRefresh = true;
|
})
|
},
|
onQuery() {
|
this.pagenum = 1;
|
this.doQuery_cus();
|
},
|
getData(page) {
|
this.pagesize = page.pagesize;
|
this.pagenum = page.pagenum;
|
this.doQuery_cus();
|
},
|
doQuery_cus() {
|
let result = this.tableData_cus_new.filter(item => {
|
let bo = true;
|
for(var k in this.formInline) {
|
let k_val = this.formInline[k];
|
let bo_ = item[k].toLowerCase().indexOf(k_val.toLowerCase()) > -1;
|
if (!bo_) {
|
return false;
|
}
|
}
|
return bo;
|
});
|
this.tableData_cus = result;
|
this.getData_cus();
|
},
|
getData_cus() {
|
this.total = this.tableData_cus.length;
|
this.tableData_cus2 = this.tableData_cus.slice((this.pagenum-1)*this.pagesize, this.pagenum * this.pagesize);
|
},
|
rowClickCus(obj) {
|
this.selectcusrow = obj.row;
|
},
|
|
//表单
|
showPopup(obj) {
|
let list=this.customerList;
|
this.selectFormField = obj.obj;
|
this.popupByFieldsDialog = true;
|
this.tableData_cus2 = this.tableData_cus;
|
this.getData_cus();
|
},
|
saveFormValByField() {
|
if (this.selectcusrow != {}) {
|
|
this.popupByFieldsDialog = false;
|
}
|
else {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
})
|
}
|
},
|
|
|
/* 上传 */
|
showZJDialog(type) {
|
this.orderForm = {
|
zzList: []
|
};
|
this.messageDialog = true;
|
},
|
|
uploadFileFun_file(one, fileList, type) {
|
let me = this;
|
//this.orderForm.zzList = [];
|
let formData = new FormData()
|
formData.append("file" , one.raw);
|
formData.append("type" , "EnterpriseLicense");//textCommon
|
uploadFileAnalysis(me, formData, result_ => {
|
console.info(result_);
|
var img_txtList = [];
|
if (result_.data.success && result_.data.data && result_.data.data.parseresult && result_.data.data.parseresult.EnterpriseLicenseInfos) {
|
img_txtList = result_.data.data.parseresult.EnterpriseLicenseInfos;
|
}
|
var formFields1_ = [];
|
var formData1_ = {};
|
for (var i = 0; i<img_txtList.length; i++) {
|
var e = img_txtList[i];
|
var field_ = "field" + i;
|
var formObj_ = {
|
field: field_,
|
name: e.Name,
|
isshow: "T",
|
align: "center"
|
};
|
formFields1_.push(formObj_);
|
formData1_[field_] = e.Value;
|
}
|
me.formFields1 = formFields1_;
|
me.formData1 = formData1_;
|
|
let upload_div = me.$refs.reportUpload1.$el.childNodes[1];//$('.avatar-uploader-cover')[0].childNodes[0];
|
upload_div.style.cssText = "display: none;";//设置目标element的style内容
|
|
/* result_ = result_.data.ids;
|
one.id = result_[0];
|
let ids_ = "";
|
fileList.map(e=>{
|
if(ids_ == "") {
|
ids_ = e.id;
|
}
|
else {
|
ids_ += ";" + e.id;
|
}
|
})
|
|
me.orderForm.zzList = fileList;
|
me.updataFileIdsByTableFieldId(ids_, "pro_order_detail", "work_report", me.orderForm.pod_id, function(result) {
|
me.orderForm.pod_work_report = ids_;
|
}); */
|
|
});
|
},
|
|
showThumbnail(file, type) {
|
if(type == "pic") {
|
return file.url;
|
}
|
if(type == "vid") {
|
return "../../img/thumbnail/file.svg";
|
}
|
if(type == "record") {
|
return "../../img/thumbnail/file.svg";
|
}
|
|
let fileName = file.name;
|
|
let suffix = fileName.split(".").pop().toLowerCase();
|
if ("cad" == suffix) {
|
return "../../img/thumbnail/cad.svg";
|
} else if ("pdf" == suffix) {
|
return "../../img/thumbnail/pdf.svg";
|
} else if (isAssetTypeAnImage(suffix)) {
|
return file.url;
|
} else {
|
return "../../img/thumbnail/file.svg";
|
}
|
|
console.info(file);
|
},
|
|
handleRemove_file(file, fileList) {
|
let me = this;
|
let checkInfo = {};
|
//if(file.id) {
|
let params_del = {
|
ids: file.id
|
}
|
fileList.splice(checkInfo.id, 1);
|
me.orderForm.zzList = fileList;
|
|
let upload_div = me.$refs.reportUpload1.$el.childNodes[1];//$('.avatar-uploader-cover')[0].childNodes[0];
|
upload_div.style.cssText = "display: block;";
|
|
|
/* me.isRefreshwork_report = false;
|
getUrl(me, "file/delFileByIds", params_del, one => {
|
fileList.splice(checkInfo.id, 1);
|
this.$message({
|
showClose: true,
|
message: "删除成功",
|
type: 'success'
|
});
|
var ids_ = "";
|
fileList.map(e=>{
|
if(ids_ == "") {
|
ids_ = e.id;
|
}
|
else {
|
ids_ += ";" + e.id;
|
}
|
})
|
me.orderForm.zzList = fileList;
|
me.orderForm.pod_work_report = ids_;
|
|
me.isRefreshwork_report = true;
|
me.updataFileIdsByTableFieldId(ids_, "pro_order_detail", "work_report", me.orderForm.pod_id, function(result) {
|
me.orderForm.pod_work_report = ids_;
|
});
|
}); */
|
/* }
|
else {
|
fileList.splice(checkInfo.id, 1);
|
this.$message({
|
showClose: true,
|
message: "删除成功",
|
type: 'success'
|
});
|
} */
|
|
},
|
|
|
updataFileIdsByTableFieldId(ids_, tablename, fieldname, id, callback) {
|
/* if (!id) {
|
return
|
}
|
let me = this;
|
let url = "file/updataFileIdsByTableFieldId"
|
let params = {
|
tablename: tablename,
|
fieldname: fieldname,
|
ids: ids_,
|
id: id
|
}
|
getUrl(me, url, params, result => {
|
if (callback) {
|
callback(result);
|
}
|
}) */
|
},
|
|
|
|
|
}
|
});
|
</script>
|
|
<style>
|
.el-input__inner{
|
padding: 0 2px;
|
}
|
|
.el-dialog__body {
|
padding-top: 0px !important;
|
padding-bottom: 0px !important;
|
}
|
</style>
|
|
</body>
|
</html>
|