Procházet zdrojové kódy

花材列表添加

shish před 5 roky
rodič
revize
0466bc2668

+ 32 - 9
ghs/src/components/module/item-list-layer.vue

@@ -11,14 +11,30 @@
 				<x-crud class="liu-crud-wrap" @load="onLoad">
 					<template #table-column-radio="{scope}">
 						<div>
-                            <el-checkbox v-if="scope.row.select == 2" disabled :label="scope.row.index">选择</el-checkbox>
-                            <el-checkbox v-else :label="scope.row.index">选择</el-checkbox>
+                            <el-checkbox v-if="scope.row.select == 2" disabled :label="scope.row.index">{{scope.row.id}}</el-checkbox>
+                            <el-checkbox v-else :label="scope.row.index">{{scope.row.id}}</el-checkbox>
                             </div>
 					</template>
 
                     <template #table-column-select="{scope}">
-				        <i class="el-icon-success" v-if="scope.row.select == 2" style="color: #67c23a; font-size: 19px"></i>
-				        <i class="el-icon-success" v-else style="color: #c0c4cc; font-size: 19px"></i>
+						<span v-if="scope.row.select == 2">✔</span>
+						<span v-else></span>
+					</template>
+
+                    <template #table-column-stockWarning="{scope}">
+						<el-input
+							v-model="scope.row.stockWarning"
+							placeholder="最低库存"
+							size="small"
+						></el-input>
+					</template>
+
+					<template #table-column-cost="{scope}">
+				        <el-input
+							v-model="scope.row.cost"
+							placeholder="成本价"
+							size="small"
+						></el-input>
 					</template>
 
 					<template #table-column-cover="{scope}">
@@ -106,19 +122,26 @@ export default {
 							label: '名称',
 							align: 'center'
 						},
+						{
+							prop: 'stockWarning',
+							label: '最低库存提醒',
+							align: 'center'
+						},
+						{
+							prop: 'cost',
+							label: '成本价',
+							align: 'center'
+						},
                         {
 							prop: 'select',
 							label: '已添加',
 							align: 'center'
 						}
 					],
-
 					on: {
 						'row-click': (row, column) => {
                             console.log(666666666666666)
-							if (column.property && row.children) {
-								app.refs('table').toggleRowExpansion(row);
-							}
+							console.log(row)
 						}
                     },
 					// 操作列
@@ -133,7 +156,7 @@ export default {
 				})
 				.set('search', {
 					key: {
-						placeholder: '花材名称,支持拼音首字母'
+						placeholder: '花材名称,支持拼音首字母搜索'
 					}
 				})
 				.set('pagination', {

+ 14 - 12
ghs/src/views/item-class/list.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="app-list-content">
 		<x-crud class="liu-crud-wrap" @load="onLoad">
-			<template #slot-tabs="{ scope }">
+			<template #slot-tabs>
 				<el-tabs
 					class="liu-tabs"
 					type="border-card"
@@ -20,17 +20,13 @@
 
 			<template #table-column-num="{scope}">
 				<el-link
-					:underline="true"
 					@click="getItemList(scope.row)"
-					style="font-size:12px;display:inline-block;color:#409EFF"
 				>{{ scope.row.num }}</el-link>
 			</template>
 
 			<template #table-column-name="{scope}">
 				<el-link
-					:underline="true"
 					@click="getItemList(scope.row)"
-					style="font-size:12px;display:inline-block;color:#409EFF"
 				>{{ scope.row.name }}</el-link>
 			</template>
 
@@ -71,15 +67,11 @@
 			</template>
 
 			<template #slot-item-list="{scope}">
-				<el-button type="text" @click="getItemList(scope.row)">查看花材</el-button>
+				<el-button type="text" @click.native.stop="getItemList(scope.row)">花材列表</el-button>
 			</template>
 
 			<template #slot-modify="{scope}">
-				<el-button type="text" @click="replaceBtnFn(scope.row.id,scope.row.name)">修改</el-button>
-			</template>
-
-			<template #slot-delete="{scope}">
-				<el-button type="text" @click="deleteFn(scope.row.id)">删除</el-button>
+				<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id,scope.row.name)">修改</el-button>
 			</template>
 
 		</x-crud>
@@ -237,6 +229,13 @@ export default {
 							minWidth: 180
 						}
 					],
+
+					on: {
+						'row-click': (row, column) => {
+							this.getItemList(row)
+						}
+					},
+
 					op: {
 						visible: true,
 						props: {
@@ -245,8 +244,11 @@ export default {
 							fixed: 'right',
 							label: '操作'
 						},
-						layout: ['slot-item-list','slot-modify','slot-delete',]
+						layout: ['slot-item-list','slot-modify']
 					}
+
+
+
 				})
 				.set('dict', {
 					search: {

+ 1 - 6
ghs/src/views/item/list.vue

@@ -191,7 +191,7 @@ export default {
 							fixed: 'right',
 							label: '操作'
 						},
-						layout: ['delete',]
+						layout: []
 					}
 				})
 				.set('dict', {
@@ -210,11 +210,6 @@ export default {
 					['data-table'],
 					['flex1', 'pagination']
 				])
-				.on('delete', (selection, { next }) => {
-					next({
-						id: selection.map(e => e.id).join(',')
-					});
-				})
 				.done();
 			app.refresh({ classId: this.classId });
 		},

+ 1 - 1
pt/README.md

@@ -1,2 +1,2 @@
 说明文档
-http://docs-comm.cool-admin.com
+http://docs-comm.cool-admin.com