shish 1 год назад
Родитель
Сommit
2ae68ea524
1 измененных файлов с 12 добавлено и 2 удалено
  1. 12 2
      hdApp/src/admin/order/workOrder.vue

+ 12 - 2
hdApp/src/admin/order/workOrder.vue

@@ -133,7 +133,7 @@ export default {
 
 	},
   computed: {
-    ...mapGetters(["getLoginInfo"]),
+    ...mapGetters(["getLoginInfo","getMyShopInfo"]),
     orderTotalPrice(){
        let price = 0
         if(Number(this.goodsPrice) > 0 && Number(this.form.num) >0 ){
@@ -226,6 +226,16 @@ export default {
           this.$msg('请填写订花人姓名')
           return false
       }
+
+      let customId = 0
+      if(this.getMyShopInfo && Number(this.getMyShopInfo.defaultCustomId)>0){
+        customId = this.getMyShopInfo.defaultCustomId
+      }
+      if(Number(customId)==0){
+        this.$msg('没有找到快捷开单的客户')
+        return false
+      }
+
       let modifyPrice = Number(this.goodsPrice)*Number(this.form.num)
       modifyPrice = modifyPrice.toFixed(2)
       //这里前后顺序有影响哦,不要随意调动
@@ -233,7 +243,7 @@ export default {
       that.$util.confirmModal({content:'确认提交?'},() => {
           uni.showLoading({mask:true})
           let name = that.kindSelectedData.name ? that.kindSelectedData.name : ''
-          createOrder({...that.form,unitGoodsPrice:this.goodsPrice,modifyPrice:modifyPrice,dj:this.dj,name:name,kindName:name}).then((res) => {
+          createOrder({...that.form,unitGoodsPrice:this.goodsPrice,modifyPrice:modifyPrice,dj:this.dj,name:name,kindName:name,customId:customId}).then((res) => {
             uni.hideLoading()
             that.pageTo({url: '/admin/order/workOrderResult',type:2,query:{id:res.data.id}})
           })