瀏覽代碼

产品上线信息

chenrui 1 年之前
父節點
當前提交
783c987fa7

+ 9 - 0
src/api/product.js

@@ -491,3 +491,12 @@ export const excelOnlineList = (params) => {
     responseType: 'blob'
     responseType: 'blob'
   })
   })
 }
 }
+
+// 显示/隐藏
+export const updateShowFlag = (params) => {
+  return axios({
+    url: '/productLog/updateShowFlag',
+    data: params,
+    method: 'post'
+  })
+}

+ 39 - 12
src/views/productManagement/productLaunchAudit/list.vue

@@ -31,9 +31,9 @@
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="4" :sm="24" v-if="queryParam.bizState != 'WAIT'">
+              <a-col :md="4" :sm="24" v-if="queryParam.bizState == 'PASS'">
                 <a-form-item label="是否新品">
                 <a-form-item label="是否新品">
-                  <v-select code="PRODUCT_LEVEL" id="productLaunchAuditList-isNew" v-model="queryParam.level" allowClear placeholder="请选择产品是否为新品"></v-select>
+                  <v-select code="FLAG" id="productLaunchAuditList-isNew" v-model="queryParam.newProductFlag" allowClear placeholder="请选择产品是否为新品"></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
               <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
@@ -69,6 +69,15 @@
             <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
             <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
+          <!-- 显示状态 -->
+          <template slot="showFlag" slot-scope="text, record">
+            <a-switch
+              checkedChildren="显示"
+              unCheckedChildren="隐藏"
+              id="productLaunchAuditList-isEnable"
+              v-model="record.isEnable"
+              @change="changeFlagHandle(record)" />
+          </template>
           <!-- 操作 -->
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
           <template slot="action" slot-scope="text, record">
             <a-button
             <a-button
@@ -78,13 +87,6 @@
               class="button-warning"
               class="button-warning"
               @click="handleAudit(record)"
               @click="handleAudit(record)"
               id="productLaunchAuditList-audit-btn">审核</a-button>
               id="productLaunchAuditList-audit-btn">审核</a-button>
-            <a-button
-              size="small"
-              type="link"
-              v-if="record.bizState=='PASS'"
-              class="button-warning"
-              @click="handleAudit(record)"
-              id="productLaunchAuditList-audit-btn">显示</a-button>
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
         </s-table>
         </s-table>
@@ -97,7 +99,7 @@
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import { productLogList, productLogAuditBatch, productLogAudit } from '@/api/product'
+import { productLogList, productLogAuditBatch, productLogAudit, updateShowFlag } from '@/api/product'
 export default {
 export default {
   name: 'ProductLaunchAuditList',
   name: 'ProductLaunchAuditList',
   mixins: [commonMixin],
   mixins: [commonMixin],
@@ -112,7 +114,8 @@ export default {
         name: '', //  名称
         name: '', //  名称
         code: '', //  编码
         code: '', //  编码
         bizType: 'ONLINE', // 上线
         bizType: 'ONLINE', // 上线
-        bizState: 'WAIT' //  状态
+        bizState: 'WAIT', //  状态
+        newProductFlag: undefined// 是否新品
       },
       },
       tableHeight: 0,
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
@@ -125,6 +128,11 @@ export default {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].isEnable = data.list[i].showFlag + '' === '1'
+            }
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false
@@ -144,11 +152,14 @@ export default {
         { title: '提交人', dataIndex: 'submitPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '提交人', dataIndex: 'submitPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '审核状态', dataIndex: 'bizStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
         { title: '审核状态', dataIndex: 'bizStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       ]
-      if (this.queryParam.bizState != 'REFUSE') {
+      if (this.queryParam.bizState == 'WAIT') {
         arr.splice(6, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' })
         arr.splice(6, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' })
       } else if (this.queryParam.bizState != 'WAIT') {
       } else if (this.queryParam.bizState != 'WAIT') {
         arr.splice(6, 1, { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
         arr.splice(6, 1, { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
         arr.splice(7, 1, { title: '审核人', dataIndex: 'auditPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(7, 1, { title: '审核人', dataIndex: 'auditPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+        if (this.queryParam.bizState === 'PASS') {
+          arr.splice(8, 1, { title: '显示状态', scopedSlots: { customRender: 'showFlag' }, width: '10%', align: 'center' })
+        }
       }
       }
       return arr
       return arr
     }
     }
@@ -169,6 +180,7 @@ export default {
       this.queryParam.code = ''
       this.queryParam.code = ''
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
+      this.queryParam.newProductFlag = undefined
       this.time = []
       this.time = []
       this.$refs.rangeDate.resetDate(this.time)
       this.$refs.rangeDate.resetDate(this.time)
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
@@ -252,6 +264,21 @@ export default {
         }
         }
       })
       })
     },
     },
+    // 修改显示状态
+    changeFlagHandle (record) {
+      const _data = {
+        productLogSn: record.productLogSn,
+        showFlag: record.isEnable ? '1' : '0'
+      }
+      this.spinning = true
+      updateShowFlag(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+        this.$refs.table.refresh()
+        this.spinning = false
+      })
+    },
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 5 - 21
src/views/salesManagement/salesOrderWarehouse/detail.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
   <div class="salesDetail-wrap">
   <div class="salesDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" :style="{ padding: !outBizSubSn ? '16px 24px' : '0px 24px' }">
-        <template slot="subTitle" v-if="!outBizSubSn&&!bizSn">
+      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" style="padding:16px 24px;">
+        <template slot="subTitle">
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
         </template>
         </template>
       </a-page-header>
       </a-page-header>
@@ -64,21 +64,11 @@
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import { dispatchDetaillList, dispatchFindBySn, dispatchDetailPrint, dispatchDetailExcel } from '@/api/dispatch'
+import { dispatchDetaillList, dispatchFindBySn } from '@/api/dispatch'
 export default {
 export default {
-  name: 'PushOrderDetail',
+  name: 'SalesOrderWarehouseDetail',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: { STable, VSelect },
   components: { STable, VSelect },
-  props: {
-    outBizSubSn: { //  有值则为弹框,无值则为页面
-      type: [Number, String],
-      default: ''
-    },
-    bizSn: { //  有值则为弹框,无值则为页面
-      type: [Number, String],
-      default: ''
-    }
-  },
   data () {
   data () {
     return {
     return {
       disabled: false,
       disabled: false,
@@ -102,19 +92,13 @@ export default {
               data.list[i].productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
               data.list[i].productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
               data.list[i].productOrigUnit = productOrigUnit || '--'
               data.list[i].productOrigUnit = productOrigUnit || '--'
             }
             }
-            this.localDataSource = data.list
             this.disabled = false
             this.disabled = false
           }
           }
           return data
           return data
         })
         })
       },
       },
       detailData: null, //  详情数据
       detailData: null, //  详情数据
-      openModal: false,
-      localDataSource: [],
-      nowPrintType: '', //  当前打印类型
-      openExcelModal: false,
-      fromRouter: null,
-      nowType: 'print'
+      fromRouter: null
     }
     }
   },
   },
   computed: {
   computed: {

+ 4 - 47
src/views/salesManagement/salesOrderWarehouse/list.vue

@@ -91,45 +91,33 @@ import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import moment from 'moment'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import getDate from '@/libs/getDate.js'
-import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import Area from '@/views/common/area.js'
-import pushOrderDetailModal from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
-import { stockOutList, stockOutOut } from '@/api/stockOut'
-import { getCustomerInfo, validateStockOut } from '@/api/sendBill'
+import { stockOutList } from '@/api/stockOut'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
 export default {
   name: 'SalesOrderWarehouseList',
   name: 'SalesOrderWarehouseList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, pushOrderDetailModal, allocationDetailModal, subarea, Area, chooseWarehouse },
+  components: { STable, VSelect, rangeDate, Area, chooseWarehouse },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       tableHeight: 0,
       time: [
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
       ],
       ],
-      exportLoading: false,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime,
         beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         endDate: getDate.getCurrMonthDays().endtime,
         demanderName: '', //  客户名称
         demanderName: '', //  客户名称
-        outBizType: undefined, //  出库类型
-        stockOutNo: '',
-        outBizNo: '',
         state: undefined, //  状态
         state: undefined, //  状态
-        subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
         shippingAddrProvinceSn: undefined,
         shippingAddrProvinceSn: undefined,
         sendFlag: undefined,
         sendFlag: undefined,
         warehouseSn: undefined
         warehouseSn: undefined
       },
       },
+      exportLoading: false,
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       loading: false,
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
@@ -149,12 +137,7 @@ export default {
           this.spinning = false
           this.spinning = false
           return data
           return data
         })
         })
-      },
-      openModal: false,
-      orderSn: undefined,
-      outBizType: null, //  当前单子类型   SALES销售出库        ALLOCATE调拨出库
-      rowSelectionInfo: null,
-      showDetailModal: false
+      }
     }
     }
   },
   },
   computed: {
   computed: {
@@ -196,22 +179,13 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
       this.queryParam.endDate = date[1]
     },
     },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.demanderName = ''
       this.queryParam.demanderName = ''
-      this.queryParam.outBizType = undefined
       this.queryParam.state = undefined
       this.queryParam.state = undefined
-      this.queryParam.stockOutNo = ''
-      this.queryParam.outBizNo = ''
-      this.queryParam.subareaArea.subareaSn = undefined
-      this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.sendFlag = undefined
       this.queryParam.sendFlag = undefined
       this.queryParam.warehouseSn = undefined
       this.queryParam.warehouseSn = undefined
@@ -221,17 +195,6 @@ export default {
     handleDetail (row) {
     handleDetail (row) {
       this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.allocateSn}` })
       this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.allocateSn}` })
     },
     },
-    // 获取客户信息
-    async getCustome (data, stockOutSnList) {
-      this.spinning = true
-      const customer = await getCustomerInfo({ stockOutSnList: stockOutSnList })
-      const validRet = await validateStockOut({ stockOutSnList, ...customer.data })
-      if (validRet.status == 200) {
-        this.showDetailModal = true
-        this.$refs.detailModal.setData(data, customer.data)
-        this.spinning = false
-      }
-    },
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -246,12 +209,6 @@ export default {
     }
     }
   },
   },
   watch: {
   watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
       this.setTableH()
     }
     }