chenrui 11 kuukautta sitten
vanhempi
commit
b89f8c3e25

+ 1 - 1
src/views/productManagement/newProduct/list.vue

@@ -87,7 +87,7 @@
               type="link"
               class="button-success"
               @click="handleDetail(record)"
-              id="newProductList-detail-btn">详情</a-button>
+              :id="'newProductList-detail-btn'+record.id">详情</a-button>
           </template>
         </s-table>
       </a-spin>

+ 1 - 1
src/views/productManagement/priceChangeRecord/list.vue

@@ -79,7 +79,7 @@
           </template>
           <!-- 变更状态 -->
           <span slot="productStatus" slot-scope="text, record">
-            <a-switch checkedChildren="启用" id="productChangeRecordList-enabledFlag" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+            <a-switch checkedChildren="启用" :id="'productChangeRecordList-enabledFlag'+record.id" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
           </span>
           <!-- 省级价变更后 -->
           <template slot="afterProvincePrice" slot-scope="text, record">

+ 4 - 4
src/views/productManagement/productBrand/list.vue

@@ -52,7 +52,7 @@
           <!-- 产品图片 -->
           <template slot="imageUrl" slot-scope="text, record">
             <img
-              id="productBrandList-imageUrl"
+              :id="'productBrandList-imageUrl'+record.id"
               :src="record.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
               width="30"
               height="30"
@@ -67,21 +67,21 @@
               v-if="$hasPermissions('B_productBrand_edit')"
               class="button-info"
               @click="handleEdit(record)"
-              id="productBrandList-edit-btn">编辑</a-button>
+              :id="'productBrandList-edit-btn'+record.id">编辑</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productBrand_detail')"
               class="button-success"
               @click="handleDetail(record)"
-              id="productBrandList-detail-btn">详情</a-button>
+              :id="'productBrandList-detail-btn'+record.id">详情</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productBrand_del')"
               class="button-error"
               @click="handleDel(record)"
-              id="productBrandList-del-btn">删除</a-button>
+              :id="'productBrandList-del-btn'+record.id">删除</a-button>
             <span v-if="!$hasPermissions('B_productBrand_edit') && !$hasPermissions('B_productBrand_detail') && !$hasPermissions('B_productBrand_del')">--</span>
           </template>
         </s-table>

+ 3 - 3
src/views/productManagement/productCategory/list.vue

@@ -26,7 +26,7 @@
             class="button-success"
             size="small"
             icon="plus"
-            id="productCategory-addSubItem"
+            :id="'productCategory-addSubItem'+record.id"
             @click="handleAdd(record)">新增子级</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_productCategory_edit')"
@@ -34,7 +34,7 @@
             class="button-info"
             size="small"
             icon="edit"
-            id="productCategory-edit"
+            :id="'productCategory-edit'+record.id"
             @click="handleEdit(record)">编辑</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_productCategory_del')"
@@ -42,7 +42,7 @@
             class="button-error"
             size="small"
             icon="delete"
-            id="productCategory-del"
+            :id="'productCategory-del'+record.id"
             @click="handleDel(record)">删除</a-button>
           <span v-if="!(record.productTypeLevel<3 && $hasPermissions('B_productCategory_add')) && !(record.pid != 0 && $hasPermissions('B_productCategory_edit')) && !(record.pid != 0 && $hasPermissions('B_productCategory_del'))">--</span>
         </template>

+ 0 - 1
src/views/productManagement/productInfo/importGuideModal.vue

@@ -150,7 +150,6 @@ export default {
       }, 1000)
       const link = document.createElement('a')
       link.style.display = 'none'
-      // link.href = 'https://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/productImport.xlsx?t=' + new Date().getTime()
       link.href = location.protocol + '//' + location.host + '/templ/产品批量导入模板.xlsx'
       link.setAttribute('download', '产品批量导入模板' + '.xlsx')
       document.body.appendChild(link)

+ 14 - 8
src/views/productManagement/productInfo/list.vue

@@ -160,14 +160,20 @@
             <a-switch
               checkedChildren="启用"
               unCheckedChildren="停产"
-              id="productInfoList-isEnable"
+              :id="'productInfoList-isEnable'+record.id"
               v-model="record.stopFlag"
               @change="changeFlagHandle(record)" />
           </template>
           <!-- 产品图片 -->
           <template slot="imageUrl" slot-scope="text, record">
             <div v-if="record.productPicList && record.productPicList.length>0">
-              <img :src="record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="inited(record.productPicList)" />
+              <img
+                :id="'productInfoList-img'+record.id"
+                :src="record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
+                width="30"
+                height="30"
+                class="imageUrl"
+                @click="inited(record.productPicList)" />
             </div>
             <span v-else>--</span>
           </template>
@@ -179,42 +185,42 @@
               v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_audit')"
               class="button-warning"
               @click="handleAudit(record)"
-              id="productInfoList-audit-btn">审核</a-button>
+              :id="'productInfoList-audit-btn'+record.id">审核</a-button>
             <a-button
               size="small"
               type="link"
               v-if="(record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')"
               class="button-primary"
               @click="handleLaunch(record)"
-              id="productInfoList-launch-btn">上线</a-button>
+              :id="'productInfoList-launch-btn'+record.id">上线</a-button>
             <a-button
               size="small"
               type="link"
               v-if="record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')"
               class="button-grey"
               @click="handleDownline(record)"
-              id="productInfoList-downline-btn">下线</a-button>
+              :id="'productInfoList-downline-btn'+record.id">下线</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productInfo_edit')"
               class="button-info"
               @click="handleEdit(record)"
-              id="productInfoList-edit-btn">编辑</a-button>
+              :id="'productInfoList-edit-btn'+record.id">编辑</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productInfo_detail')"
               class="button-success"
               @click="handleDetail(record)"
-              id="productInfoList-detail-btn">详情</a-button>
+              :id="'productInfoList-detail-btn'+record.id">详情</a-button>
             <a-button
               size="small"
               type="link"
               v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_del')"
               class="button-error"
               @click="handleDel(record)"
-              id="productInfoList-del-btn">删除</a-button>
+              :id="'productInfoList-del-btn'+record.id">删除</a-button>
             <span v-if="!(record.state=='WAIT' && $hasPermissions('B_productInfo_audit')) && !((record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')) && !(record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')) && !$hasPermissions('B_productInfo_edit') && !$hasPermissions('B_productInfo_detail') && !(record.state=='WAIT' && $hasPermissions('B_productInfo_del'))">--</span>
           </template>
         </s-table>

+ 1 - 1
src/views/productManagement/productInfo/offlineModal.vue

@@ -40,7 +40,7 @@
             bordered>
             <!-- 通用编码 -->
             <template slot="commonProductList" slot-scope="text, record" >
-              <productCodeList ref="productCodeList" mode="multiple" @change="e => productCodeChange(e, record)" />
+              <productCodeList :id="'productCodeList'+record.productSn" ref="productCodeList" mode="multiple" @change="e => productCodeChange(e, record)" />
             </template>
           </a-table>
         </a-form-model-item>

+ 2 - 2
src/views/productManagement/productLaunchAudit/list.vue

@@ -78,7 +78,7 @@
             <a-switch
               checkedChildren="显示"
               unCheckedChildren="隐藏"
-              id="productLaunchAuditList-isEnable"
+              :id="'productLaunchAuditList-isEnable'+record.productLogSn"
               v-model="record.isEnable"
               @change="changeFlagHandle(record)" />
           </template>
@@ -90,7 +90,7 @@
               v-if="record.bizState=='WAIT' && $hasPermissions('B_productLaunchAudit_audit')"
               class="button-warning"
               @click="handleAudit(record)"
-              id="productLaunchAuditList-audit-btn">审核</a-button>
+              :id="'productLaunchAuditList-audit-btn'+record.productLogSn">审核</a-button>
             <span v-else>--</span>
           </template>
         </s-table>

+ 19 - 13
src/views/productManagement/productLevel/list.vue

@@ -71,12 +71,18 @@
             v-if="$hasPermissions('B_productLevel_edit')"
             class="button-info"
             @click="handleEdit(record)"
-            id="productLevelList-edit-btn">编辑</a-button>
+            :id="'productLevelList-edit-btn'+record.id">编辑</a-button>
           <span v-else>--</span>
         </template>
       </s-table>
       <!-- 编辑价格 -->
-      <product-level-edit-modal v-drag :openModal="openModal" :itemId="itemId" :nowData="nowData" @close="closeModal" @ok="$refs.table.refresh()" />
+      <product-level-edit-modal
+        v-drag
+        :openModal="openModal"
+        :itemId="itemId"
+        :nowData="nowData"
+        @close="closeModal"
+        @ok="$refs.table.refresh()" />
     </a-card>
   </div>
 </template>
@@ -84,12 +90,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
-//组件
+// 组件
 import { STable, VSelect } from '@/components'
 import productLevelEditModal from './editModal.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
-//接口
+// 接口
 import { productLevelList } from '@/api/product'
 export default {
   name: 'ProductLevelList',
@@ -98,20 +104,20 @@ export default {
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,//表格高度
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       //  查询条件
-      queryParam: { 
+      queryParam: {
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        level: undefined //产品级别
+        level: undefined // 产品级别
       },
-      productType: [],//产品分类
+      productType: [], // 产品分类
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'left', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -150,7 +156,7 @@ export default {
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
-      nowData: null //当前行数据
+      nowData: null // 当前行数据
     }
   },
   methods: {
@@ -184,7 +190,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //导出配置
+    // 导出配置
     download (data) {
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
@@ -197,21 +203,21 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
-    //初始化
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
-    //计算表格高度
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200
     }
   },
   watch: {
-    //展开关闭 监听表格高度变化
+    // 展开关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 1 - 1
src/views/productManagement/productOfflineAudit/list.vue

@@ -104,7 +104,7 @@
               v-if="record.bizState=='WAIT' && $hasPermissions('B_productOfflineAudit_audit')"
               class="button-warning"
               @click="handleAudit(record)"
-              id="productOfflineAuditList-audit-btn">审核</a-button>
+              :id="'productOfflineAuditList-audit-btn'+record.productLogSn">审核</a-button>
             <span v-else>--</span>
           </template>
         </s-table>

+ 2 - 2
src/views/productManagement/productPricing/list.vue

@@ -115,14 +115,14 @@
               v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
               class="button-warning"
               @click="handleAudit(record)"
-              id="productPricingList-audit-btn">审核</a-button>
+              :id="'productPricingList-audit-btn'+record.id">审核</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productPricing_edit')"
               class="button-info"
               @click="handleEdit(record)"
-              id="productPricingList-edit-btn">编辑</a-button>
+              :id="'productPricingList-edit-btn'+record.id">编辑</a-button>
             <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
           </template>
         </s-table>

+ 1 - 1
src/views/productManagement/productSourcePath/list.vue

@@ -157,7 +157,7 @@
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
-              id="productSourceList-info"
+              :id="'productSourceList-info'+record.id"
               v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'"
               size="small"
               type="link"

+ 2 - 2
src/views/productManagement/productUniversal/list.vue

@@ -85,14 +85,14 @@
               v-if="$hasPermissions('B_productUniversal_edit')"
               class="button-info"
               @click="handleEdit(record)"
-              id="productUniversalList-edit-btn">编辑</a-button>
+              :id="'productUniversalList-edit-btn'+record.id">编辑</a-button>
             <a-button
               size="small"
               type="link"
               v-if="$hasPermissions('B_productUniversal_del')"
               class="button-error"
               @click="handleDel(record)"
-              id="productUniversalList-del-btn">删除</a-button>
+              :id="'productUniversalList-del-btn'+record.id">删除</a-button>
             <span v-if="!$hasPermissions('B_productUniversal_edit') && !$hasPermissions('B_productUniversal_del')">--</span>
           </template>
         </s-table>

+ 2 - 2
src/views/productManagement/shelfNoManage/list.vue

@@ -124,14 +124,14 @@
                 v-if="$hasPermissions('B_shelfNoManage_edit')"
                 class="button-info"
                 @click="handleEdit(record)"
-                id="shelfNoMan-edit-btn">编辑</a-button>
+                :id="'shelfNoMan-edit-btn'+record.id">编辑</a-button>
               <a-button
                 size="small"
                 type="link"
                 v-if="$hasPermissions('B_shelfNoManage_detail')"
                 class="button-info"
                 @click="handleDetail(record)"
-                id="shelfNoMan-detail-btn">变更记录</a-button>
+                :id="'shelfNoMan-detail-btn'+record.id">变更记录</a-button>
             </div>
           </template>
         </s-table>