Jelajahi Sumber

Merge branch 'develop_yh11' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into pre-release

# Conflicts:
#	public/version.json
#	vue.config.js
lilei 2 tahun lalu
induk
melakukan
8202b017c2
27 mengubah file dengan 828 tambahan dan 74 penghapusan
  1. 1 1
      public/version.json
  2. 8 0
      src/api/allocateBill.js
  3. 27 0
      src/api/product.js
  4. 2 2
      src/components/index.less
  5. 18 7
      src/utils/request.js
  6. 5 2
      src/views/allocationManagement/transferOut/importGuideModal.vue
  7. 37 6
      src/views/allocationManagement/transferOut/list.vue
  8. 131 0
      src/views/allocationManagement/transferOut/printStatusModal.vue
  9. 5 2
      src/views/allocationManagement/transferReturn/importGuideModal.vue
  10. 48 6
      src/views/allocationManagement/transfersPrint/list.vue
  11. 7 2
      src/views/expenseManagement/expenseReimbursement/importGuideModal.vue
  12. 1 1
      src/views/financialManagement/collectionDetailStatic/list.vue
  13. 2 2
      src/views/financialManagement/warehousingConfirmation/list.vue
  14. 5 2
      src/views/inventoryManagement/intelligentReplenishment/set.vue
  15. 221 0
      src/views/productManagement/productInfo/chooseImportModal.vue
  16. 202 0
      src/views/productManagement/productInfo/importGuideModal.vue
  17. 26 5
      src/views/productManagement/productInfo/list.vue
  18. 8 3
      src/views/productManagement/productPricing/importGuideModal.vue
  19. 7 2
      src/views/productManagement/shelfNoManage/importGuideModal.vue
  20. 7 4
      src/views/purchasingManagement/bulkWarehousingOrder/importGuideModal.vue
  21. 1 1
      src/views/salesManagement/receiptPrint/list.vue
  22. 24 7
      src/views/salesManagement/salesCollection/detailModal.vue
  23. 6 3
      src/views/salesManagement/salesQuery/importGuideModal.vue
  24. 7 2
      src/views/salesManagement/sendOutOrder/importGuideModal.vue
  25. 7 2
      src/views/salesReturnManagement/salesReturn/importGuideModal.vue
  26. 5 2
      src/views/supplierManagement/associatedProduct/importGuideModal.vue
  27. 10 10
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.1.10",
+    "version": "2.1.73",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 8 - 0
src/api/allocateBill.js

@@ -203,3 +203,11 @@ export const allocateBillDetailExcel = (params) => {
     responseType: 'blob'
   })
 }
+//  调拨 列表  更改(暂不打印、取消打印)打印状态
+export const updatePrintState = params => {
+  return axios({
+    url: '/allocateBill/updatePrintState',
+    data: params,
+    method: 'post'
+  })
+}

+ 27 - 0
src/api/product.js

@@ -402,4 +402,31 @@ export const stackPlaceSave = (params) => {
     data: params,
     method: 'post'
   })
+}
+
+// 批量导入产品
+export const batchImportProduct = (params) => {
+  return axios({
+    url: '/product/importProduct',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出错误项产品
+export const exportErrorProduct = (params) => {
+  return axios({
+    url: '/product/exportErrorProduct',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 批量保存产品
+export const saveBatchImportProduct = (params) => {
+  return axios({
+    url: '/product/saveBatchImportProduct',
+    data: params,
+    method: 'post'
+  })
 }

+ 2 - 2
src/components/index.less

@@ -307,7 +307,7 @@
   }
   .ant-table-row{
     td{
-      > div:empty::after{
+      > div:not(.ant-table-row-expand-icon):empty::after{
         content: '--';
       }
       .ant-select-search__field__mirror{
@@ -319,7 +319,7 @@
     margin: 0;
     tr:hover{
       td{
-        > div:empty::after{
+        > div:not(.ant-table-row-expand-icon):empty::after{
           content: '--';
         }
       }

+ 18 - 7
src/utils/request.js

@@ -24,10 +24,10 @@ const service = axios.create({
 })
 
 const err = (error) => {
-  console.log(error, error.response,error.message,'error')
+  console.log(error, error.response.data,error.message,'error')
   const config = error.config
   // 网络连接出错
-  if (error.message.indexOf('Network Error') >= 0 || error.message.indexOf('Request failed') >= 0) {
+  if (error.message.indexOf('Network Error') >= 0) {
     notification.destroy()
     notification.error({
       message: '提示',
@@ -40,12 +40,23 @@ const err = (error) => {
   // 业务错误提示
   if (error.response) {
     const status = error.response.status
+    const message = error.response.data
     if ((status == 503 || status == 500 || status == 404)) {
       notification.destroy()
-      notification.error({
-        message: '提示',
-        description: error.response.data.message
-      })
+      if(message instanceof Blob){
+        message.text().then(data => {
+          const res = JSON.parse(data)
+          notification.error({
+            message: '提示',
+            description: res.message
+          })
+        })
+      }else{
+        notification.error({
+          message: '提示',
+          description: message
+        })
+      }
     }
     store.commit('SET_loadingStatus', false)
     return Promise.reject(err)
@@ -106,7 +117,7 @@ service.interceptors.request.use(config => {
 
 // response interceptor
 service.interceptors.response.use((response) => {
-  // console.log(response, 'response.data.status')
+  console.log(response, 'response.data.status')
   const et = sessionStorage.getItem('errorTips')
   if ((response.data.status == '1001' || response.data.status == '1099') && !et) {
     sessionStorage.setItem('errorTips', 1)

+ 5 - 2
src/views/allocationManagement/transferOut/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -89,7 +89,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -126,8 +127,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       allocateBillDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 37 - 6
src/views/allocationManagement/transferOut/list.vue

@@ -122,15 +122,23 @@
             <span v-if="record.allocateTypeName">{{ record.allocateTypeName }}</span>
           </div>
         </template>
+        <!-- 打印状态 -->
+        <template slot="printStateWord" slot-scope="text, record">
+          <span v-if="record.printState">
+            <span v-if="record.printState=='NO_PRINT'||record.printState=='PRINT'">{{ record.printStateDictValue }}</span>
+            <span @click="handlePrint(record)" class="link-bule" v-else>{{ record.printStateDictValue }}</span>
+          </span>
+          <span v-else>--</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button
+          <!-- <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'&&record.printState=='UNABLE_PRINT' && $hasPermissions('B_tfo_yxPrint')"
+            v-if="record.state == 'WAIT_AUDIT' && record.printState!='UNABLE_PRINT' && record.printState!='NO_PRINT' && $hasPermissions('B_tfo_yxPrint')"
             class="button-warning"
             @click="handleYxPrint(record)"
-            id="allocateBillList-examine-btn">允许打印</a-button>
+            id="allocateBillList-examine-btn">允许打印</a-button> -->
           <a-button
             size="small"
             type="link"
@@ -166,6 +174,8 @@
       @close="visibleAudit=false"
       @ok="auditOrder('WAIT_OUT_WAREHOUSE')"
       @fail="auditOrder('AUDIT_REJECT')" />
+    <!-- 打印状态 -->
+    <printModal v-drag :show="printIsShow" :info="printInfo" @cancel="cancelModal"></printModal>
   </a-card>
 </template>
 
@@ -181,10 +191,11 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport, allocateBillAblePrint } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
+import printModal from './printStatusModal.vue'
 export default {
   name: 'TransferOutList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
+  components: { STable, VSelect, basicInfoModal, printModal, rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -210,6 +221,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      printIsShow: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -231,10 +243,12 @@ export default {
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false,
-      openModal: false //  新增编辑  弹框
+      openModal: false, //  新增编辑  弹框
+      printInfo: null
     }
   },
   computed: {
+    // dataIndex: 'printStateDictValue',
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
@@ -251,7 +265,7 @@ export default {
         { title: '费用类型', dataIndex: 'costTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', scopedSlots: { customRender: 'allocateType' }, width: '6%', align: 'center' },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', scopedSlots: { customRender: 'printStateWord' }, width: '6%', align: 'center' },
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -267,6 +281,11 @@ export default {
     }
   },
   methods: {
+    // 关闭打印状态弹窗
+    cancelModal () {
+      this.printIsShow = false
+      this.$refs.table.refresh(true)
+    },
     custChange (val) {
       this.queryParam.receiverSn = val.key || ''
       // this.queryParam.receiverName = val.name || ''
@@ -398,6 +417,18 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 238
+    },
+    handlePrint (item) {
+      const obj = {
+        no: item.allocateNo,
+        targetName: item.targetName,
+        allocateSn: item.allocateSn,
+        printState: item.printState
+      }
+      this.printInfo = obj
+      this.$nextTick(() => {
+        this.printIsShow = true
+      })
     }
   },
   watch: {

+ 131 - 0
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -0,0 +1,131 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="40%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="调拨单号:" prop="no">
+          <span>{{ form.no }}{{ form.printState == 'UNABLE_PRINT' ? '(暂不打印)' : form.printState == 'CANCEL_PRINT' ? '(取消打印)' : '' }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="调往对象:" prop="targetName">
+          <span>{{ form.targetName }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="调拨打印:" prop="printStateInfo">
+          <a-radio-group v-model="form.printStateInfo">
+            <a-radio value="NO_PRINT">允许打印</a-radio>
+            <a-radio value="CANCEL_PRINT" v-if="form.printState == 'UNABLE_PRINT'">取消打印</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { updatePrintState } from '@/api/allocateBill.js'
+export default {
+  name: 'PrintModal',
+  props: {
+    show: [Boolean],
+    info: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '调拨打印状态',
+
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 18
+        }
+      },
+      form: {
+        no: undefined,
+        payerName: undefined,
+        printStatus: '',
+        allocateSn: '',
+        printStateInfo: ''
+      },
+      rules: { printStateInfo: [{ required: true, message: '请选择调拨打印状态', trigger: 'change' }] }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.handleSave()
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    handleSave () {
+      const _this = this
+      const ajax_form = {
+        allocateSn: _this.form.allocateSn,
+        printState: _this.form.printStateInfo
+      }
+      _this.spinning = true
+      _this.confirmLoading = true
+      updatePrintState(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+        _this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.form.printStateInfo = ''
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      } else {
+        this.form = this.info
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.ant-form-item {
+  margin-bottom: 0px !important;
+}
+</style>

+ 5 - 2
src/views/allocationManagement/transferReturn/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -89,7 +89,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -126,8 +127,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       allocateBillDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 48 - 6
src/views/allocationManagement/transfersPrint/list.vue

@@ -104,6 +104,11 @@
             <span v-if="$hasPermissions('M_tfoPrint_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
             <span v-else>{{ record.allocateNo }}</span>
           </template>
+          <!-- 打印状态 -->
+          <template slot="printStatus" slot-scope="text, record">
+            <span v-if="record.printState=='NO_PRINT'" class="link-bule" @click="editPrintStatus(record)">{{ record.printStateDictValue }}</span>
+            <span v-else>{{ record.printStateDictValue }}</span>
+          </template>
           <div slot="costTitle">
             <a-tooltip placement="top">
               <template slot="title">
@@ -143,6 +148,16 @@
       @close="openModal=false" />
     <!-- 打印记录 -->
     <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
+    <!-- 操作提示 -->
+    <commonModal modalTit="操作提示" okText="暂不打印" :openModal="showPrintModal" @cancel="canselModal" @ok="updatePrintStatus">
+      <div style="text-align: center;">
+        <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
+        <div style="line-height: 24px;">
+          <div>调拨单号:{{ tipData&&tipData.allocateNo }}</div>
+          <div>调往对象:{{ tipData&&tipData.targetName }}</div>
+        </div>
+      </div>
+    </commonModal>
   </div>
 </template>
 
@@ -157,12 +172,13 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
 import recordModal from './recordModal.vue'
-import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
+import commonModal from '@/views/common/commonModal.vue'
+import { allocateBillList, allocateBillDetailPrint, updatePrintState } from '@/api/allocateBill'
 import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal, recordModal, subarea, Area },
+  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal, commonModal, recordModal, subarea, Area },
   data () {
     return {
       spinning: false,
@@ -170,6 +186,7 @@ export default {
       tableHeight: 0,
       itemData: null,
       showRecordModal: false,
+      showPrintModal: false,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -208,9 +225,8 @@ export default {
         })
       },
       visibleAudit: false,
-      auditInfo: null,
-      spinningAudit: false,
-      openModal: false //  打印弹框
+      openModal: false, //  打印弹框
+      tipData: null
     }
   },
   computed: {
@@ -228,7 +244,7 @@ export default {
         // { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', scopedSlots: { customRender: 'printStatus' }, width: '6%', align: 'center' },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -324,6 +340,32 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240
+    },
+    // 状态打印弹窗
+    editPrintStatus (item) {
+      this.tipData = item
+      this.$nextTick(() => {
+        this.showPrintModal = true
+      })
+    },
+    canselModal () {
+      this.showPrintModal = false
+      this.resetSearchForm()
+    },
+    updatePrintStatus () {
+      const _this = this
+      _this.spinning = true
+      const ajax_data = {
+        allocateSn: _this.tipData.allocateSn,
+        printState: 'UNABLE_PRINT'
+      }
+      updatePrintState(ajax_data).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.canselModal()
+        }
+        _this.spinning = false
+      })
     }
   },
   watch: {

+ 7 - 2
src/views/expenseManagement/expenseReimbursement/importGuideModal.vue

@@ -18,7 +18,7 @@
             <li>1) 导入的Excel文件中必须包含名为“记账类型”、“记账名称”、“费用承担方类型”、“费用承担方”、“费用承担金额”的列,且名称必须相同</li>
             <li>2) 其他列可根据实际情况填写,如果符合规则,系统会一起导入</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -86,7 +86,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -127,6 +128,10 @@ export default {
     },
     // 下载模板
     handleExport () {
+      this.exportLoading = true
+      setTimeout(() => {
+        this.exportLoading = false
+      }, 1000)
       const link = document.createElement('a')
       link.style.display = 'none'
       link.href = 'https://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/expenseAccountDetailImport.xlsx?t=' + new Date().getTime()

+ 1 - 1
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -163,7 +163,7 @@
         <!-- 备注 -->
         <template slot="note" slot-scope="text, record">
           <div @click="handleNote(record)">
-            <span class="link-bule">{{ record.remarks || '--' }}</span>
+            <span :title="record.remarks" class="link-bule" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width:100%;display:block;">{{ record.remarks || '--' }}</span>
           </div>
         </template>
       </s-table>

+ 2 - 2
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -87,8 +87,8 @@
         </div>
       </div>
       <div class="btn-box">
-        <a-button type="primary" class="button-error" @click="handleConfirmationFail">不通过</a-button>
-        <a-button type="primary" class="button-info" @click="handleConfirmationOk">通过</a-button>
+        <a-button type="primary" :loading="spinning" class="button-error" @click="handleConfirmationFail">不通过</a-button>
+        <a-button type="primary" :loading="spinning" class="button-info" @click="handleConfirmationOk">通过</a-button>
       </div>
     </a-modal>
   </a-card>

+ 5 - 2
src/views/inventoryManagement/intelligentReplenishment/set.vue

@@ -22,7 +22,7 @@
                 <li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
                 <li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
               </ul>
-              <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+              <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
             </div>
             <div class="explain-item">
               <div class="explain-tit">
@@ -84,7 +84,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -109,8 +110,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       predictProductInfoExport({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 221 - 0
src/views/productManagement/productInfo/chooseImportModal.vue

@@ -0,0 +1,221 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200}"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200}"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { batchImportProduct, exportErrorProduct } from '@/api/product'
+export default {
+  name: 'SalesChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', dataIndex: 'packQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品尺寸', dataIndex: 'size', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '颜色', dataIndex: 'color', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      loadData: [],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', dataIndex: 'packQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品尺寸', dataIndex: 'size', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '颜色', dataIndex: 'color', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '备注', dataIndex: 'errorMsg', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const _this = this
+      this.loading = true
+      const params = {
+        path: this.paramsData.path
+      }
+      batchImportProduct(params).then(res => {
+        this.loading = false
+        if (res.status == 200) {
+          if (res.data.rightList && res.data.rightList.length > 0) {
+            res.data.rightList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          if (res.data.errorList && res.data.errorList.length > 0) {
+            res.data.errorList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          _this.loadData = res.data.rightList || []
+          _this.unLoadData = res.data.errorList || []
+        }
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('无可导入产品!')
+      } else {
+        this.$emit('ok', this.loadData)
+        this.isShow = false
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出的错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(exportErrorProduct, _this.unLoadData, '导出产品错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

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

@@ -0,0 +1,202 @@
+<template>
+  <a-modal
+    centered
+    class="importGuide-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="750">
+    <div class="importGuide-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1) 请先下载导入模板,模板中已标示出必填项</li>
+            <li>2) 产品编码具有唯一性,系统中已存在的无法导入</li>
+            <li>3) 产品品牌、产品分类、单位、包装数单位,必须是系统中已经存在的值,否则无法导入</li>
+          </ul>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuide-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="import"
+              :action="attachAction"
+              :uploadParams="uploadParams"
+              upText="添加文件"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuide-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuide-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import ChooseImportModal from './chooseImportModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'SalesImportGuideModal',
+  mixins: [commonMixin],
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
+      paramsData: null,
+      uploadParams: {
+        savePathType: 'local'
+      },
+      exportLoading: false
+    }
+  },
+  methods: {
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      if (file) {
+        this.paramsData = {
+          path: file
+        }
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    },
+    // 下载模板
+    handleExport () {
+      this.exportLoading = true
+      setTimeout(() => {
+        this.exportLoading = false
+      }, 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.setAttribute('download', '产品批量导入模板' + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+      document.body.removeChild(link)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.paramsData = null
+        this.$refs.importUpload.setFileList('')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuide-modal{
+    .importGuide-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuide-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 26 - 5
src/views/productManagement/productInfo/list.vue

@@ -93,7 +93,7 @@
           class="button-warning"
           :loading="loadingAudit"
           @click="handleBatchAudit"
-          style="margin: 0 15px;">批量审核</a-button>
+          style="margin: 0 10px;">批量审核</a-button>
         <a-button
           id="productInfoList-batchLaunch"
           type="primary"
@@ -101,7 +101,7 @@
           class="button-primary"
           :loading="loadingLaunch"
           @click="handleBatchLaunch"
-          style="margin: 0 15px;">批量上线</a-button>
+          style="margin: 0 10px;">批量上线</a-button>
         <a-button
           id="productInfoList-batchDownline"
           type="primary"
@@ -109,7 +109,14 @@
           class="button-grey"
           :loading="loadingDownline"
           @click="handleBatchDownline"
-          style="margin: 0 15px;">批量下线</a-button>
+          style="margin: 0 10px;">批量下线</a-button>
+        <a-button
+          id="productInfoList-batchImport"
+          v-if="$hasPermissions('B_productInfo_batchImport')"
+          type="primary"
+          class="button-error"
+          @click="openGuideModal=true"
+          style="margin: 0 10px;">批量导入</a-button>
         <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
           <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
@@ -204,6 +211,8 @@
     <product-info-detail-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
     <!-- 产品下线 -->
     <product-info-offline-modal v-drag :openModal="openOfflineModal" :offlineProductList="offlineProductList" @close="closeOfflineModal" @ok="$refs.table.refresh()" />
+    <!-- 导入产品 -->
+    <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
   </a-card>
 </template>
 
@@ -217,11 +226,12 @@ import { productTypeQueryAll } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
 import { exportExcel } from '@/libs/JGPrint.js'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport } from '@/api/product'
+import importGuideModal from './importGuideModal.vue'
+import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport, saveBatchImportProduct } from '@/api/product'
 export default {
   name: 'ProductInfoList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, rangeDate },
+  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, rangeDate, importGuideModal },
   data () {
     return {
       spinning: false,
@@ -243,6 +253,7 @@ export default {
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      openGuideModal: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -305,6 +316,16 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 批量导入产品
+    hanldeOk (obj) {
+      this.spinning = true
+      saveBatchImportProduct(obj).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+        this.spinning = false
+      })
+    },
     // 审核
     handleAudit (row) {
       const _this = this

+ 8 - 3
src/views/productManagement/productPricing/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) “产品编码”必须是列表中已存在的产品</li>
             <li>3) 省级价、市级价、特约价、终端价、车主价均可为空,为空表示不对原有价格做改变</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -123,7 +124,11 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      this.spinning = true
+      _this.spinning = true
+      _this.exportLoading = true
+      setTimeout(() => {
+        _this.exportLoading = false
+      }, 1000)
       hdExportExcel(productPriceTplDownload, {}, '产品定价导入模板', function () {
         _this.spinning = false
       })

+ 7 - 2
src/views/productManagement/shelfNoManage/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) “产品编码”必须是列表中已存在的产品</li>
             <li>3) “货位编号”可为空,为空表示此产品没有货位信息</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -124,6 +125,10 @@ export default {
     handleExport () {
       const _this = this
       this.spinning = true
+      this.exportLoading = true
+      setTimeout(() => {
+        _this.exportLoading = false
+      }, 1000)
       hdExportExcel(stackPlaceImportTemplate, {}, '货位编号管理导入模板', function () {
         _this.spinning = false
       })

+ 7 - 4
src/views/purchasingManagement/bulkWarehousingOrder/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -125,10 +126,12 @@ export default {
     handleExport () {
       const _this = this
       const params = { grabFlag: this.params.grabFlag }
-      this.exportLoading = true
       this.spinning = true
-      hdExportExcel(sparePartsDetailDownload, params, '散件入库导入模板', function () {
+      this.exportLoading = true
+      setTimeout(() => {
         _this.exportLoading = false
+      }, 1000)
+      hdExportExcel(sparePartsDetailDownload, params, '散件入库导入模板', function () {
         _this.spinning = false
       })
     }

+ 1 - 1
src/views/salesManagement/receiptPrint/list.vue

@@ -198,7 +198,7 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } , ellipsis: true},
         { title: '收款打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', scopedSlots: { customRender: 'printStatus' } },
         { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }

+ 24 - 7
src/views/salesManagement/salesCollection/detailModal.vue

@@ -42,22 +42,27 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="收款单号">
                   <a-input v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="财务收款事由">
                   <a-input v-model.trim="queryParam.bookReason" allowClear placeholder="请输入财务收款事由"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="申请人">
                   <employee style="width: 100%;" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
+                <a-form-item label="申请时间">
+                  <rangeDate ref="rangeApply" :value="applyDate" @change="dateApplyChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -112,13 +117,16 @@
 <script>
 import { STable, VSelect } from '@/components'
 import { financeBookQueryPage } from '@/api/financeBook.js'
+import rangeDate from '@/views/common/rangeDate.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import { settleReceiptBookBatch } from '@/api/settleReceipt'
 export default {
   name: 'GlDetailModal',
-  components: { STable, VSelect, employee, commonModal, detailModal },
+  components: { STable, VSelect, employee, commonModal, detailModal, rangeDate },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -148,11 +156,14 @@ export default {
       spinning: false,
       showDetailModal: false,
       handlePlData: [],
+      applyDate: [],
       queryParam: {
         bookNo: '',
         bookReason: '',
         applyPersonSn: undefined,
-        status: 'AUDIT_PASS'
+        status: 'AUDIT_PASS',
+        auditBeginDate: undefined,
+        auditEndDate: undefined
       },
       chooseData: [],
       columns: [
@@ -160,6 +171,7 @@ export default {
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务收款事由', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '付款方', dataIndex: 'payerName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -215,6 +227,10 @@ export default {
       this.handlePlData = data
       this.snList = snList
     },
+    dateApplyChange (date) {
+      this.queryParam.auditBeginDate = date[0]
+      this.queryParam.auditEndDate = date[1]
+    },
     // 删除
     handleDel (row) {
       const i = this.chooseData.findIndex(item => row.bookSn == item.bookSn)
@@ -268,7 +284,8 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
-      this.$nextTick(()=>{
+      this.$nextTick(() => {
+        this.$refs.rangeApply.resetDate()
         this.$refs.table.refresh(true)
       })
     }

+ 6 - 3
src/views/salesManagement/salesQuery/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -90,7 +90,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -129,8 +130,10 @@ export default {
       const params = { grabFlag: this.params.grabFlag }
       this.exportLoading = true
       this.spinning = true
-      hdExportExcel(salesDownload, params, '销售导入模板', function () {
+      setTimeout(() => {
         _this.exportLoading = false
+      }, 1000)
+      hdExportExcel(salesDownload, params, '销售导入模板', function () {
         _this.spinning = false
       })
     }

+ 7 - 2
src/views/salesManagement/sendOutOrder/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 如果物流单号相同,则视为同一个发货单</li>
             <li>3) 同一个发货单可有多个不同类型的类型,包括易损件、电池、机油</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -87,7 +87,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -125,6 +126,10 @@ export default {
     },
     // 下载模板
     handleExport () {
+      this.exportLoading = true
+      setTimeout(() => {
+        this.exportLoading = false
+      }, 1000)
       const link = document.createElement('a')
       link.style.display = 'none'
       link.href = 'https://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/sendOutOrderImport.xlsx?t=' + new Date().getTime()

+ 7 - 2
src/views/salesReturnManagement/salesReturn/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”、“价格”、“退货原因”四列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -90,7 +90,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -125,6 +126,10 @@ export default {
     },
     // 下载模板
     handleExport () {
+      this.exportLoading = true
+      setTimeout(() => {
+        this.exportLoading = false
+      }, 1000)
       const link = document.createElement('a')
       link.style.display = 'none'
       link.href = 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/template/XiaoShouTuiHuoMingXiDaoRu.xlsx?t=' + new Date().getTime()

+ 5 - 2
src/views/supplierManagement/associatedProduct/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“成本”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -87,7 +87,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -124,8 +125,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       supplierProductDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 10 - 10
vue.config.js

@@ -14,13 +14,13 @@ function isProd () {
   return process.env.NODE_ENV === 'production'
 }
 
-// 项目部署基础
-// 默认情况下,我们假设你的应用将被部署在域的根目录下,
-// 例如:https://www.my-app.com/
-// 默认:'/'
-// 如果您的应用程序部署在子路径中,则需要在这指定子路径
-// 例如:https://www.foobar.com/my-app/
-// 需要将它改为'/my-app/'
+// 锟斤拷目锟斤拷锟斤拷锟斤拷锟斤拷
+// 默锟斤拷锟斤拷锟斤拷锟铰o拷锟斤拷锟角硷拷锟斤拷锟斤拷锟斤拷应锟矫斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥革拷目录锟斤拷,
+// 锟斤拷锟界:https://www.my-app.com/
+// 默锟较o拷'/'
+// 锟斤拷锟斤拷锟斤拷锟斤拷应锟矫筹拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷路锟斤拷锟叫o拷锟斤拷锟斤拷要锟斤拷锟斤拷指锟斤拷锟斤拷路锟斤拷
+// 锟斤拷锟界:https://www.foobar.com/my-app/
+// 锟斤拷要锟斤拷锟斤拷锟斤拷为'/my-app/'
 const BASE_URL = isProd ? '/' : '/'
 
 const assetsCDN = {
@@ -44,7 +44,7 @@ const prodExternals = {
 
 // vue.config.js
 const vueConfig = {
-  runtimeCompiler: true, // 动态编译组件
+  runtimeCompiler: true, // 锟斤拷态锟斤拷锟斤拷锟斤拷锟斤拷
   publicPath: BASE_URL,
   configureWebpack: {
     // webpack plugins
@@ -108,8 +108,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.0.182/ocs-admin',
-        // target: 'https://t.ocs.360arrow.com/ocs-admin', //  
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://t.ocs.360arrow.com/ocs-admin', //  锟斤拷
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预锟斤拷锟斤拷
         ws: false,
         changeOrigin: true,
         pathRewrite: {