Merge branch 'dev2' of http://git.gpxscs.cn/front/java-mall-admin into dev2
This commit is contained in:
commit
a04db00c4f
@ -124,6 +124,21 @@
|
|||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item prop="product_state_id">
|
||||||
|
<el-select
|
||||||
|
v-model.trim="queryForm.is_special"
|
||||||
|
clearable
|
||||||
|
:placeholder="__('是否特价商品')"
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="false" icon="el-icon-delete" type="primary" @click="clearData">
|
<el-button v-if="false" icon="el-icon-delete" type="primary" @click="clearData">
|
||||||
{{ __('清空') }}
|
{{ __('清空') }}
|
||||||
@ -312,7 +327,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<el-tag :type='({"1001":"success","1002":"info","1000":"warning"})[scope.row.product_state_id]'>
|
<el-tag :type='({"1001":"success","1002":"info","1000":"warning"})[scope.row.product_state_id]'>
|
||||||
{{ ({"1001":"销售中","1002":"仓库中","1000":"违规禁售"})[scope.row.product_state_id] }}
|
{{ ({"1001":"销售中","1002":"仓库中","1000":"违规禁售","1003":"未分配商品"})[scope.row.product_state_id] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -496,6 +511,20 @@ import {
|
|||||||
value: 1000,
|
value: 1000,
|
||||||
label: this.__('违规禁售'),
|
label: this.__('违规禁售'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value:1003,
|
||||||
|
label:"未分配商品"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
specialOptions:[
|
||||||
|
{
|
||||||
|
value:0,
|
||||||
|
label:"否"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value:1,
|
||||||
|
label:"是"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
data: [], // 产品规格数据
|
data: [], // 产品规格数据
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
|
|||||||
@ -66,6 +66,21 @@
|
|||||||
style="width: 120px;"
|
style="width: 120px;"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<tree-select
|
||||||
|
ref="treeSelect"
|
||||||
|
:checked-keys="defaultCheckedKeys"
|
||||||
|
clearable
|
||||||
|
:data="productDataList"
|
||||||
|
:default-props="defaultProps"
|
||||||
|
:height="300"
|
||||||
|
:node-key="nodeKey"
|
||||||
|
size="small"
|
||||||
|
style="width: 120px"
|
||||||
|
:width="220"
|
||||||
|
@change="change"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="el-icon-search" type="primary" @click="queryData">
|
<el-button icon="el-icon-search" type="primary" @click="queryData">
|
||||||
{{ __('查询') }}
|
{{ __('查询') }}
|
||||||
@ -273,10 +288,12 @@
|
|||||||
import { getToken } from '@/utils/token'
|
import { getToken } from '@/utils/token'
|
||||||
import excelExeImport from './components/ExcelImport'
|
import excelExeImport from './components/ExcelImport'
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
|
import TreeSelect from '@/components/treeSelect'
|
||||||
|
import { getTree } from '@/api/base/product/category'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductList',
|
name: 'ProductList',
|
||||||
components: { Edit, Add, excelExeImport },
|
components: { Edit, Add, excelExeImport,TreeSelect },
|
||||||
beforeRouteEnter(to, form, next) {
|
beforeRouteEnter(to, form, next) {
|
||||||
next((vm) => vm.queryData())
|
next((vm) => vm.queryData())
|
||||||
},
|
},
|
||||||
@ -351,6 +368,13 @@
|
|||||||
label: this.__('供应商产品'),
|
label: this.__('供应商产品'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
defaultCheckedKeys: [],
|
||||||
|
nodeKey: 'id',
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'label',
|
||||||
|
},
|
||||||
|
productDataList: [], // 产品规格数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -369,6 +393,7 @@
|
|||||||
|
|
||||||
this.params.authorization = getToken()
|
this.params.authorization = getToken()
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
|
this.getTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
__,
|
__,
|
||||||
@ -390,6 +415,11 @@
|
|||||||
await this.fetchData()
|
await this.fetchData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async getTree() {
|
||||||
|
const { data } = await getTree()
|
||||||
|
debugger;
|
||||||
|
this.productDataList = data
|
||||||
|
},
|
||||||
handleSuccess(response, file, fileList) {
|
handleSuccess(response, file, fileList) {
|
||||||
let status = response.status
|
let status = response.status
|
||||||
let msg = response.msg
|
let msg = response.msg
|
||||||
@ -525,6 +555,9 @@
|
|||||||
this.total = data.records
|
this.total = data.records
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
},
|
},
|
||||||
|
change(id) {
|
||||||
|
this.queryForm.category_id = id
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user