|
@@ -21,14 +21,14 @@
|
|
|
<div class="audit-btn">
|
|
|
<a-button @click="openAudit" type="text">
|
|
|
<template #icon>
|
|
|
- <icon-plus-circle />
|
|
|
+ <icon-plus-circle/>
|
|
|
</template>
|
|
|
<template #default>购卡</template>
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<!-- 数据表格 -->
|
|
|
<a-table :data="tableData" :pagination="pageData" :columns="columns" @page-change="evChangePage"
|
|
|
- :scroll="{ x: '100%', y: '800px' }">
|
|
|
+ :scroll="{ x: '100%', y: '800px' }">
|
|
|
<!-- <template #status="{ record }">
|
|
|
{{ record.status }}
|
|
|
</template>
|
|
@@ -54,7 +54,7 @@
|
|
|
</template>
|
|
|
</a-table>
|
|
|
<a-modal v-model:visible="uploadContract" title="上传合同" @cancel="handleCancel" @before-ok="handleBeforeOk"
|
|
|
- okText="保存" cancelText="关闭">
|
|
|
+ okText="保存" cancelText="关闭">
|
|
|
<a-form :model="formContract" auto-label-width>
|
|
|
<a-form-item field="orderNumber" label="单号">
|
|
|
<!-- <a-input v-model="formContract.orderNumber" disabled placeholder="请输入单号" /> -->
|
|
@@ -65,14 +65,14 @@
|
|
|
<div class="audit-txt" style="color:#418035;">{{ formContract.customerName }}</div>
|
|
|
</a-form-item>
|
|
|
<a-form-item field="fileList" label="销售合同">
|
|
|
- <a-upload action="/" :default-file-list="formContract.fileList" />
|
|
|
+ <a-upload action="/" :default-file-list="formContract.fileList"/>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</a-modal>
|
|
|
|
|
|
<!-- 创建 -->
|
|
|
<a-modal v-model:visible="showAudit" title="购卡" width="600px" @cancel="cancelPurchase" centered
|
|
|
- :maskClosable="false" okText="确定" cancelText="关闭" :footer="null">
|
|
|
+ :maskClosable="false" okText="确定" cancelText="关闭" :footer="null">
|
|
|
<a-form ref="formRef" :rules="rules" :model="formState" @submit="submitPurchase">
|
|
|
<a-form-item field="customerName" label="客户名称">
|
|
|
<!-- <a-input v-model="formAudit.customerName" placeholder="请输入客户" /> -->
|
|
@@ -80,13 +80,13 @@
|
|
|
</a-form-item>
|
|
|
<a-form-item label="运营商" field="source">
|
|
|
<a-select v-model="formState.source" :style="{ width: '380px' }" placeholder="请选择运营商">
|
|
|
- <a-option v-for="item of sourceList" :value="item.id" :label="item.label" />
|
|
|
+ <a-option v-for="item of sourceList" :value="item.id" :label="item.label"/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="资费名称" field="tariffId">
|
|
|
<a-select v-model="formState.tariffId" :style="{ width: '380px' }" @change="tariffChange"
|
|
|
- placeholder="请选择资费ID">
|
|
|
- <a-option v-for="item of tariffData" :value="item.value" :label="item.label" />
|
|
|
+ placeholder="请选择资费ID">
|
|
|
+ <a-option v-for="item of tariffData" :value="item.value" :label="item.label"/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<!-- <a-form-item label="资费详情" v-if="formState.tariffId">
|
|
@@ -107,14 +107,14 @@
|
|
|
</a-form-item> -->
|
|
|
<a-form-item label="卡类型" field="cardType">
|
|
|
<a-select v-model="formState.cardType" :style="{ width: '380px' }" placeholder="请选择卡类型">
|
|
|
- <a-option v-for="item of orderType" :value="item.value" :label="item.label" />
|
|
|
+ <a-option v-for="item of orderType" :value="item.value" :label="item.label"/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
<a-form-item label="沉默期">
|
|
|
<a-select v-model="formState.silencePeriod" :style="{ width: '380px' }" placeholder="请选择沉默期">
|
|
|
- <a-option v-for="item of silenceOptions" :value="item.value" :label="item.label" />
|
|
|
+ <a-option v-for="item of silenceOptions" :value="item.value" :label="item.label"/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="流量池" field="flowPool">
|
|
@@ -125,7 +125,7 @@
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="购卡数量" field="num">
|
|
|
- <a-input v-model="formState.num" placeholder="请输入购卡数量" />
|
|
|
+ <a-input v-model="formState.num" placeholder="请输入购卡数量"/>
|
|
|
</a-form-item>
|
|
|
<a-form-item>
|
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;">确定</a-button>
|
|
@@ -136,7 +136,7 @@
|
|
|
|
|
|
<!-- 详情 -->
|
|
|
<a-modal v-model:visible="showDetail" width="800px" :title="currentIndex == 1 ? '退卡详情' : '查看'"
|
|
|
- @cancel="showDetail = false" :footer="null">
|
|
|
+ @cancel="showDetail = false" :footer="null">
|
|
|
<div class="detail-box">
|
|
|
<div class="detail-item-box">
|
|
|
<div class="detail-item">
|
|
@@ -220,7 +220,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail-table">
|
|
|
- <a-table :columns="columnsDetail" :data="dataDetail" />
|
|
|
+ <a-table :columns="columnsDetail" :data="dataDetail"/>
|
|
|
</div>
|
|
|
<div style="text-align: right;margin-top: 20px;">
|
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;" @click="operateHandle">确定</a-button>
|
|
@@ -238,11 +238,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, reactive, onMounted } from 'vue';
|
|
|
-import { Message } from '@arco-design/web-vue';
|
|
|
-import { enum_dict } from "@/hooks/enum";
|
|
|
-import { tariffList } from "@/api/path/tariffManagement.api";
|
|
|
-import { purchaseOrderList, addPurchaseOrder, platformUpdate, adminUpdate } from '@/api/path/purchase';
|
|
|
+import {ref, reactive, onMounted} from 'vue';
|
|
|
+import {Message} from '@arco-design/web-vue';
|
|
|
+import {enum_dict} from "@/hooks/enum";
|
|
|
+import {tariffList} from "@/api/path/tariffManagement.api";
|
|
|
+import {purchaseOrderList, addPurchaseOrder, platformUpdate, adminUpdate} from '@/api/path/purchase';
|
|
|
+import {Getdictionary} from '@/mixins/index.js'
|
|
|
|
|
|
const selectedKeys = ref([]);
|
|
|
const rowSelection = reactive({
|
|
@@ -256,44 +257,44 @@ const searchForm = reactive({
|
|
|
});
|
|
|
|
|
|
const columns = [
|
|
|
- { title: '订单编号', dataIndex: 'id', align: 'center', width: 300 },
|
|
|
- { title: '客户名称', dataIndex: 'user_id', align: 'center' },
|
|
|
- { title: '订阅状态', dataIndex: 'statusName', align: 'center' },
|
|
|
- { title: '审核状态', dataIndex: 'orderTypeName', align: 'center' },
|
|
|
- { title: '采购数量', dataIndex: 'quantity', align: 'center' },
|
|
|
- { title: '支付金额', dataIndex: 'paymentAmount', align: 'center' },
|
|
|
- { title: '下单时间', dataIndex: 'createdAt', align: 'center' },
|
|
|
- { title: '操作', slotName: 'operate', align: 'center' }
|
|
|
+ {title: '订单编号', dataIndex: 'id', align: 'center', width: 300},
|
|
|
+ {title: '客户名称', dataIndex: 'user_id', align: 'center'},
|
|
|
+ {title: '订阅状态', dataIndex: 'statusName', align: 'center'},
|
|
|
+ {title: '审核状态', dataIndex: 'orderTypeName', align: 'center'},
|
|
|
+ {title: '采购数量', dataIndex: 'quantity', align: 'center'},
|
|
|
+ {title: '支付金额', dataIndex: 'paymentAmount', align: 'center'},
|
|
|
+ {title: '下单时间', dataIndex: 'createdAt', align: 'center'},
|
|
|
+ {title: '操作', slotName: 'operate', align: 'center'}
|
|
|
];
|
|
|
-const columnsDetail = [{ title: 'ICCID', dataIndex: 'iccid' },
|
|
|
-{ title: '池名称及编号', dataIndex: 'nameAndId' },
|
|
|
-{ title: '卡状态', dataIndex: 'status' },
|
|
|
+const columnsDetail = [{title: 'ICCID', dataIndex: 'iccid'},
|
|
|
+ {title: '池名称及编号', dataIndex: 'nameAndId'},
|
|
|
+ {title: '卡状态', dataIndex: 'status'},
|
|
|
]
|
|
|
const dataDetail = ref([{
|
|
|
iccid: '8986061800002054589N',
|
|
|
nameAndId: '泰国监控40G共享/53357981207',
|
|
|
status: '沉默期'
|
|
|
},
|
|
|
-{
|
|
|
- iccid: '8986061800002054588N',
|
|
|
- nameAndId: '泰国监控40G共享/53357981207',
|
|
|
- status: '沉默期'
|
|
|
-}, {
|
|
|
- iccid: '8986061800002054587N',
|
|
|
- nameAndId: '泰国监控40G共享/53357981207',
|
|
|
- status: '沉默期'
|
|
|
-}, {
|
|
|
- iccid: '8986061800002054586N',
|
|
|
- nameAndId: '泰国监控40G共享/53357981207',
|
|
|
- status: '沉默期'
|
|
|
-},])
|
|
|
+ {
|
|
|
+ iccid: '8986061800002054588N',
|
|
|
+ nameAndId: '泰国监控40G共享/53357981207',
|
|
|
+ status: '沉默期'
|
|
|
+ }, {
|
|
|
+ iccid: '8986061800002054587N',
|
|
|
+ nameAndId: '泰国监控40G共享/53357981207',
|
|
|
+ status: '沉默期'
|
|
|
+ }, {
|
|
|
+ iccid: '8986061800002054586N',
|
|
|
+ nameAndId: '泰国监控40G共享/53357981207',
|
|
|
+ status: '沉默期'
|
|
|
+ },])
|
|
|
const userName = ref('')
|
|
|
const userType = ref(''); // 1平台 2用户
|
|
|
const tableData = ref([]);
|
|
|
const formRef = ref(null);
|
|
|
const currentIndex = ref(null);
|
|
|
const rules = {
|
|
|
- source: [{ required: true, trigger: 'change', }],
|
|
|
+ source: [{required: true, trigger: 'change',}],
|
|
|
tariffId: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -339,25 +340,26 @@ const orderType = ref([]); // 卡类型
|
|
|
const flowPoolData = ref([]); // 组池
|
|
|
const showAudit = ref(false);
|
|
|
|
|
|
-const handleDictValue = () => {
|
|
|
- const dictList = JSON.parse(window.localStorage.getItem('dictList')) ?? []
|
|
|
- sourceList.value = dictList.filter((item) => item.typeKey == enum_dict.SOURCE)
|
|
|
- orderType.value = dictList.filter((item) => item.typeKey == enum_dict.CARD_TYPE)
|
|
|
- flowPoolData.value = dictList.filter((item) => item.typeKey == enum_dict.GROUP_POOL)
|
|
|
- console.log(flowPoolData.value)
|
|
|
- silenceOptions.value = dictList.filter((item) => item.typeKey == enum_dict.SILENCE)
|
|
|
+const handleDictValue = async () => {
|
|
|
+ let one = await Getdictionary('source')
|
|
|
+ let two = await Getdictionary('cardType')
|
|
|
+ let tree = await Getdictionary('silenceOf')
|
|
|
+ sourceList.value = one.filter( (item) => item.typeKey == 'source')
|
|
|
+ orderType.value = two.filter( (item) => item.typeKey == 'cardType')
|
|
|
+ silenceOptions.value = tree.filter( (item) => item.typeKey == 'silenceOf')
|
|
|
}
|
|
|
// 订单列表
|
|
|
-const intData = () => {
|
|
|
+const intData = async () => {
|
|
|
const param = {
|
|
|
current: pageData.value.current,
|
|
|
size: pageData.value.size,
|
|
|
}
|
|
|
+ let res1 = await Getdictionary('subscriptionRelationshipStatus')
|
|
|
+ let res2 = await Getdictionary('orderAuditStatus')
|
|
|
purchaseOrderList(param).then(res => {
|
|
|
tableData.value = (res.data.records || []).map(item => {
|
|
|
- const dictList = JSON.parse(window.localStorage.getItem('dictList')) ?? []
|
|
|
- const statusName = dictList.filter((item) => item.typeKey == enum_dict.SUBSCRIPTION_RELATIONSHIP_STATUS)?.find(val => item.status == val.value)?.label
|
|
|
- const orderTypeName = dictList.filter((item) => item.typeKey == enum_dict.ORDER_AUDIT_STATUS)?.find(val => item.status == val.value)?.label
|
|
|
+ const statusName = res1.filter( (item) => item.typeKey == 'subscriptionRelationshipStatus')?.find(val => item.status == val.value)?.label
|
|
|
+ const orderTypeName = res2.filter( (item) => item.typeKey == 'orderAuditStatus')?.find(val => item.status == val.value)?.label
|
|
|
|
|
|
return {
|
|
|
...item,
|
|
@@ -384,7 +386,7 @@ const getTariff = () => {
|
|
|
})
|
|
|
}
|
|
|
// 确认购卡
|
|
|
-const submitPurchase = ({ values, errors }) => {
|
|
|
+const submitPurchase = ({values, errors}) => {
|
|
|
formRef.value.validate(async (errors) => {
|
|
|
if (!errors) {
|
|
|
const data = {
|
|
@@ -392,8 +394,8 @@ const submitPurchase = ({ values, errors }) => {
|
|
|
tariff_id: formState.value.tariffId,
|
|
|
quantity: Number(formState.value.num),
|
|
|
card_type: formState.value.cardType,
|
|
|
- period_of_silence: String(formState.value.silencePeriod),
|
|
|
- is_traffic_pool: formState.value.flowPool
|
|
|
+ periodOfSilence: String(formState.value.silencePeriod),
|
|
|
+ isTrafficPool: formState.value.flowPool
|
|
|
}
|
|
|
addPurchaseOrder(data).then(res => {
|
|
|
intData();
|
|
@@ -469,7 +471,6 @@ onMounted(() => {
|
|
|
// 上传合同的弹框
|
|
|
const uploadContract = ref(false);
|
|
|
const openContract = (item) => {
|
|
|
- console.log(item, '???')
|
|
|
uploadContract.value = true;
|
|
|
formContract.customerName = item.customerName;
|
|
|
formContract.orderNumber = item.cardNumber;
|