diff --git a/src/api/order/delivery.js b/src/api/order/delivery.js index 3d36493..e5459a0 100644 --- a/src/api/order/delivery.js +++ b/src/api/order/delivery.js @@ -7,8 +7,19 @@ const api = { delivery: '/order.delivery/delivery', batch: '/order.delivery/batch', 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) { return axios({ diff --git a/src/views/order/Detail.vue b/src/views/order/Detail.vue index f314fae..28a03d5 100644 --- a/src/views/order/Detail.vue +++ b/src/views/order/Detail.vue @@ -275,13 +275,18 @@ 已发货 -
-
- - - 商品图片 -
共{{ goods.delivery_num }}件
-
+
+
+
+ + + 商品图片 +
共{{ goods.delivery_num }}件
+
+
+
+
+ 修改物流信息
@@ -372,6 +377,7 @@ +
@@ -379,7 +385,16 @@ import { inArray } from '@/utils/util' import * as Api from '@/api/order' 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 { OrderTypeEnum, @@ -438,6 +453,7 @@ export default { RemarkForm, Ueditor, JingDong, + DeliveryFormEdit, }, data() { return { @@ -556,7 +572,10 @@ export default { const { record } = this this.$refs.DeliveryForm.show(record) }, - + // 修改物流 + onClickEditDelivery(record) { + this.$refs.DeliveryFormEdit.show(record) + }, // 自提核销 handleExtract() { const { record } = this diff --git a/src/views/order/modules/DeliveryFormEdit.vue b/src/views/order/modules/DeliveryFormEdit.vue new file mode 100644 index 0000000..7b90256 --- /dev/null +++ b/src/views/order/modules/DeliveryFormEdit.vue @@ -0,0 +1,162 @@ + + + + \ No newline at end of file diff --git a/src/views/order/modules/DocumentRecord.vue b/src/views/order/modules/DocumentRecord.vue index 6c7524c..501f887 100644 --- a/src/views/order/modules/DocumentRecord.vue +++ b/src/views/order/modules/DocumentRecord.vue @@ -11,18 +11,21 @@ > - - + + 同意 拒绝 - + @@ -33,7 +36,7 @@ import * as Api from '@/api/order' export default { - data () { + data() { return { refuse_show: false, // 对话框标题 @@ -49,21 +52,19 @@ export default { // 当前表单元素 form: this.$form.createForm(this), // 当前记录 - record: {} + record: {}, } }, - created () { - }, + created() {}, methods: { - // 显示对话框 - show (record) { + show(record) { // 显示窗口 this.visible = true // 当前记录 this.record = record }, - handleStatus (e) { + handleStatus(e) { if (e.target.value === 20) { this.form.setFieldsValue({ cause: '' }) this.refuse_show = true @@ -72,10 +73,12 @@ export default { } }, // 确认按钮 - handleSubmit (e) { + handleSubmit(e) { e.preventDefault() // 表单验证 - const { form: { validateFields } } = this + const { + form: { validateFields }, + } = this validateFields((errors, values) => { // 提交到后端api !errors && this.onFormSubmit(values) @@ -83,26 +86,25 @@ export default { }, // 关闭对话框事件 - handleCancel () { + handleCancel() { this.visible = false this.form.resetFields() }, // 提交到后端api - onFormSubmit (values) { + onFormSubmit(values) { this.isLoading = true Api.updateStandard({ standardId: this.record.id, form: values }) - .then(result => { + .then((result) => { // 显示成功 this.$message.success(result.message, 1.5) // 关闭对话框事件 this.handleCancel() // 通知父端组件提交完成了 - this.$emit('handleSubmit', values) + this.$emit('handleSubmit') }) - .finally(() => this.isLoading = false) - } - - } + .finally(() => (this.isLoading = false)) + }, + }, } diff --git a/src/views/order/modules/DocumentRecordList.vue b/src/views/order/modules/DocumentRecordList.vue index 2361906..0a46631 100644 --- a/src/views/order/modules/DocumentRecordList.vue +++ b/src/views/order/modules/DocumentRecordList.vue @@ -47,11 +47,11 @@ 详情 - 审单 + 审单 - + @@ -111,7 +111,7 @@ export default { dataIndex: 'transfer_image_url', scopedSlots: { customRender: 'transfer_image_url' }, }, - { + { title: '状态', dataIndex: 'standard_status', scopedSlots: { customRender: 'standard_status' }, @@ -131,6 +131,14 @@ export default { }, created() {}, methods: { + /** + * 刷新列表 + * @param Boolean bool 强制刷新到第一页 + */ + handleRefresh(bool = false) { + bool && (this.page = 1) + this.getDocumentList() + }, // 显示对话框 show(record) { // 显示窗口 diff --git a/src/views/order/modules/index.js b/src/views/order/modules/index.js index d4d6543..aeb6eaf 100644 --- a/src/views/order/modules/index.js +++ b/src/views/order/modules/index.js @@ -8,4 +8,5 @@ import JingDong from './JingDong' import DocumentRecord from './DocumentRecord' import DocumentRecordList from './DocumentRecordList' 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 } diff --git a/src/views/store/Setting.vue b/src/views/store/Setting.vue index 7c214be..8be17a2 100644 --- a/src/views/store/Setting.vue +++ b/src/views/store/Setting.vue @@ -21,7 +21,7 @@ - +