Commit 8d70d5c8 authored by alwayOnlie's avatar alwayOnlie

bug

parent 7c3e76c6
......@@ -23,7 +23,7 @@ const activeAnchorClassName = 'ant-anchor-link-active'
const Details = (props: any) => {
const [form] = Form.useForm();
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [Drawervisible, setDrawervisible] = useState<boolean>(false)
/* 合同id */
const { location: { query: { contractId, type } } } = props;
......@@ -140,7 +140,18 @@ const Details = (props: any) => {
}
const columnsTab = (Numberamount, Totalamount) => {
const columns: any = [
{ title: '物料编号/名称', dataIndex: 'materielNo', align: 'center', },
{
title: '物料编号/名称', dataIndex: 'materielNo', align: 'center',
render: (text, item, index) => {
return (
<div>
<div>{text}</div>
<div>{item.materielName}</div>
</div>
)
}
},
{ title: '规格型号', dataIndex: 'type', align: 'center', },
{ title: '品类', dataIndex: 'category', align: 'center', },
{ title: '品牌', dataIndex: 'brand', align: 'center', },
......@@ -246,10 +257,10 @@ const Details = (props: any) => {
</div>
<div className={style.text}>
<p>商品编号:{record.associatedMaterielNo}</p>
<p>商品名称:{record.associatedMaterielName}</p>
<p>商品名称:{record.associatedGoods}</p>
</div>
<div className={style.text}>
<p>规格型号:{record.associatedGoods}</p>
<p>规格型号:{record.associatedType}</p>
<p>品类:{record.associatedCategory}</p>
</div>
<div className={style.text}>
......@@ -337,7 +348,7 @@ const Details = (props: any) => {
associatedBrand
}
console.log(params, 10086, res_data)
const msg = message.loading({
let msg = message.loading({
content: '正在操作',
duration: 0,
});
......@@ -365,15 +376,28 @@ const Details = (props: any) => {
/* 提交表单 */
const submitExamine = () => {
// let flag = ListData.find((item: any)
let flag = false;
ListData.every((item => {
if (item.associatedDataId && item.associatedMaterielNo) {
flag = true;
}
}))
if (!flag) {
message.info('请先关联报价商品');
} else {
setIsModalVisible(!Visible)
}
}
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
/* 审核 */
const onFinish = (values: any) => {
values.contractId = contractId;
const msg = message.loading({
let msg = message.loading({
content: '正在操作',
duration: 0,
});
......@@ -733,7 +757,7 @@ const Details = (props: any) => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -21,7 +21,7 @@ import { history } from 'umi';
const pageToBeExamineOne = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
//表头
......@@ -35,7 +35,7 @@ const pageToBeExamineOne = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/coordination/pageToBeExamineOne/details?contractId=${record.id}`}
>
{text}
</EyePreview>
......@@ -229,7 +229,7 @@ const pageToBeExamineOne = () => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" >
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -20,7 +20,7 @@ const { TextArea } = Input;
const pageToBeExamineTwo = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const getdate = (time) => {
......@@ -34,7 +34,7 @@ const pageToBeExamineTwo = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/coordination/pageToBeExamineTwo/details?contractId=${record.id}`}
>
{text}
</EyePreview>
......@@ -227,7 +227,7 @@ const pageToBeExamineTwo = () => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion">
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -227,7 +227,7 @@ const pageToBeSubmitExamine = () => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请输入原因' }]}>
</Form.Item>
<Form.Item label='' name="opinion">
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -31,7 +31,7 @@ const Sign = () => {
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}`}
url={`/memberCenter/contract/coordination/Sign/details?contractId=${record.id}`}
>
{text}
</EyePreview>
......@@ -105,7 +105,7 @@ const Sign = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=Sign`)}>签订合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/Sign/details?contractId=${record.id}&type=Sign`)}>签订合同</span>
</div>
)
}
......
......@@ -89,7 +89,7 @@ const Addbilldetails: React.FC<{}> = () => {
return (
<>
{
record.status == 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => isModal(record)}>提交请款单</span>
record.status == 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => isModal(record)}>提交</span>
}
{
record.status != 3 || record.status != 5 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }}>修改</span>
......@@ -176,44 +176,7 @@ const Addbilldetails: React.FC<{}> = () => {
return (
<PageHeaderWrapper>
<Card>
{/* <StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: addSchemaBli,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"status",
fetchOptions(PublicApi.getContractApplyAmountGetStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
formilyChilds={{
children: Actions
}}
/> */}
<StandardTable
tableProps={{
rowKey: 'id',
......
......@@ -4,12 +4,8 @@ import { Button, Input, Form, Select, Radio, message, Modal } from 'antd'
const { Search, TextArea } = Input
import { StandardTable } from 'god';
import { PublicApi } from '@/services/api';
const { Option } = Select;
const Examine = (props: any) => {
const { ExamineFlag, getfetchData, applyId, type } = props;
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
/***
......@@ -55,7 +51,6 @@ const Examine = (props: any) => {
/* 回调 */
const fetchData = (val) => {
console.log(22222);
if (val == 'onCancel') {
getfetchData({
ExamineFlag: false,
......@@ -84,7 +79,7 @@ const Examine = (props: any) => {
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<Form.Item label='' name="opinion" rules={[{ required: isPass ? true : false, message: '审核通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -72,7 +72,7 @@ const FormList = (props: any) => {
>
<Select
style={{ width: 80 }}
defaultValue={text ? text.toString() : ''}
defaultValue={text === 0 || text === 1 ? text.toString() : ''}
onChange={(e) => setInput(e, 'isHasTax', index)}
>
<Option value="0" key={0}></Option>
......@@ -165,7 +165,7 @@ const FormList = (props: any) => {
/* 确定 */
const handleOk = () => {
console.log(selectRow, '显示');
console.log(selectRow);
let dataArr = [];
selectRow.map((item: any) => {
dataArr.push(item);
......
......@@ -31,16 +31,20 @@ const ContractText = (props: any) => {
}
PublicApi.getContractContractTemplatePage(data).then(res => {
console.log(res);
let list = res.data.data.map((item: any) => {
if (item.state != 0) {
return {
let list = [];
res.data.data.find((item: any) => {
item.version != null ? item.version : '';
console.log(item.version)
if (item.state == 1) {
console.log(item,)
list.push({
label: item.name + item.version,
value: item.id,
id: item.id,
}
})
}
})
console.log(list);
// console.log(list, res.data.data);
setTemplatePage(list)
})
......
......@@ -63,7 +63,7 @@ const FormList = (props: any) => {
>
<Select
style={{ width: 80 }}
defaultValue={text ? text.toString() : ''}
defaultValue={text === 0 || text === 1 ? text.toString() : ''}
onChange={(e) => setInput(e, 'isHasTax', index)}
>
<Option value="0" key={0}></Option>
......
......@@ -31,15 +31,20 @@ const ContractText = (props: any) => {
}
PublicApi.getContractContractTemplatePage(data).then(res => {
console.log(res);
let list = res.data.data.map((item: any) => {
if (item.state != 0) {
return {
let list = [];
res.data.data.find((item: any) => {
item.version != null ? item.version : '';
console.log(item.version)
if (item.state == 1) {
console.log(item,)
list.push({
label: item.name + item.version,
value: item.id,
id: item.id,
}
})
}
})
// console.log(list, res.data.data);
setTemplatePage(list)
})
......
......@@ -64,19 +64,7 @@ const Information = (props: any) => {
}
})
// useEffect(() => {
// if (oldContractId) {
// let data = { oldContractNo: basic.contractNo }
// console.log(data, 123131, basic)
// PublicApi.getContractManageGetContractNo(data).then(res => {
// console.log(res.data)
// if (res.code === 1000) {
// basic.contractNo = res.data
// attrValueForm.setFieldsValue(basic)
// }
// })
// }
// }, [oldContractId])
/* 时间选中 */
const onChange = (value: any) => {
console.log(value)
......
......@@ -21,7 +21,7 @@ const Examine = () => {
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [form] = Form.useForm();
const [id, setid] = useState("")
const getdate = (time) => {
......@@ -242,7 +242,7 @@ const Examine = () => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" >
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -26,7 +26,7 @@ const Levelexamine = () => {
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [form] = Form.useForm();
//表头
const columns: ColumnType<any>[] = [{
......@@ -241,7 +241,7 @@ const Levelexamine = () => {
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion">
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
......
......@@ -347,15 +347,18 @@ export const QueryListSchema: ISchema = {
enum: [
{ label: '所有状态', value: 0 },
{ label: '待提交乙方签订合同', value: 1 },
{ label: '乙方签订合同', value: 2 },
{ label: '已提交乙方签订合同', value: 2 },
{ label: '待提交审核合同', value: 3 },
{ label: '待审核合同(一级)', value: 4 },
{ label: '待审核合同(级)', value: 5 },
{ label: '合同审核不通过(一级)', value: 6 },
{ label: '合同审核通过(二级)', value: 7 },
{ label: '合同审核不通过', value: 4 },
{ label: '待审核合同(级)', value: 5 },
{ label: '待审核合同(二级)', value: 6 },
{ label: '合同审核通过(二级', value: 7 },
{ label: '合同审核不通过(二级)', value: 8 },
{ label: '同意签订合同', value: 9 },
{ label: '不同意签订合同', value: 10 },
{ label: '合同审核不通过(二级)', value: 9 },
{ label: '同意签订合同', value: 10 },
{ label: '不同意签订合同', value: 11 },
{ label: '已作废', value: 12 },
{ label: '已停用', value: 13 },
],
},
submit: {
......
......@@ -21,7 +21,7 @@ const Secondaryexamine = () => {
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [isPass, setIsAllMember] = useState()
const [isPass, setIsAllMember] = useState(1)
const [form] = Form.useForm();
//表头
const columns: ColumnType<any>[] = [{
......@@ -242,7 +242,7 @@ const Secondaryexamine = () => {
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: isPass ? false : true, message: '审核不通过意见' }]}>
</Form.Item>
<Form.Item label='' name="opinion">
......
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