shish 2 лет назад
Родитель
Сommit
ca6fefa27f
3 измененных файлов с 32 добавлено и 170 удалено
  1. 1 1
      ghs/src/views/in/add.vue
  2. 2 0
      ghs/src/views/item/import.vue
  3. 29 169
      ghs/src/views/item/list.vue

+ 1 - 1
ghs/src/views/in/add.vue

@@ -34,7 +34,7 @@
         <el-table-column prop="bigCount" label="数量" width="110" align="center"></el-table-column>
         <el-table-column prop="sumPrice" label="金额" width="110" align="center">
           <template slot-scope="scope">
-            ¥{{ parseFloat(Number(scope.row.userPrice)*Number(scope.row.bigCount).toFixed(2)) }}
+            ¥{{ parseFloat((Number(scope.row.userPrice)*Number(scope.row.bigCount)).toFixed(2)) }}
           </template>
         </el-table-column>
 

+ 2 - 0
ghs/src/views/item/import.vue

@@ -401,6 +401,8 @@ export default {
       return result
     },
     saveBtn(){
+      this.$message.warning('开发中')
+        return false
       let list = []
       this.rightItemList.forEach(item => {
         if (item.flag == true) {

+ 29 - 169
ghs/src/views/item/list.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="app-list-content">
     <x-crud class="liu-crud-wrap" ref="xCrud" @load="onLoad">
+
       <template #slot-tabs>
         <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="tabClick">
           <el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="item.text" :name="item.key">
@@ -8,17 +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>
@@ -31,7 +31,8 @@
       </template>
 
       <template #table-column-unit="{scope}">
-        <span>{{ scope.row.bigUnit }} / {{scope.row.smallUnit}}</span>
+        <span v-if="scope.row.ratioType == 0">{{ scope.row.ratio }}{{scope.row.smallUnit}} / {{ scope.row.bigUnit }}</span>
+		<span v-else>若干{{scope.row.smallUnit}} / {{ scope.row.bigUnit }}</span>
       </template>
 
       <template #table-column-price="{scope}">
@@ -41,8 +42,6 @@
       <template #table-header-price>
         <div class="set-sort">
           <span style="color:blue;">价格</span>
-          <el-button v-if="!priceInput" icon="el-icon-edit-outline" size="small" type="text" @click="showPriceInput" class="show"></el-button>
-          <el-button class="hide" v-else size="mini" @click="commitChange('price')" type="primary">完成</el-button>
         </div>
       </template>
 
@@ -53,25 +52,9 @@
       <template #table-header-stockWarning>
         <div class="set-sort">
           <span>库存预警</span>
-          <el-button v-if="!stockWarningInput" icon="el-icon-edit-outline" size="small" type="text" @click="showStockWarningInput" class="show"></el-button>
-		<el-button class="hide" v-if="stockWarningInput"  size="mini" @click="showMultiplePop(scope,'stockWarning')" type="primary">批</el-button>
-          <el-button class="hide" v-if="stockWarningInput" size="mini" @click="commitChange('stockWarning')" type="primary">完成</el-button>
         </div>
       </template>
 
-      <template #table-column-shelfLife="{scope}">
-        <span v-if="!shelfLifeInput"><span>{{ scope.row.shelfLife}}</span></span>
-		<el-input style="width:80%;" ref="sort-input" focus size="mini" v-else placeholder="" v-model="scope.row.shelfLife" @blur="changeInputValue(scope.row, 'shelfLife')" ></el-input>
-      </template>
-      <template #table-header-shelfLife>
-        <div class="set-sort">
-          <span>保质期</span>
-          <el-button v-if="!shelfLifeInput" icon="el-icon-edit-outline" size="small" type="text" @click="showShelfLifeInputInput" class="show"></el-button>
-			<el-button class="hide" v-if="shelfLifeInput"  size="mini" @click="showMultiplePop(scope,'shelfLife')" type="primary">批</el-button>
-          <el-button class="hide" v-if="shelfLifeInput" size="mini" @click="commitChange('shelfLife')" type="primary">完成</el-button>
-        </div>
-      </template>
-      
       <template #table-column-inTurn="{scope}">
         <span v-if="!sort.status">{{ scope.row.inTurn }}</span>
         <el-input style="width:80%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.inTurn" @blur="changeInputValue(scope.row, 'inTurn')" ></el-input>
@@ -80,8 +63,6 @@
       <template #table-header-inTurn>
         <div class="set-sort">
           <span>排序</span>
-          <el-button v-if="!sort.status" icon="el-icon-edit-outline" size="small" type="text" @click="showInTurn" class="show"></el-button>
-          <el-button class="hide" v-else size="mini" @click="commitChange('inTurn')" type="primary">完成</el-button>
         </div>
       </template> 
 
@@ -110,67 +91,9 @@
 			<el-input style="width:80%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.cost" @blur="changeInputValue(scope.row, 'cost')" ></el-input>
 		</template>
 
-
-		<template #table-header-addPrice="{scope}">
-			<div class="set-sort">
-				<span style="color:blue;">加价</span>
-				<el-button v-if="!canAddPrice" icon="el-icon-edit-outline" size="small" type="text" @click="showAddPrice" class="show"></el-button>
-				<el-button class="hide" v-if="canAddPrice"  size="mini" @click="showMultiplePop(scope,'addPrice')" type="primary">批</el-button>
-				<el-button class="hide" v-if="canAddPrice"  size="mini" @click="commitChange('addPrice')" type="primary">完成</el-button>
-			</div>
-		</template>
-		<template #table-column-addPrice="{scope}">
-			<span v-if="!canAddPrice" style="color:blue;">{{ scope.row.addPrice }}</span>
-			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.addPrice" @blur="changeInputValue(scope.row, 'addPrice')" ></el-input>
-		</template>
-
-
-		<template #table-header-skAddPrice="{scope}">
-			<div class="set-sort">
-				<span>大众加价</span>
-				<el-button v-if="!canSkAddPrice" icon="el-icon-edit-outline" size="small" type="text" @click="showSkAddPrice" class="show"></el-button>
-				<el-button class="hide" v-if="canSkAddPrice"  size="mini" @click="showMultiplePop(scope,'skAddPrice')" type="primary">批</el-button>
-				<el-button class="hide" v-if="canSkAddPrice"  size="mini" @click="commitChange('skAddPrice')" type="primary">完成</el-button>
-			</div>
-		</template>
-		<template #table-column-skAddPrice="{scope}">
-			<span v-if="!canSkAddPrice">{{ scope.row.skAddPrice }}</span>
-			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.skAddPrice" @blur="changeInputValue(scope.row, 'skAddPrice')" ></el-input>
-		</template>
-
-		<template #table-header-hjAddPrice="{scope}">
-			<div class="set-sort">
-				<span>黄金加价</span>
-				<el-button v-if="!canHjAddPrice" icon="el-icon-edit-outline" size="small" type="text" @click="showHjAddPrice" class="show"></el-button>
-				<el-button class="hide" v-if="canHjAddPrice"  size="mini" @click="showMultiplePop(scope,'hjAddPrice')" type="primary">批</el-button>
-				<el-button class="hide" v-if="canHjAddPrice"  size="mini" @click="commitChange('hjAddPrice')" type="primary">完成</el-button>
-			</div>
-		</template>
-		<template #table-column-hjAddPrice="{scope}">
-			<span v-if="!canHjAddPrice">{{ scope.row.hjAddPrice }}</span>
-			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.hjAddPrice" @blur="changeInputValue(scope.row, 'hjAddPrice')" ></el-input>
-		</template>
-
-
-		<template #table-header-zsAddPrice="{scope}">
-			<div class="set-sort">
-				<span>钻石加价</span>
-				<el-button v-if="!canZsAddPrice" icon="el-icon-edit-outline" size="small" type="text" @click="showZsAddPrice" class="show"></el-button>
-				<el-button class="hide" v-if="canZsAddPrice"  size="mini" @click="showMultiplePop(scope,'zsAddPrice')" type="primary">批</el-button>
-				<el-button class="hide" v-if="canZsAddPrice"  size="mini" @click="commitChange('zsAddPrice')" type="primary">完成</el-button>
-			</div>
-		</template>
-		<template #table-column-zsAddPrice="{scope}">
-			<span v-if="!canZsAddPrice">{{ scope.row.zsAddPrice }}</span>
-			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.zsAddPrice" @blur="changeInputValue(scope.row, 'zsAddPrice')" ></el-input>
-		</template>
-
-
 		<template #table-header-ratio>
 			<div class="set-sort">
 				<span>单位比</span>
-				<el-button v-if="!canAddRatio" icon="el-icon-edit-outline" size="small" type="text" @click="showAddRatio" class="show"></el-button>
-				<el-button class="hide" v-if="canAddRatio"  size="mini" @click="commitChange('ratio')" type="primary">完成</el-button>
 			</div>
 		</template>
       	<template #table-column-ratio="{scope}">
@@ -181,8 +104,6 @@
 	  	<template #table-header-weight>
 		<div class="set-sort">
 			<span>重量(公斤)</span>
-			<el-button v-if="!costWeight" icon="el-icon-edit-outline" size="small" type="text" @click="showWeight" class="show"></el-button>
-			<el-button class="hide" v-else size="mini" @click="commitChange('weight')" type="primary">完成</el-button>
 		</div>
 	  </template>
 		<template #table-column-weight="{scope}">
@@ -198,21 +119,14 @@
         <el-button type="primary" size="mini" @click="$util.pageTo({url: '/item/import'})">批量导入花材</el-button>
       </template>
 
-	<template #slot-addNew-goods-btn>
-        <el-button type="primary" size="mini" @click="replaceBtnFn(0)">新增</el-button>
-      </template>
+		<template #slot-addNew-goods-btn>
+			<el-button type="primary" size="mini" @click="replaceBtnFn(0)">新增</el-button>
+		</template>
 	
-
     </x-crud>
     <item-list-layer :show.sync="showItemModal" :classId.sync="classId" :className.sync="className" @confirm="selectItemFn" @cancel="showItemModal = false">
     </item-list-layer>
-    <!-- 新增弹窗 -->
-		<el-dialog
-			title="花材"
-			:visible.sync="addDialog"
-			:close-on-click-modal="false"
-			width="600px"
-		>
+		<el-dialog title="花材" :visible.sync="addDialog" :close-on-click-modal="false" width="600px" >
       <div class="ad-modal-content">
         <el-form
 					:model="replaceForm"
@@ -638,77 +552,23 @@ export default {
 				fixed: 'left',
 				'min-width': 60,
 			},
-            {
-              prop: 'skAddPrice',
-              label: '大众加价',
-              align: 'center',
-              'min-width': 130
-            },
-            {
-              prop: 'addPrice',
-              label: '加价',
-              align: 'center',
-              'min-width': 130
-            },
-            {
-              prop: 'hjAddPrice',
-              label: '黄金加价',
-              align: 'center',
-              'min-width': 130
-            },
-            {
-              prop: 'zsAddPrice',
-              label: '钻石加价',
-              align: 'center',
-              'min-width': 130
-            },
             {
               prop: 'cost',
               label: '成本',
               align: 'center',
               'min-width': 90
             },
-            {
-              prop: 'skPrice',
-              label: '大众价',
-              align: 'center',
-              minWidth:100
-            },
             {
               prop: 'price',
               label: '价格',
               align: 'center',
-              minWidth:105
-            },
-            {
-              prop: 'hjPrice',
-              label: '黄金价',
-              align: 'center',
-              minWidth:100
-            },
-            {
-              prop: 'zsPrice',
-              label: '钻石价',
-              align: 'center',
-              minWidth:100
+              minWidth:95
             },
             {
               prop: 'stockWarning',
               label: '库存预警',
               align: 'center',
-              'min-width': 130
-            },
-			{
-              prop: 'status',
-              label: '上架',
-              align: 'center',
-              minWidth: 60
-            },
-            {
-              prop: 'shelfLife',
-              label: '保质期',
-              align: 'center',
-              'min-width': 130
+              'min-width':80
             },
             {
               prop: 'className',
@@ -722,27 +582,21 @@ export default {
               align: 'center',
               'min-width': 70
             },
-            {
-              prop: 'ratio',
-              label: '单位比',
-              align: 'center',
-              'min-width': 100
-            },
             {
               prop: 'weight',
               label: '重量(公斤)',
               align: 'center',
-              'min-width': 130
+              'min-width': 100
             },
             {
               prop: 'inTurn',
               label: '排序',
               align: 'center',
-              minWidth: 100
+              minWidth:70
             },
             {
               prop: 'unit',
-              label: '单位',
+              label: '单位',
               align: 'center',
               'min-width': 70
             },
@@ -751,7 +605,13 @@ export default {
               label: 'ID',
               align: 'center',
               'min-width': 50
-            }
+            },
+			{
+              prop: 'status',
+              label: '上下架',
+              align: 'center',
+              minWidth: 60
+            },
           ],
           op: {
             visible: true,