|
@@ -163,18 +163,35 @@ export default {
|
|
|
this.disabled = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
this.spinning = true
|
|
|
- return reportStockList(params).then(res => {
|
|
|
- // 总计
|
|
|
- this.getCount(params)
|
|
|
- const data = res.data
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
- }
|
|
|
- this.disabled = false
|
|
|
- this.spinning = false
|
|
|
- return data
|
|
|
- })
|
|
|
+ console.log(params, 'paramsparams')
|
|
|
+ if (params.targetName) {
|
|
|
+ return reportStockList(params).then(res => {
|
|
|
+ // 总计
|
|
|
+ this.getCount(params)
|
|
|
+ const data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const _this = this
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
|
+ const data = {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [],
|
|
|
+ count: 0
|
|
|
+ }
|
|
|
+ _this.disabled = false
|
|
|
+ _this.spinning = false
|
|
|
+ _this.$message.info('请选择连锁店')
|
|
|
+ resolve(data)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
productType: [],
|
|
|
productBrandList: [], // 品牌下拉数据
|
|
@@ -220,7 +237,7 @@ export default {
|
|
|
this.queryParam.productTypeSn3 = ''
|
|
|
this.productType = []
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
- // this.$refs.table.refresh(true)
|
|
|
+ this.$refs.table.clearTable()
|
|
|
},
|
|
|
// 详情
|
|
|
goDetail (row) {
|