Просмотр исходного кода

Merge branch 'develop_yh15' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh15

lilei 2 лет назад
Родитель
Сommit
3c1b47df22

BIN
public/templ/产品信息管理(箭冠)自定义报价导入模板.xlsx


BIN
public/templ/库存预警产品导入模板.xlsx


+ 34 - 0
src/api/product.js

@@ -85,3 +85,37 @@ export const settingPrice = params => {
     method: 'post'
   })
 }
+// 产品信息(箭冠)列表导出
+export const productExportPrice = params => {
+  return axios.request({
+    url: `/product/exportPrice`,
+    method: 'post',
+    data: params,
+    responseType: 'blob'
+  })
+}
+// 产品信息(箭冠)获取导入数据
+export const productImportPrice = params => {
+  return axios({
+    url: '/product/importPrice',
+    data: params,
+    method: 'post'
+  })
+}
+// 产品信息(箭冠)导入
+export const productImportPriceInsertBatch = (params) => {
+  return axios({
+    url: '/product/importPrice/insertBatch',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出错误项
+export const productExportError = (params) => {
+  return axios({
+    url: '/product/importPrice/exportError',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 10 - 1
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -149,7 +149,14 @@
               <a-col :span="6">
                 <div style="margin-top: 4px;text-align: right;">
                   <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
-                  <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="warehouseAllocationEdit-del-all-btn">清空列表</a-button>
+                  <a-button
+                    size="small"
+                    type="danger"
+                    style="margin-left: 8px"
+                    @click.stop="handleDel('', 'all')"
+                    ghost
+                    :disabled="chooseLoadDataSource.length==0"
+                    id="warehouseAllocationEdit-del-all-btn">清空列表</a-button>
                 </div>
               </a-col>
             </a-row>
@@ -251,6 +258,7 @@ export default {
       productType: [],
       warehousePutLocData: [], //  调入仓位  下拉数据
       warehouseOutLocData: [], //  调出仓位  下拉数据
+      chooseLoadDataSource: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -282,6 +290,7 @@ export default {
             data.list[i].allocationCost = data.list[i].totalAllocationCost / data.list[i].allocationQty
           }
           this.chooseDisabled = false
+          this.chooseLoadDataSource = data.list
           return data
         })
       },

+ 2 - 0
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -198,6 +198,8 @@
                       <a-button
                         type="primary"
                         ghost
+                        :disabled="chooseLoadDataSource.length==0"
+                        style="margin-left: 10px"
                         @click="delBulkOrder"
                         :loading="delLoading"
                         id="bulkWarehousingOrderEdit-del-all">清空列表</a-button>

+ 3 - 3
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -107,7 +107,7 @@
           <span v-else>--</span>
         </template>
         <!-- 在途数 -->
-        <template slot="inTransit" slot-scope="text, record" >
+        <!-- <template slot="inTransit" slot-scope="text, record" >
           <div>
             <a-input-number
               id="inventoryWarningList-inTransit"
@@ -120,7 +120,7 @@
               @change="numChange(record)"
               placeholder="请输入在途数" />
           </div>
-        </template>
+        </template> -->
         <!-- 最大库存数 -->
         <template slot="upperLimit" slot-scope="text, record" >
           <div>
@@ -216,7 +216,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'brandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
-        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 80, align: 'center' },
+        { title: '在途数(个)', dataIndex: 'inTransit', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总库存数(个)', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 100, align: 'center' },
         { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 100, align: 'center' },

+ 16 - 13
src/views/productManagement/productInfoJg/chooseImportModal.vue

@@ -4,7 +4,7 @@
     class="chooseImport-modal"
     :footer="null"
     :maskClosable="false"
-    title="确认导入"
+    title="导入"
     v-model="isShow"
     @cancel="isShow=false"
     :width="900">
@@ -37,7 +37,7 @@
         :scroll="{ y: 200 }"
         :pagination="false"
         bordered>
-        <template slot="errorMsg" slot-scope="text,record">
+        <!-- <template slot="errorMsg" slot-scope="text,record">
           <a-popover placement="topRight">
             <template slot="content">
               <p v-for="d in record.importErrorMsgSet" v-if="d">{{ d }};</p>
@@ -46,7 +46,7 @@
               查看
             </a-button>
           </a-popover>
-        </template>
+        </template> -->
       </a-table>
       <!-- 按钮 -->
       <div class="btn-con">
@@ -76,10 +76,12 @@
 </template>
 
 <script>
-import { stockWarnProductImport, stockWarnExportError, stockWarnBatchImport } from '@/api/stockWarn'
+import { commonMixin } from '@/utils/mixin'
+import { productImportPrice, productExportError, productImportPriceInsertBatch } from '@/api/product'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'ChooseImportModal',
+  mixins: [commonMixin],
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -98,19 +100,20 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [ //  可导入
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         // { title: '在途数(个)', dataIndex: 'inTransit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '自定义终端价', dataIndex: 'upperLimit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '自定义车主价', dataIndex: 'lowerLimit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '自定义终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '自定义车主价', dataIndex: 'carOwnersPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       nowUnColumns: [ //  不可导入
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '在途数(个)', dataIndex: 'inTransit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '自定义终端价', dataIndex: 'upperLimit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '自定义车主价', dataIndex: 'lowerLimit', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '备注', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+        { title: '自定义终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: function (text) { return (text ? parseInt(text) ? _this.toThousands(text) : text : '--') } },
+        { title: '自定义车主价', dataIndex: 'carOwnersPrice', width: '10%', align: 'right', customRender: function (text) { return (text ? parseInt(text) ? _this.toThousands(text) : text : '--') } },
+        { title: '备注', dataIndex: 'errorMsg', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
+        // scopedSlots: { customRender: 'errorMsg' },
       ],
       loadData: [],
       unLoadData: [],
@@ -121,7 +124,7 @@ export default {
     getData () {
       const _this = this
       this.loading = true
-      stockWarnProductImport(this.paramsData).then(res => {
+      productImportPrice(this.paramsData).then(res => {
         this.loading = false
         if (res.status == 200) {
           if (res.data.rightList && res.data.rightList.length > 0) {
@@ -146,7 +149,7 @@ export default {
         this.$message.warning('暂无可导入产品!')
       } else {
         this.spinning = true
-        stockWarnBatchImport(this.loadData).then(res => {
+        productImportPriceInsertBatch(this.loadData).then(res => {
           if (res.status == 200) {
             this.$emit('ok', this.loadData)
             this.isShow = false
@@ -163,7 +166,7 @@ export default {
         return
       }
       _this.spinning = true
-      hdExportExcel(stockWarnExportError, _this.unLoadData, '库存预警产品导入错误项', function () {
+      hdExportExcel(productExportError, _this.unLoadData, '库存预警产品导入错误项', function () {
         _this.spinning = false
       })
     }

+ 1 - 1
src/views/productManagement/productInfoJg/importGuideModal.vue

@@ -86,7 +86,7 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      templUrl: location.protocol + '//' + location.host + '/templ/库存预警产品导入模板.xlsx'
+      templUrl: location.protocol + '//' + location.host + '/templ/产品信息管理(箭冠)自定义报价导入模板.xlsx'
     }
   },
   methods: {

+ 18 - 4
src/views/productManagement/productInfoJg/list.vue

@@ -160,11 +160,11 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { productList, getCurrentDealer, productUpdate } from '@/api/product'
+import { productList, getCurrentDealer, productUpdate, productExportPrice } from '@/api/product'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { STable, VSelect } from '@/components'
-// import { downloadExcel } from '@/libs/JGPrint.js'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import editPriceModal from './editPriceModal.vue'
 import importGuideModal from './importGuideModal.vue'
 export default {
@@ -394,7 +394,22 @@ export default {
     },
     // 导入导出
     handleActions (e) {
-      this.openGuideModal = true
+      if (e.key == 1) {
+        this.openGuideModal = true
+      } else {
+        this.handleExport()
+      }
+    },
+    handleExport () {
+      const _this = this
+      const params = _this.queryParam
+      _this.exportLoading = true
+      _this.spinning = true
+      productExportPrice(params).then(res => {
+        downloadExcel(res, '产品信息管理(箭冠)')
+        _this.exportLoading = false
+        _this.spinning = false
+      })
     }
   },
   watch: {
@@ -407,7 +422,6 @@ export default {
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
     }
-
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

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

@@ -114,6 +114,7 @@
                 <a-button
                   type="primary"
                   ghost
+                  :disabled="dataSource.length==0"
                   @click="delSalerOrder"
                   :loading="delLoading"
                   id="salesEdit-del-all">清空列表</a-button>
@@ -516,7 +517,7 @@ export default {
           salesDel({ id: _this.orderId }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.handleBack()
+              _this.resetSearchForm(true)
             }
             _this.spinning = false
           })