|
@@ -1,11 +1,26 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <div>
|
|
|
|
|
|
|
+ <div style="width:100%;height:70px;line-height: 70px;">
|
|
|
|
|
|
|
|
|
|
+ <el-radio-group v-model="requestType" @change="changeRequest" style="margin-right:20px;padding-top:6px;margin-left:20px;" size="small">
|
|
|
|
|
+ <el-radio label="hasStockList">有库存花材</el-radio>
|
|
|
|
|
+ <el-radio label="itemList">全部花材</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+
|
|
|
|
|
+ <el-select size="small" v-model="currentItemClassName" placeholder="花材分类" style="width:150px;margin-right:10px;" @change="getItemClass" clearable>
|
|
|
|
|
+ <el-option v-for="item in itemClassList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+
|
|
|
|
|
+ <el-input v-model="searchName" placeholder="搜索花材" style="width:200px;margin-right:9px;" size="small" @focus="searchFocus" @input="toSearch"></el-input>
|
|
|
|
|
+
|
|
|
|
|
+ <el-input v-model="modifyName" placeholder="保存本次名称(选填)" style="width:200px;margin-right:9px;margin-left:90px;" size="small"></el-input>
|
|
|
|
|
+ <el-button type="primary" size="small" @click="replaceBtnFn(0)">确认修改</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button type="success" size="small" @click="replaceBtnFn(0)" style="margin-left:90px;">修改记录</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="width:100%;height:auto;text-align: left;" v-for="(sonProduct, index) in allProdct">
|
|
<div style="width:100%;height:auto;text-align: left;" v-for="(sonProduct, index) in allProdct">
|
|
|
|
|
|
|
|
- <div style="font-weight:bold;text-align: left;width:100%;padding:6px 0 5px 8px;">{{ sonProduct.className }}</div>
|
|
|
|
|
|
|
+ <div style="font-weight:bold;text-align: left;width:100%;padding:6px 0 5px 8px;" v-if="sonProduct.child && !$util.isEmpty(sonProduct.child)">{{ sonProduct.className }}</div>
|
|
|
|
|
|
|
|
<div style="width:100%;height:auto;background-color: white;" v-if="sonProduct.child && !$util.isEmpty(sonProduct.child)">
|
|
<div style="width:100%;height:auto;background-color: white;" v-if="sonProduct.child && !$util.isEmpty(sonProduct.child)">
|
|
|
|
|
|
|
@@ -70,16 +85,41 @@
|
|
|
components: {},
|
|
components: {},
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
- allProdct:[]
|
|
|
|
|
|
|
+ allProdct:[],
|
|
|
|
|
+ requestType:"hasStockList",
|
|
|
|
|
+ itemClassList:[],
|
|
|
|
|
+ currentItemClassName:'',
|
|
|
|
|
+ classId:0,
|
|
|
|
|
+ searchName:'',
|
|
|
|
|
+ modifyName:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
this.show()
|
|
this.show()
|
|
|
|
|
+
|
|
|
|
|
+ this.$service.itemClass.allClass().then((res) => {
|
|
|
|
|
+ this.itemClassList = res;
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ searchFocus(){
|
|
|
|
|
+ this.searchName = ''
|
|
|
|
|
+ this.show()
|
|
|
|
|
+ },
|
|
|
|
|
+ toSearch(){
|
|
|
|
|
+ this.show()
|
|
|
|
|
+ },
|
|
|
|
|
+ changeRequest(e){
|
|
|
|
|
+ this.requestType = e
|
|
|
|
|
+ this.show()
|
|
|
|
|
+ },
|
|
|
|
|
+ getItemClass(e){
|
|
|
|
|
+ this.classId = e
|
|
|
|
|
+ this.show()
|
|
|
|
|
+ },
|
|
|
show(){
|
|
show(){
|
|
|
let that = this
|
|
let that = this
|
|
|
- this.$service.product.showProduct({requestType:'hasStockList'}).then(res => {
|
|
|
|
|
|
|
+ this.$service.product.showProduct({requestType:this.requestType,classId:this.classId,name:this.searchName}).then(res => {
|
|
|
if (!this.$util.isEmpty(res.classItem)) {
|
|
if (!this.$util.isEmpty(res.classItem)) {
|
|
|
res.classItem.forEach((item,idx,arr) => {
|
|
res.classItem.forEach((item,idx,arr) => {
|
|
|
//console.log(item.child)
|
|
//console.log(item.child)
|