|
@@ -172,37 +172,23 @@ export default {
|
|
|
const { data } = await hostFn(params);
|
|
const { data } = await hostFn(params);
|
|
|
this.globalClassItemList = '';
|
|
this.globalClassItemList = '';
|
|
|
data.forEach(element => {
|
|
data.forEach(element => {
|
|
|
- element.child && element.child.forEach(child => {
|
|
|
|
|
-
|
|
|
|
|
- //组合出一维数组给下面使用 shish 20210811
|
|
|
|
|
- this.globalItemList[child.id] = child
|
|
|
|
|
|
|
+ if(element.child && !this.$util.isEmpty(element.child)){
|
|
|
|
|
+ element.child.forEach(child => {
|
|
|
|
|
|
|
|
|
|
+ //组合出一维数组给下面使用 shish 20221216
|
|
|
|
|
+ //this.globalItemList[child.id] = child 用这个方法会造成this.globalClassItemList无法渲染到页面,很奇怪!
|
|
|
|
|
+ this.globalItemList.push(child)
|
|
|
|
|
+
|
|
|
child.classId = element.classId;
|
|
child.classId = element.classId;
|
|
|
child.className = element.className;
|
|
child.className = element.className;
|
|
|
child.userPrice = 0;
|
|
child.userPrice = 0;
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.productInfoList = data;
|
|
this.productInfoList = data;
|
|
|
|
|
|
|
|
let currentInfo = uni.getStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId)
|
|
let currentInfo = uni.getStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId)
|
|
|
if(!this.$util.isEmpty(currentInfo)){
|
|
if(!this.$util.isEmpty(currentInfo)){
|
|
|
- currentInfo.forEach((currentItem,currentIndex,currentArray)=>{
|
|
|
|
|
- let currentId = currentItem.id
|
|
|
|
|
- if(this.globalItemList[currentId]){
|
|
|
|
|
- currentArray[currentIndex].bigPrice = this.globalItemList[currentId].bigPrice
|
|
|
|
|
- currentArray[currentIndex].smallPrice = this.globalItemList[currentId].smallPrice
|
|
|
|
|
- //已经记住的花材,价格修改之后,被记住的价格也要同步修改(除了采购模块)
|
|
|
|
|
- // if(this.selectJobType != 'purchase'){
|
|
|
|
|
- // if(!this.$util.isEmpty(currentArray[currentIndex].userPrice)){
|
|
|
|
|
- // if(currentArray[currentIndex].bigCount && Number(currentArray[currentIndex].bigCount)>0){
|
|
|
|
|
- // currentArray[currentIndex].userPrice = this.globalItemList[currentId].bigPrice
|
|
|
|
|
- // }else{
|
|
|
|
|
- // currentArray[currentIndex].userPrice = this.globalItemList[currentId].smallPrice
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
this.setSelectInfo({ selectJobType: this.selectJobType, info: currentInfo,selectJobId:this.selectJobId })
|
|
this.setSelectInfo({ selectJobType: this.selectJobType, info: currentInfo,selectJobId:this.selectJobId })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -319,6 +305,9 @@ export default {
|
|
|
if(this.py.indexOf('橙色') == 0 && this.py.length <= 2){
|
|
if(this.py.indexOf('橙色') == 0 && this.py.length <= 2){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ if(this.py.indexOf('银色') == 0 && this.py.length <= 2){
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if(this.py.indexOf('yj') == 0 && this.py.length <= 2){
|
|
if(this.py.indexOf('yj') == 0 && this.py.length <= 2){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|