Kaynağa Gözat

改价改数

shish 1 yıl önce
ebeveyn
işleme
2a562bd278
2 değiştirilmiş dosya ile 18 ekleme ve 25 silme
  1. 1 1
      ghs/src/mock/userInfo.js
  2. 17 24
      ghs/src/views/item/list.vue

+ 1 - 1
ghs/src/mock/userInfo.js

@@ -178,7 +178,7 @@ let menu = {
 
 		{id: '4',parentId: null,name: '花材',type: 0,icon: 'iconshangpinguanli',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
 		{id: '405',	parentId: '4',name: '花材列表',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
-		{id: '403',	parentId: '4',name: '批量改价',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/batch-modify',viewPath: 'views/item/batch-modify.vue',keepAlive: 1},
+		{id: '403',	parentId: '4',name: '改价改数',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/batch-modify',viewPath: 'views/item/batch-modify.vue',keepAlive: 1},
 		{id: '401',parentId: '4',name: '花材分类',type: 1,icon: 'icon-user',orderNum: 4,router: '/item-class/list',viewPath: 'views/item-class/list.vue',keepAlive: 1},
 		{id: '809',parentId: '4',name: '花材导入',type: 1,icon: 'icongongzuotai',orderNum: 4,router: '/item/import',viewPath: 'views/item/import.vue',keepAlive: 1},
 

+ 17 - 24
ghs/src/views/item/list.vue

@@ -32,6 +32,10 @@
 		<span class="item-name" v-else style="color:#CCCCCC;">{{ scope.row.name }}</span>
       </template>
 
+	  <template #table-column-stock="{scope}">
+		<div style="cursor: pointer;" @click="changeStock(scope.row)">{{ scope.row.stock?parseFloat(scope.row.stock):0 }}</div>
+      </template>
+
       <template #table-column-status="{scope}">
 		<span v-if="scope.row.status == 1">是</span>
 		<span v-else>-</span>
@@ -56,6 +60,7 @@
         <span v-if="!stockWarningInput"><span>{{ scope.row.stockWarning}}</span></span>
 		<el-input style="width:80%;" ref="sort-input" focus size="mini" v-else placeholder="" v-model="scope.row.stockWarning" @blur="changeInputValue(scope.row, 'stockWarning')" ></el-input>
       </template>
+
       <template #table-header-stockWarning>
         <div class="set-sort">
           <span>库存预警</span>
@@ -170,32 +175,17 @@
     </item-list-layer>
 		<el-dialog title="花材" :visible.sync="addDialog" :close-on-click-modal="false" width="600px" >
       <div class="ad-modal-content">
-        <el-form
-					:model="replaceForm"
-					:rules="replaceFormRules"
-					ref="replaceForm"
-					label-width="100px"
-					class="demo-form"
-				>
+        <el-form :model="replaceForm" :rules="replaceFormRules" ref="replaceForm" label-width="100px" class="demo-form" >
         <el-form-item label="名称" prop="name">
-						<el-input
-							v-model="replaceForm.name"
-							placeholder="请输入名称"
-							@input="fillName($event)"
-							size="small"
-						></el-input>
-					</el-form-item>
-			<el-form-item label="拼音缩写" prop="py">
-				<el-input
-						v-model="replaceForm.py"
-						placeholder="拼音缩写"
-						size="small"
-				></el-input>
-			</el-form-item>
+			<el-input v-model="replaceForm.name" placeholder="请输入名称" @input="fillName($event)" size="small" ></el-input>
+		</el-form-item>
+		<el-form-item label="拼音缩写" prop="py">
+			<el-input v-model="replaceForm.py" placeholder="拼音缩写" size="small" ></el-input>
+		</el-form-item>
 
 		<el-form-item label="图片" prop="cover">
-						<cl-upload v-model="replaceForm.cover" :successFun="uploadSuccess"></cl-upload>
-						<p style="font-size: 14px; color: #cccccc">建议上传图片比例 400X400</p>
+			<cl-upload v-model="replaceForm.cover" :successFun="uploadSuccess"></cl-upload>
+			<p style="font-size: 14px; color: #cccccc">建议上传图片比例 400X400</p>
 		</el-form-item>
 
 		<el-form-item label="分类" prop="classId">
@@ -456,6 +446,9 @@ export default {
 
   },
   methods: {
+	changeStock(info){
+
+	},
 	getItemClass(e){
 		this.classId = e
 		this.refreshData()
@@ -1188,7 +1181,7 @@ export default {
 		})
 		this.dialogFormVisible = false;
 	},
-	//批量改价
+	//改价改数
 	batchAlterNumFun(){
 		if(this.batchAlterNum==''){
 			return