hefei 1 year ago
parent
commit
61ba2c1074
3 changed files with 16 additions and 8 deletions
  1. 5 1
      .env.development
  2. 0 1
      package.json
  3. 11 6
      src/views/product/addProduct/index.vue

+ 5 - 1
.env.development

@@ -1 +1,5 @@
1
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
1
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
2
+# 接口地址
3
+ VUE_APP_BASE_API = 'http://testshop.hxxfb.com'
4
+# socket 连接地址
5
+ VUE_APP_WS_URL = ''

+ 0 - 1
package.json

@@ -81,7 +81,6 @@
81
     "@babel/core": "7.4.0",
81
     "@babel/core": "7.4.0",
82
     "@babel/register": "7.0.0",
82
     "@babel/register": "7.0.0",
83
     "@vue/cli-plugin-babel": "3.5.3",
83
     "@vue/cli-plugin-babel": "3.5.3",
84
-    "@vue/cli-plugin-eslint": "^3.9.1",
85
     "@vue/cli-plugin-unit-jest": "3.5.3",
84
     "@vue/cli-plugin-unit-jest": "3.5.3",
86
     "@vue/cli-service": "3.5.3",
85
     "@vue/cli-service": "3.5.3",
87
     "@vue/test-utils": "1.0.0-beta.29",
86
     "@vue/test-utils": "1.0.0-beta.29",

+ 11 - 6
src/views/product/addProduct/index.vue

@@ -107,7 +107,7 @@
107
           <el-col :span="24" class="lunbo">
107
           <el-col :span="24" class="lunbo">
108
             <el-form-item label="运费模板:" prop="temp_id">
108
             <el-form-item label="运费模板:" prop="temp_id">
109
               <div class="acea-row">
109
               <div class="acea-row">
110
-                <el-select v-model="formValidate.temp_id" placeholder="请选择" class="selWidthd mr20">
110
+                <el-select v-model="formValidate.temp_id" placeholder="包邮" class="selWidthd mr20" disabled="true">
111
                   <el-option
111
                   <el-option
112
                     v-for="item in shippingList"
112
                     v-for="item in shippingList"
113
                     :key="item.shipping_template_id"
113
                     :key="item.shipping_template_id"
@@ -115,7 +115,7 @@
115
                     :value="item.shipping_template_id"
115
                     :value="item.shipping_template_id"
116
                   />
116
                   />
117
                 </el-select>
117
                 </el-select>
118
-                <el-button class="mr15" size="small" @click="addTem">添加运费模板</el-button>
118
+                <!-- <el-button class="mr15" size="small" @click="addTem">添加运费模板</el-button> -->
119
               </div>
119
               </div>
120
             </el-form-item>
120
             </el-form-item>
121
 
121
 
@@ -123,7 +123,7 @@
123
               <el-input v-model="formValidate.unit_name" placeholder="请输入单位" />
123
               <el-input v-model="formValidate.unit_name" placeholder="请输入单位" />
124
             </el-form-item> -->
124
             </el-form-item> -->
125
           </el-col>
125
           </el-col>
126
-          <el-col :span="24" class="lunbo">
126
+         <!-- <el-col :span="24" class="lunbo">
127
             <el-form-item label="优惠券:" class="proCoupon">
127
             <el-form-item label="优惠券:" class="proCoupon">
128
               <div class="acea-row">
128
               <div class="acea-row">
129
                 <el-tag
129
                 <el-tag
@@ -140,7 +140,7 @@
140
               </div>
140
               </div>
141
             </el-form-item>
141
             </el-form-item>
142
 
142
 
143
-          </el-col>
143
+          </el-col> -->
144
         </el-row>
144
         </el-row>
145
         <!-- 商品详情-->
145
         <!-- 商品详情-->
146
         <el-row v-show="currentTab === 1">
146
         <el-row v-show="currentTab === 1">
@@ -471,7 +471,9 @@
471
                   <el-table-column align="center" label="分润比例" min-width="125">
471
                   <el-table-column align="center" label="分润比例" min-width="125">
472
                     <template slot-scope="scope">
472
                     <template slot-scope="scope">
473
                       <div style="display: flex;">
473
                       <div style="display: flex;">
474
-                        <div style="width: 80px;flex: 1;"><el-input @input="handleInput(scope.row, '分润比例')"  v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" /></div>
474
+                        <div style="width: 80px;flex: 1;">
475
+							<el-input @blur="handleInput(scope.row, '分润比例')"  v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
476
+						</div>
475
                         <div style="width: 10px;margin-top: 10px;"><b>%</b></div>
477
                         <div style="width: 10px;margin-top: 10px;"><b>%</b></div>
476
                       </div>
478
                       </div>
477
                     </template>
479
                     </template>
@@ -579,7 +581,7 @@
579
                 <template v-if="formValidate.extension_type == 1">
581
                 <template v-if="formValidate.extension_type == 1">
580
                   <el-table-column align="center" label="分润比例(%)" min-width="120">
582
                   <el-table-column align="center" label="分润比例(%)" min-width="120">
581
                     <template slot-scope="scope">
583
                     <template slot-scope="scope">
582
-                      <el-input @input="handleInput(scope.row, '分润比例')" v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
584
+                      <el-input @blur="handleInput(scope.row, '分润比例')" v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
583
                     </template>
585
                     </template>
584
                   </el-table-column>
586
                   </el-table-column>
585
                   <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
587
                   <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
@@ -1127,6 +1129,9 @@ export default {
1127
     getShippingList() {
1129
     getShippingList() {
1128
       shippingListApi().then(res => {
1130
       shippingListApi().then(res => {
1129
         this.shippingList = res.data
1131
         this.shippingList = res.data
1132
+		if(this.shippingList) {
1133
+			this.formValidate.temp_id = res.data[0]['shipping_template_id']
1134
+		}
1130
       })
1135
       })
1131
     },
1136
     },
1132
     showInput(item) {
1137
     showInput(item) {