Ver Fonte

bug修复

chenrui há 3 anos atrás
pai
commit
e895fcf09f
1 ficheiros alterados com 35 adições e 33 exclusões
  1. 35 33
      src/views/productManagement/newProduct/list.vue

+ 35 - 33
src/views/productManagement/newProduct/list.vue

@@ -6,47 +6,47 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="上线日期" prop="time">
-                <rangeDate ref="rangeDate" v-model.trim="time" @change="dateChange" />
-              </a-form-model-item>
+              <a-form-item label="产品编码">
+                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+              <a-form-item label="产品名称">
+                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
-              </a-form-item>
+              <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品名称">
-                  <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                <a-form-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="productInfoList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品编码">
-                  <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -78,6 +78,9 @@
         :defaultLoadData="false"
         :scroll="{ x: 1090, y: tableHeight }"
         bordered>
+        <template slot="auditTime">
+          {{ $route.params.onlineFalg=='1'?'上':'下' }}线时间
+        </template>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
           <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
@@ -111,7 +114,6 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       productType: [],
-      time: [],
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -129,7 +131,7 @@ export default {
       exportLoading: false, // 导出loading
       columns: [
         { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
-        { title: '上线日期', dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'auditTime' }, dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -162,12 +164,12 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
     //  重置
     resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
       this.queryParam.code = ''
       this.queryParam.name = ''
       this.queryParam.origCode = ''