Commit 84aa90da authored by 张子雨's avatar 张子雨

Merge branch 'feat/sentry0616' into feature/meal-3.0

* feat/sentry0616:
  feat: 解决senty问题
  feat: 修改sentry
  feat: 解决sentry问题
  feat: 解决sentry问题
  feat: 修复sentry问题
parents 77ccf63b f932ffea
import RoleType, { isPlatForm } from './role.config'; import RoleType, { isPlatForm } from './role.config';
const isProduction = process.env.NODE_ENV === 'production'; const isProduction = process.env.NODE_ENV === 'production';
const isPre = process.env.PRE_ENV === 'pre'; const isPre = process.env.PRE_ENV === 'pre';
const environment = 'yxm2'; const environment = 'sc';
const envAPi = { const envAPi = {
api: `https://security-${environment}.liangkebang.net`, //'https://security-xyqb.liangkebang.net', api: `https://security-${environment}.liangkebang.net`, //'https://security-xyqb.liangkebang.net',
......
...@@ -17,12 +17,12 @@ const Model = { ...@@ -17,12 +17,12 @@ const Model = {
const productCategoryId = payload?.productCategoryId || []; const productCategoryId = payload?.productCategoryId || [];
params.productCategoryId = params.productCategoryId =
(productCategoryId.length && productCategoryId[productCategoryId.length - 1]) || ''; (productCategoryId.length && productCategoryId[productCategoryId.length - 1]) || '';
const { data } = yield call(api.searchList, params); const res = yield call(api.searchList, params);
if (!data) return; if (res && !res.data) return;
yield put({ yield put({
type: 'saveData', type: 'saveData',
payload: { payload: {
tableData: data, tableData: res.data,
}, },
}); });
}, },
......
...@@ -30,9 +30,13 @@ class toExamine extends Component { ...@@ -30,9 +30,13 @@ class toExamine extends Component {
if (err) { if (err) {
return; return;
} }
if (!values?.fileList[0]?.url) {
notification.error({ message: '请上传发票错误,请重新上传' });
return;
}
const params = { const params = {
filePath: values?.fileList[0].url, filePath: values?.fileList[0].url,
fileName: values?.fileList[0].name, fileName: values?.fileList[0]?.name || '',
id, id,
}; };
const data = await uploadBill(params); const data = await uploadBill(params);
......
...@@ -62,6 +62,10 @@ class PicturesWall extends React.Component { ...@@ -62,6 +62,10 @@ class PicturesWall extends React.Component {
const vm = this; const vm = this;
// eslint-disable-next-line new-cap // eslint-disable-next-line new-cap
const data = `${UUID.createUUID()}.${suffix}`; const data = `${UUID.createUUID()}.${suffix}`;
if (!token) {
message.error('上传失败,请刷新页面重试!');
return;
}
const observable = qiniu.upload(file, data, token); const observable = qiniu.upload(file, data, token);
const observer = { const observer = {
next() { next() {
...@@ -121,7 +125,9 @@ class PicturesWall extends React.Component { ...@@ -121,7 +125,9 @@ class PicturesWall extends React.Component {
customRequest={this.customRequest} customRequest={this.customRequest}
listType="text" listType="text"
fileList={fileList} fileList={fileList}
disabled={status !== 1}
onRemove={status === 1 ? this.clearFileList : ''} onRemove={status === 1 ? this.clearFileList : ''}
accept=".pdf,.doc,.docx,.zip,.rar,.png,.jpeg"
> >
{max && fileList.length >= max ? null : uploadButton} {max && fileList.length >= max ? null : uploadButton}
</Upload> </Upload>
......
...@@ -147,7 +147,7 @@ const FormAttr = forwardRef((props, ref) => { ...@@ -147,7 +147,7 @@ const FormAttr = forwardRef((props, ref) => {
if (typeof values[item] === 'string') { if (typeof values[item] === 'string') {
obj.productAttributeApplyValueList = JSON.parse(values[item]); obj.productAttributeApplyValueList = JSON.parse(values[item]);
} else { } else {
obj.productAttributeApplyValueList = values[item].map(v => JSON.parse(v)); obj.productAttributeApplyValueList = values[item]?.map(v => JSON.parse(v)) || [];
} }
return obj; return obj;
}); });
......
...@@ -10,7 +10,7 @@ const FormItem = Form.Item; ...@@ -10,7 +10,7 @@ const FormItem = Form.Item;
const { Option } = Select; const { Option } = Select;
const LogisticsForm = props => { const LogisticsForm = props => {
const { modalVisible, onCancel, companys = [], skuList, onSubmit } = props; const { modalVisible, onCancel, company = [], skuList, onSubmit } = props;
const { getFieldDecorator } = props.form; const { getFieldDecorator } = props.form;
const [result, setResult] = useState(() => props.value); const [result, setResult] = useState(() => props.value);
const formData = async (formDataList, fieldsValue, suffixes) => { const formData = async (formDataList, fieldsValue, suffixes) => {
...@@ -127,14 +127,14 @@ const LogisticsForm = props => { ...@@ -127,14 +127,14 @@ const LogisticsForm = props => {
], ],
})( })(
<Select showSearch placeholder="请选择物流公司"> <Select showSearch placeholder="请选择物流公司">
{companys.map(item => ( {company?.map(item => (
<Option <Option
value={`${item.expressCompanyCode}-${item.expressCompanyName}`} value={`${item.expressCompanyCode}-${item.expressCompanyName}`}
key={item.expressCompanyCode} key={item.expressCompanyCode}
> >
{item.expressCompanyName} {item.expressCompanyName}
</Option> </Option>
))} )) || []}
</Select>, </Select>,
)} )}
</FormItem> </FormItem>
......
...@@ -248,7 +248,9 @@ const UpdateStatusModal = (props, ref) => { ...@@ -248,7 +248,9 @@ const UpdateStatusModal = (props, ref) => {
const onOk = async () => { const onOk = async () => {
const submitApi = oldPackageList.length === 0 ? apiDeliveriesAdd : apiDeliveriesEdit; const submitApi = oldPackageList.length === 0 ? apiDeliveriesAdd : apiDeliveriesEdit;
formRef.current.form.validateFields().then(async values => { formRef.current.form
.validateFields()
.then(async values => {
const packageList = onFilterParams(values.packageList); const packageList = onFilterParams(values.packageList);
// 对比修改差异 // 对比修改差异
...@@ -285,14 +287,15 @@ const UpdateStatusModal = (props, ref) => { ...@@ -285,14 +287,15 @@ const UpdateStatusModal = (props, ref) => {
setConfirmLoading(true); setConfirmLoading(true);
const res = await submitApi(params); const res = await submitApi(params);
setConfirmLoading(false); setConfirmLoading(false);
if (res.code === '0000' && res.businessCode === '0000') { if (res?.code === '0000' && res?.businessCode === '0000') {
notification.success({ notification.success({
message: '提交成功', message: '提交成功',
}); });
onCancel(); onCancel();
actionRef.current.reload(); actionRef.current.reload();
} }
}); })
.catch(err => {});
}; };
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
......
...@@ -591,7 +591,7 @@ const TableList = props => { ...@@ -591,7 +591,7 @@ const TableList = props => {
<LogisticsForm <LogisticsForm
onSubmit={reload} onSubmit={reload}
skuList={skuList} skuList={skuList}
companys={companys} company={companys}
onCancel={() => handleModalVisible(false)} onCancel={() => handleModalVisible(false)}
modalVisible={LogisticsModalVisible} modalVisible={LogisticsModalVisible}
value={LogisticsData} value={LogisticsData}
......
...@@ -12,7 +12,6 @@ class Socket extends EventEmitter { ...@@ -12,7 +12,6 @@ class Socket extends EventEmitter {
this.taskRemindInterval = null; this.taskRemindInterval = null;
this.connected = false; this.connected = false;
this.waitingSendData = []; this.waitingSendData = [];
this.reconnectCount = 0;
this.heartBeatTimer = null; this.heartBeatTimer = null;
return this; return this;
} }
...@@ -117,8 +116,10 @@ class Socket extends EventEmitter { ...@@ -117,8 +116,10 @@ class Socket extends EventEmitter {
return; return;
} }
const sendValue = typeof value === 'string' ? value : JSON.stringify(value); const sendValue = typeof value === 'string' ? value : JSON.stringify(value);
if (this.socket.readyState === this.socket.OPEN) {
this.socket.send(sendValue); this.socket.send(sendValue);
} }
}
}; };
checkWaitingData() { checkWaitingData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment