Pārlūkot izejas kodu

1、优化sku编辑

huangmp 2 gadi atpakaļ
vecāks
revīzija
2fe6b7fb84

+ 9 - 9
src/views/modules/print/print-order.vue

@@ -117,9 +117,9 @@
                 v-model="dataForm.colorPrint"
                 clearable
                 size="small">
-                <el-option key="1" label="影像级" value="影像级"></el-option>
-                <el-option key="2" label="六色" value="六色"></el-option>
-                <el-option key="3" label="四色" value="四色"></el-option>
+                <el-option key="1" label="影像级" value="8"></el-option>
+                <el-option key="2" label="六色" value="6"></el-option>
+                <el-option key="3" label="四色" value="4"></el-option>
               </el-select>
             </template>
           </el-form-item>
@@ -285,9 +285,9 @@
 <!--                  <el-tag v-if="order.colorPrint === '四色'" type="success">{{order.colorPrint }}</el-tag>-->
 <!--                  <el-tag v-if="order.colorPrint === '影像级'" type="danger">{{order.colorPrint }}</el-tag>-->
 <!--                  <el-tag v-if="order.colorPrint === '六色'" type="warning">{{order.colorPrint }}</el-tag>-->
-                  <span style="font-size: 24px; color: green" v-if="order.colorPrint === '四色'">{{order.colorPrint}}</span>
-                  <span style="font-size: 24px; color: orange" v-if="order.colorPrint === '六色'">{{order.colorPrint}}</span>
-                  <span style="font-size: 24px; color: red" v-if="order.colorPrint === '影像级'">{{order.colorPrint}}</span>
+                  <span style="font-size: 24px; color: green" v-if="order.colorPrint === '4'">四色</span>
+                  <span style="font-size: 24px; color: orange" v-if="order.colorPrint === '6'">六色</span>
+                  <span style="font-size: 24px; color: red" v-if="order.colorPrint === '8'">影像级</span>
                 </div>
               </el-col>
               <!-- 打印克数 -->
@@ -425,9 +425,9 @@
         </el-form-item>
         <el-form-item label="色数" label-width="100px">
           <el-select v-model="wave.colorPrint">
-            <el-option key="YX" label="影像级" value="影像级"></el-option>
-            <el-option key="LS" label="六色" value="六色"></el-option>
-            <el-option key="SS" label="四色" value="四色"></el-option>
+            <el-option key="YX" label="影像级" value="8"></el-option>
+            <el-option key="LS" label="六色" value="6"></el-option>
+            <el-option key="SS" label="四色" value="4"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="克数" label-width="100px">

+ 6 - 6
src/views/modules/print/wave.vue

@@ -136,9 +136,9 @@
             label="打印色数"
           >
             <template slot-scope="scope">
-              <el-tag v-if="scope.row.colorPrint === '四色'" type="success">{{scope.row.colorPrint }}</el-tag>
-              <el-tag v-if="scope.row.colorPrint === '影像级'" type="danger">{{scope.row.colorPrint }}</el-tag>
-              <el-tag v-if="scope.row.colorPrint === '六色'" type="warning">{{scope.row.colorPrint }}</el-tag>
+              <el-tag v-if="scope.row.colorPrint === '4'" type="success">四色</el-tag>
+              <el-tag v-if="scope.row.colorPrint === '8'" type="danger">影像级</el-tag>
+              <el-tag v-if="scope.row.colorPrint === '6'" type="warning">六色</el-tag>
             </template>
           </el-table-column>
           <el-table-column
@@ -248,9 +248,9 @@
         </el-form-item>
         <el-form-item label="色数" label-width="100px">
           <el-select v-model="modifyWave.colorPrint">
-            <el-option key="1" label="影像级" value="影像级"></el-option>
-            <el-option key="2" label="六色" value="六色"></el-option>
-            <el-option key="3" label="四色" value="四色"></el-option>
+            <el-option key="1" label="影像级" value="8"></el-option>
+            <el-option key="2" label="六色" value="6"></el-option>
+            <el-option key="3" label="四色" value="4"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="克数" label-width="100px">

+ 72 - 1
src/views/modules/prod/post-product/posting-edit-product.vue

@@ -206,7 +206,32 @@
               <el-input type="number" v-model="dataForm.setNum"></el-input>
             </el-form-item>
           </div>
-
+          <el-form-item label="第三方产品简称">
+            <el-autocomplete
+              class="inline-input"
+              v-model="dataForm.thirdProdName"
+              :fetch-suggestions="querySearch"
+              placeholder="请输入内容"
+              @select="handleSelect"
+            >
+              <template slot-scope="{ item }">
+                <div class="name">{{ item.label }}</div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item label="四色或六色">
+            <el-select
+              v-model="dataForm.colorPrint"
+              :placeholder="this.$i18n.t('tip.select')"
+            >
+              <el-option
+                v-for="transport in colorPrintList"
+                :key="transport.colorPrintId"
+                :label="transport.colorPrintName"
+                :value="transport.colorPrintId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <!-- 预售发货时间 -->
           <el-form-item
               v-if="dataForm.preSellStatus === 1 && dataForm.prodType !== 5"
@@ -550,9 +575,41 @@ export default {
       }
     }
     return {
+      colorPrintList:[
+        {
+          colorPrintName:'影像级',
+          colorPrintId: '8'
+        },
+        {
+          colorPrintName:'六色',
+          colorPrintId: '6'
+        },
+        {
+          colorPrintName:'四色',
+          colorPrintId: '4'
+        }
+      ],
       lang: window.localStorage.getItem('lang'),
+      thirdProdNameLisk: [
+        {value: 'YXK', label: 'YXK-圆角小卡'},
+        {value: 'ZJXK', label: 'ZJXK-直角小卡'},
+        {value: 'FP', label: 'FP-仿拍立得'},
+        {value: 'FK', label: 'FK-方卡'},
+        {value: 'MXP', label: 'MXP-明信片'},
+        {value: 'ZP', label: 'ZP-直拍封面'},
+        {value: 'PG', label: 'PG-票根'},
+        {value: 'HZ', label: 'HZ-徽章'},
+        {value: 'HB', label: 'HB-海报'},
+        {value: 'TZ', label: 'TZ-贴纸'},
+        {value: 'TMPLD', label: 'TMPLD-透明拍立得'},
+        {value: 'RMHZ', label: 'RMHZ-绒毛徽章'},
+        {value: 'BHK', label: 'BHK-变换卡'},
+        {value: 'SQ', label: 'SQ-书签'}
+      ],
       dataForm: {
         // 商品类型(0普通商品 1拼团 2秒杀 3积分 5活动商品)
+        thirdProdName:'',
+        colorPrint: '6',
         prodType: 0,
         prodNameEn: '',
         prodNameCn: '',
@@ -763,6 +820,20 @@ export default {
   },
 
   methods: {
+    querySearch (queryString, cb) {
+      var restaurants = this.thirdProdNameLisk
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
+      // 调用 callback 返回建议列表的数据
+      cb(results)
+    },
+    createFilter (queryString) {
+      return (restaurant) => {
+        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
+      }
+    },
+    handleSelect (item) {
+      console.log(item)
+    },
     /**
      * 商品类型切换
      */

+ 55 - 0
src/views/modules/prod/sku-table.vue

@@ -208,6 +208,28 @@
               </template>
             </el-table-column>
 
+            <!--  第三方sku编号          -->
+            <el-table-column
+              prop="thirdSkuNo"
+              label="第三方sku编号"
+              width="220px"
+            >
+              <template slot-scope="scope">
+                <el-autocomplete
+                  class="inline-input"
+                  v-model="scope.row.thirdSkuNo"
+                  placeholder="请输入内容"
+                >
+                  <template slot-scope="{ item }">
+                    <div class="name">{{ item.label }}</div>
+<!--                    <span class="addr">{{ item.label }}</span>-->
+                  </template>
+                </el-autocomplete>
+                <!-- :class="{'err-tips': scope.row.partyCodeSame}" -->
+                <!-- <el-input v-model="scope.row.partyCode" size="small" maxlength="100" class="tag-input-width"></el-input> -->
+              </template>
+            </el-table-column>
+
             <!--起订量-->
             <el-table-column prop="setNum" label="起订量">
               <template slot-scope="scope">
@@ -438,6 +460,25 @@ import Big from 'big.js'
 export default {
   data () {
     return {
+      skuList: [
+        {value: '1', label: '1:高透亮膜'},
+        {value: '2', label: '2:哑膜'},
+        {value: '3', label: '3:七彩镭射膜'},
+        {value: '4', label: '4:斜杠镭射膜'},
+        {value: '5', label: '5:满天星膜'},
+        {value: '6', label: '6:玻璃碎膜'},
+        {value: '7', label: '7:珠光纸'},
+        {value: '8', label: '8:不覆膜'},
+        {value: '9', label: '9:印象磨砂膜'},
+        {value: '10', label: '10:星光拉丝膜'},
+        {value: '21', label: '21:镜面光膜'},
+        {value: '22', label: '22:星星镭射膜'},
+        {value: '23', label: '23:爱心镭射膜'},
+        {value: '160', label: '160:相片膜'},
+        {value: '195', label: '195:透明拍立得(几个款'},
+        {value: '197', label: '197:绒毛徽章'},
+        {value: '198', label: '198:变换卡'}
+      ],
       // 表格数据
       lists: [],
       rowspan: [],
@@ -559,6 +600,20 @@ export default {
     }
   },
   methods: {
+    querySearch (queryString, cb) {
+      var restaurants = this.skuList
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
+      // 调用 callback 返回建议列表的数据
+      cb(results)
+    },
+    createFilter (queryString) {
+      return (restaurant) => {
+        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
+      }
+    },
+    handleSelect (item) {
+      console.log(item)
+    },
     init (skuList) {
       this.initing = true
       this.lists = genFlatten(this.skuTags, skuList, this.defalutSku)