main
fanfan 2 months ago
parent bb3ab3a52f
commit ac8ef59aee
  1. 33
      src/api/order/index.js
  2. 62
      src/views/order/Index.vue
  3. 108
      src/views/order/modules/DocumentRecord.vue
  4. 138
      src/views/order/modules/DocumentRecordDetails.vue
  5. 166
      src/views/order/modules/DocumentRecordList.vue
  6. 6
      src/views/order/modules/index.js
  7. 5
      src/views/store/Setting.vue

@ -3,9 +3,38 @@ import { axios } from '@/utils/request'
// api接口列表 // api接口列表
const api = { const api = {
list: '/order/list', list: '/order/list',
detail: '/order/detail' detail: '/order/detail',
}
/**
* 审单
* @param {*} data
*/
export function updateStandard(data) {
return axios({
url: '/order/updateStandard',
method: 'post',
data
})
}
/**
* 审单
* @param {*} data
*/
export function standard(data) {
return axios({
url: '/order/standard',
method: 'post',
data
})
}
// 列表记录
export function getStandardList (params) {
return axios({
url: 'order/getStandard',
method: 'get',
params
})
} }
// 列表记录 // 列表记录
export function list (params) { export function list (params) {
return axios({ return axios({

@ -220,6 +220,19 @@
>删除</a >删除</a
> >
<a @click="copyText(item.copy_text)">复制</a> <a @click="copyText(item.copy_text)">复制</a>
<a @click="reviewDocuments(item, 1)" v-if="item.standard_count == 0">审单</a>
<a
style="pointer-events: none; cursor: default; color: gray"
v-if="item.standard_count == 1"
>审单</a
>
<a @click="reviewDocuments(item, 2)" v-if="item.standard_count == 1">再次审单</a>
<a
style="pointer-events: none; cursor: default; color: gray"
v-if="item.standard_count == 2"
>再次审单</a
>
<a @click="documentRecord(item)">审单记录</a>
</div> </div>
</td> </td>
</template> </template>
@ -252,6 +265,7 @@
<DeliveryForm ref="DeliveryForm" @handleSubmit="handleRefresh" /> <DeliveryForm ref="DeliveryForm" @handleSubmit="handleRefresh" />
<ExtractForm ref="ExtractForm" @handleSubmit="handleRefresh" /> <ExtractForm ref="ExtractForm" @handleSubmit="handleRefresh" />
<CancelForm ref="CancelForm" @handleSubmit="handleRefresh" /> <CancelForm ref="CancelForm" @handleSubmit="handleRefresh" />
<DocumentRecordList ref="DocumentRecordList" @handleSubmit="handleRefresh" />
</a-spin> </a-spin>
</a-card> </a-card>
</template> </template>
@ -273,7 +287,7 @@ import {
ReceiptStatusEnum, ReceiptStatusEnum,
} from '@/common/enum/order' } from '@/common/enum/order'
import { PaymentMethodEnum } from '@/common/enum/payment' import { PaymentMethodEnum } from '@/common/enum/payment'
import { DeliveryForm, ExtractForm, CancelForm } from './modules' import { DeliveryForm, ExtractForm, CancelForm, DocumentRecord, DocumentRecordList } from './modules'
// //
const columns = [ const columns = [
@ -340,6 +354,8 @@ export default {
DeliveryForm, DeliveryForm,
ExtractForm, ExtractForm,
CancelForm, CancelForm,
DocumentRecord,
DocumentRecordList,
}, },
data() { data() {
return { return {
@ -420,7 +436,49 @@ export default {
getDataType() { getDataType() {
return this.$route.path.split('/')[3].replace('-', '_') return this.$route.path.split('/')[3].replace('-', '_')
}, },
reviewDocuments(item, type) {
if (type == 1) {
const app = this
const modal = app.$confirm({
title: '是否确定审单?',
onOk() {
return Api.standard({
orderId: item.order_id,
form: {
type: 10,
},
})
.then((result) => {
app.$message.success(result.message, 1.5)
app.handleRefresh()
})
.finally((result) => modal.destroy())
},
})
}
if (type == 2) {
const app = this
const modal = app.$confirm({
title: '是否确定再次审单?',
onOk() {
return Api.standard({
orderId: item.order_id,
form: {
type: 20,
},
})
.then((result) => {
app.$message.success(result.message, 1.5)
app.handleRefresh()
})
.finally((result) => modal.destroy())
},
})
}
},
documentRecord(record) {
this.$refs.DocumentRecordList.show(record)
},
async copyText(text) { async copyText(text) {
try { try {
const textToCopy = text const textToCopy = text

@ -0,0 +1,108 @@
<template>
<a-modal
:title="title"
:width="560"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:maskClosable="false"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="isLoading">
<a-form :form="form">
<a-form-item
label="审核状态"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<a-radio-group v-decorator="['standard_status', { initialValue: 1, rules: [{ required: true }] }]" @change="handleStatus">
<a-radio :value="10">同意</a-radio>
<a-radio :value="20">拒绝</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="拒绝原因" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="refuse_show">
<a-textarea placeholder="拒绝原因" :rows="2" v-decorator="['cause', { initialValue: '', rules: [{ required: true,message: '拒绝原因不能为空' }] }]"/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import * as Api from '@/api/order'
export default {
data () {
return {
refuse_show: false,
//
title: '审核',
//
labelCol: { span: 7 },
//
wrapperCol: { span: 13 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
form: this.$form.createForm(this),
//
record: {}
}
},
created () {
},
methods: {
//
show (record) {
//
this.visible = true
//
this.record = record
},
handleStatus (e) {
if (e.target.value === 20) {
this.form.setFieldsValue({ cause: '' })
this.refuse_show = true
} else {
this.refuse_show = false
}
},
//
handleSubmit (e) {
e.preventDefault()
//
const { form: { validateFields } } = this
validateFields((errors, values) => {
// api
!errors && this.onFormSubmit(values)
})
},
//
handleCancel () {
this.visible = false
this.form.resetFields()
},
// api
onFormSubmit (values) {
this.isLoading = true
Api.updateStandard({ standardId: this.record.id, form: values })
.then(result => {
//
this.$message.success(result.message, 1.5)
//
this.handleCancel()
//
this.$emit('handleSubmit', values)
})
.finally(() => this.isLoading = false)
}
}
}
</script>

@ -0,0 +1,138 @@
<template>
<a-modal
:title="title"
:width="800"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:maskClosable="false"
:footer="null"
@cancel="handleCancel"
>
<a-spin :spinning="isLoading">
<a-form :form="form" v-if="record">
<a-row>
<a-col :span="24">
<a-form-item label="客户来源" :labelCol="labelCol" :wrapperCol="wrapperCol">
<span>{{ isFrom[record.from] }}</span>
</a-form-item></a-col
>
</a-row>
<a-row>
<a-col :span="24"
><a-form-item label="是否同一城市" :labelCol="labelCol" :wrapperCol="wrapperCol">
<span>{{ isYes[record.is_city] }}</span>
</a-form-item></a-col
></a-row
>
<a-row>
<a-col :span="24"
><a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
<span v-if="record.standard_status == 10">审核通过</span>
<span v-if="record.standard_status == 20">审核不通过</span>
<span v-if="record.standard_status == 30">审核中</span>
</a-form-item></a-col
></a-row
><a-row>
<a-col :span="24">
<a-form-item label="微信聊天截图" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage
v-if="idOrderShow"
ref="childComponent"
:type="1"
multiple
:source="1"
:maxNum="10"
:defaultList="record.order_image_url"
/> </a-form-item
></a-col>
</a-row>
<a-row>
<a-col :span="24" style="margin-bottom: 30px">
<a-form-item label="转账截图" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage
v-if="transferShow"
:type="1"
ref="childComponent"
multiple
:source="1"
:maxNum="10"
:defaultList="record.transfer_image_url"
/> </a-form-item
></a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import * as Api from '@/api/market/settle'
import { SelectImage } from '@/components'
const isFrom = {
10: '本地同城线下真实零售客户',
20: '电商平台客户',
30: '短视频平台客户',
}
const isYes = {
10: '是',
20: '否',
}
export default {
components: {
SelectImage,
},
data() {
return {
isFrom,
isYes,
title: '审单详情',
//
//
labelCol: { span: 7 },
//
wrapperCol: { span: 13 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
form: this.$form.createForm(this),
//
record: {},
idOrderShow: false,
transferShow: false,
}
},
created() {},
methods: {
details(record) {
this.visible = true
this.idOrderShow = false
this.transferShow = false
this.record = record
if (this.record) {
this.idOrderShow = true
this.transferShow = true
}
},
//
handleCancel() {
this.visible = false
this.idOrderShow = false
this.transferShow = false
this.form.resetFields()
},
},
}
</script>
<style lang="less" scoped>
.ant-form-item {
margin-bottom: 5px;
}
</style>

@ -0,0 +1,166 @@
<template>
<a-modal
:title="title"
:width="1000"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:maskClosable="false"
:footer="null"
@cancel="handleCancel"
>
<a-spin :spinning="isLoading">
<a-table
v-if="!isLoading"
rowKey="category_id"
:columns="columns"
:dataSource="documentList"
:defaultExpandAllRows="true"
:expandIconColumnIndex="1"
:pagination="false"
:loading="isLoading"
>
<!-- 文章封面图 -->
<span slot="transfer_image_url" slot-scope="text">
<a v-if="text" title="点击查看原图">
<img height="50" :src="text[0].preview_url" alt="转账图片" />
</a>
</span>
<span slot="order_image_url" slot-scope="text">
<a v-if="text" title="点击查看原图">
<img height="50" :src="text[0].preview_url" alt="聊天截图" />
</a>
</span>
<!-- 状态 -->
<span slot="is_city" slot-scope="text">
<a-tag :color="text == 10 ? 'green' : ''">{{ text == 10 ? '是' : '否' }}</a-tag>
</span>
<span slot="from" slot-scope="text">
<span v-if="text == 10">本地同城线下真实零售客户</span>
<span v-if="text == 20">电商平台客户</span>
<span v-if="text == 30">短视频平台客户</span>
</span>
<span slot="standard_status" slot-scope="text">
<span v-if="text == 10">审核通过</span>
<span v-if="text == 20">审核不通过</span>
<span v-if="text == 30">审核中</span>
</span>
<span slot="action" slot-scope="text, item">
<a style="margin-right: 8px" @click="handleEdit(item)">详情</a>
<a @click="onClickRecord(item)" v-if="item.standard_status==10">审单</a>
</span>
</a-table>
</a-spin>
<DocumentRecord ref="DocumentRecord" />
<DocumentRecordDetails ref="DocumentRecordDetails" />
</a-modal>
</template>
<script>
import * as Api from '@/api/order'
import DocumentRecord from './DocumentRecord.vue'
import DocumentRecordDetails from './DocumentRecordDetails.vue'
import { STable } from '@/components'
export default {
components: {
DocumentRecord,
DocumentRecordDetails,
STable,
},
data() {
return {
//
title: '审单记录',
//
labelCol: { span: 7 },
//
wrapperCol: { span: 13 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
//
record: {},
documentList: [],
//
columns: [
{
title: '审单ID',
dataIndex: 'id',
},
{
title: '客户来源',
width: '120px',
dataIndex: 'from',
scopedSlots: { customRender: 'from' },
},
{
title: '是否同一城市',
width: '100px',
dataIndex: 'is_city',
scopedSlots: { customRender: 'is_city' },
},
{
title: '微信聊天截图',
dataIndex: 'order_image_url',
scopedSlots: { customRender: 'order_image_url' },
},
{
title: '转账截图',
dataIndex: 'transfer_image_url',
scopedSlots: { customRender: 'transfer_image_url' },
},
{
title: '状态',
dataIndex: 'standard_status',
scopedSlots: { customRender: 'standard_status' },
},
{
title: '添加时间',
dataIndex: 'create_time',
},
{
title: '操作',
dataIndex: 'action',
width: '120px',
scopedSlots: { customRender: 'action' },
},
],
}
},
created() {},
methods: {
//
show(record) {
//
this.visible = true
//
this.record = record
if (this.record) {
this.getDocumentList()
}
},
//
getDocumentList(bool) {
bool && (this.isLoading = true)
Api.getStandardList({ orderId: this.record.order_id })
.then((result) => {
this.documentList = result.data.list
})
.finally(() => (this.isLoading = false))
},
onClickRecord(record) {
this.$refs.DocumentRecord.show(record)
},
handleEdit(record) {
this.$refs.DocumentRecordDetails.details(record)
},
//
handleCancel() {
this.visible = false
this.form.resetFields()
},
},
}
</script>

@ -5,5 +5,7 @@ import PrinterForm from './PrinterForm'
import PriceForm from './PriceForm' import PriceForm from './PriceForm'
import RemarkForm from './RemarkForm' import RemarkForm from './RemarkForm'
import JingDong from './JingDong' import JingDong from './JingDong'
import DocumentRecord from './DocumentRecord'
export { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm,JingDong } import DocumentRecordList from './DocumentRecordList'
import DocumentRecordDetails from './DocumentRecordDetails'
export { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm,JingDong,DocumentRecord,DocumentRecordList,DocumentRecordDetails }

@ -20,6 +20,9 @@
<a-form-item label="登录Logo" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 132*132,请上传正方形图片"> <a-form-item label="登录Logo" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 132*132,请上传正方形图片">
<SelectImage :defaultList="record.loginImg ? [record.loginImg]: []" v-decorator="['login_img_id']" /> <SelectImage :defaultList="record.loginImg ? [record.loginImg]: []" v-decorator="['login_img_id']" />
</a-form-item> </a-form-item>
<a-form-item label="审单" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 300*300,请上传正方形图片">
<SelectImage :defaultList="record.loginImg ? [record.loginImg]: []" v-decorator="['standard_image_id']" />
</a-form-item>
<a-form-item label="新品首发" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 375*326"> <a-form-item label="新品首发" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 375*326">
<SelectImage multiple :defaultList="record.newProductImg ? record.newProductImg : []" v-decorator="['new_product_img_id']" /> <SelectImage multiple :defaultList="record.newProductImg ? record.newProductImg : []" v-decorator="['new_product_img_id']" />
</a-form-item> </a-form-item>
@ -112,7 +115,7 @@ export default {
// //
this.$nextTick(() => { this.$nextTick(() => {
setFieldsValue( setFieldsValue(
pick(record, ['store_name', 'describe', 'logo_image_id', 'phone', 'login_img_id' ]) pick(record, ['store_name', 'describe', 'logo_image_id', 'phone', 'login_img_id','standard_image_id' ])
) )
}) })
}, },

Loading…
Cancel
Save