|
@@ -72,7 +72,7 @@ import ItemStock from "./components/ItemStock";
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite/index";
|
|
import { getWeixinId } from "@/api/invite/index";
|
|
|
-import { generatePriceTable,generateBarcodeTable,print } from '@/api/product';
|
|
|
|
|
|
|
+import { generatePriceTable,generateBarcodeTable,print,statusUpdate } from '@/api/product';
|
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
|
import { CURRENT_ENV } from '@/config'
|
|
import { CURRENT_ENV } from '@/config'
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
@@ -183,8 +183,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
moreToDo(item){
|
|
moreToDo(item){
|
|
|
let that=this;
|
|
let that=this;
|
|
|
- let doList = ['复制花材', '销售记录']
|
|
|
|
|
- let doNum = [0,1,2,10,100,500]
|
|
|
|
|
|
|
+ let doList = ['复制花材', '销售记录','下架','上架']
|
|
|
uni.showActionSheet({
|
|
uni.showActionSheet({
|
|
|
itemList: doList,
|
|
itemList: doList,
|
|
|
success: function (respond) {
|
|
success: function (respond) {
|
|
@@ -193,13 +192,24 @@ export default {
|
|
|
that.pageTo({url: '/admin/item/copy',query: {id: item.id}})
|
|
that.pageTo({url: '/admin/item/copy',query: {id: item.id}})
|
|
|
} else if (index == 1) {
|
|
} else if (index == 1) {
|
|
|
that.pageTo({url: "/admin/order/itemOrder?id="+item.id})
|
|
that.pageTo({url: "/admin/order/itemOrder?id="+item.id})
|
|
|
- }else{
|
|
|
|
|
- let currentNum = Number(doNum[index])
|
|
|
|
|
- print({id:item.id,num:currentNum}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.$msg(res.msg)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ } else if (index == 2) {
|
|
|
|
|
+ that.$util.confirmModal({content:'确认下架?'},() => {
|
|
|
|
|
+ statusUpdate({id:item.id,status:2}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
|
|
+ } else if (index == 3) {
|
|
|
|
|
+ that.$util.confirmModal({content:'确认上架?'},() => {
|
|
|
|
|
+ statusUpdate({id:item.id,status:1}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|