shish 5 лет назад
Родитель
Сommit
79a758eb50
1 измененных файлов с 22 добавлено и 47 удалено
  1. 22 47
      ghs/src/views/order/list.vue

+ 22 - 47
ghs/src/views/order/list.vue

@@ -54,53 +54,28 @@
         <template >
           <div style="display: flex">
             <div v-for="res in scope.row.buttonList" >
-              <el-button v-if="res.type=='item'&&res.show==1&&res.disable==0" size="small">该花材</el-button>
-              <el-button v-if="res.type=='item'&&res.show==1&&res.disable==1" size="small" disabled>该花材</el-button>
+				<el-button v-if="res.type=='item'&&res.show==1&&res.disable==0" size="small">改花材</el-button>
+				<el-button v-if="res.type=='item'&&res.show==1&&res.disable==1" size="small" disabled>改花材</el-button>
 
-              <el-button v-if="res.type=='send'&&res.show==1&&res.disable==0" @click="shipDrawFn(scope.row)" size="mini" type="primary" plain >发货</el-button>
-              <el-button v-if="res.type=='send'&&res.show==1&&res.disable==1" disabled size="mini" type="primary" plain >发货</el-button>
+				<el-button v-if="res.type=='send'&&res.show==1&&res.disable==0" @click="shipDrawFn(scope.row)" size="mini" type="primary" plain >发货</el-button>
+				<el-button v-if="res.type=='send'&&res.show==1&&res.disable==1" disabled size="mini" plain>发货</el-button>
 
-              <el-popover v-if="res.type=='selfGet'&&res.show==1&&res.disable==0" style="margin-left:14px;" placement="top" width="160" :ref="'popover-' + scope.row.id">
-              <p>确认已自取?</p>
-              <div style="text-align: right; margin: 0">
-                <el-button size="mini" type="text" @click="selfGetCancel(scope.row.id)">取消</el-button>
-                <el-button type="primary" size="mini" @click="noSendShipFn(scope.row)">确定</el-button>
-              </div>
-              <el-button slot="reference" size="mini" type="primary" plain>自取</el-button>
-            </el-popover>
-              <el-button v-if="res.type=='selfGet'&&res.show==1&&res.disable==1" style="margin-left:14px;" size="small" disabled>自取</el-button>
+				<el-popover v-if="res.type=='selfGet'&&res.show==1&&res.disable==0" style="margin-left:14px;" placement="top" width="160" :ref="'popover-' + scope.row.id">
+				<p>确认已自取?</p>
+				<div style="text-align: right; margin: 0">
+					<el-button size="mini" type="text" @click="selfGetCancel(scope.row.id)">取消</el-button>
+					<el-button type="primary" size="mini" @click="noSendShipFn(scope.row)">确定</el-button>
+				</div>
+				<el-button slot="reference" size="mini" type="primary" plain>自取</el-button>
+				</el-popover>
+
+				<el-button v-if="res.type=='selfGet'&&res.show==1&&res.disable==1" style="margin-left:14px;" size="small" disabled>自取</el-button>
 
-              <el-button v-if="res.type=='print'&&res.show==1&&res.disable==0" @click="printOrder(scope.row)" size="mini" type="primary" plain style="margin-left:14px;">打印</el-button>
-              <el-button v-if="res.type=='print'&&res.show==1&&res.disable==1" disabled size="mini" type="primary" plain style="margin-left:14px;">打印</el-button>
+				<el-button v-if="res.type=='print'&&res.show==1&&res.disable==0" @click="printOrder(scope.row)" size="mini" type="primary" plain style="margin-left:14px;">打印</el-button>
+				<el-button v-if="res.type=='print'&&res.show==1&&res.disable==1" disabled size="mini" plain style="margin-left:14px;">打印</el-button>
             </div>
           </div>
         </template>
-
-<!--				<template v-if="scope.row.status == 1">-->
-<!--					<el-button size="small" disabled>打印</el-button>-->
-<!--					<el-button size="small" disabled>自取</el-button>-->
-<!--					<el-button size="small" disabled>发货</el-button>-->
-<!--				</template>-->
-<!--				<template v-else-if="['4', '5', '6'].indexOf(scope.row.status) != -1"></template>-->
-<!--				<template v-else>-->
-<!--					<template v-if="scope.row.currentFlow == 1">-->
-<!--						<el-popover placement="top" width="160" :ref="'popover-' + scope.row.id">-->
-<!--							<p>确认已自取?</p>-->
-<!--							<div style="text-align: right; margin: 0">-->
-<!--								<el-button size="mini" type="text" @click="selfGetCancel(scope.row.id)">取消</el-button>-->
-<!--								<el-button type="primary" size="mini" @click="noSendShipFn(scope.row)">确定</el-button>-->
-<!--							</div>-->
-<!--							<el-button slot="reference" size="mini" type="primary" plain>自取</el-button>-->
-<!--						</el-popover>-->
-<!--						<el-button @click="shipDrawFn(scope.row)" size="mini" type="primary" plain style="margin-left:14px;">发货</el-button>-->
-<!--						<el-button @click="printOrder(scope.row)" size="mini" type="primary" plain style="margin-left:14px;">打印</el-button>-->
-<!--					</template>-->
-<!--					<template v-else>-->
-<!--						<el-button size="mini" type="primary" plain @click="shipDrawFn(scope.row)">发货</el-button>-->
-<!--						<el-button @click="printOrder(scope.row)" size="mini" type="primary" plain style="margin-left:14px;">打印</el-button>-->
-<!--					</template>-->
-
-<!--				</template>-->
 			</template>
 		</x-crud>
 		<!-- 用户详情 -->
@@ -393,12 +368,12 @@ export default {
 				])
 				.on('refresh', async (params, { next }) => {
 					// 继续执行刷新
-					let  asset  = await next(params);
-					this.tabsData[0].val = asset.allNum;
-					this.tabsData[1].val = asset.unPayNum;
-					this.tabsData[2].val = asset.unSendNum;
-					this.tabsData[3].val = asset.sendingNum;
-					this.tabsData[4].val = asset.finishNum;
+					let  res  = await next(params);
+					this.tabsData[0].val = res.shop.totalOrder;
+					this.tabsData[1].val = res.shop.unPayOrder;
+					this.tabsData[2].val = res.shop.unSendOrder;
+					this.tabsData[3].val = res.shop.sendingOrder;
+					this.tabsData[4].val = res.shop.finishOrder;
 				})
 				.done();
 			app.refresh({ status: this.tabIndex });