|
@@ -144,9 +144,7 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- this.productForm.dispatchBillSn = this.$route.params.dispatchBillSn
|
|
|
// 查询统计
|
|
|
- this.getTotalData()
|
|
|
return waitDispatchDetailAllList(Object.assign(parameter, this.productForm)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
@@ -176,6 +174,11 @@ export default {
|
|
|
findBySalesBillSn({ salesBillSn: this.$route.params.salesBillSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.totalData = res.data || null
|
|
|
+ this.productForm.dispatchBillSn = res.data.dispatchBillSn
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => {
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ })
|
|
|
} else {
|
|
|
this.totalData = null
|
|
|
}
|
|
@@ -195,7 +198,7 @@ export default {
|
|
|
_this.$refs.partQuery.resetCurForm()
|
|
|
_this.$message.success(res.message)
|
|
|
_this.spinning = false
|
|
|
- _this.resetSearchForm(true)
|
|
|
+ _this.resetSearchForm()
|
|
|
} else {
|
|
|
_this.spinning = false
|
|
|
}
|
|
@@ -205,8 +208,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 重置
|
|
|
- resetSearchForm (flag) {
|
|
|
- this.$refs.table.refresh(!!flag)
|
|
|
+ resetSearchForm () {
|
|
|
+ this.getTotalData()
|
|
|
this.getOrderDetail()
|
|
|
},
|
|
|
// 返回
|
|
@@ -256,7 +259,7 @@ export default {
|
|
|
_this.spinning = true
|
|
|
deleteBatch(type == 0 ? [row.dispatchBillDetailSn] : row).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- _this.resetSearchForm(true)
|
|
|
+ _this.resetSearchForm()
|
|
|
_this.$refs.partQuery.resetCurForm()
|
|
|
if (type == 1) { // 批量操作
|
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
@@ -372,7 +375,7 @@ export default {
|
|
|
this.$refs.partQuery.clearTable()
|
|
|
this.salesBillSn = this.$route.params.salesBillSn
|
|
|
this.getOrderDetail()
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.getTotalData()
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|