|
|
@@ -7,6 +7,8 @@ export default {
|
|
|
return {
|
|
|
currentJobType: "bill",//业务类型,开单、采购、报损、盘点
|
|
|
currentJobId:0,//业务类型对应的主体ID等
|
|
|
+ currentBackJobId:1,
|
|
|
+ globalHasHand:0,
|
|
|
isCut:false,
|
|
|
productInfoList: [], //商品信息
|
|
|
classIndex: 0, //当前商品类别下标
|
|
|
@@ -86,7 +88,46 @@ export default {
|
|
|
this.setSelectInfo({ currentJobType: this.currentJobType, info: selectData,currentJobId:this.currentJobId })
|
|
|
uni.setStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentJobId, selectData)
|
|
|
},
|
|
|
- //询问是否删除缓存
|
|
|
+ handOrder(){
|
|
|
+ let that = this
|
|
|
+ let has = uni.getStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentBackJobId)
|
|
|
+ if(!this.$util.isEmpty(has)){
|
|
|
+ this.$msg('已挂了一单')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ let currentInfo = uni.getStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentJobId)
|
|
|
+ if(this.$util.isEmpty(currentInfo)){
|
|
|
+ this.$msg('没有花材要挂单')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ uni.setStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentBackJobId, currentInfo)
|
|
|
+
|
|
|
+ uni.removeStorageSync('selectList_'+that.currentJobType+'_target_'+that.currentJobId)
|
|
|
+ that.reSetSelectInfo({currentJobType:that.currentJobType,currentJobId:that.currentJobId})
|
|
|
+
|
|
|
+ this.globalHasHand = 1
|
|
|
+ },
|
|
|
+ getHandOrder(){
|
|
|
+ let that = this
|
|
|
+ let currentInfo = uni.getStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentBackJobId)
|
|
|
+ if(this.$util.isEmpty(currentInfo)){
|
|
|
+ this.$msg('没有挂单')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ uni.removeStorageSync('selectList_'+that.currentJobType+'_target_'+that.currentJobId)
|
|
|
+ that.reSetSelectInfo({currentJobType:that.currentJobType,currentJobId:that.currentJobId})
|
|
|
+
|
|
|
+ uni.setStorageSync('selectList_'+this.currentJobType+'_target_'+this.currentJobId, currentInfo)
|
|
|
+ if(!this.$util.isEmpty(currentInfo)){
|
|
|
+ this.setSelectInfo({ currentJobType: this.currentJobType, info: currentInfo,currentJobId:this.currentJobId })
|
|
|
+ }
|
|
|
+
|
|
|
+ //清除挂单
|
|
|
+ uni.removeStorageSync('selectList_'+that.currentJobType+'_target_'+that.currentBackJobId)
|
|
|
+
|
|
|
+ this.globalHasHand = 0
|
|
|
+ },
|
|
|
removeFromSave(){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认清除花材?'},() => {
|