|
@@ -49,6 +49,11 @@
|
|
<a-input v-model.trim="queryParam.ggxh" placeholder="规格型号"/>
|
|
<a-input v-model.trim="queryParam.ggxh" placeholder="规格型号"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="查询方式">
|
|
|
|
+ <a-switch un-checked-children="存量" checked-children="存货" v-model="searchType" default-checked @change="$refs.table.refresh(true)"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="8 || 24" :sm="24">
|
|
<a-col :md="8 || 24" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
@@ -94,7 +99,7 @@ import Detail from './Detail'
|
|
import { fetchSpareTypeTree } from '@/api/sqarepartmanage/sparetype'
|
|
import { fetchSpareTypeTree } from '@/api/sqarepartmanage/sparetype'
|
|
import { fetchStoreTree } from '@/api/store/store'
|
|
import { fetchStoreTree } from '@/api/store/store'
|
|
|
|
|
|
-import { getSpareStorePageYY3 } from '@/api/yongyou/yongyou'
|
|
|
|
|
|
+import { getSpareStorePageYY3, getInventoryPage } from '@/api/yongyou/yongyou'
|
|
export default {
|
|
export default {
|
|
name: 'SpareStoreSelectModalYY',
|
|
name: 'SpareStoreSelectModalYY',
|
|
components: {
|
|
components: {
|
|
@@ -135,7 +140,7 @@ export default {
|
|
isSpecial: null,
|
|
isSpecial: null,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- storeNo: '09',
|
|
|
|
|
|
+ storeNo: '09'
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
@@ -181,6 +186,7 @@ export default {
|
|
],
|
|
],
|
|
// 下拉框map
|
|
// 下拉框map
|
|
tokenType: 1,
|
|
tokenType: 1,
|
|
|
|
+ searchType: 0,
|
|
delFlagMap: {},
|
|
delFlagMap: {},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -194,14 +200,25 @@ export default {
|
|
sortName: 'update_time'
|
|
sortName: 'update_time'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return getSpareStorePageYY3(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- if (res.data.rows === null) {
|
|
|
|
- const data = { total: 0, rows: [], pageNum: 1, pageSize: 10, pages: 1 }
|
|
|
|
- return data
|
|
|
|
- } else {
|
|
|
|
- return res.data
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (!this.searchType) {
|
|
|
|
+ return getSpareStorePageYY3(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
+ if (res.data.rows === null) {
|
|
|
|
+ const data = { total: 0, rows: [], pageNum: 1, pageSize: 10, pages: 1 }
|
|
|
|
+ return data
|
|
|
|
+ } else {
|
|
|
|
+ return res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return getInventoryPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
+ if (res.data.rows === null) {
|
|
|
|
+ const data = { total: 0, rows: [], pageNum: 1, pageSize: 10, pages: 1 }
|
|
|
|
+ return data
|
|
|
|
+ } else {
|
|
|
|
+ return res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
selectedRowKeys: [],
|
|
selectedRowKeys: [],
|
|
selectedRows: [],
|
|
selectedRows: [],
|