|
@@ -32,7 +32,13 @@
|
|
<a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
|
|
- <a-button style="margin-left: 15px" type="primary" class="button-info" @click="searchThreeStock" id="salesEdit-updateStock">第三方库存</a-button>
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ :loading="loading"
|
|
|
|
+ style="margin-left: 15px"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="button-info"
|
|
|
|
+ @click="searchThreeStock"
|
|
|
|
+ id="salesEdit-updateStock">第三方库存</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -238,6 +244,7 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
|
|
+ loading: false,
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -257,6 +264,7 @@ export default {
|
|
this.dataSource = data.list
|
|
this.dataSource = data.list
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.loading = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -305,7 +313,7 @@ export default {
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.showStockCol) {
|
|
if (this.showStockCol) {
|
|
- arr.splice(5, 0, { title: '第三方库存', dataIndex: 'stockQty', width: '8%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
|
|
|
|
|
|
+ arr.splice(5, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: '8%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
|
|
}
|
|
}
|
|
// 售价权限
|
|
// 售价权限
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
@@ -337,9 +345,13 @@ export default {
|
|
},
|
|
},
|
|
// 查询第三方库存
|
|
// 查询第三方库存
|
|
searchThreeStock () {
|
|
searchThreeStock () {
|
|
- this.showStockCol = true
|
|
|
|
|
|
+ this.loading = true
|
|
this.$emit('allThreeStock')
|
|
this.$emit('allThreeStock')
|
|
},
|
|
},
|
|
|
|
+ searchThreeStockOk () {
|
|
|
|
+ this.showStockCol = true
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ },
|
|
// 获取统计
|
|
// 获取统计
|
|
getCount () {
|
|
getCount () {
|
|
salesDetaiCount(Object.assign(this.queryParam, { showStock: true })).then(res => {
|
|
salesDetaiCount(Object.assign(this.queryParam, { showStock: true })).then(res => {
|