修改物流

main
fanfan 2 months ago
parent c6699af397
commit 33e35c425c
  1. 13
      src/api/order/delivery.js
  2. 37
      src/views/order/Detail.vue
  3. 162
      src/views/order/modules/DeliveryFormEdit.vue
  4. 50
      src/views/order/modules/DocumentRecord.vue
  5. 14
      src/views/order/modules/DocumentRecordList.vue
  6. 3
      src/views/order/modules/index.js
  7. 2
      src/views/store/Setting.vue

@ -7,8 +7,19 @@ const api = {
delivery: '/order.delivery/delivery', delivery: '/order.delivery/delivery',
batch: '/order.delivery/batch', batch: '/order.delivery/batch',
eorder: '/order.delivery/eorder', eorder: '/order.delivery/eorder',
updateDelivery: '/order/updateDelivery',
}
/**
* 确认发货 修改物流
* @param {*} data
*/
export function updateDelivery (data) {
return axios({
url: api.updateDelivery,
method: 'post',
data
})
} }
// 列表记录 // 列表记录
export function list (params) { export function list (params) {
return axios({ return axios({

@ -275,13 +275,18 @@
<a-tag color="green">已发货</a-tag> <a-tag color="green">已发货</a-tag>
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
<div class="deliver-goods-list clearfix"> <div style="display: flex; justify-content: space-between">
<div class="goods-item" v-for="(goods, idx) in item.goods" :key="idx"> <div class="deliver-goods-list clearfix" style="width: 66.66%">
<a-tooltip> <div class="goods-item" v-for="(goods, idx) in item.goods" :key="idx">
<template slot="title">{{ goods.goods_name?goods.goods_name:'' }}</template> <a-tooltip>
<img class="goods-img" :src="goods.goods_image?goods.goods_image:''" alt="商品图片" /> <template slot="title">{{ goods.goods_name ? goods.goods_name : '' }}</template>
<div class="title">{{ goods.delivery_num }}</div> <img class="goods-img" :src="goods.goods_image ? goods.goods_image : ''" alt="商品图片" />
</a-tooltip> <div class="title">{{ goods.delivery_num }}</div>
</a-tooltip>
</div>
</div>
<div class="action-item" style="width: 33.33%" v-if="record.delivery_status==DeliveryStatusEnum.DELIVERED.value &&item.delivery_method==10">
<a-button type="primary" @click="onClickEditDelivery(item)">修改物流信息</a-button>
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
@ -372,6 +377,7 @@
<PriceForm ref="PriceForm" @handleSubmit="handleRefresh" /> <PriceForm ref="PriceForm" @handleSubmit="handleRefresh" />
<RemarkForm ref="RemarkForm" @handleSubmit="handleRefresh" /> <RemarkForm ref="RemarkForm" @handleSubmit="handleRefresh" />
<JingDong ref="JingDong" @handleSubmit="handleRefresh" /> <JingDong ref="JingDong" @handleSubmit="handleRefresh" />
<DeliveryFormEdit ref="DeliveryFormEdit" @handleSubmit="handleRefresh" />
</div> </div>
</template> </template>
@ -379,7 +385,16 @@
import { inArray } from '@/utils/util' import { inArray } from '@/utils/util'
import * as Api from '@/api/order' import * as Api from '@/api/order'
import { GoodsItem, UserItem } from '@/components/Table' import { GoodsItem, UserItem } from '@/components/Table'
import { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm, JingDong } from './modules' import {
DeliveryForm,
ExtractForm,
CancelForm,
PrinterForm,
PriceForm,
RemarkForm,
JingDong,
DeliveryFormEdit,
} from './modules'
import { Ueditor } from '@/components' import { Ueditor } from '@/components'
import { import {
OrderTypeEnum, OrderTypeEnum,
@ -438,6 +453,7 @@ export default {
RemarkForm, RemarkForm,
Ueditor, Ueditor,
JingDong, JingDong,
DeliveryFormEdit,
}, },
data() { data() {
return { return {
@ -556,7 +572,10 @@ export default {
const { record } = this const { record } = this
this.$refs.DeliveryForm.show(record) this.$refs.DeliveryForm.show(record)
}, },
//
onClickEditDelivery(record) {
this.$refs.DeliveryFormEdit.show(record)
},
// //
handleExtract() { handleExtract() {
const { record } = this const { record } = this

@ -0,0 +1,162 @@
<template>
<a-modal
:title="title"
:width="680"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:maskClosable="false"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="isLoading">
<a-form-model ref="ruleForm" :model="record" :rules="rules" :label-col="labelCol" :wrapperCol="wrapperCol">
<div>
<a-form-model-item label="物流公司" prop="express_id">
<a-select v-model="record.express_id" placeholder="请选择物流公司">
<a-select-option v-for="(item, index) in expressList" :key="index" :value="item.express_id">{{
item.express_name
}}</a-select-option>
</a-select>
<div class="form-item-help">
<router-link target="_blank" :to="{ path: '/setting/delivery/express/index' }">物流公司管理</router-link>
</div>
</a-form-model-item>
<a-form-model-item label="物流单号" prop="express_no" extra="请手动录入物流单号或快递单号">
<a-input v-model="record.express_no" />
</a-form-model-item>
</div>
</a-form-model>
</a-spin>
</a-modal>
</template>
<script>
import { assignment } from '@/utils/util'
import * as Api from '@/api/order/delivery'
import * as ExpressApi from '@/api/setting/express'
import ClientEnum from '@/common/enum/Client'
import { PaymentMethodEnum } from '@/common/enum/payment'
import { DeliveryStatusEnum } from '@/common/enum/order'
import { GoodsItem } from '@/components/Table'
const rules = {
expressId: [{ required: true, message: '请选择物流公司', trigger: 'blur' }],
expressNo: [{ required: true, message: '请填写物流单号', trigger: 'blur' }],
}
export default {
components: {
GoodsItem,
},
data() {
return {
//
title: '订单发货',
//
labelCol: { span: 7 },
//
wrapperCol: { span: 13 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
rules,
// tab
//
expressList: [],
//
record: {},
}
},
computed: {},
beforeCreate() {
//
assignment(this, {
ClientEnum,
PaymentMethodEnum,
})
},
created() {
//
this.getExpressList()
},
methods: {
//
show(record) {
console.log(record, 'AAAAAAAAAAAAAAAAAA')
//
this.record = record
this.visible = true
},
//
getExpressList() {
this.isLoading = true
ExpressApi.all()
.then((result) => (this.expressList = result.data.list))
.finally(() => (this.isLoading = false))
},
//
handleSubmit(e) {
e.preventDefault()
//
this.$refs.ruleForm.validate((valid) => {
// api
valid && this.onFormSubmit()
})
},
//
handleCancel() {
this.visible = false
if (this.$refs.ruleForm) {
this.$refs.ruleForm.resetFields()
}
},
// api
onFormSubmit() {
this.isLoading = true
Api.updateDelivery({
delivery_id: this.record.delivery_id,
form: { express_no: this.record.express_no, express_id: this.record.express_id },
})
.then((result) => {
//
this.$message.success(result.message, 1.5)
//
this.handleCancel()
//
this.$emit('handleSubmit', true)
})
.finally(() => (this.isLoading = false))
},
},
}
</script>
<style lang="less" scoped>
/deep/.ant-modal-header {
border-bottom: none;
}
/deep/.ant-modal-footer {
border-top: none;
}
/deep/.ant-modal-body {
padding: 0px 24px;
}
/deep/.ant-tabs-bar {
margin-bottom: 22px;
}
.ant-table-wrapper {
margin-bottom: 30px;
}
.ant-form-item {
margin-bottom: 15px;
&:last-child {
margin-bottom: 5px;
}
}
</style>

@ -11,18 +11,21 @@
> >
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<a-form :form="form"> <a-form :form="form">
<a-form-item <a-form-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
label="审核状态" <a-radio-group
:labelCol="labelCol" v-decorator="['standard_status', { initialValue: 1, rules: [{ required: true }] }]"
:wrapperCol="wrapperCol" @change="handleStatus"
> >
<a-radio-group v-decorator="['standard_status', { initialValue: 1, rules: [{ required: true }] }]" @change="handleStatus">
<a-radio :value="10">同意</a-radio> <a-radio :value="10">同意</a-radio>
<a-radio :value="20">拒绝</a-radio> <a-radio :value="20">拒绝</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="拒绝原因" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="refuse_show"> <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-textarea
placeholder="拒绝原因"
:rows="2"
v-decorator="['cause', { initialValue: '', rules: [{ required: true, message: '拒绝原因不能为空' }] }]"
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@ -33,7 +36,7 @@
import * as Api from '@/api/order' import * as Api from '@/api/order'
export default { export default {
data () { data() {
return { return {
refuse_show: false, refuse_show: false,
// //
@ -49,21 +52,19 @@ export default {
// //
form: this.$form.createForm(this), form: this.$form.createForm(this),
// //
record: {} record: {},
} }
}, },
created () { created() {},
},
methods: { methods: {
// //
show (record) { show(record) {
// //
this.visible = true this.visible = true
// //
this.record = record this.record = record
}, },
handleStatus (e) { handleStatus(e) {
if (e.target.value === 20) { if (e.target.value === 20) {
this.form.setFieldsValue({ cause: '' }) this.form.setFieldsValue({ cause: '' })
this.refuse_show = true this.refuse_show = true
@ -72,10 +73,12 @@ export default {
} }
}, },
// //
handleSubmit (e) { handleSubmit(e) {
e.preventDefault() e.preventDefault()
// //
const { form: { validateFields } } = this const {
form: { validateFields },
} = this
validateFields((errors, values) => { validateFields((errors, values) => {
// api // api
!errors && this.onFormSubmit(values) !errors && this.onFormSubmit(values)
@ -83,26 +86,25 @@ export default {
}, },
// //
handleCancel () { handleCancel() {
this.visible = false this.visible = false
this.form.resetFields() this.form.resetFields()
}, },
// api // api
onFormSubmit (values) { onFormSubmit(values) {
this.isLoading = true this.isLoading = true
Api.updateStandard({ standardId: this.record.id, form: values }) Api.updateStandard({ standardId: this.record.id, form: values })
.then(result => { .then((result) => {
// //
this.$message.success(result.message, 1.5) this.$message.success(result.message, 1.5)
// //
this.handleCancel() this.handleCancel()
// //
this.$emit('handleSubmit', values) this.$emit('handleSubmit')
}) })
.finally(() => this.isLoading = false) .finally(() => (this.isLoading = false))
} },
},
}
} }
</script> </script>

@ -47,11 +47,11 @@
</span> </span>
<span slot="action" slot-scope="text, item"> <span slot="action" slot-scope="text, item">
<a style="margin-right: 8px" @click="handleEdit(item)">详情</a> <a style="margin-right: 8px" @click="handleEdit(item)">详情</a>
<a @click="onClickRecord(item)" v-if="item.standard_status==30">审单</a> <a @click="onClickRecord(item)" v-if="item.standard_status == 30">审单</a>
</span> </span>
</a-table> </a-table>
</a-spin> </a-spin>
<DocumentRecord ref="DocumentRecord" /> <DocumentRecord ref="DocumentRecord" @handleSubmit="handleRefresh" />
<DocumentRecordDetails ref="DocumentRecordDetails" /> <DocumentRecordDetails ref="DocumentRecordDetails" />
</a-modal> </a-modal>
</template> </template>
@ -111,7 +111,7 @@ export default {
dataIndex: 'transfer_image_url', dataIndex: 'transfer_image_url',
scopedSlots: { customRender: 'transfer_image_url' }, scopedSlots: { customRender: 'transfer_image_url' },
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'standard_status', dataIndex: 'standard_status',
scopedSlots: { customRender: 'standard_status' }, scopedSlots: { customRender: 'standard_status' },
@ -131,6 +131,14 @@ export default {
}, },
created() {}, created() {},
methods: { methods: {
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh(bool = false) {
bool && (this.page = 1)
this.getDocumentList()
},
// //
show(record) { show(record) {
// //

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

@ -21,7 +21,7 @@
<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,请上传正方形图片"> <a-form-item label="审单" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="建议尺寸: 300*300,请上传正方形图片">
<SelectImage :defaultList="record.loginImg ? [record.loginImg]: []" v-decorator="['standard_image_id']" /> <SelectImage :defaultList="record.standard_image ? [record.standard_image]: []" v-decorator="['standard_image_id']" />
</a-form-item> </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']" />

Loading…
Cancel
Save