zhuohongkui 1 year ago
parent
commit
dec24010c3

+ 33 - 31
admin/src/pages/order/orderList/components/tableFrom.vue

@@ -87,7 +87,7 @@
             <Button v-auth="['export-storeOrder']" class="export" icon="ios-share-outline" @click="exportList"
               >导出</Button
             >
-            <Button style="margin-left: 10px;" v-auth="['export-storeOrder']"  class="export"  @click="sendAll"
+            <Button style="margin-left: 10px" v-auth="['export-storeOrder']" class="export" @click="sendAll"
               >批量发货</Button
             >
           </div>
@@ -121,27 +121,28 @@
       </div>
     </Modal>
     <el-upload
-    :show-file-list="false"
-    :headers="uploadHeaders"
-    with-credentials
-    :on-success="uploadSuccess"
-    v-if="isSend"
-  class="upload-demo"
-  drag
-  :action="uploadAction"
-  :multiple="false">
-  <i class="el-icon-upload"></i>
-  <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-  <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
-</el-upload>
+      :show-file-list="false"
+      :headers="uploadHeaders"
+      with-credentials
+      :on-success="uploadSuccess"
+      v-if="isSend"
+      class="upload-demo"
+      drag
+      :action="uploadAction"
+      :multiple="false"
+    >
+      <i class="el-icon-upload"></i>
+      <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+      <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
+    </el-upload>
   </div>
 </template>
 
 <script>
 import { mapState, mapMutations } from 'vuex';
-import { putWrite, storeOrderApi,batch_delivery } from '@/api/order';
+import { putWrite, storeOrderApi, batch_delivery } from '@/api/order';
 import { exportOrderList } from '@/api/export';
-import {getCookies} from "@/libs/util";
+import { getCookies } from '@/libs/util';
 import Setting from '@/setting';
 export default {
   name: 'table_from',
@@ -164,8 +165,8 @@ export default {
     };
     return {
       uploadHeaders: {},
-      uploadAction: `${Setting.apiBaseURL}/file/upload`,
-      isSend:false,
+      uploadAction: `${Setting.apiBaseURL}/file/upload1`,
+      isSend: false,
       fromList: {
         title: '选择时间',
         custom: true,
@@ -314,21 +315,22 @@ export default {
   methods: {
     // 上传头部token
     getToken() {
-      this.uploadHeaders["Authori-zation"] =
-        "Bearer " + getCookies("token");
+      this.uploadHeaders['Authori-zation'] = 'Bearer ' + getCookies('token');
     },
-    uploadSuccess(response, file, fileList){
-      console.log(123,response, file, fileList);
-      batch_delivery({file:response.data.src}).then(res=>{
-        this.$Message.success(res.msg);
-        this.isSend=false
-      }).catch(err=>{
-        console.log(123,err);
-        this.$Message.error(err.msg);
-      })
+    uploadSuccess(response, file, fileList) {
+      console.log(123, response, file, fileList);
+      batch_delivery({ file: response.data.src })
+        .then((res) => {
+          this.$Message.success(res.msg);
+          this.isSend = false;
+        })
+        .catch((err) => {
+          console.log(123, err);
+          this.$Message.error(err.msg);
+        });
     },
-    sendAll(){
-      this.isSend=!this.isSend
+    sendAll() {
+      this.isSend = !this.isSend;
     },
     ...mapMutations('order', ['getOrderStatus', 'getOrderType', 'getOrderTime', 'getOrderNum', 'getfieldKey']),
     getPath() {

+ 1 - 1
wanxinguni-app/pages/goods/order_details/index.vue

@@ -351,7 +351,7 @@
 					<view
 						@click="openSubcribe(`/pages/goods/${cartInfo.length > 1 ? 'goods_return_list' : 'goods_return'}/index?orderId=`+orderInfo.order_id+ '&id=' + orderInfo.id)"
 						class='bnt cancel'
-						v-else-if="orderInfo.is_apply_refund && orderInfo.refund_status == 0 && cartInfo.length>1 && !orderInfo.virtual_type">
+						v-else-if="orderInfo.is_apply_refund && orderInfo.refund_status == 0 && cartInfo.length>1 && !orderInfo.virtual_type && !!orderInfo.check_time">
 						{{cartInfo.length>1?$t(`批量退款`):$t(`申请退款`)}}
 					</view>
 					<navigator class='bnt cancel'