|
|
@@ -81,7 +81,7 @@ import productMins from "@/mixins/product";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { checkOrderApi } from "@/api/inventory";
|
|
|
import { changeFrontHide } from "@/api/item";
|
|
|
-import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelPreSell } from '@/api/product'
|
|
|
+import { cancelPreSell } from '@/api/product'
|
|
|
export default {
|
|
|
name: "item_list",
|
|
|
components: {
|
|
|
@@ -134,45 +134,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- downloadTable(){
|
|
|
- let level = 0
|
|
|
- let levelList = ['零售价', '批发价']
|
|
|
- uni.showActionSheet({
|
|
|
- itemList: levelList,
|
|
|
- success: function (respond) {
|
|
|
- level = respond.tapIndex
|
|
|
- uni.showLoading({title:'下载中',mask:true})
|
|
|
- generatePriceTable({level:level}).then(res => {
|
|
|
- if(res.code == 1){
|
|
|
- uni.hideLoading()
|
|
|
- let file = res.data.file
|
|
|
- let shortFile = res.data.shortFile
|
|
|
- uni.downloadFile({
|
|
|
- url: file,
|
|
|
- header: {"Content-Type": 'application/vnd.ms-excel'},
|
|
|
- filePath: `${wx.env.USER_DATA_PATH}/${shortFile}`,
|
|
|
- success: (res) => {
|
|
|
- if (res.statusCode === 200) {
|
|
|
- wx.saveFileToDisk({
|
|
|
- filePath: res.filePath,
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- },
|
|
|
- fail:function(res) {
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- fail:()=>{
|
|
|
- uni.showToast({title:'请用电脑打开小程序下载',mask:true,icon:'none'})
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
initProduct(){
|
|
|
this.shopId = this.getMyShopInfo.id;
|
|
|
let type = '';
|