Browse Source

no message

una 2 months ago
parent
commit
7010bbf8fc
2 changed files with 103 additions and 43 deletions
  1. 97 42
      src/views/goods/create.vue
  2. 6 1
      src/views/goods/selectCity.vue

+ 97 - 42
src/views/goods/create.vue

@@ -187,7 +187,7 @@
         <el-row>
           <el-form-item label="规格类型" prop="sku">
             <el-radio-group v-model="goods.productType" @input="productTypeChange">
-              <el-radio :label="1">单规格无加购</el-radio>
+              <el-radio :label="1">单规格</el-radio>
               <el-radio :label="2">多规格</el-radio>
               <!-- <el-radio :label="3" v-if="goods.type != 4">加购</el-radio> -->
               <!-- <el-radio :label="4">无限购</el-radio> -->
@@ -265,53 +265,90 @@
         <!-- v-if="goods.productType != 1" -->
         <el-table :data="products" border>
           <!-- v-if="goods.productType!=3" -->
-          <el-table-column property="value" label="货品规格" :key="Math.random()">
+          <el-table-column property="value" label="基本信息" :key="Math.random()">
             <template slot-scope="scope">
               <div style="text-align: left;">
-                <span style="font-weight: 600;">商品规格:</span>
+                <span style="font-weight: 600;">规格名称:</span>
                 {{ scope.row.specifications }}
                 <br />
                 <span style="font-weight: 600;">规格简称:</span>
                 {{ scope.row.shortName }}
                 <br />
-                <div v-if="goods.productType == 3">
-                  <span style="font-weight: 600;">加购数量:</span>
-                  {{
-                  scope.row.unitIncreaseNumber }}
-                  <br />
-                </div>
+                         <span style="font-weight: 600;">商品属性:</span>
+                {{ scope.row.attribute }}
+                <br />
+                       <span style="font-weight: 600;">商品类型:</span>
+                {{ scope.row.type }}
+                <br />
+                    <span style="font-weight: 600;">市场售价:</span>
+                {{ scope.row.counterPrice }}
+                <br />
+                 <span style="font-weight: 600;">实际售卖价:</span>
+                {{ scope.row.price }}
+                <br />
+                 <span style="font-weight: 600;">商品库存:</span>
+                {{ scope.row.number }}
+                <br />
+                 <span style="font-weight: 600;">已售数量:</span>
+                {{ scope.row.salesNumber }}
+                <br />
+
               </div>
             </template>
           </el-table-column>
 
           <!-- <el-table-column property="unitIncreaseNumber" label="加购数量" v-if="goods.productType == 3" :key="Math.random()" /> -->
-          <el-table-column property="price" label="售价&库存" width="130">
+          <el-table-column property="price" label="服务设置" width="150">
             <template slot-scope="scope">
               <div style="text-align: left;">
-                <span style="font-weight: 600;">市场售价:</span>
-                {{ scope.row.counterPrice }}
+                <span style="font-weight: 600;">是否支持加购:</span>
+                {{ scope.row.isSupportAddbuy==1?'是':'否' }}
                 <br />
-                <span style="font-weight: 600;">实际售价:</span>
-                {{ scope.row.price }}
+                <span style="font-weight: 600;">是否同步给抖音:</span>
+                {{ scope.row.isSyncDy==1?'是':'否' }}
                 <br />
-                <span style="font-weight: 600;">商品库存:</span>
-                {{ scope.row.number }}
+                <span style="font-weight: 600;">最大加购数量:</span>
+                {{ scope.row.unitMaximum }}
                 <br />
-                <span style="font-weight: 600;">已售库存:</span>
-                {{ scope.row.salesNumber }}
+                <span style="font-weight: 600;">加购单位:</span>
+                {{ scope.row.unitArea }}
+                <br />
+                <span style="font-weight: 600;">加购内容:</span>
+                {{ scope.row.unitDescribe }}
+                <br />
+                 <span style="font-weight: 600;">展示单价:</span>
+                {{ scope.row.unitPrice }}
+                <br />
+                  <span style="font-weight: 600;">所需技能:</span>
+                {{ scope.row.serviceSkill }}
+                <br />
+                  <span style="font-weight: 600;">计提金额:</span>
+                {{ scope.row.serviceFee }}
+                <br />
+                             <span style="font-weight: 600;">服务时长:</span>
+                {{ scope.row.serviceDuration }}
+                <br />
+                 <span style="font-weight: 600;">服务次数:</span>
+                {{ scope.row.serviceTimes }}
                 <br />
               </div>
             </template>
           </el-table-column>
 
-          <el-table-column property="serviceTimes" label="服务信息" width="170">
+          <el-table-column  label="预约设置" width="170">
             <template slot-scope="scope">
               <div style="text-align: left;">
-                <span style="font-weight: 600;">服务次数:</span>
-                {{ scope.row.serviceTimes }}
+                 <span style="font-weight: 600;">预约时段类型:</span>
+                {{ scope.row.timeRangeType==1?'指定时间段可约':'固定时间段可约(默认半小时)' }}
                 <br />
-                <span style="font-weight: 600;">服务时长:</span>
-                {{ scope.row.serviceDuration }}
+    <span style="font-weight: 600;">延迟几小时可约:</span>
+                {{ scope.row.bookDelayDay}}
+                <br />
+                    <span style="font-weight: 600;">商品可服务时间:</span>
+                {{ scope.row.startTime+'-'+scope.row.endTime}}
+                <br />
+                  <span style="font-weight: 600;">可约期限多少天:</span>
+                {{ scope.row.bookIntervalDay}}
                 <br />
                 <span style="font-weight: 600;">服务时段:</span>
                 <div style="margin:-22px 0 0 65px;">
@@ -321,7 +358,23 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column property="url" width="80" label="货品图片" v-if="goods.productType != 3">
+                   <el-table-column  label="不可约设置" width="170">
+            <template slot-scope="scope">
+              <div style="text-align: left;">
+                <div v-for="(item,index) in scope.row.noServiceTimeRange" :key="index">
+                 <span style="font-weight: 600;margin-left:10px;">开始时间:</span>
+                {{ item.startTime }}
+                 <span style="font-weight: 600;margin-left:10px;">结束时间:</span>
+                {{ item.endTime }}
+                          <span style="font-weight: 600;margin-left:10px;">不可约标签:</span>
+                {{ item.tagName }}
+                   <span style="font-weight: 600;margin-left:10px;">提醒内容:</span>
+                {{ item.comment }}
+               </div>
+                  </div>
+            </template>
+          </el-table-column>
+          <el-table-column property="url" width="80" label="货品图片" >
             <template slot-scope="scope">
               <img v-if="scope.row.url" :src="scope.row.url" width="40" />
             </template>
@@ -418,7 +471,7 @@
 
             <el-row>
               <el-col :span="12">
-                <el-form-item label="商品规格库存" prop="number">
+                <el-form-item label="商品库存" prop="number">
                   <el-input v-model="productForm.number" placeholder="商品库存数量,0表示无库存限制" />
                 </el-form-item>
               </el-col>
@@ -524,7 +577,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="服务次数" prop="serviceTimes" v-if="goods.productType != 3">
+                <el-form-item label="服务次数" prop="serviceTimes" >
                   <el-input v-model="productForm.serviceTimes" type="number">
                     <template slot="append">次</template>
                   </el-input>
@@ -561,7 +614,7 @@
 
             <el-row v-if="productForm.timeRangeType==0">
               <el-col :span="12">
-                <el-form-item label="每天工作开始时间" prop="startWorkTime">
+                <el-form-item label="商品可服务开始时间" prop="startWorkTime">
                   <el-time-select
                     v-model="productForm.startTime"
                     :picker-options="{
@@ -574,7 +627,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="每天工作结束时间" prop="endTime">
+                <el-form-item label="商品可服务结束时间" prop="endTime">
                   <el-time-select
                     v-model="productForm.endTime"
                     :picker-options="{
@@ -1394,9 +1447,8 @@ export default {
         unitIncreaseNumber: 1,
         shortName: "",
         id: 0,
-        specification: "",
+        specifications: "",
         attribute: "",
-
         type: 0,
         price: 0.0,
         number: 0,
@@ -1525,14 +1577,7 @@ export default {
         // memberPrice: [
         //   { required: true, message: "会员价不能为空", rigger: "blur" },
         // ],
-        attribute: [
-          {
-            validator: validateGoodsAttribute,
-            required: true,
-            message: "请选择商品属性",
-            trigger: "blur"
-          }
-        ],
+      
         number: [{ required: true, message: "库存不能为空", trigger: "blur" }],
         reportCategory: [
           { required: true, message: "商品简称不能为空", trigger: "blur" }
@@ -1580,7 +1625,15 @@ export default {
         ],
         url: [
           { required: true, message: "商品图片不能为空", trigger: "change" }
-        ]
+        ],
+          attribute: [
+          {
+            validator: validateGoodsAttribute,
+            required: true,
+            message: "请选择商品属性",
+            trigger: "blur"
+          }
+        ],
       },
       editorInit: {
         language: "zh_CN",
@@ -1886,10 +1939,10 @@ export default {
         list.push(item[2]);
       });
 
-      goodsParam.recGoods = list;
+      // goodsParam.recGoods = list;
       goodsParam.gallery = this.goods.gallery.join(",");
       goodsParam.channel = this.goods.channel.join(",");
-      goodsParam.recGoods = this.goods.recGoods.join(",");
+      goodsParam.recGoods = list.join(",");
       //      let goodsSupplement = goodsParam.goodsSupplement;
       // let supplyList = [];
       // goodsSupplement.forEach(item => {
@@ -2224,7 +2277,7 @@ export default {
       this.timerange.forEach(time => {
         if (
           time.duration == this.productForm.serviceDuration &&
-          time.type == this.goods.attribute
+          time.type == this.productForm.attribute
         )
           this.timerange_p.push({ range: time.startTime + "-" + time.endTime });
       });
@@ -2368,9 +2421,11 @@ export default {
       this.$refs["productForm"].validateField("url");
     },
     handleProductEdit() {
+                this.productForm.noServiceTimeRange=this.noServiceRanges;
       this.$refs["productForm"].validate(valid => {
         if (valid) {
           console.log(this.productForm);
+
           // this.productForm.specifications = [this.productForm.specification];
           //判断售价
           if (

+ 6 - 1
src/views/goods/selectCity.vue

@@ -41,7 +41,9 @@
             </div>
             <div slot="footer" style="display: flex; align-items: center;justify-content: space-between;">
                 <div>
-                    <el-button type="info" style="float:right;padding:5px 10px" @click="selectAll">全选</el-button>
+
+                    <el-button type="info" style="float:right;padding:5px 10px" @click="selectAllNo">全不选</el-button>
+                                        <el-button type="primary" style="float:right;padding:5px 10px;margin-right:10px;" @click="selectAll">全选</el-button>
                 </div>
                 <div>
                     <el-button @click="closed">取 消</el-button>
@@ -183,6 +185,9 @@ export default {
             let filterCity = this.selectedCitys.filter(item => item.channel != channel);
             this.selectedCitys = filterCity.concat(this.citys.map(city => { return { cityId: city.id, city: city.cityName, channel: channel, province: city.province } }))
         },
+           selectAllNo() {
+               this.selectedCitys=[];
+           }, 
         closed() {
             this.selectedCitys = this.selected;
             this.Pvisible = false;