Browse Source

fix(): 12-14处理商户信息页面编辑和详情数据回显的问题等

tags/PMS_Frontend_v1.0.6-develop
陈宇航 1 year ago
parent
commit
d51f436248
  1. 21
      src/pages/MerchantMgm/InvoiceConf/loadable.jsx
  2. 2
      src/pages/MerchantMgm/MerchantAdmin/loadable.jsx
  3. 87
      src/pages/MerchantMgm/MerchantInfo/loadable.jsx
  4. 12
      src/services/MerchantMgm/MerchantInfo/index.js

21
src/pages/MerchantMgm/InvoiceConf/loadable.jsx

@ -738,7 +738,7 @@ function InvoiceConf() {
className="search-group-item"
limit={90}
showTime={false}
allowClear={false}
// allowClear={false}
/>
</Form.Item>
@ -937,7 +937,7 @@ function InvoiceConf() {
e=>{setTaxTypeStatus(e)}
}
disabled={true}
value={rateStatus>1?
value={parseInt(rateStatus) >= 1?
editForm.setFieldsValue({tax_type:"2"}):
editForm.setFieldsValue({tax_type:"1"})}
/>
@ -1407,25 +1407,28 @@ function InvoiceConf() {
<div className="item"><div className="item-title">发票平台</div>{records.receipt_type_name}</div>
</div>
<div className="left-wrap">
<div className="item"><div className="item-title">开票项目</div>{records.invoice_item}</div>
<div className="item"><div className="item-title">计税方式</div>{records.tax_way}</div>
<div className="item"><div className="item-title">开票项目</div>{records.invoice_item_name}</div>
<div className="item"><div className="item-title">计税方式</div>{records.tax_way_name}</div>
<div className="item"><div className="item-title">税率%</div>{records.tax_rate}</div>
<div className="item"><div className="item-title">含税标志</div>{records.tax_type}</div>
<div className="item"><div className="item-title">含税标志</div>{records.tax_type_name}</div>
</div>
<div className="left-wrap">
<div className="item"><div className="item-title">平台编码</div>{records.code}</div>
{/* <div className="item"><div className="item-title"></div>{records.code}</div>
<div className="item"><div className="item-title">授权码</div>{records.auth_code}</div>
<div className="item"><div className="item-title">请求地址</div>{records.request_url}</div>
<div className="item"><div className="item-title">请求码</div>{records.request_code}</div>
<div className="item"><div className="item-title">请求函数</div>{records.request_func}</div>
<div className="item"><div className="item-title">目标命名空间</div>{records.namespace}</div>
<div className="item"><div className="item-title">目标命名空间</div>{records.namespace}</div> */}
<div className="item"><div className="item-title">APPKEY</div>{records.appkey}</div>
<div className="item"><div className="item-title">APPSECRET</div>{records.appsecret}</div>
<div className="item"><div className="item-title">请求地址</div>{records.request_url}</div>
<div className="item"><div className="item-title">纳税人名称</div>{records.tax_name}</div>
<div className="item"><div className="item-title">纳税人识别号</div><span>{records.tax_num}</span></div>
</div>
</div>
<div className="right">
<div className="right-wrap">
<div className="item"><div className="item-title">纳税人名称</div>{records.tax_name}</div>
<div className="item"><div className="item-title">纳税人识别号</div><span>{records.tax_num}</span></div>
<div className="item"><div className="item-title">销货方名称</div>{records.sell_name}</div>
<div className="item"><div className="item-title">销货放识别号</div>{records.sell_num}</div>
<div className="item"><div className="item-title">销贷方地址</div>{records.sell_address}</div>

2
src/pages/MerchantMgm/MerchantAdmin/loadable.jsx

@ -258,7 +258,7 @@ function MerchantAdmin() {
status: 0,
};
searchForm.setFieldsValue(value)
getTable({ ...value, pn: 1, page_size: Number(pageSizeOptions[0])})
// getTable({ ...value, pn: 1, page_size: Number(pageSizeOptions[0])})
}

87
src/pages/MerchantMgm/MerchantInfo/loadable.jsx

@ -109,6 +109,7 @@ function MerchantInfo() {
//
const [zhiMiniVisible2, setZhiMiniVisible2] = useState(false)
const [editId, setEditId] = useState(""); // id
const [companyAddress, setCompanyAddress] = useState([]); //
//
const columns = [
{
@ -228,19 +229,33 @@ function MerchantInfo() {
label: '车务业务'
},
]
//
const COMPANY_ADRESS = [
{
label: '山东省',
value: '山东省',
children: [
{
label: '黄岛区',
value: '黄岛区'
// //
// const COMPANY_ADRESS = [
// {
// label: '',
// value: '',
// children: [
// {
// label: '',
// value: ''
// }
// ]
// }
// ]
//
const getAddressList = () => {
ajax.getAddressData().then(
res => {
if (res.status == 20000) {
setCompanyAddress(res?.data?.list || [])
} else {
message.error(res.message)
}
]
}
]
).catch(
(err) => { console.log(err) }
)
}
//
const PAY = [
{
@ -794,6 +809,7 @@ function MerchantInfo() {
getTenantTypePull()
getBusinessTypePull()
getStatusPull()
getAddressList()
// getTable()
}, []
)
@ -1103,7 +1119,12 @@ function MerchantInfo() {
>
<Cascader
placeholder="请选择"
options={COMPANY_ADRESS}
options={companyAddress}
fieldNames={{
label: "areaName",
value: "areaId",
children: "cities",
}}
// onChange={e => { setFormCreate({ ...formCreate, city: e }) }}
className="select-item"
/>
@ -1165,23 +1186,23 @@ function MerchantInfo() {
action="/PMS/api/com/common/file_upload"
fileList={fileList}
maxCount={1}
// beforeUpload = {(file) => {
// // 5M
// if (file.size > 5 * 1024 * 1024) {
// message.error("5M");
// return false;
// } else {
// let isFormat = false;
// // console.log(file.type);
// // jpgpngjpegbmp
// const picList = ["image/jpeg", "image/png", "image/jpg", "image/bmp", "image/gif"];
// isFormat = picList.indexOf(file.type) > -1;
// if (!isFormat) {
// message.error("jpgjpegpngbmpgif");
// }
// return isFormat;
// }
// }}
beforeUpload = {(file) => {
// 5M
if (file.size > 5 * 1024 * 1024) {
message.error("上传文件超过5M,请重新选择!");
return false;
} else {
let isFormat = false;
// console.log(file.type);
// jpgpngjpegbmp
const picList = ["image/jpeg", "image/png", "image/jpg", "image/bmp", "image/gif"];
isFormat = picList.indexOf(file.type) > -1;
if (!isFormat) {
message.error("请上传jpg、jpeg、png、bmp、gif的图片格式");
}
return isFormat;
}
}}
onChange={uploadLicense}
>
{fileList.length >= 1 ? null : uploadButton}
@ -1196,6 +1217,8 @@ function MerchantInfo() {
src={item}
style={{
height: '100%',
width: "100%",
objectFit: "contain"
}}
/>
)
@ -1206,7 +1229,7 @@ function MerchantInfo() {
)
}
</Upload>
<span className="text">非必填请上传营业执照扫描附件大小5M以内支持格式.jpg</span>
<span className="text">非必填请上传营业执照扫描附件大小5M以内支持格式.jpg .jpeg .png .bmp .gif</span>
</Form.Item>
</Form>
</div>
@ -1984,7 +2007,7 @@ function MerchantInfo() {
<div className="system">
<div className="system-wrap">
<div className="item"><span className="item-title">商户ID</span>{records.tenantId}</div>
<div className="item"><div className="item-title">商户编码</div><span>{records.tenantId}</span></div>
<div className="item"><div className="item-title">商户编码</div><span>{records.tenantCode}</span></div>
<div className="item"><div className="item-title">状态</div><span className={records.status == 1 ? "text-green" : "text-red"}>{records.status_name}</span></div>
<div className="item"><div className="item-title">商户名称</div>{records.tenantName}</div>
<div className="item"><div className="item-title">商户类型</div>{records.shop_type_name}</div>
@ -1998,7 +2021,7 @@ function MerchantInfo() {
<div className="account">
<div className="account-wrap">
<div className="item"><span className="item-title">公司名称</span>{records.companyName}</div>
<div className="item"><div className="item-title">公司地址</div><span>{records.address}</span></div>
<div className="item"><div className="item-title">公司地址</div><span>{records?.city_name || ""} {records?.address || ""}</span></div>
<div className="item"><div className="item-title">联系人</div><span>{records.connect_name}</span></div>
<div className="item"><div className="item-title">联系电话</div>{records.connect_phone}</div>
<div className="item"><div className="item-title">邮箱</div>{records.email}</div>

12
src/services/MerchantMgm/MerchantInfo/index.js

@ -9,6 +9,15 @@ const getTenantSelectPull=(p)=>{
data: p
})
}
// 获取公司地址数据
const getAddressData=(p)=>{
return ajax({
url: "/api/bpm/region/get_region_list",
type: 'get',
data: p
})
}
//获取商户类型下拉框
const getTenantTypePull=(p)=>{
return ajax({
@ -89,6 +98,7 @@ export default {
addTenant,
editTenant,
checkTenant,
updateStatus
updateStatus,
getAddressData
}
Loading…
Cancel
Save