|
@@ -1,8 +1,8 @@
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import { copyObject } from "@/utils/util"
|
|
import { copyObject } from "@/utils/util"
|
|
|
import { allProduct } from '@/api/product'
|
|
import { allProduct } from '@/api/product'
|
|
|
-import { getMenu } from "@/api/item-class";
|
|
|
|
|
-import { getItemList } from '@/api/item';
|
|
|
|
|
|
|
+import { getCategoryToGoods } from "@/api/goods"
|
|
|
|
|
+import {getMenu} from "@/api/category"
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -153,7 +153,7 @@ export default {
|
|
|
if(!that.$util.isEmpty(currentInfo)){
|
|
if(!that.$util.isEmpty(currentInfo)){
|
|
|
that.setSelectInfo({ selectJobType: that.selectJobType, info: currentInfo,selectJobId:that.selectJobId })
|
|
that.setSelectInfo({ selectJobType: that.selectJobType, info: currentInfo,selectJobId:that.selectJobId })
|
|
|
}
|
|
}
|
|
|
- that.getGlobalProductList()
|
|
|
|
|
|
|
+ that.getGlobalGoodsList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -162,14 +162,14 @@ export default {
|
|
|
this.globalGoToTop()
|
|
this.globalGoToTop()
|
|
|
this.globalPage = 1
|
|
this.globalPage = 1
|
|
|
this.globalFinishGetItem = 0
|
|
this.globalFinishGetItem = 0
|
|
|
- this.getGlobalProductList()
|
|
|
|
|
|
|
+ this.getGlobalGoodsList()
|
|
|
},
|
|
},
|
|
|
- getGlobalProductList(){
|
|
|
|
|
|
|
+ getGlobalGoodsList(){
|
|
|
if(this.globalFinishGetItem == 1){
|
|
if(this.globalFinishGetItem == 1){
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
let that = this
|
|
let that = this
|
|
|
- getItemList({classId:this.globalClassId,requestType:this.globalRequestType,page:this.globalPage,
|
|
|
|
|
|
|
+ getCategoryToGoods({classId:this.globalClassId,requestType:this.globalRequestType,page:this.globalPage,
|
|
|
search:this.globalPy,customId:this.globalCustomId,globalCgMyCharge:this.globalCgMyCharge,lookStock:this.globalLookStock}).then(res=>{
|
|
search:this.globalPy,customId:this.globalCustomId,globalCgMyCharge:this.globalCgMyCharge,lookStock:this.globalLookStock}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.globalItemData = that.globalPage == 1 ? res.data.list : that.globalItemData.concat(res.data.list)
|
|
that.globalItemData = that.globalPage == 1 ? res.data.list : that.globalItemData.concat(res.data.list)
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
//无操作
|
|
//无操作
|
|
|
}else{
|
|
}else{
|
|
|
let currentClass = this.globalClassDataIndex[currentClassId] ? this.globalClassDataIndex[currentClassId] : null
|
|
let currentClass = this.globalClassDataIndex[currentClassId] ? this.globalClassDataIndex[currentClassId] : null
|
|
|
- cName = currentClass.name ? currentClass.name : ''
|
|
|
|
|
|
|
+ cName = currentClass.categoryName ? currentClass.categoryName : ''
|
|
|
hasExists[currentClassId] = 1
|
|
hasExists[currentClassId] = 1
|
|
|
}
|
|
}
|
|
|
that.globalItemData[i].className = cName
|
|
that.globalItemData[i].className = cName
|
|
@@ -247,7 +247,7 @@ export default {
|
|
|
this.$refs.globalSearchRef.search = ''
|
|
this.$refs.globalSearchRef.search = ''
|
|
|
this.globalClassId = item.id
|
|
this.globalClassId = item.id
|
|
|
this.globalFinishGetItem = 0
|
|
this.globalFinishGetItem = 0
|
|
|
- this.getGlobalProductList()
|
|
|
|
|
|
|
+ this.getGlobalGoodsList()
|
|
|
},
|
|
},
|
|
|
pushToSave(selectData){
|
|
pushToSave(selectData){
|
|
|
this.setSelectInfo({ selectJobType: this.selectJobType, info: selectData,selectJobId:this.selectJobId })
|
|
this.setSelectInfo({ selectJobType: this.selectJobType, info: selectData,selectJobId:this.selectJobId })
|
|
@@ -259,7 +259,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
removeFromSave(){
|
|
removeFromSave(){
|
|
|
let that = this
|
|
let that = this
|
|
|
- that.$util.confirmModal({content:'确认清除花材?'},() => {
|
|
|
|
|
|
|
+ that.$util.confirmModal({content:'确认清除?'},() => {
|
|
|
that.removeFromSaveDirect()
|
|
that.removeFromSaveDirect()
|
|
|
that.$msg('已清除')
|
|
that.$msg('已清除')
|
|
|
})
|
|
})
|
|
@@ -269,10 +269,6 @@ export default {
|
|
|
//删除仓库
|
|
//删除仓库
|
|
|
uni.removeStorageSync('selectList_'+that.selectJobType+'_target_'+that.selectJobId)
|
|
uni.removeStorageSync('selectList_'+that.selectJobType+'_target_'+that.selectJobId)
|
|
|
that.reSetSelectInfo({selectJobType:that.selectJobType,selectJobId:that.selectJobId})
|
|
that.reSetSelectInfo({selectJobType:that.selectJobType,selectJobId:that.selectJobId})
|
|
|
- //删除多颜色
|
|
|
|
|
- if(that.selectJobType == 'bill'){
|
|
|
|
|
- uni.removeStorageSync("xj"+that.selectJobId)
|
|
|
|
|
- }
|
|
|
|
|
//删除显示
|
|
//删除显示
|
|
|
if(!this.$util.isEmpty(this.globalItemData)){
|
|
if(!this.$util.isEmpty(this.globalItemData)){
|
|
|
this.globalItemData.forEach((item,index,arr) =>{
|
|
this.globalItemData.forEach((item,index,arr) =>{
|
|
@@ -291,7 +287,7 @@ export default {
|
|
|
this.globalGoToTop()
|
|
this.globalGoToTop()
|
|
|
this.globalClassIndex = -1
|
|
this.globalClassIndex = -1
|
|
|
this.globalFinishGetItem = 0
|
|
this.globalFinishGetItem = 0
|
|
|
- this.getGlobalProductList()
|
|
|
|
|
|
|
+ this.getGlobalGoodsList()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
globalGoToTop(){
|
|
globalGoToTop(){
|
|
@@ -309,7 +305,7 @@ export default {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.globalIsRequesting = true
|
|
this.globalIsRequesting = true
|
|
|
- this.getGlobalProductList()
|
|
|
|
|
|
|
+ this.getGlobalGoodsList()
|
|
|
},
|
|
},
|
|
|
getSelectItemById(id, classId) {
|
|
getSelectItemById(id, classId) {
|
|
|
let info = { bigCount: null, smallCount: null, autoPrice: null, itemPrice: null }
|
|
let info = { bigCount: null, smallCount: null, autoPrice: null, itemPrice: null }
|
|
@@ -461,14 +457,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
//显示可以修改花材的弹框
|
|
//显示可以修改花材的弹框
|
|
|
showAddModelFn(info) {
|
|
showAddModelFn(info) {
|
|
|
- if(info && info.variety == 1 && this.selectJobType == 'bill'){
|
|
|
|
|
- let curPage = getCurrentPages();
|
|
|
|
|
- let route = curPage[curPage.length - 1].route;
|
|
|
|
|
- if(route == 'admin/billing/affirm'){
|
|
|
|
|
- this.$msg('多颜色花材,请返回修改')
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
if(info.bigNum <= 0 && info.smallNum <= 0){
|
|
if(info.bigNum <= 0 && info.smallNum <= 0){
|
|
|
if(this.globalCheckStock){
|
|
if(this.globalCheckStock){
|
|
|
this.$util.noStockRemind()
|
|
this.$util.noStockRemind()
|