shish 3 лет назад
Родитель
Сommit
22ecce62b3

+ 1 - 40
ghsApp/src/admin/changePrice/changeStock.vue

@@ -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 = '';

+ 14 - 5
ghsApp/src/admin/home/components/OrderItem.vue

@@ -49,7 +49,7 @@
         <div class="list-bottom">
             <div class="list-button">
 
-<block v-if="item.status != 1 && item.status != 5 &&item.fhStatus == 0">
+<block v-if="canFh">
 <view><button @click.stop="directFh(item)" class="admin-button-com bule">一键发货</button> </view>
 <view><button @click.stop="fillNoFh(item)" class="admin-button-com bule">填单发货</button> </view>
 </block>
@@ -69,19 +69,28 @@ export default {
 	components: {
 	},
 	props: {
-	    item: {
+	  item: {
 			required: true
 		},
-	    isScanEnv:{
+	   isScanEnv:{
 			type: Boolean,
 			default: false
-	    }
+	  }
 	},
 	data() {
 		return {
-
+      canFh:true
 		};
 	},
+	mounted(){
+		if(this.item){
+      if(this.item.status != 1 && this.item.status != 5 && this.item.fhStatus == 0){
+        this.canFh = true
+      }else{
+        this.canFh = false
+      }
+		}
+	},
 	methods: {
     directFh(info){
 			this.$emit('directFh', info)

+ 4 - 1
ghsApp/src/admin/home/order.vue

@@ -20,7 +20,8 @@
       <block v-if="!$util.isEmpty(list.data)">
         <div class="list" v-for="(item, index) in list.data" :key="index">
 
-          <OrderItem :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh"></OrderItem>
+          <OrderItem :ref="`orderRef${item.id}`" :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh">
+          </OrderItem>
 
         </div>
       </block>
@@ -173,6 +174,7 @@ export default {
       that.$util.confirmModal({content:'确认发货?'},() => {
           orderFh({id:info.id,fhType:0}).then(res=>{
             if(res.code == 1){
+              that.$refs[`orderRef${info.id}`][0].canFh = false
               that.$msg('发货成功')
             }
           })
@@ -208,6 +210,7 @@ export default {
       that.$util.confirmModal({content:'确认发货?'},() => {
           orderFh({id:id,fhType:1,fhWl:that.fhWl,fhWlNo:that.fhWlNo}).then(res=>{
             if(res.code == 1){
+              that.$refs[`orderRef${id}`][0].canFh = false
               that.fhLabelShow = false
               that.fhWlFocus = false
               that.fhWlNo = ''