shish 2 лет назад
Родитель
Сommit
3ce7f7f574

+ 151 - 0
ghs/src/views/item/components/stock-detail.vue

@@ -0,0 +1,151 @@
+<template>
+	<div class="order-detail">
+		<el-drawer :visible.sync="showOrderDetail" size="1000px" :before-close="closeFn" custom-class="order-draw-wrap" >
+			<div class="order-manage-wrap" v-if="!$util.isEmpty(data)">
+
+				<div class="card-wrap" style="margin-top:0px;">
+					<div class="card-tit">备注</div>
+					<div class="card-body">
+						<el-input type="textarea" :rows="1" placeholder="请输入内容" v-model="data[0].remark"></el-input>
+					</div>
+					<div style="text-align:center;margin-top:4px;">
+					<el-button @click.stop="modifyRemark()" size="small" type="primary" style="margin:0 auto;">修改</el-button>
+					</div>
+				</div>
+
+				<div class="card-wrap">
+					<div class="card-tit">花材信息</div>
+					<div class="card-body">
+						<el-table :data="data[0].product" show-summary>
+							<el-table-column label="花材图片">
+								<template slot-scope="scope">
+									<cl-avatar shape="square" :size="30" :src="scope.row.cover" ></cl-avatar>
+								</template>
+							</el-table-column>
+							<el-table-column property="name" label="花材名称"></el-table-column>
+							<el-table-column property="num" label="数量"></el-table-column>
+							<el-table-column property="refundNum" label="已退数量"></el-table-column>
+							<el-table-column property="xhUnitPrice" label="单价"></el-table-column>
+						</el-table>
+					</div>
+				</div>
+				<div class="card-wrap">
+					<div class="card-tit">客户</div>
+					<div class="card-body">
+						<el-table :data="data">
+							<el-table-column property="customName" label="名称"></el-table-column>
+							<el-table-column property="customMobile" label="手机号"></el-table-column>
+							<el-table-column property="fullAddress" label="地址" width="280px"></el-table-column>
+							<el-table-column property="showAddress" label="完整地址" width="280px"></el-table-column>
+						</el-table>
+					</div>
+				</div>
+				<div class="card-wrap">
+					<div class="card-tit">基本信息</div>
+					<div class="card-body">
+						<el-table :data="data">
+							<el-table-column property="orderSn" label="单号" width="180px"></el-table-column>
+							<el-table-column property="sendNum" label="编号"></el-table-column>
+							<el-table-column property="sendCost" label="运费"></el-table-column>
+							<el-table-column property="packCost" label="打包费"></el-table-column>
+							<el-table-column property="prePrice" label="原价"></el-table-column>
+							<el-table-column property="tkPrice" label="退款"></el-table-column>
+							<el-table-column property="actPrice" label="实际金额"></el-table-column>
+							<el-table-column property="debt" label="欠款">
+								<template slot-scope="scope">
+									<div v-if="scope.row.debt == 1">是</div><div v-else>-</div>
+								</template>
+							</el-table-column>
+							<el-table-column property="status" label="状态">
+								<template slot-scope="scope">
+									<span>{{ scope.row.status | constantfilter('ORDER_STATUS') }}</span>
+								</template>
+							</el-table-column>
+						</el-table>
+					</div>
+				</div>
+			</div>
+			<div v-else  v-loading="loading" style="height:800px;"></div>
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'order-detail',
+	props: {
+		orderOperate: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showOrderDetail: false,
+			data: [],
+			loading:true
+		};
+	},
+	methods: {
+		modifyRemark(){
+			this.$service.order.modifyRemark({ id: this.orderOperate.id,remark:this.data[0].remark }).then(res => {
+				this.$notify({ title: '修改成功', message: 'SUCCESS', type: 'success'})
+			})
+		},
+		init() {
+			this.data = []
+			this.showOrderDetail = true
+			this.$service.order.info({ id: this.orderOperate.id }).then(res => {
+				this.data = [res]
+			});
+		},
+		closeFn() {
+			this.showOrderDetail = false;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.order-draw-wrap {
+	.el-drawer__header {
+		margin-bottom: 2px;
+	}
+	.el-table__header-wrapper {
+		.el-table__header tr,
+		.el-table__header th {
+			background-color: #f7f7f7;
+		}
+	}
+}
+</style>
+<style lang="scss" scoped>
+.order-draw-wrap {
+	.title-status-wrap {
+		@include disFlex(center, flex-start);
+		.title-text {
+			margin-right: 200px;
+		}
+		.title-status {
+			color: red;
+			&.success {
+				color: green;
+			}
+		}
+	}
+}
+.order-manage-wrap {
+	height: calc(100vh - 64px);
+	overflow-y: auto;
+	padding-bottom: 20px;
+}
+.card-wrap {
+	margin: 20px;
+	.card-tit {
+		font-size: 16px;
+		margin-bottom: 8px;
+	}
+	.card-body {
+		border: 1px solid $borderColor;
+	}
+}
+</style>

+ 27 - 14
ghs/src/views/item/list.vue

@@ -9,16 +9,16 @@
         </el-tabs>
       </template>
 
-		<template #table-column-cover="{ scope }">
-			<el-popover placement="right" width="200" trigger="hover">
-				<div style="width:200px;height:200px;">
-					<img style="width:100%;height:100%;object-fit: cover;" :src="scope.row.bigCover" />
-				</div>
-				<div style="width:40px;" slot="reference">
-					<img style="width:100%;height:100%;object-fit: cover;border-radius:5px;" :src="scope.row.cover" />
-				</div>
-			</el-popover>
-		</template>
+	<template #table-column-cover="{ scope }">
+		<el-popover placement="right" width="200" trigger="hover">
+			<div style="width:200px;height:200px;">
+				<img style="width:100%;height:100%;object-fit: cover;" :src="scope.row.bigCover" />
+			</div>
+			<div style="width:40px;" slot="reference">
+				<img style="width:100%;height:100%;object-fit: cover;border-radius:5px;" :src="scope.row.cover" />
+			</div>
+		</el-popover>
+	</template>
 
       <template #table-column-name="{scope}">
         <span class="item-name" v-if="scope.row.delStatus == 1" style="color:red;">{{ scope.row.name }}</span>
@@ -82,6 +82,8 @@
 		<el-button type="text" v-if="scope.row.delStatus==0" @click.native.stop="setDelStatusFun(scope.row.id,1)" >停用</el-button>
 		<el-button type="text" v-if="scope.row.delStatus==1" @click.native.stop="setDelStatusFun(scope.row.id,0)" >恢复</el-button>
 
+		<el-button type="text" @click.native.stop="getStockList(scope.row)" >库存明细</el-button>
+
 	</template>
 
 		<template #table-column-cost="{scope}">
@@ -229,14 +231,18 @@
 		  </div>
 	  </el-dialog>
 
+	  <stock-detail ref="stockDetail" :orderOperate="itemData" />
+
   </div>
 </template>
 <script>
 import itemListLayer from '@/components/module/item-list-layer';
+import stockDetail from './components/stock-detail';
 export default {
-  name: 'item_list',
+  name: 'list',
   components: {
-    itemListLayer
+    itemListLayer,
+	stockDetail
   },
   data () {
     return {
@@ -371,7 +377,8 @@ export default {
 		},
 		itemClassList: [],
 		unitList: [],
-		currentItemId: 0
+		currentItemId: 0,
+		itemData:[]
     };
   },
   computed: {
@@ -380,6 +387,12 @@ export default {
     this.init();
   },
   methods: {
+	getStockList(item){
+		this.itemData = item;
+		setTimeout(() => {
+			this.$refs.stockDetail.init()
+		})
+	},
 	  downloadPrice(level){
 		this.$service.product.generatePriceTable({level:level}).then(res => {
 			if(res.file){
@@ -631,7 +644,7 @@ export default {
           op: {
             visible: true,
             props: {
-              width: 185,
+              width: 300,
               align: 'center',
               fixed: 'right',
               label: '操作'

+ 6 - 1
ghs/src/views/order/book.vue

@@ -43,6 +43,11 @@
 
 			<template #slot-column-option="{scope}">
         <el-button @click.stop="goDetail(scope.row)" size="medium" type="primary">查看明细</el-button>
+        <el-button @click.stop="" size="medium" type="primary">预订明细</el-button>
+        <el-button @click.stop="" size="medium" type="primary">上下架记录</el-button>
+        <el-button @click.stop="" size="medium" type="primary">路上记录</el-button>
+        <el-button @click.stop="" size="medium" type="primary">待采记录</el-button>
+        <el-button @click.stop="" size="medium" type="primary">库存明细</el-button>
       </template>
 
     </x-crud>
@@ -235,7 +240,7 @@ export default {
             op: {
               visible: true,
               props: {
-                width: 800,
+                width: 900,
                 align: 'left',
                 fixed: 'right',
                 label: '操作'

+ 4 - 1
ghs/src/views/order/list.vue

@@ -14,7 +14,10 @@
       </template>
 
       <template #table-column-orderSn="{scope}">
-        <el-link :underline="true" style="font-size:12px;display:inline-block;" >{{ scope.row.orderSn }}</el-link>
+        <el-link
+            :underline="true"
+            style="font-size:12px;display:inline-block;"
+        >{{ scope.row.orderSn }}</el-link>
       </template>
 
       <template #table-column-customName="{scope}">