|
@@ -42,6 +42,7 @@ import {
|
|
|
} from "@/tools";
|
|
|
import { taskStatus, projectStatus } from "@/dataDic.js";
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
+import CheckProject from "../../components/checkProject";
|
|
|
const FormItem = Form.Item;
|
|
|
const { TabPane } = Tabs;
|
|
|
const { Option } = Select;
|
|
@@ -134,8 +135,64 @@ const MyTaskOutsource = React.createClass({
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
+ waiDetail() {
|
|
|
+ let url = window.location.href.substring(7)
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ crossDomain: false,
|
|
|
+ url:
|
|
|
+ globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceDtails',
|
|
|
+ data: {
|
|
|
+ tid: this.state.id,
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
+ },
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ })
|
|
|
+ if (!data.error.length && data.data) {
|
|
|
+ this.setState({
|
|
|
+ startType: data.data.startType, //类型
|
|
|
+ patentType: data.data.patentType, //专利类型
|
|
|
+ patentNameType: data.data.patentNameType, //专利名称类型
|
|
|
+ patentName: data.data.patentName, //专利名称
|
|
|
+ outsourceRemarks: data.data.outsourceRemarks,
|
|
|
+ remarks: data.data.remarks,
|
|
|
+ companyName: data.data.companyName,
|
|
|
+ amount: data.data.amount,
|
|
|
+ mid: data.data.id,
|
|
|
+ unitPrice: data.data.unitPrice,
|
|
|
+ refundStatus: data.data.refundStatus,
|
|
|
+ unitNumber: data.data.unitNumber,
|
|
|
+ pictureUrl: data.data.pictureUrl
|
|
|
+ ? splitUrl(
|
|
|
+ data.data.pictureUrl,
|
|
|
+ ',',
|
|
|
+ globalConfig.avatarHost + '/upload',
|
|
|
+ url
|
|
|
+ )
|
|
|
+ : [], //图片地址
|
|
|
+ createTimes: data.data.createTimes,
|
|
|
+ auditTimes: data.data.auditTimes,
|
|
|
+ })
|
|
|
+ } else if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message)
|
|
|
+ } else if (!data.data) {
|
|
|
+ this.setState({
|
|
|
+ refundStatus: undefined,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ )
|
|
|
+ },
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ paySubject: [],
|
|
|
orderData: [],
|
|
|
orderNo: "",
|
|
|
jiedian: [],
|
|
@@ -685,6 +742,10 @@ const MyTaskOutsource = React.createClass({
|
|
|
this.xiangqings(record.orderNo);
|
|
|
this.xiangmu(record.orderNo);
|
|
|
this.loaduserss(record);
|
|
|
+ // 获取第三方信息表格
|
|
|
+ this.thirdTable(record.id)
|
|
|
+ //获取支付节点信息表格
|
|
|
+ this.payNodeTable(record.id)
|
|
|
},
|
|
|
//点击修改项目详情
|
|
|
tijiaoOk() {
|
|
@@ -1226,6 +1287,9 @@ const MyTaskOutsource = React.createClass({
|
|
|
modKey: e,
|
|
|
});
|
|
|
this.loadCompany();
|
|
|
+ if (e == 2) {
|
|
|
+ this.waiDetail()
|
|
|
+ }
|
|
|
if (e == 3) {
|
|
|
this.orderDetailData(this.state.orderNo);
|
|
|
this.xiangmu(this.state.orderNo);
|
|
@@ -1756,6 +1820,132 @@ const MyTaskOutsource = React.createClass({
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
+ //查看第三方信息表格
|
|
|
+ thirdTable(id) {
|
|
|
+ this.setState({
|
|
|
+ loadData: true,
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/company/selectCompany',
|
|
|
+ data: {
|
|
|
+ tid: id,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message)
|
|
|
+ } else {
|
|
|
+ let companyNameArr = []
|
|
|
+ let theArr = []
|
|
|
+ let thisData = []
|
|
|
+ let arr = data.data || []
|
|
|
+ let allTotalAmount = 0
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ thisData = arr[i]
|
|
|
+ allTotalAmount =
|
|
|
+ (allTotalAmount * 10000 + thisData.totalAmount * 10000) / 10000
|
|
|
+ companyNameArr.push(thisData.companyName)
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ id: thisData.id, //节点Id
|
|
|
+ tid: thisData.tid,
|
|
|
+ companyName: thisData.companyName, //供应商名称
|
|
|
+ unitPrice: thisData.unitPrice, //单价
|
|
|
+ quantity: thisData.quantity, //数量
|
|
|
+ totalAmount: thisData.totalAmount, //总价
|
|
|
+ material: thisData.material, //材料 0无 1有
|
|
|
+ urgent: thisData.urgent, // 0无加急(系统默认)1加急3天 2加急4天 3加急5-10天 4加急11-15天 5加急16-20天 6加急21-25天 7加急26-30天
|
|
|
+ audit: thisData.audit, //0无审计 1年审 2专审
|
|
|
+ assets: thisData.assets, //资产
|
|
|
+ income: thisData.income, //收入
|
|
|
+ remarks: thisData.remarks, //备注
|
|
|
+ cid: thisData.cid, //机构id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!allTotalAmount) {
|
|
|
+ allTotalAmount = 0
|
|
|
+ }
|
|
|
+ console.log(theArr)
|
|
|
+ console.log(companyNameArr)
|
|
|
+
|
|
|
+ this.setState({
|
|
|
+ tid: id,
|
|
|
+ thirdInfoList: theArr,
|
|
|
+ allTotalAmount: allTotalAmount,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ })
|
|
|
+ }.bind(this)
|
|
|
+ )
|
|
|
+ },
|
|
|
+ payNodeTable(id) {
|
|
|
+ this.setState({
|
|
|
+ loadData: true,
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/company/selectPaymentNode',
|
|
|
+ data: {
|
|
|
+ tid: id,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message)
|
|
|
+ } else {
|
|
|
+ let payNodeArr = []
|
|
|
+ let thisData = []
|
|
|
+ let arr = data.data || []
|
|
|
+ // console.log('this.state.paySubject', this.state.paySubject)
|
|
|
+ //对#5283自定义的补充展示
|
|
|
+ this.state.paySubject.push({ key: '自定义', value: '0' })
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ thisData = arr[i]
|
|
|
+ //遍历paySubject,获取当前dunType对应的key
|
|
|
+ this.state.paySubject.map((item) => {
|
|
|
+ if (item.value == thisData.dunType) {
|
|
|
+ thisData.dunType = item.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ payNodeArr.push({
|
|
|
+ key: i,
|
|
|
+ id: thisData.id, //付款节点Id
|
|
|
+ tid: thisData.tid,
|
|
|
+ companyName: thisData.companyName, //供应商名称
|
|
|
+ projectType: thisData.projectType, //项目分类
|
|
|
+ dunType: thisData.dunType, //催款分类
|
|
|
+ unitPrice: thisData.unitPrice, //单价
|
|
|
+ quantity: thisData.quantity, //数量
|
|
|
+ totalAmount: thisData.totalAmount, //总价
|
|
|
+ partyAmount: thisData.partyAmount, //付款
|
|
|
+ partyTimes: thisData.partyTimes, //付款时间
|
|
|
+ cid: thisData.cid, //机构id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(payNodeArr,'payNodeArr:')
|
|
|
+ // console.log('paySubject:', this.state.paySubject)
|
|
|
+ this.setState({
|
|
|
+ tid: id,
|
|
|
+ payNodeList: payNodeArr,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ })
|
|
|
+ }.bind(this)
|
|
|
+ )
|
|
|
+ },
|
|
|
orderDetailData(orderNos) {
|
|
|
this.setState({
|
|
|
loading: true,
|
|
@@ -2739,152 +2929,24 @@ const MyTaskOutsource = React.createClass({
|
|
|
</Form>
|
|
|
</TabPane>
|
|
|
<TabPane tab="外包接单公司信息" key="2">
|
|
|
- {/*<Button type="primary" onClick={this.addCompany} style={{float:'right',marginBottom:'10px'}}>+新增接单公司</Button>*/}
|
|
|
- {
|
|
|
- <div className="clearfix">
|
|
|
- <h3 className="sub-title" style={{ marginBottom: "10px" }}>
|
|
|
- 新增(编辑)接单公司
|
|
|
- </h3>
|
|
|
- <FormItem
|
|
|
- className="three-item"
|
|
|
- {...formItemLayout}
|
|
|
- label={
|
|
|
- <span>
|
|
|
- <strong style={{ color: "#f00" }}>*</strong>公司名称
|
|
|
- </span>
|
|
|
- }
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder="请输入公司名称"
|
|
|
- value={this.state.cName}
|
|
|
- style={{ width: "200px" }}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ cName: e.target.value });
|
|
|
- }}
|
|
|
- className="height-input"
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- className="three-item"
|
|
|
- {...formItemLayout}
|
|
|
- label={
|
|
|
- <span>
|
|
|
- <strong style={{ color: "#f00" }}>*</strong>联系人
|
|
|
- </span>
|
|
|
- }
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder="请输入联系人名称"
|
|
|
- value={this.state.companyContacts}
|
|
|
- style={{ width: "200px" }}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ companyContacts: e.target.value });
|
|
|
- }}
|
|
|
- className="height-input"
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- className="three-item"
|
|
|
- {...formItemLayout}
|
|
|
- label={
|
|
|
- <span>
|
|
|
- <strong style={{ color: "#f00" }}>*</strong>联系人电话
|
|
|
- </span>
|
|
|
- }
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder="请输入联系人电话"
|
|
|
- value={this.state.companyContactsMobile}
|
|
|
- style={{ width: "200px" }}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({
|
|
|
- companyContactsMobile: e.target.value,
|
|
|
- });
|
|
|
- }}
|
|
|
- className="height-input"
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- className="three-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="企业地址"
|
|
|
- >
|
|
|
- <Cascader
|
|
|
- options={areaSelect()}
|
|
|
- value={this.state.companyProvinceArr}
|
|
|
- placeholder="选择城市"
|
|
|
- style={{ width: "200px" }}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ companyProvinceArr: e });
|
|
|
- }}
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- <FormItem className="three-item" {...formItemLayout} label="">
|
|
|
- <Input
|
|
|
- placeholder="请输入详细地址"
|
|
|
- value={this.state.companyAddress}
|
|
|
- style={{ width: "200px", marginLeft: "12em" }}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ companyAddress: e.target.value });
|
|
|
- }}
|
|
|
- className="height-input"
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- className="three-item"
|
|
|
- {...formItemLayout}
|
|
|
- label=""
|
|
|
- ></FormItem>
|
|
|
- <div className="clearfix">
|
|
|
- <FormItem
|
|
|
- labelCol={{ span: 3 }}
|
|
|
- wrapperCol={{ span: 16 }}
|
|
|
- label="备注"
|
|
|
- >
|
|
|
- <Input
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入备注"
|
|
|
- rows={4}
|
|
|
- value={this.state.companyRemarks}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ companyRemarks: e.target.value });
|
|
|
- }}
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- style={{
|
|
|
- float: "right",
|
|
|
- marginTop: "10px",
|
|
|
- marginRight: "50px",
|
|
|
- }}
|
|
|
- onClick={() => {
|
|
|
- this.saveCompany(this.state.companyId);
|
|
|
- }}
|
|
|
- >
|
|
|
- 保存
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- }
|
|
|
- <p style={{ color: "red" }}>
|
|
|
- 提示:查看备注请点击表格左侧加号按钮~
|
|
|
- </p>
|
|
|
- <div className="patent-table" style={{ marginTop: "10px" }}>
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <Table
|
|
|
- columns={this.state.companyColumns}
|
|
|
- dataSource={this.state.companys}
|
|
|
- scroll={{ x: 300, y: 0 }}
|
|
|
- bordered
|
|
|
- size="small"
|
|
|
- expandedRowRender={(record) => {
|
|
|
- return <p>{record.remarks}</p>;
|
|
|
- }}
|
|
|
- pagination={false}
|
|
|
- />
|
|
|
- </Spin>
|
|
|
- </div>
|
|
|
+ <CheckProject
|
|
|
+ {...this.props}
|
|
|
+ tid={this.state.tid}
|
|
|
+ status={this.state.refundStatus}
|
|
|
+ isPreviewPay={true}
|
|
|
+ thirdInfoList={this.state.thirdInfoList}
|
|
|
+ dataSource={this.state.payNodeList}
|
|
|
+ outsourceRemarks={this.state.outsourceRemarks}
|
|
|
+ fileList={this.state.pictureUrl}
|
|
|
+ startType={this.state.startType}
|
|
|
+ projectStatus={this.state.projectStatus}
|
|
|
+ onRefresh={()=>{
|
|
|
+ this.waiDetail();
|
|
|
+ this.thirdTable(this.state.tid);
|
|
|
+ this.payNodeTable(this.state.tid)
|
|
|
+ this.loadData(this.state.page)
|
|
|
+ }}
|
|
|
+ />
|
|
|
</TabPane>
|
|
|
{!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
|
|
|
<TabPane tab="订单详情" key="3">
|