shish 1 year ago
parent
commit
98691969eb

+ 1 - 1
ghsApp/src/admin/home/components/OrderItem.vue

@@ -109,7 +109,7 @@
       <!-- 新增物流下单弹窗 -->
       <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
         <view style="padding:40upx 50upx;width:90vw;">
-          <view style="font-size:32upx;font-weight:bold;text-align:center;margin-bottom:30upx;">客户地址</view>
+          <view style="font-size:32upx;font-weight:bold;text-align:center;margin-bottom:30upx;">发货信息</view>
           <view style="display:flex;flex-direction:column;gap:18upx;">
             <view style="display:flex;align-items:center;">
               <view style="width:120upx;color:#888;font-size:28upx;">城市:</view>

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

@@ -263,6 +263,7 @@ export default {
 			})
       // #endif
     },
+    //这个有多处要同步修改,关键词:fh_express_pop
     fillNoFh(info){
       let that = this
       this.fhLabelShow = true

+ 82 - 7
ghsApp/src/admin/order/itemOrder.vue

@@ -7,7 +7,7 @@
             <OrderItem :item="item.orderInfo" @printOrder="printOrder"></OrderItem>
           </div>
           <div v-else>
-            <OrderItem :item="item" @printOrder="printOrder"></OrderItem>
+            <OrderItem :ref="`orderRef${item.id}`" :item="item" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh"></OrderItem>
           </div>
 
         </div>
@@ -17,10 +17,29 @@
       </block>
     </div>
 
-			<div class="app-footer" v-if="!$util.isEmpty(ids)">
-        <div class="admin-button-com big blue" @click="batchFh()">全部发货</div>
-				<div class="admin-button-com big blue" style="margin-left:50upx;" @click="batchPrint()">合并打印</div>
-			</div>
+    <div class="app-footer" v-if="!$util.isEmpty(ids)">
+      <div class="admin-button-com big blue" @click="batchFh()">全部发货</div>
+      <div class="admin-button-com big blue" style="margin-left:50upx;" @click="batchPrint()">合并打印</div>
+    </div>
+
+		<modal-module :show="fhLabelShow" @click="fhConfirm" :maskClosable="true" title="物流信息" padding="30rpx 30rpx" >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">物流名称</div>
+            <div class="line-input">
+            <input type="text" v-model="fhWl" @focus="fhWl=''" class="inp-input" />
+            </div>
+          </div>
+          <div class="inp-list-line">
+            <div class="line-label">物流单号</div>
+            <div class="line-input">
+            <input type="text" v-model="fhWlNo" :focus="fhWlFocus" @focus="fhWlNo=''" class="inp-input" />
+            </div>
+          </div>
+        </div>
+      </template>
+		</modal-module>
 
   </div>
 </template>
@@ -32,7 +51,7 @@ import { mapGetters } from "vuex";
 import { getOrderInfoList } from "@/api/order-item";
 import orderMixin from "@/mixins/order";
 import OrderItem from "../home/components/OrderItem"
-import { getListB,cloudPrintOrder,mergePrintFn,allFhAction} from "@/api/order";
+import { getListB,cloudPrintOrder,mergePrintFn,allFhAction,orderFh} from "@/api/order";
 export default {
   name: "itemOrder",
   components: {
@@ -44,7 +63,12 @@ export default {
   computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
   data() {
     return {
-      ids:''
+      ids:'',
+      fhWlInfo:[],
+      fhWlNo:'',
+      fhWl:'顺丰',
+      fhWlFocus:false,
+      fhLabelShow:false,
     }
   },
   onPullDownRefresh() {
@@ -74,8 +98,59 @@ export default {
 
   },
   methods: {
+    //这个有多处要同步修改,关键词:fh_express_pop
+    fillNoFh(info){
+      let that = this
+      this.fhLabelShow = true
+      this.fhWlInfo = info
+			setTimeout(x => {
+				this.$nextTick(() => {
+          that.fhWlFocus = true
+        })
+			}, 200)
+    },
+    fhConfirm(val){
+      let that = this
+			if (val.index == 0) {
+				that.fhLabelShow = false
+				that.fhWlFocus = false
+        that.fhWlNo = ''
+				return
+			}
+      if (this.$util.isEmpty(this.fhWl)){
+        that.$msg('请填写物流名称')
+        return false
+      }
+      if (this.$util.isEmpty(this.fhWlNo)){
+        that.$msg('请填写物流单号')
+        return false
+      }
+      let id = that.fhWlInfo.id ? that.fhWlInfo.id : 0
+      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].currentStatus = 3
+              that.fhLabelShow = false
+              that.fhWlFocus = false
+              that.fhWlNo = ''
+              that.$msg('发货成功')
+            }
+          })
+      })
+    },
     init(){
 
+    },
+    directFh(info){
+      let that = this
+      that.$util.confirmModal({content:'确认发货?'},() => {
+          orderFh({id:info.id,fhType:0}).then(res=>{
+            if(res.code == 1){
+              that.$refs[`orderRef${info.id}`][0].currentStatus = 3
+              that.$msg('发货成功')
+            }
+          })
+      })
     },
     batchFh(){
       let that = this