Browse Source

Merge branch 'develop_yh67_2' of jianguan-web/jg-ocs-html into pre-release

李磊 1 month ago
parent
commit
56785216ab

+ 5 - 2
babel.config.js

@@ -3,6 +3,7 @@ const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
 const plugins = []
 if (IS_PROD) {
   plugins.push('transform-remove-console')
+  plugins.push("@babel/plugin-transform-runtime")
 }
 
 module.exports = {
@@ -11,7 +12,9 @@ module.exports = {
     [
       '@babel/preset-env',
       {
-        'useBuiltIns': 'entry'
+        'useBuiltIns': 'entry',
+        'targets': '> 0.25%, not dead',
+        'corejs': 2
       }
     ]
   ],
@@ -25,4 +28,4 @@ module.exports = {
   //     'style': true // `style: true` 会加载 less 文件
   //   } ]
   // ]
-}
+}

File diff suppressed because it is too large
+ 847 - 680
package-lock.json


+ 2 - 0
package.json

@@ -15,6 +15,8 @@
   },
   "dependencies": {
     "@antv/data-set": "^0.10.2",
+    "@babel/plugin-transform-runtime": "^7.28.0",
+    "@babel/preset-env": "^7.26.0",
     "@jiaminghi/data-view": "^2.10.0",
     "ant-design-vue": "^1.7.8",
     "axios": "^0.19.0",

+ 1 - 1
public/version.json

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

+ 16 - 3
src/api/verifyAccount.js

@@ -51,6 +51,19 @@ export const verifyAccountBillModify = params => {
     }
   })
 }
+
+// 查找最后一次单据  备注
+export const findLastBillRemarks = params => {
+  return axios({
+    url: `/verifyAccountBill/findLastBill/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('查找经销商最后一次对账单据备注')
+    }
+  })
+}
+
 // 对账单管理  删除
 export const verifyAcountBillDel = params => {
   return axios({
@@ -87,9 +100,9 @@ export const verifyAcountBillSubmitCheck = params => {
 // 对账单管理  提交
 export const verifyAcountBillSubmit = params => {
   return axios({
-    url: `/verifyAccountBill/submit/${params.sn}`,
-    data: {},
-    method: 'get',
+    url: `/verifyAccountBill/submit`,
+    data: params,
+    method: 'post',
     headers: {
       'module': encodeURIComponent('对账单提交')
     }

+ 2 - 2
src/components/index.js

@@ -16,7 +16,7 @@ import AvatarList from '@/components/AvatarList'
 import CountDown from '@/components/CountDown'
 import Ellipsis from '@/components/Ellipsis'
 import FooterToolbar from '@/components/FooterToolbar'
-import NumberInfo from '@/components/NumberInfo'
+// import NumberInfo from '@/components/NumberInfo'
 import DescriptionList from '@/components/DescriptionList'
 import Tree from '@/components/Tree/Tree'
 import Trend from '@/components/Trend'
@@ -48,7 +48,7 @@ export {
   CountDown,
   Ellipsis,
   FooterToolbar,
-  NumberInfo,
+  // NumberInfo,
   DescriptionList,
   // 兼容写法,请勿继续使用
   DescriptionList as DetailList,

+ 1 - 3
src/layouts/PageView.vue

@@ -3,9 +3,7 @@
     <PageHeader v-if="!multiTab"></PageHeader>
     <div class="content" :style="{ height: pageHeight+'px' }">
       <div class="page-header-index-wide">
-        <slot>
-          <router-view ref="content" />
-        </slot>
+        <router-view ref="content" />
       </div>
     </div>
   </div>

+ 7 - 1
src/views/financialManagement/accountStatement/baseModal.vue

@@ -35,7 +35,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
-import { verifyAccountBillCreate, verifyAccountBillModify, verifyAcountBillDetail } from '@/api/verifyAccount.js'
+import { verifyAccountBillCreate, verifyAccountBillModify, verifyAcountBillDetail, findLastBillRemarks } from '@/api/verifyAccount.js'
 export default {
   name: 'ASBaseModal',
   mixins: [commonMixin],
@@ -75,11 +75,17 @@ export default {
       if (v && v.key) {
         this.form.dealerSn = v.key
         this.form.dealerName = v.row ? v.row.dealerName : ''
+        this.getDefRemarks()
       } else {
         this.form.dealerSn = ''
         this.form.dealerName = ''
       }
     },
+    // 获取上次备注
+    async getDefRemarks () {
+      const data = await findLastBillRemarks({ sn: this.form.dealerSn }).then(res => res.data)
+      this.form.remarks = data ? data.remarks || '' : ''
+    },
     //  保存
     handleSubmit (e) {
       e.preventDefault()

+ 84 - 27
src/views/financialManagement/accountStatement/edit.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="salesReturnEdit-wrap">
+  <div class="accountState-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back">
+      <a-page-header :ghost="false" :backIcon="false" class="accountState-back">
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
-          <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack">
+          <a id="accountState-back-btn" href="javascript:;" @click="handleBack">
             <a-icon type="left" />
             返回列表
           </a>
@@ -15,7 +15,7 @@
           </a-button>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
+      <a-card size="small" :bordered="false" class="accountState-cont">
         <queryPart
           ref="partQuery"
           :newLoading="isInster"
@@ -25,7 +25,7 @@
           @add="saveProduct"
           @bachAdd="saveMoreProduct"></queryPart>
       </a-card>
-      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
+      <a-card size="small" :bordered="false" class="accountState-cont">
         <a-alert style="margin-bottom: 10px;" type="info" v-if="countData">
           <div slot="message" class="total-bar">
             <div>
@@ -125,7 +125,7 @@
         :disabled="spinning"
         type="primary"
         class="button-primary"
-        @click="handleSubmit"
+        @click="handlePreSubmit"
         id="salesReturn-handleSubmit">提交</a-button>
     </div>
     <!-- 编辑基础信息弹窗 -->
@@ -138,13 +138,39 @@
       :itemSn="verifyAccountBillSn"
       :dealerSn="dealerSn"
       @cancel="baseModal=false"
-      @ok="hanldAudit"></baseTzModal>
+      @ok="hanldOk"></baseTzModal>
+    <!-- 提交前弹框 -->
+    <commonModal
+      modalTit="提示"
+      width="500px"
+      okText="提交"
+      :openModal="showTipModal"
+      @cancel="canselModal"
+      @ok="handleSubmit">
+      <div class="tip-list" v-if="detailData">
+        <div><span>经销商:</span>{{ detailData.dealerName }}</div>
+        <div><span>时间区间:</span>{{ detailData.bizFirstDate }}~{{ detailData.bizLastDate }}</div>
+        <div><span>期初余额:</span>{{ toThousands(detailData.beginBalance) }}</div>
+        <div><span>借方合计:</span>{{ toThousands(detailData.debitAmount) }}</div>
+        <div><span>贷方合计:</span>{{ toThousands(detailData.creditAmount*-1) }}</div>
+        <div><span>余额:</span>{{ toThousands(detailData.totalAmount) }}</div>
+        <div>
+          <span style="width:70px;">备注:</span>
+          <a-textarea :rows="6" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="remarks"></a-textarea>
+        </div>
+        <div style="color:red">
+          <span style="width:60px;"></span>
+          请修改备注信息。若无需修改可直接提交!
+        </div>
+      </div>
+    </commonModal>
   </div>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import commonModal from '@/views/common/commonModal.vue'
 import queryPart from './queryPart.vue'
 import baseModal from './baseModal.vue'
 import baseTzModal from '../manualEntryForm/baseModal.vue'
@@ -168,7 +194,8 @@ export default {
     queryPart,
     baseModal,
     rangeDate,
-    baseTzModal
+    baseTzModal,
+    commonModal
   },
   data () {
     return {
@@ -226,7 +253,9 @@ export default {
       detailData: null, // 基础信息数据
       addMoreLoading: false, // 批量添加动画
       verifyAccountBillSn: undefined, // 单据sn
-      itemSn: null
+      itemSn: null,
+      showTipModal: false,
+      remarks: ''
     }
   },
   computed: {
@@ -263,6 +292,9 @@ export default {
     handleBack () {
       this.$router.push({ name: `accountStatementList` })
     },
+    canselModal () {
+      this.showTipModal = false
+    },
     //  创建时间  change
     dateChange (date) {
       this.productForm.beginDate = date[0] ? date[0] : ''
@@ -273,9 +305,8 @@ export default {
       this.itemSn = null
       this.baseModal = true
     },
-    // 打开审核提交弹框
-    hanldAudit (data) {
-      this.$message.success('提交成功')
+    // 调账成功
+    hanldOk (data) {
       this.resetTable(false)
     },
     // 删除所选产品
@@ -301,6 +332,7 @@ export default {
             _this.resetTable(false)
             _this.getChooseList()
             _this.$refs.partQuery.clearSelected()
+            _this.getBasicsData(true)
           }
           _this.$message.info(res.message)
           _this.delLoading = false
@@ -329,10 +361,12 @@ export default {
     },
     // 修改备注
     changeRemarks (record) {
-      this.spinning = true
-      verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
-        this.spinning = false
-      })
+      if (record.remarks && record.remarks.length > 0) {
+        this.spinning = true
+        verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
+          this.spinning = false
+        })
+      }
     },
     // 单个添加单据
     saveProduct (row) {
@@ -372,6 +406,7 @@ export default {
             this.getChooseList()
             this.$refs.table.refresh(true)
             this.$refs.partQuery.clearSelected()
+            this.getBasicsData(true)
           }
           this.isInster = false
           this.spinning = false
@@ -384,7 +419,7 @@ export default {
         })
     },
     // 提交
-    async handleSubmit () {
+    async handlePreSubmit () {
       this.spinning = true
       const ret = await verifyAcountBillSubmitCheck({ sn: this.verifyAccountBillSn })
       this.spinning = false
@@ -392,14 +427,8 @@ export default {
       const snList = ret.data.length ? ret.data.map(item => item.detailSn) : []
       // 通过校验提交
       if (noList.length == 0) {
-        this.spinning = true
-        verifyAcountBillSubmit({ sn: this.verifyAccountBillSn }).then(res => {
-          if (res.status == 200) {
-            this.handleBack()
-            this.$message.success(res.message)
-          }
-          this.spinning = false
-        })
+        this.showTipModal = true
+        this.remarks = this.detailData.remarks
       } else {
         // 提示不能参与的单子
         const _this = this
@@ -414,6 +443,21 @@ export default {
         })
       }
     },
+    // 提交单据
+    handleSubmit () {
+      if (!this.remarks) {
+        this.$message.error('请输入备注信息')
+        return
+      }
+      this.spinning = true
+      verifyAcountBillSubmit({ verifyAccountBillSn: this.verifyAccountBillSn, remarks: this.remarks }).then(res => {
+        if (res.status == 200) {
+          this.handleBack()
+          this.$message.success(res.message)
+        }
+        this.spinning = false
+      })
+    },
     getChooseList () {
       this.$refs.partQuery.pageInit()
     },
@@ -460,7 +504,20 @@ export default {
 </script>
 
 <style lang="less">
-.salesReturnEdit-wrap {
+.tip-list{
+    padding: 10px;
+    > div{
+      display: flex;
+      margin-bottom: 10px;
+      > span{
+        margin-right: 6px;
+        text-align: right;
+        display: block;
+        width: 60px;
+      }
+    }
+  }
+.accountState-wrap {
   position: relative;
   height: 100%;
   padding-bottom: 51px;
@@ -469,7 +526,7 @@ export default {
     overflow-y: scroll;
     height: 100%;
   }
-  .salesReturnEdit-cont {
+  .accountState-cont {
     margin-top: 6px;
     .ant-divider-horizontal {
       margin: 10px 0 24px;

+ 6 - 1
src/views/financialManagement/accountStatementBill/baseModal.vue

@@ -34,7 +34,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
-import { verifyAccountBillCreate } from '@/api/verifyAccount.js'
+import { verifyAccountBillCreate, findLastBillRemarks } from '@/api/verifyAccount.js'
 export default {
   name: 'ASBaseModal',
   mixins: [commonMixin],
@@ -108,6 +108,11 @@ export default {
         dealerName: data.dealer.dealerName,
         remarks: ''
       }
+      // 获取默认备注
+      const res = await findLastBillRemarks({ sn: data.dealer.dealerSn })
+      if (res.status == 200) {
+        this.form.remarks = res.data.remarks
+      }
     }
   },
   watch: {

+ 3 - 3
vue.config.js

@@ -96,9 +96,9 @@ const vueConfig = {
           // 'border-radius-base': '4px'
         },
         // do not remove this line
-        javascriptEnabled: true
+        javascriptEnabled: true,
       }
-    }
+    },
   },
 
   devServer: {
@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.10/ocs-admin',
+        // target: 'http://192.168.2.132/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,

Some files were not shown because too many files changed in this diff