|
@@ -184,7 +184,7 @@ import { getDetailApi, saveSignInTicket, checkApi, splitDataApi, updateApi } fro |
|
@@ -184,7 +184,7 @@ import { getDetailApi, saveSignInTicket, checkApi, splitDataApi, updateApi } fro |
|
184
|
import Product from './product.vue'
|
184
|
import Product from './product.vue'
|
|
185
|
import DetailButtons from '@/components/detail-buttons/index.vue'
|
185
|
import DetailButtons from '@/components/detail-buttons/index.vue'
|
|
186
|
import FileUpload from '@/components/file-upload/index.vue'
|
186
|
import FileUpload from '@/components/file-upload/index.vue'
|
|
187
|
-import { getShipmentPlanDetailApi, createApi } from '@/api/delay_invoice.js'
|
187
|
+import { getShipmentPlanDetailApi, createApi, pushApi } from '@/api/delay_invoice.js'
|
|
188
|
import { downloadFile } from '@/utils/downloadFile.js'
|
188
|
import { downloadFile } from '@/utils/downloadFile.js'
|
|
189
|
|
189
|
|
|
190
|
export default {
|
190
|
export default {
|
|
@@ -199,6 +199,7 @@ export default { |
|
@@ -199,6 +199,7 @@ export default { |
|
199
|
{ text: '填写实发数', visible: true, variant: 'outline', event: 'fill' },
|
199
|
{ text: '填写实发数', visible: true, variant: 'outline', event: 'fill' },
|
|
200
|
{ text: '上传签收单据', visible: true, variant: 'primary', event: 'upload' },
|
200
|
{ text: '上传签收单据', visible: true, variant: 'primary', event: 'upload' },
|
|
201
|
{ text: '填写日期', visible: true, variant: 'primary', event: 'fillDate' },
|
201
|
{ text: '填写日期', visible: true, variant: 'primary', event: 'fillDate' },
|
|
|
|
202
|
+ { text: '推送', visible: true, variant: 'primary', event: 'push' },
|
|
202
|
],
|
203
|
],
|
|
203
|
uploadFile: { id: '', name: '' },
|
204
|
uploadFile: { id: '', name: '' },
|
|
204
|
applyDelayForm: {},
|
205
|
applyDelayForm: {},
|
|
@@ -231,6 +232,7 @@ export default { |
|
@@ -231,6 +232,7 @@ export default { |
|
231
|
{ ...this.buttons[0], visible: f.canFill && this.$auth.hasPermi('shipping-plan-manage:invoice:fill') },
|
232
|
{ ...this.buttons[0], visible: f.canFill && this.$auth.hasPermi('shipping-plan-manage:invoice:fill') },
|
|
232
|
{ ...this.buttons[1], visible: f.canUpload && this.$auth.hasPermi('shipping-plan-manage:invoice:upload') },
|
233
|
{ ...this.buttons[1], visible: f.canUpload && this.$auth.hasPermi('shipping-plan-manage:invoice:upload') },
|
|
233
|
{ ...this.buttons[2], visible: f.canFillDate && this.$auth.hasPermi('shipping-plan-manage:invoice:fill-date') },
|
234
|
{ ...this.buttons[2], visible: f.canFillDate && this.$auth.hasPermi('shipping-plan-manage:invoice:fill-date') },
|
|
|
|
235
|
+ { ...this.buttons[3], visible: this.$auth.hasPermi('shipping-plan-manage:invoice:push') },
|
|
234
|
]
|
236
|
]
|
|
235
|
},
|
237
|
},
|
|
236
|
todayDate() {
|
238
|
todayDate() {
|
|
@@ -261,6 +263,7 @@ export default { |
|
@@ -261,6 +263,7 @@ export default { |
|
261
|
fill: () => this.onFill(),
|
263
|
fill: () => this.onFill(),
|
|
262
|
upload: () => this.onUpload(),
|
264
|
upload: () => this.onUpload(),
|
|
263
|
fillDate: () => this.onFillDate(),
|
265
|
fillDate: () => this.onFillDate(),
|
|
|
|
266
|
+ push: () => this.onPush(),
|
|
264
|
}
|
267
|
}
|
|
265
|
const fn = map[btn.event]
|
268
|
const fn = map[btn.event]
|
|
266
|
if (typeof fn === 'function') fn()
|
269
|
if (typeof fn === 'function') fn()
|
|
@@ -279,6 +282,16 @@ export default { |
|
@@ -279,6 +282,16 @@ export default { |
|
279
|
}
|
282
|
}
|
|
280
|
if (id) uni.navigateTo({ url: `/pages/invoice/fill?id=${id}&customerName=${this.form.customerName}` })
|
283
|
if (id) uni.navigateTo({ url: `/pages/invoice/fill?id=${id}&customerName=${this.form.customerName}` })
|
|
281
|
},
|
284
|
},
|
|
|
|
285
|
+ async onPush() {
|
|
|
|
286
|
+ const id = this.form.id || this.form.code;
|
|
|
|
287
|
+ try {
|
|
|
|
288
|
+ await pushApi([id])
|
|
|
|
289
|
+ } catch (e) {
|
|
|
|
290
|
+ uni.showToast({ title: (e && e.msg) || '推送失败', icon: 'none' })
|
|
|
|
291
|
+ return
|
|
|
|
292
|
+ }
|
|
|
|
293
|
+ if (id) uni.showToast({ title: '推送成功', icon: 'success' })
|
|
|
|
294
|
+ },
|
|
282
|
onUpload() {
|
295
|
onUpload() {
|
|
283
|
this.$refs.uploadPopup && this.$refs.uploadPopup.open()
|
296
|
this.$refs.uploadPopup && this.$refs.uploadPopup.open()
|
|
284
|
},
|
297
|
},
|