|
@@ -442,6 +442,7 @@ import { getDealerList, getListCustomer } from '@/api/basic_data/dealer'
|
|
import PickupPrint from '@/views/supply/pickup/components/pickup_print'
|
|
import PickupPrint from '@/views/supply/pickup/components/pickup_print'
|
|
|
|
|
|
import printPreview from './components/design/preview.vue'
|
|
import printPreview from './components/design/preview.vue'
|
|
|
|
+import { async } from 'q'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -693,7 +694,12 @@ export default {
|
|
logisticsId: this.screenForm.logisticsId,
|
|
logisticsId: this.screenForm.logisticsId,
|
|
invoiceId: this.screenForm.invoiceId
|
|
invoiceId: this.screenForm.invoiceId
|
|
}
|
|
}
|
|
- getPickupList(params).then(res => {
|
|
|
|
|
|
+ // getPickupList(params).then(res => {
|
|
|
|
+ // this.dataList = res.data.records
|
|
|
|
+ // this.listTotal = res.data.total
|
|
|
|
+ // this.listLoading = false
|
|
|
|
+ // })
|
|
|
|
+ return getPickupList(params).then(res => {
|
|
this.dataList = res.data.records
|
|
this.dataList = res.data.records
|
|
this.listTotal = res.data.total
|
|
this.listTotal = res.data.total
|
|
this.listLoading = false
|
|
this.listLoading = false
|
|
@@ -745,22 +751,38 @@ export default {
|
|
|
|
|
|
// 点击打印
|
|
// 点击打印
|
|
async toPrint() {
|
|
async toPrint() {
|
|
- const { data } = await this.getNewDetailPrintDisString()
|
|
|
|
- if (data) {
|
|
|
|
- this.$confirm(<p class='text'>{data}</p>, '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- customClass: 'text'
|
|
|
|
- }).then(() => {
|
|
|
|
- if (this.tableSelection[0].printNum) {
|
|
|
|
- this.dialogForm.createMan = JSON.parse(localStorage.getItem('supply_user')).nickName
|
|
|
|
- this.dialogForm.createDate = this.getDate()
|
|
|
|
- this.isShowDialog = true
|
|
|
|
|
|
+ this.getList().then(async res => {
|
|
|
|
+ if (this.dataList.length) {
|
|
|
|
+ const ids = this.tableSelection.map(k => k.id)
|
|
|
|
+ for (let i = 0; i < ids.length; i++) {
|
|
|
|
+ console.log(this.dataList.some(e => e.id === ids[i]))
|
|
|
|
+ if (!this.dataList.some(e => e.id === ids[i])) {
|
|
|
|
+ console.log(333)
|
|
|
|
+ this.$errorMsg(`单被商家取消预约,请刷新页面,重新选择`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.getOvalDateil()
|
|
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.$errorMsg(`单被商家取消预约,请刷新页面,重新选择`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const { data } = await this.getNewDetailPrintDisString()
|
|
|
|
+ if (data) {
|
|
|
|
+ this.$confirm(<p class='text'>{data}</p>, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ customClass: 'text'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ if (this.tableSelection[0].printNum) {
|
|
|
|
+ this.dialogForm.createMan = JSON.parse(localStorage.getItem('supply_user')).nickName
|
|
|
|
+ this.dialogForm.createDate = this.getDate()
|
|
|
|
+ this.isShowDialog = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.getOvalDateil()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getOvalDateil() {
|
|
getOvalDateil() {
|
|
this.getDateil(this.tableSelection, 'getDtailPrintDis', this.check).then(res => {
|
|
this.getDateil(this.tableSelection, 'getDtailPrintDis', this.check).then(res => {
|