|
|
|
@ -10,10 +10,10 @@ |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="tableParams.customerId" |
|
|
|
placeholder="客户"> |
|
|
|
<el-option v-for="item in form.data['client']" |
|
|
|
:key="item.customerId" |
|
|
|
:label="item.customerName" |
|
|
|
:value="item.customerId"> |
|
|
|
<el-option v-for="item in form.data['customerId']" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -63,7 +63,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" |
|
|
|
@click="commitCode()">上传代码</el-button> |
|
|
|
@click="commitCodeDiaShow('')">上传代码</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -84,25 +84,26 @@ |
|
|
|
- |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<c-dialog :title="commitDia.title" |
|
|
|
<c-dialog :title="'上传代码'" |
|
|
|
:visible="commitDia.visible" |
|
|
|
:showConfirm="false" |
|
|
|
@ok="commitCode" |
|
|
|
@cancel="commitDiaCancel"> |
|
|
|
<commit-form ref="ref_commit_form" |
|
|
|
:optionData="optionData" |
|
|
|
@commitConfirm="commitConfirm"></commit-form> |
|
|
|
</c-dialog> |
|
|
|
|
|
|
|
<c-dialog :title="submitDia.title" |
|
|
|
<c-dialog :title="'提交审核'" |
|
|
|
:visible="submitDia.visible" |
|
|
|
:dialogHeight="1.1" |
|
|
|
@cancel="submitDiaCancel"> |
|
|
|
<submit-form ref="ref_submit_form" |
|
|
|
:codeId="selCodeId" |
|
|
|
:feedbackShow="feedbackShow"></submit-form> |
|
|
|
</c-dialog> |
|
|
|
|
|
|
|
<c-dialog :showFooter="false" |
|
|
|
:title="operDia.title" |
|
|
|
:title="'操作历史'" |
|
|
|
:visible="operDia.visible" |
|
|
|
@cancel="operDiaCancel"> |
|
|
|
<oper-history ref="ref_oper_history"></oper-history> |
|
|
|
@ -110,9 +111,14 @@ |
|
|
|
|
|
|
|
<c-dialog :showFooter="false" |
|
|
|
:title="'二维码'" |
|
|
|
:visible="operDia.visible" |
|
|
|
@cancel="operDiaCancel"> |
|
|
|
<oper-history ref="ref_oper_history"></oper-history> |
|
|
|
:width="40" |
|
|
|
:visible="qrCodeDia.visible" |
|
|
|
@cancel="qrCodeDiaCancel"> |
|
|
|
<div style="text-align:center"> |
|
|
|
<el-image style="width: 300px; height: 300px" |
|
|
|
:src="src"></el-image> |
|
|
|
<div class="el-upload__tip">请用微信扫描二维码</div> |
|
|
|
</div> |
|
|
|
</c-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -128,6 +134,7 @@ export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
loading: false, |
|
|
|
selCodeId: '', // 进行操作的代码id |
|
|
|
// 查询相关 |
|
|
|
tableParams: { |
|
|
|
customerId: '', // 客户 |
|
|
|
@ -137,8 +144,8 @@ export default { |
|
|
|
submitDate: '' // 审核日期 |
|
|
|
}, |
|
|
|
// 列表相关 |
|
|
|
// tableUrl: '/third/code/uploadlist', |
|
|
|
tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/code/uploadlist', |
|
|
|
tableUrl: '/third/code/uploadlist', |
|
|
|
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/code/uploadlist', |
|
|
|
// 列表操作栏的操作项数组 |
|
|
|
operations: [ |
|
|
|
{ |
|
|
|
@ -239,21 +246,23 @@ export default { |
|
|
|
], |
|
|
|
// 上传弹出框相关 |
|
|
|
commitDia: { |
|
|
|
title: '', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
optionData: Object, |
|
|
|
// 审核弹出框相关 |
|
|
|
feedbackShow: false, |
|
|
|
submitDia: { |
|
|
|
title: '', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
// 操作历史弹出框相关 |
|
|
|
operDia: { |
|
|
|
title: '', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
// 二维码弹出框相关 |
|
|
|
qrCodeDia: { |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
src: '', |
|
|
|
// 查询栏下拉框数据 |
|
|
|
form: { |
|
|
|
dataUrl: [], // 下拉框/单选框/复选框等获取数据的url |
|
|
|
@ -310,26 +319,17 @@ export default { |
|
|
|
CDialog, SubmitForm, CommitForm, OperHistory, CTable |
|
|
|
}, |
|
|
|
activated () { |
|
|
|
let params = this.$route.params |
|
|
|
|
|
|
|
// 由客户注册信息跳转来 |
|
|
|
if (params.showCommit) { |
|
|
|
this.commitCodeDiaShow(params.customerId) |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.table.doLayout() // 解决表格错位 |
|
|
|
}) |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
let params = this.$route.params |
|
|
|
// 由客户注册信息跳转来 |
|
|
|
if (params.showCommit) { |
|
|
|
this.commitDia.title = '上传代码' |
|
|
|
this.commitDia.visible = true |
|
|
|
|
|
|
|
let dataForm = { |
|
|
|
clientType: '工作端', |
|
|
|
client: params.name |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['ref_commit_form'].initData(dataForm) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.renderSelData() |
|
|
|
this.loadData() |
|
|
|
}, |
|
|
|
@ -346,24 +346,33 @@ export default { |
|
|
|
this.$refs.table.loadData() // 获取表格数据 |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 上传代码 |
|
|
|
commitCode (id) { |
|
|
|
this.form.data['customerId'] = this.form.data['client'] |
|
|
|
// 打开上传代码窗口 |
|
|
|
commitCodeDiaShow (customerId) { |
|
|
|
// this.form.data['customerId'] = this.form.data['client'] |
|
|
|
this.optionData = this.form.data |
|
|
|
this.commitDia.title = '上传代码' |
|
|
|
this.commitDia.visible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
let dataForm = { |
|
|
|
clientType: 'resi', |
|
|
|
customerId: customerId |
|
|
|
} |
|
|
|
this.$refs['ref_commit_form'].initData(dataForm) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 上传代码 |
|
|
|
async commitCode () { |
|
|
|
// 获取数据 |
|
|
|
await this.$refs['ref_commit_form'].commitCode() |
|
|
|
}, |
|
|
|
// 提交审核 |
|
|
|
submitCode (row) { |
|
|
|
this.selCodeId = row.id |
|
|
|
// if (row.status === 'audit_failed') { |
|
|
|
this.feedbackShow = true |
|
|
|
// } |
|
|
|
|
|
|
|
this.submitDia.title = '提交审核' |
|
|
|
this.submitDia.visible = true |
|
|
|
}, |
|
|
|
submitDiaCancel () { |
|
|
|
this.submitDia.title = '' |
|
|
|
this.submitDia.visible = false |
|
|
|
}, |
|
|
|
// 审核撤回 |
|
|
|
@ -371,8 +380,23 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
// 体验版二维码 |
|
|
|
showQRCode (id) { |
|
|
|
|
|
|
|
showQRCode (row) { |
|
|
|
this.qrCodeDia.visible = true |
|
|
|
const url = '/third/code/qrcode' |
|
|
|
const param = { |
|
|
|
codeId: row.id |
|
|
|
} |
|
|
|
window.app.ajax.exportFilePost(url, param, |
|
|
|
(data, rspMsg) => { |
|
|
|
if (data) { |
|
|
|
// eslint-disable-next-line |
|
|
|
// debugger |
|
|
|
this.src = window.URL.createObjectURL(data.qrcode) |
|
|
|
} |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg) |
|
|
|
}, { headers: { 'Content-Type': 'image/jpeg' } }) |
|
|
|
}, |
|
|
|
// 发布 |
|
|
|
issueCode (id) { |
|
|
|
@ -384,7 +408,6 @@ export default { |
|
|
|
}, |
|
|
|
// 操作历史 |
|
|
|
operHistory (id) { |
|
|
|
this.operDia.title = '操作历史' |
|
|
|
this.operDia.visible = true |
|
|
|
}, |
|
|
|
// 提交审核确定 |
|
|
|
@ -393,37 +416,50 @@ export default { |
|
|
|
this.loadData() |
|
|
|
}, |
|
|
|
commitDiaCancel () { |
|
|
|
this.commitDia.title = '' |
|
|
|
this.$refs['ref_commit_form'].resetData() |
|
|
|
this.commitDia.visible = false |
|
|
|
}, |
|
|
|
operDiaCancel () { |
|
|
|
this.operDia.title = '' |
|
|
|
this.operDia.visible = false |
|
|
|
}, |
|
|
|
renderSelData () { // 渲染下拉框/单选框/复选框等数据 |
|
|
|
this.form.dataUrl = [] |
|
|
|
this.form.dataUrl.push({ // 有效客户 |
|
|
|
key: 'client', // 对应bean.js中对应属性的key |
|
|
|
url: '/oper/crm/customer/getvalidcustomerlist', |
|
|
|
params: {} |
|
|
|
}) |
|
|
|
window.app.ajax.all( // 并发请求全部的渲染数据 |
|
|
|
this.form.dataUrl, |
|
|
|
data => { |
|
|
|
data.forEach((oneData, index) => { // 组织数据 |
|
|
|
var key = this.form.dataUrl[index].key |
|
|
|
this.form.data[key] = oneData |
|
|
|
}) |
|
|
|
qrCodeDiaCancel () { |
|
|
|
this.qrCodeDia.visible = false |
|
|
|
}, |
|
|
|
async renderSelData () { // 渲染下拉框/单选框/复选框等数据 |
|
|
|
const customerUrl = '/third/pacustomer/registerbyauth' |
|
|
|
// const customerUrl = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/pacustomer/registerbyauth' |
|
|
|
const param = { |
|
|
|
initState: 1, |
|
|
|
resiAuth: 1, |
|
|
|
workAuth: 1 |
|
|
|
} |
|
|
|
|
|
|
|
this.form.data['client'].forEach((oneData, index) => { // 组织数据 |
|
|
|
oneData.value = oneData.customerId |
|
|
|
oneData.label = oneData.customerName |
|
|
|
}) |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
await window.app.ajax.post(customerUrl, param, |
|
|
|
(data, rspMsg) => { |
|
|
|
if (data) { |
|
|
|
let customerList = [] |
|
|
|
|
|
|
|
data.forEach(element => { |
|
|
|
let oneObj = { |
|
|
|
value: element.customerId, |
|
|
|
label: element.customerName |
|
|
|
} |
|
|
|
customerList.push(oneObj) |
|
|
|
}) |
|
|
|
|
|
|
|
this.form.data.customerId = customerList |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style> |
|
|
|
.el-upload__tip { |
|
|
|
color: rgb(155, 155, 155); |
|
|
|
} |
|
|
|
</style> |
|
|
|
|