From 2a0b8a1f99f61d50fe2983eed2bead449a50704a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 09 四月 2025 23:43:16 +0800 Subject: [PATCH] Merge branch 'positec' into dms --- src/api/index.js | 12 ++++++ src/tabviews/custom/components/module/invoice/index.jsx | 1 src/views/appcheck/index.jsx | 47 ++++++++++++++++++++++- src/views/appmanage/index.jsx | 40 +++++++++++++++++++ src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 6 ++ 5 files changed, 102 insertions(+), 4 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 83a8993..171600c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -73,6 +73,10 @@ return Promise.reject(response.data) } else { + if (response.data.ErrCode === 'E' && /姝婚攣/.test(response.data.message)) { + response.data.message = '鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庨噸璇曪紒' + response.data.ErrMesg = '鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庨噸璇曪紒' + } if (response.config.requestId) { response.data.$requestId = response.config.requestId } @@ -1094,6 +1098,14 @@ param.data_md5 = param.data_md5 || '' param.time_limit = param.time_limit || 0 + param.data.forEach(item => { + item.exps.forEach(cell => { + if (typeof(cell.value) === 'number') { + cell.value = cell.value + '' + } + }) + }) + param = this.encryptParam(param) return new Promise((resolve) => { diff --git a/src/tabviews/custom/components/module/invoice/index.jsx b/src/tabviews/custom/components/module/invoice/index.jsx index 5f130b2..dfb257f 100644 --- a/src/tabviews/custom/components/module/invoice/index.jsx +++ b/src/tabviews/custom/components/module/invoice/index.jsx @@ -813,6 +813,7 @@ if (options.length) { options.forEach(line => { let vals = [line.productcode, line.productname, line.spec, line.unit, line.bill_count, line.unitprice, line.amount_line, line.tax_classify_code, line.tax_classify_name, line.tax_rate, line.tax_amount, line.free_tax_mark || '', line.vat_special_management || '', line.invoice_lp || '', line.tax_item, line.tax_method, line.uuid, 'del'] + vals = vals.map(val => typeof(val) === 'number' ? val + '' : val) lines.push(vals) }) } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 9f8e3df..b596c48 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -2628,7 +2628,11 @@ let lines = data.map(item => { let vals = [] forms.forEach(col => { - vals.push(item[col.field]) + if (typeof(item[col.field]) === 'number') { + vals.push(item[col.field] + '') + } else { + vals.push(item[col.field]) + } }) vals.push(item.$$uuid) diff --git a/src/views/appcheck/index.jsx b/src/views/appcheck/index.jsx index 9dbbfd2..b231964 100644 --- a/src/views/appcheck/index.jsx +++ b/src/views/appcheck/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import { withRouter } from 'react-router-dom' -import { Spin, notification, Table, Typography, Row, Col, Tooltip } from 'antd' -import { QuestionCircleOutlined } from '@ant-design/icons' +import { Spin, notification, Table, Typography, Row, Col, Tooltip, Button, Modal } from 'antd' +import { QuestionCircleOutlined, LinkOutlined } from '@ant-design/icons' import Api from '@/api' import { langs } from '@/store/options.js' @@ -9,6 +9,7 @@ import './index.scss' const { Paragraph } = Typography +const { confirm } = Modal const Header = asyncComponent(() => import('./header')) @@ -147,6 +148,47 @@ this.setState({ selectApp: record }) } + updateLink = (item) => { + let link = `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` + + let param = { + func: 's_miniapp_kei_linkurl_upt', + id: item.ID, + linkurl: link + } + + if (window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } + + confirm({ + content: '纭畾鏇存柊搴旂敤閾炬帴鍦板潃鍚楋紵', + onOk() { + return new Promise(resolve => { + Api.genericInterface(param).then(result => { + if (result.status) { + notification.success({ + top: 92, + message: '鎿嶄綔鎴愬姛锛�', + duration: 3 + }) + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + } + resolve() + }, () => { + resolve() + }) + }) + }, + onCancel() {} + }) + } + render () { const { loading, columns, applist, selectApp } = this.state @@ -259,6 +301,7 @@ </Col> </Row> <div className="action"> + <Button type="link" onClick={() => this.updateLink(item)}><LinkOutlined style={{color: 'orange'}}/></Button> <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}${item.wxAppId ? '/' + item.wxAppId : ''}` }}></Paragraph> </div> </div> diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index 77a2cc2..88bbad2 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import { fromJS } from 'immutable' import { Spin, notification, Input, Button, Table, Modal, Typography, Row, Col, Tooltip } from 'antd' -import { QuestionCircleOutlined } from '@ant-design/icons' +import { QuestionCircleOutlined, LinkOutlined } from '@ant-design/icons' import moment from 'moment' import md5 from 'md5' @@ -1137,6 +1137,43 @@ }) } + updateLink = (item) => { + let link = `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` + + let param = { + func: 's_miniapp_kei_linkurl_upt', + id: item.ID, + linkurl: link + } + + confirm({ + content: '纭畾鏇存柊搴旂敤閾炬帴鍦板潃鍚楋紵', + onOk() { + return new Promise(resolve => { + Api.getCloudConfig(param).then(result => { + if (result.status) { + notification.success({ + top: 92, + message: '鎿嶄綔鎴愬姛锛�', + duration: 3 + }) + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + } + resolve() + }, () => { + resolve() + }) + }) + }, + onCancel() {} + }) + } + render () { const { loading, visible, subVisible, columns, transcolumns, applist, translist, transVisible, selectApp, selectTran, selectSubApp, scriptVisible, scriptlist, scriptcolumns, selectScriptKeys } = this.state @@ -1295,6 +1332,7 @@ <Button type="link" onClick={() => this.setState({ selectSubApp: item, subVisible: 'edit' })} style={{color: '#8E44AD'}}>淇敼</Button> <Button type="link" onClick={() => this.deleteSubApp(item)} style={{color: '#ff4d4f'}}>鍒犻櫎</Button> <Button type="link" onClick={() => this.jumpApp(item)}>缂栬緫搴旂敤</Button> + <Button type="link" onClick={() => this.updateLink(item)}><LinkOutlined style={{color: 'orange'}}/></Button> <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}${item.wxAppId ? '/' + item.wxAppId : ''}` }}></Paragraph> </div> </div> -- Gitblit v1.8.0