|
|
|
@ -181,7 +181,7 @@ |
|
|
|
<span v-if="scope.row.status == 0">待审核</span> |
|
|
|
<span v-else-if="scope.row.status == 1 || scope.row.status == 4">已通过</span> |
|
|
|
<span v-else-if="scope.row.status == 2">已驳回</span> |
|
|
|
<span v-else-if="scope.row.status == 3">已撤回</span> |
|
|
|
<span v-else-if="scope.row.status == 5">已撤回</span> |
|
|
|
<span v-else></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -190,14 +190,14 @@ |
|
|
|
<span v-if="kefu && scope.row.status == 4" style="color: #FA5A1E;" |
|
|
|
@click="openRecall('refund')">退款</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 1" style="color: #2741DE;">待填写手续费</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 3" style="color: #2741DE;" |
|
|
|
<span v-else-if="kefu && scope.row.status == 5" style="color: #2741DE;" |
|
|
|
@click="openAddForm(scope.row)">编辑</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 0" style="color: #FA5A1E;" |
|
|
|
@click="openRecall('recall')">撤回</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 2" style="color: #FA5A1E;" |
|
|
|
@click="openRejectReason(scope.row.rejectReason)">查看驳回理由</span> |
|
|
|
<span v-else-if="activeTab == 'wait' && !kefu" style="color: #2741DE;" |
|
|
|
@click="openAuditForm">审核</span> |
|
|
|
@click="openAuditForm(scope.row)">审核</span> |
|
|
|
<span v-else-if="activeTab == 'pass' && !kefu" style="color: #2741DE;" |
|
|
|
@click="openEditForm(scope.row)">编辑</span> |
|
|
|
</template> |
|
|
|
@ -233,7 +233,7 @@ |
|
|
|
<el-input v-model="addFormData.jwcode" placeholder="请输入精网号" @blur="jwcodeSeachMarket" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户姓名" required> |
|
|
|
<el-input v-model="addFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
<el-input disabled="true" v-model="addFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属地区" required> |
|
|
|
<el-input disabled="true" v-model="addFormData.market" :value="addFormData.marketName" |
|
|
|
@ -292,8 +292,10 @@ |
|
|
|
<template #footer> |
|
|
|
<span class="dialog-footer"> |
|
|
|
<el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button> |
|
|
|
<el-button style="background-color: #2741DE; margin-left: 2.5vw;" type="primary" |
|
|
|
@click="handleAddForm">确定</el-button> |
|
|
|
<el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;" |
|
|
|
type="primary" @click="handleAddForm">确定</el-button> |
|
|
|
<el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;" |
|
|
|
type="primary" @click="handleEditForm">编辑</el-button> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
@ -301,40 +303,42 @@ |
|
|
|
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm"> |
|
|
|
<el-form class="addForm" label-width="4vw" label-position="left"> |
|
|
|
<el-form-item label="精网号"> |
|
|
|
<el-input v-model="auditFormData.jwcode" placeholder="请输入驳回理由" /> |
|
|
|
<el-input disabled="true" v-model="auditFormData.jwcode" placeholder="请输入驳回理由" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户姓名"> |
|
|
|
<el-input v-model="auditFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
<el-input disabled="true" v-model="auditFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属地区"> |
|
|
|
<el-input disabled="true" v-model="auditFormData.market" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="活动名称"> |
|
|
|
<el-input v-model="auditFormData.jwcode" placeholder="请输入活动名称" /> |
|
|
|
<el-input disabled="true" v-model="auditFormData.activity" placeholder="请输入活动名称" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="产品名称"> |
|
|
|
<el-select placeholder="请选择产品名称" clearable></el-select> |
|
|
|
<el-form-item label="产品名称" required> |
|
|
|
<ProductSelect disabled="true" v-model="auditFormData.goodsName"></ProductSelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款币种"> |
|
|
|
<el-select placeholder="请选择付款币种" v-model="auditFormData.moneyType" clearable> |
|
|
|
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
<el-form-item label="付款币种" required> |
|
|
|
<CurrencySelect disabled="true" v-model="auditFormData.paymentCurrency" :items="customOptions" |
|
|
|
placeholder="请选择付款币种" @change="handleCurrencyChange" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款金额"> |
|
|
|
<el-input v-model="auditFormData.jwcode" placeholder="请输入付款金额" /> |
|
|
|
<el-input disabled="true" v-model="auditFormData.paymentAmount" placeholder="请输入付款金额" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="支付方式"> |
|
|
|
<el-select placeholder="请选择支付方式" clearable></el-select> |
|
|
|
<el-form-item label="支付方式" required> |
|
|
|
<CurrencySelect disabled="true" v-model="auditFormData.payType" :items="paytypeOptions" |
|
|
|
placeholder="请选择支付方式"> |
|
|
|
</CurrencySelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款时间"> |
|
|
|
<el-date-picker type="datetime" v-model="auditFormData.time" placeholder="请选择付款时间" /> |
|
|
|
<el-date-picker disabled="true" type="datetime" v-model="auditFormData.payTime" |
|
|
|
placeholder="请选择付款时间" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="转账凭证"> |
|
|
|
<div class="pic"> |
|
|
|
<el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card" |
|
|
|
:auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr" |
|
|
|
:on-change="handleImageChange" :http-request="customUpload"> |
|
|
|
<img v-if="auditFormData.imageUrl" :src="auditFormData.imageUrl" class="avatar" |
|
|
|
<img v-if="auditFormData.voucher" :src="auditFormData.voucher" class="avatar" |
|
|
|
style="height: 100%; width: 100%; object-fit: cover;" /> |
|
|
|
<el-icon v-else class="avatar-uploader-icon"> |
|
|
|
<Plus /> |
|
|
|
@ -346,11 +350,11 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input v-model="auditFormData.mask" type="textarea" :rows="3" placeholder="请输入备注" maxlength="100" |
|
|
|
show-word-limit /> |
|
|
|
<el-input disabled="true" v-model="auditFormData.remark" type="textarea" :rows="3" placeholder="请输入备注" |
|
|
|
maxlength="100" show-word-limit /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驳回理由" v-if="ifReject" required> |
|
|
|
<el-input v-model="auditFormData.mask" type="textarea" :rows="3" placeholder="请输入驳回理由" |
|
|
|
<el-input v-model="auditFormData.rejectReason" type="textarea" :rows="3" placeholder="请输入驳回理由" |
|
|
|
maxlength="100" show-word-limit /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -361,7 +365,7 @@ |
|
|
|
backgroundColor: isBtnDisabled ? '#E5E5E5FF' : '#2741DEFF', |
|
|
|
marginLeft: '60px', |
|
|
|
color: isBtnDisabled ? '#8A8A8A' : '#F3FAFE' |
|
|
|
}" @click="handleReject" :disabled="isBtnDisabled">{{ btnText }}</el-button> |
|
|
|
}" @click="handelAudit" :disabled="isBtnDisabled">{{ btnText }}</el-button> |
|
|
|
</span> |
|
|
|
<span class="dialog-footer" v-if="ifReject"> |
|
|
|
<el-button style="background-color: #7E91FF;" @click="closeAuditForm">取消</el-button> |
|
|
|
@ -487,6 +491,7 @@ const getTime = ref({ |
|
|
|
|
|
|
|
const search = () => { |
|
|
|
getlist() |
|
|
|
ElMessage.success('查询成功') |
|
|
|
} |
|
|
|
|
|
|
|
//获得表格数据接口 |
|
|
|
@ -504,8 +509,8 @@ const getlist = async () => { |
|
|
|
}) |
|
|
|
|
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
ElMessage.success('查询成功') |
|
|
|
tableData.value = result.data.list |
|
|
|
total.value = result.data.total |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
@ -550,7 +555,6 @@ const jwcodeSeachMarket = async () => { |
|
|
|
addFormData.value.marketName = result.marketName |
|
|
|
addFormData.value.name = result.name |
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
@ -563,10 +567,15 @@ const openRejectReason = (reason) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
const uploadRef = ref() |
|
|
|
const addOrEdit = ref(0) // 1 为新增 2 为编辑 |
|
|
|
const openAddForm = (row) => { |
|
|
|
if (row) { |
|
|
|
console.log('编辑回显数据', row); |
|
|
|
if (row.jwcode) { |
|
|
|
addOrEdit.value = 2 |
|
|
|
addFormData.value = { ...row }; |
|
|
|
jwcodeSeachMarket() |
|
|
|
} else { |
|
|
|
addOrEdit.value = 1 |
|
|
|
addFormData.value = {} |
|
|
|
} |
|
|
|
addFormisible.value = true |
|
|
|
@ -574,8 +583,9 @@ const openAddForm = (row) => { |
|
|
|
const closeAddForm = () => { |
|
|
|
addFormisible.value = false |
|
|
|
addFormData.value = {} |
|
|
|
addOrEdit.value = 0 |
|
|
|
} |
|
|
|
|
|
|
|
//客服新增 |
|
|
|
const handleAddForm = async () => { |
|
|
|
try { |
|
|
|
if (addFormData.value.payTime) { |
|
|
|
@ -591,14 +601,38 @@ const handleAddForm = async () => { |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
ElMessage.success('添加成功') |
|
|
|
getlist() |
|
|
|
closeAddForm() |
|
|
|
} |
|
|
|
console.log('返回参数:', result); |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
//客服提交撤回的编辑记录 |
|
|
|
const handleEditForm = async () => { |
|
|
|
try { |
|
|
|
if (addFormData.value.payTime) { |
|
|
|
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
console.log('客服编辑的数据', addFormData.value); |
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/reSubmit', |
|
|
|
data: { |
|
|
|
...addFormData.value, |
|
|
|
submitterId: adminData.value.id |
|
|
|
} |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
ElMessage.success('编辑成功') |
|
|
|
getlist() |
|
|
|
closeAddForm() |
|
|
|
} |
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//付款币种 |
|
|
|
const selectedCurrency = ref(''); |
|
|
|
const customOptions = ref(['新币', '马币', '港币', '美元', '英镑', '越南盾']); |
|
|
|
@ -615,14 +649,13 @@ const textContent = ref('') |
|
|
|
const recallDialog = ref(false) |
|
|
|
const openRecall = (val) => { |
|
|
|
console.log('打开弹窗', val); |
|
|
|
|
|
|
|
recallDialog.value = true |
|
|
|
if (val == 'refund') { |
|
|
|
textContent.value = '将要对该订单退款!' |
|
|
|
} |
|
|
|
if (val == 'recall') { |
|
|
|
textContent.value = '将要撤回该信息!' |
|
|
|
} |
|
|
|
recallDialog.value = true |
|
|
|
} |
|
|
|
const closeRecall = () => { |
|
|
|
recallDialog.value = false |
|
|
|
@ -674,7 +707,7 @@ const customUpload = async (options) => { |
|
|
|
}) |
|
|
|
if (response.code === 200 && response.data) { |
|
|
|
handleImgSuccess(response, options.file) |
|
|
|
ElMessage.success(response.msg || '上传成功') |
|
|
|
ElMessage.success('上传成功') |
|
|
|
} else { |
|
|
|
options.onError(response) |
|
|
|
ElMessage.error(response.msg || '上传失败') |
|
|
|
@ -707,15 +740,65 @@ const submitEditForm = () => { |
|
|
|
const auditFormData = ref({ |
|
|
|
|
|
|
|
}) |
|
|
|
//财务通过审核请求 |
|
|
|
const handelAudit = async() => { |
|
|
|
try { |
|
|
|
const result = await request({ |
|
|
|
url: '/cashAudit/collectionAudit', |
|
|
|
data: { |
|
|
|
orderCode:auditFormData.value.orderCode, |
|
|
|
action:1, |
|
|
|
auditId:adminData.value.id |
|
|
|
} |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
ElMessage.success('审核成功') |
|
|
|
getlist() |
|
|
|
closeAuditForm() |
|
|
|
}else{ |
|
|
|
ElMessage.error(result.msg) |
|
|
|
getlist() |
|
|
|
} |
|
|
|
console.log('返回参数:', result); |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//财务驳回审核请求 |
|
|
|
const handelAuditReject = async() => { |
|
|
|
try { |
|
|
|
const result = await request({ |
|
|
|
url: '/cashAudit/collectionAudit', |
|
|
|
data: { |
|
|
|
orderCode:auditFormData.value.orderCode, |
|
|
|
orderCode:auditFormData.value.orderCode, |
|
|
|
action:2, |
|
|
|
auditId:adminData.value.id |
|
|
|
} |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
ElMessage.success('审核成功') |
|
|
|
getlist() |
|
|
|
closeAuditForm() |
|
|
|
} |
|
|
|
console.log('返回参数:', result); |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
const auditFormisible = ref(false) |
|
|
|
//判断弹窗中是否展示驳回 |
|
|
|
const ifReject = ref(false) |
|
|
|
const openAuditForm = () => { |
|
|
|
|
|
|
|
const openAuditForm = (row) => { |
|
|
|
auditFormData.value = {...row} |
|
|
|
auditFormisible.value = true |
|
|
|
} |
|
|
|
const countdown = ref(0); // 倒计时秒数(示例设为 5 秒) |
|
|
|
const isBtnDisabled = ref(false); // 按钮是否禁用 |
|
|
|
const btnText = ref('通过(3)'); // 按钮显示的文字(含倒计时) |
|
|
|
|
|
|
|
const closeAuditForm = () => { |
|
|
|
ifReject.value = false |
|
|
|
auditFormisible.value = false |
|
|
|
@ -797,6 +880,7 @@ const getAdminData = async function () { |
|
|
|
} |
|
|
|
onMounted(async function () { |
|
|
|
await getAdminData() |
|
|
|
await getlist() |
|
|
|
}) |
|
|
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
|
|
|