Bläddra i källkod

在线选品更改页面

xialei 1 år sedan
förälder
incheckning
c378a060b9

+ 1 - 1
src/views/merchant/list/index.vue

@@ -462,7 +462,7 @@ export default {
462 462
         .then((res) => {
463 463
           Cookies.set("merchantToken", res.data.token);
464 464
           // window.open(SettingMer.httpUrl + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
465
-          window.open("http://10.1.2.170:9527" + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
465
+          window.open("https://testapi.hxxfb.com" + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
466 466
           // window.open(res.data.url);
467 467
           console.log('跳转到merchant res = ')
468 468
           console.log(res)

+ 35 - 24
src/views/product/Onlineselection/onlineselection/index.vue

@@ -62,15 +62,15 @@
62 62
         </div>
63 63
       </div>
64 64
       <div class="jilulist" v-if="indexINs != 1 ? true : false">
65
-        <el-button plain class="checkoed">
65
+        <!-- <el-button plain class="checkoed">
66 66
           <el-checkbox
67 67
             :indeterminate="isIndeterminate"
68 68
             v-model="checkAll"
69 69
             @change="handleCheckAllChange"
70 70
             >全选</el-checkbox
71 71
           >
72
-        </el-button>
73
-        <el-button type="success" plain @click="del">取消全选</el-button>
72
+        </el-button> -->
73
+        <!-- <el-button type="success" plain @click="del">取消全选</el-button> -->
74 74
         <!-- <el-button type="info" plain @click="library"
75 75
           >批量加入商品管理</el-button
76 76
         > -->
@@ -142,12 +142,12 @@
142 142
               </div>
143 143
               <div class="jige">
144 144
                 <div class="ysi">
145
-                  <div class="jinqin">销售价:{{ item.market_price }}</div>
146
-                  <div class="lsid">养老金:{{ item.pension }}</div>
145
+                  <div class="jinqin">成本价:{{ item.cost_price }}</div>
146
+                  <div class="lsid">销售价:{{ item.market_price }}</div>
147 147
                 </div>
148 148
                 <div class="er">
149 149
                   <div class="tops">
150
-                    创客利润:<span style="font-size: 10px">{{
150
+                    利润:<span style="font-size: 10px">{{
151 151
                       item.mer_profit
152 152
                     }}</span>
153 153
                   </div>
@@ -166,10 +166,16 @@
166 166
                   </div>
167 167
                   <div
168 168
                     class="left"
169
+                    @click="update(item)"
170
+                  >
171
+                    修改价格
172
+                  </div>
173
+                  <!-- <div
174
+                    class="left"
169 175
                     @click="xunapin(item.spu_id)"
170 176
                     v-if="item.status == 0"
171 177
                   >
172
-                    加入3号库
178
+                    加入选品
173 179
                   </div>
174 180
                   <div
175 181
                     class="left"
@@ -177,11 +183,11 @@
177 183
                     v-if="item.status == 1"
178 184
                     style="color: red"
179 185
                   >
180
-                    取消加入3号
181
-                  </div>
186
+                    取消加入选品
187
+                  </div> -->
182 188
                 </div>
183 189
 
184
-                <div class="si">
190
+                <!-- <div class="si">
185 191
 
186 192
                   <div
187 193
                     class="centers"
@@ -189,7 +195,7 @@
189 195
                   >
190 196
                     修改价格
191 197
                   </div>
192
-                </div>
198
+                </div> -->
193 199
               </div>
194 200
             </div>
195 201
           </el-checkbox>
@@ -211,40 +217,42 @@
211 217
     </el-card>
212 218
 
213 219
     <div>
214
-      <el-dialog title="修改销售价" :visible.sync="dialogTableVisible">
220
+      <el-dialog title="修改成本价" :visible.sync="dialogTableVisible">
215 221
         <div class="niromg">
216 222
           <div class="lanse">
217 223
 
218 224
             <div style="display: flex">
219
-              <div style="margin-top: 10px;">销售价:</div>
225
+              <div style="margin-top: 10px;">成本价:</div>
220 226
               <el-input
221
-                v-model="dataInfo.market_price"
227
+                v-model="dataInfo.cost_price"
222 228
                 style="width: 300px"
223 229
                 placeholder="输入销售价格"
230
+                @input="handleInputProfit()"
224 231
               ></el-input>
225 232
             </div>
226 233
 
227 234
             <div style="display: flex">
228
-              <div style="margin-top: 10px;">市场价:</div>
235
+              <div style="margin-top: 10px;">销售价:</div>
229 236
               <el-input
230
-                v-model="dataInfo.ot_price"
237
+                v-model="dataInfo.market_price"
231 238
                 style="width: 300px"
232
-                placeholder="输入市场价格"
239
+                placeholder="输入成本价格"
240
+                @input="handleInputProfit()"
233 241
               ></el-input>
234 242
             </div>
235 243
 
236 244
             <div style="display: flex">
237
-              <div>销售价:{{dataInfo.market_price}}</div>
245
+              <div>成本价:{{dataInfo.cost_price}}</div>
238 246
               <div style="margin-left: 5px">
239
-                养老金:{{dataInfo.pension}}
247
+                销售价:{{dataInfo.market_price}}
240 248
               </div>
241 249
             </div>
242 250
 
243 251
             <div style="display: flex">
244
-              <div>市场价:{{dataInfo.ot_price}}</div>
245
-              <div style="margin-left: 5px">
252
+              <div>利润:{{dataInfo.mer_profit}}</div>
253
+              <!-- <div style="margin-left: 5px">
246 254
                 创客利润:{{ dataInfo.mer_profit }}
247
-              </div>
255
+              </div> -->
248 256
             </div>
249 257
 
250 258
           </div>
@@ -328,6 +336,9 @@ export default {
328 336
     this.getList();
329 337
   },
330 338
   methods: {
339
+    handleInputProfit(){
340
+      this.dataInfo.mer_profit = (this.dataInfo.market_price - this.dataInfo.cost_price).toFixed(2)
341
+    },
331 342
     del() {
332 343
       this.checkedCities = [];
333 344
       this.isIndeterminate = true;
@@ -525,9 +536,9 @@ export default {
525 536
 
526 537
       let dkx = 0;
527 538
      
528
-      if (this.dataInfo.market_price == "" || this.dataInfo.ot_price == "") {
539
+      if (this.dataInfo.market_price == "" || this.dataInfo.market_price == "") {
529 540
         this.$message.error("请输入金额");
530
-      } else if (!reg.test(this.dataInfo.market_price) || this.dataInfo.market_price == 0 || !reg.test(this.dataInfo.ot_price) || this.dataInfo.ot_price == 0) {
541
+      } else if (!reg.test(this.dataInfo.market_price) || this.dataInfo.market_price == 0 || !reg.test(this.dataInfo.market_price) || this.dataInfo.market_price == 0) {
531 542
         dkx = 1;
532 543
         this.$message.error("请输入正确金额");
533 544
         return;