Browse Source

添加禁用

chenrui 2 years ago
parent
commit
85ae6f86da

+ 69 - 46
src/views/productManagement/priceChangeRecord/list.vue

@@ -68,6 +68,10 @@
           <span v-if="record.productEntity.productTypeName2 || record.productEntity.productTypeName3">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
           <span v-else>--</span>
         </template>
+        <!-- 变更状态 -->
+        <span slot="productStatus" slot-scope="text, record">
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+        </span>
         <!-- 省级价变更后 -->
         <template slot="afterProvincePrice" slot-scope="text, record">
           <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ toThousands(record.afterProvincePrice) }}</span>
@@ -166,53 +170,54 @@ export default {
         { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '变更状态', scopedSlots: { customRender: 'productStatus' }, width: 70, align: 'center' }
       ]
-        arr.push({
-          title: '省级价',
-          dataIndex: 'sdtermindfaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '市级价',
-          dataIndex: 'sdterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '特约价',
-          dataIndex: 'gterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '终端价',
-          dataIndex: 'hterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '车主价',
-          dataIndex: 'sterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
-          ]
-        })
+      arr.push({
+        title: '省级价',
+        dataIndex: 'sdtermindfaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '市级价',
+        dataIndex: 'sdterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '特约价',
+        dataIndex: 'gterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '终端价',
+        dataIndex: 'hterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '车主价',
+        dataIndex: 'sterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
+        ]
+      })
       return arr
     }
   },
@@ -307,6 +312,24 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 233
+    },
+    // 修改状态
+    changeFlagHandle (text, record) {
+      // const _data = {
+      //   id: record.id,
+      //   flag: record.loginFlag ? '1' : '0'
+      // }
+      // this.spinning = true
+      // updateEnableStatus(_data).then(res => {
+      //   if (res.status == 200) {
+      //     this.$message.success(res.message)
+      //     this.$refs.table.refresh()
+      //     this.spinning = false
+      //   } else {
+      //     this.$refs.table.refresh()
+      //     this.spinning = false
+      //   }
+      // })
     }
   },
   watch: {

+ 3 - 3
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -33,9 +33,9 @@
           {{ chooseAddr }}
           <a-button type="link" :disabled="!form.buyerSn" id="chooseCustom-chooseAddr" @click="handleChoose">{{ addressVal }} >></a-button>
         </a-form-model-item>
-        <a-form-model-item label="出库仓库" prop="warehouseSn">
+        <!--  <a-form-model-item label="出库仓库" prop="warehouseSn">
           <chooseWarehouse ref="warehouse" v-model="form.warehouseSn"></chooseWarehouse>
-        </a-form-model-item>
+        </a-form-model-item> -->
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
           <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
           <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
@@ -107,7 +107,7 @@ export default {
         this.form.buyerName = val.name || ''
         this.$refs.ruleForm.clearValidate()
         this.getDefaultAddress()
-        if(val.row){
+        if (val.row) {
           this.form.warehouseSn = val.row.defaultWarehouseSn
         }
       } else {

+ 2 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -6,10 +6,10 @@
         <template slot="subTitle">
           <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
-          <div style="margin: 0 15px;display:inline-block;color: #666;">
+          <!-- <div style="margin: 0 15px;display:inline-block;color: #666;">
             <span>出库仓库:</span>
             <chooseWarehouse style="width:200px" :allowClear="false" ref="warehouse" v-model="warehouseSn" @change="handleWarehouse"></chooseWarehouse>
-          </div>
+          </div> -->
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesEdit-cont">

+ 8 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -30,6 +30,11 @@
                 <ProductType id="productInfoList-productType" v-model="productType" @change="changeProductType"></ProductType>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="仓库">
+                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+              </a-form-item>
+            </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -103,11 +108,12 @@ import { commonMixin } from '@/utils/mixin'
 import { queryStockProductPage } from '@/api/stock'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { STable, VSelect } from '@/components'
 export default {
   name: 'QueryPart',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, ProductType },
+  components: { STable, VSelect, ProductBrand, ProductType, chooseWarehouse },
   props: {
     newLoading: Boolean
   },
@@ -159,6 +165,7 @@ export default {
       const arr = [
         { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: '18%', align: 'left' },
+        { title: '仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },