|
@@ -21,8 +21,10 @@ import {
|
|
|
Popconfirm,
|
|
|
Switch,
|
|
|
Tabs,
|
|
|
+ Col,
|
|
|
Icon,
|
|
|
Upload,
|
|
|
+ AutoComplete,
|
|
|
Tag
|
|
|
} from "antd";
|
|
|
import Assign from "@/manageCenter/publicComponent/assign";
|
|
@@ -205,11 +207,19 @@ const Task = React.createClass({
|
|
|
},
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ thirdCompanyName: "",
|
|
|
+ thirdUnitPrice: "",
|
|
|
+ thirdQuantity: 1,
|
|
|
+ thirdRemarks: "",
|
|
|
+ customerArr: [],
|
|
|
+ currentTotalPrice: 0, //当前修改页面的总价
|
|
|
+ saveThirdList: [],
|
|
|
orderData: [],
|
|
|
orderNo: "",
|
|
|
jiedian: [],
|
|
|
jiedianNew: [],
|
|
|
timeVisible: false,
|
|
|
+ ThirdListVisible: false,
|
|
|
searchMore: true,
|
|
|
assignVisible: false,
|
|
|
releaseDate: [],
|
|
@@ -607,6 +617,87 @@ const Task = React.createClass({
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
+ // 专利
|
|
|
+ ContactsListsNew: [
|
|
|
+ {
|
|
|
+ title: "供应商名称",
|
|
|
+ dataIndex: "companyName",
|
|
|
+ key: "companyName",
|
|
|
+ render: (text, record, index) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "单价(万元)",
|
|
|
+ dataIndex: "unitPrice",
|
|
|
+ key: "unitPrice",
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "数量",
|
|
|
+ dataIndex: "quantity",
|
|
|
+ key: "quantity",
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "总价",
|
|
|
+ dataIndex: "totalAmount",
|
|
|
+ key: "totalAmount",
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "备注",
|
|
|
+ dataIndex: "remarks",
|
|
|
+ key: "remarks",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ dataIndex: "dels",
|
|
|
+ key: "dels",
|
|
|
+ render: (text, record, index) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Popconfirm
|
|
|
+ title="是否删除?"
|
|
|
+ onConfirm={() => {
|
|
|
+ this.confirmDeletNew(record);
|
|
|
+ }}
|
|
|
+ okText="删除"
|
|
|
+ cancelText="不删除"
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ marginRight: "10px",
|
|
|
+ color: "#ffffff",
|
|
|
+ background: "#f00",
|
|
|
+ border: "none",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </Button>
|
|
|
+ </Popconfirm>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
/* 分派 */
|
|
@@ -673,6 +764,8 @@ const Task = React.createClass({
|
|
|
this.xiangqings(record.orderNo);
|
|
|
this.xiangmu(record.orderNo);
|
|
|
this.loaduserss(record);
|
|
|
+ // 获取第三方信息表格
|
|
|
+ this.thirdTable(record.id);
|
|
|
},
|
|
|
//点击修改项目详情
|
|
|
tijiaoOk() {
|
|
@@ -937,11 +1030,17 @@ const Task = React.createClass({
|
|
|
contractNo: thisdata.contractNo, //合同编号
|
|
|
certificateNumber: thisdata.certificateNumber,
|
|
|
splitStatus: thisdata.splitStatus,
|
|
|
+ officialCost: thisdata.officialCost,
|
|
|
+ costReduction: thisdata.costReduction,
|
|
|
+ type: thisdata.type,
|
|
|
+ cSort: thisdata.cSort,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
this.setState({
|
|
|
dataSourceX: theArr,
|
|
|
+ type: theArr[0].type,
|
|
|
+ cSort: theArr[0].cSort,
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(
|
|
@@ -1048,6 +1147,7 @@ const Task = React.createClass({
|
|
|
}
|
|
|
this.setState({
|
|
|
contactList: theArr,
|
|
|
+ tid: record.id,
|
|
|
});
|
|
|
}
|
|
|
}.bind(this),
|
|
@@ -1213,10 +1313,20 @@ const Task = React.createClass({
|
|
|
nextCancel() {
|
|
|
this.setState({
|
|
|
addnextVisible: false,
|
|
|
+ displayFees: "none",
|
|
|
+ officialCost: "", //是否有官费
|
|
|
+ costReduction: "", //是否有费减
|
|
|
});
|
|
|
},
|
|
|
//点击打卡项目详情
|
|
|
tableRowClickX(record) {
|
|
|
+ if (record.type == "1") {
|
|
|
+ this.setState({
|
|
|
+ displayFees: "block",
|
|
|
+ costReduction: record.costReduction,
|
|
|
+ officialCost: record.officialCost,
|
|
|
+ });
|
|
|
+ }
|
|
|
this.setState({
|
|
|
jid: record.id, //项目ID
|
|
|
kid: record.commodityId, //商品ID
|
|
@@ -1400,21 +1510,25 @@ const Task = React.createClass({
|
|
|
},
|
|
|
// 项目发起外包
|
|
|
sureOut() {
|
|
|
- if (!this.state.companyName) {
|
|
|
- message.warning("公司名称不能为空");
|
|
|
+ if (!this.state.startType) {
|
|
|
+ message.warning("请选择类型");
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.state.unitPrice) {
|
|
|
- message.warning("单价不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!this.state.unitNumber) {
|
|
|
- message.warning("数量不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!this.state.amount) {
|
|
|
- message.warning("总金额不能为空");
|
|
|
- return;
|
|
|
+ if (this.state.type == 1) {//专利
|
|
|
+ if (!this.state.patentType) {
|
|
|
+ message.warning("请选择专利类型");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.state.patentNameType) {
|
|
|
+ message.warning("请选择专利类型名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.state.patentNameType==3) {
|
|
|
+ if (!this.state.patentName) {
|
|
|
+ message.warning("请填写专利名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if (!this.state.outsourceRemarks) {
|
|
|
message.warning("备注不能为空");
|
|
@@ -1510,6 +1624,10 @@ const Task = React.createClass({
|
|
|
});
|
|
|
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,
|
|
@@ -1604,7 +1722,7 @@ const Task = React.createClass({
|
|
|
this.jiedianNew(this.state.orderNo);
|
|
|
}
|
|
|
if (key == 2) {
|
|
|
- this.waiDetail()
|
|
|
+ this.waiDetail();
|
|
|
}
|
|
|
},
|
|
|
//节点列表
|
|
@@ -1746,7 +1864,239 @@ const Task = React.createClass({
|
|
|
}.bind(this),
|
|
|
});
|
|
|
},
|
|
|
+ //点击新增供应商
|
|
|
+ addcontactNew() {
|
|
|
+ this.state.contactListNew.push({
|
|
|
+ key: this.state.contactListNew.length,
|
|
|
+ money: "",
|
|
|
+ dunSubject: undefined,
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
+ dunTarget: this.state.kehuId,
|
|
|
+ });
|
|
|
+ this.setState({
|
|
|
+ contactListNew: this.state.contactListNew,
|
|
|
+ cuiFlag: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查看第三方信息表格
|
|
|
+ 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 theArr = [];
|
|
|
+ let thisData = [];
|
|
|
+ let arr = data.data || [];
|
|
|
+ let allTotalAmount = 0;
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ thisData = arr[i];
|
|
|
+ allTotalAmount += +thisData.totalAmount;
|
|
|
+ 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);
|
|
|
+ this.setState({
|
|
|
+ tid: id,
|
|
|
+ thirdInfoList: theArr,
|
|
|
+ allTotalAmount: allTotalAmount,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 新增第三方供应商信息
|
|
|
+ addThirdList() {
|
|
|
+ this.setState({
|
|
|
+ ThirdListVisible: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 自动计算总金额
|
|
|
+ calculatedAmount() {
|
|
|
+ let currentTotalPrice;
|
|
|
+ currentTotalPrice = this.state.thirdUnitPrice * this.state.thirdQuantity;
|
|
|
+ currentTotalPrice = currentTotalPrice.toFixed(4);
|
|
|
+ this.setState({
|
|
|
+ currentTotalPrice: currentTotalPrice,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //服务值改变时请求供应商名称
|
|
|
+ httpChange(e) {
|
|
|
+ if (e.length >= 1) {
|
|
|
+ this.supervisor(e);
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ thirdCompanyName: e,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //加载(自动补全)
|
|
|
+ supervisor(e) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/company/selectVague",
|
|
|
+ data: { name: e },
|
|
|
+ success: function (data) {
|
|
|
+ let thedata = data.data;
|
|
|
+ if (!thedata) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ thedata = {};
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ customerArr: thedata,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 保存供应商信息
|
|
|
+ handleCancelq() {
|
|
|
+ let api
|
|
|
+ if(this.state.ThirdId){//修改
|
|
|
+ api='/api/admin/company/updateCompany'
|
|
|
+ }else{//新增
|
|
|
+ api='/api/admin/company/addCompany'
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + api,
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ data: {
|
|
|
+ id:this.state.ThirdId,//id
|
|
|
+ tid: this.state.tid, //订单编号
|
|
|
+ companyName: this.state.thirdCompanyName, //第三方名称
|
|
|
+ unitPrice: this.state.thirdUnitPrice, //单价
|
|
|
+ quantity: this.state.thirdQuantity, //数量
|
|
|
+ totalAmount: this.state.currentTotalPrice, //总价
|
|
|
+ remarks: this.state.thirdRemarks,
|
|
|
+ },
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("保存成功!");
|
|
|
+ this.setState({
|
|
|
+ ThirdId:"",
|
|
|
+ ThirdListVisible: false,
|
|
|
+ thirdCompanyName: "", //第三方名称
|
|
|
+ thirdUnitPrice: "", //单价
|
|
|
+ thirdQuantity: "", //数量
|
|
|
+ currentTotalPrice: "", //总价
|
|
|
+ thirdRemarks: "",
|
|
|
+ });
|
|
|
+ // this.visitCancel();
|
|
|
+ this.thirdTable(this.state.tid);
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 取消
|
|
|
+ handleCancelclose() {
|
|
|
+ this.setState({
|
|
|
+ ThirdListVisible: false,
|
|
|
+ thirdCompanyName: "", //第三方名称
|
|
|
+ thirdUnitPrice: "", //单价
|
|
|
+ thirdQuantity: 1, //数量
|
|
|
+ currentTotalPrice: "", //总价
|
|
|
+ thirdRemarks: "",
|
|
|
+ ThirdId:"",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 删除供应商信息
|
|
|
+ confirmDeletNew(index) {
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ ThirdListVisible: false,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/company/deleteCompany",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ id: index.id,
|
|
|
+ },
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("删除成功!");
|
|
|
+ this.thirdTable(this.state.tid);
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //点击供应商详情
|
|
|
+ tableRowClickOne(record) {
|
|
|
+ this.setState({
|
|
|
+ ThirdListVisible: true,
|
|
|
+ ThirdId:record.id,//供应商id
|
|
|
+ thirdCompanyName: record.companyName, //第三方名称
|
|
|
+ thirdUnitPrice: record.unitPrice, //单价
|
|
|
+ thirdQuantity: record.quantity, //数量
|
|
|
+ currentTotalPrice:record.totalAmount, //总价
|
|
|
+ thirdRemarks: record.remarks,
|
|
|
+ });
|
|
|
+ },
|
|
|
render() {
|
|
|
+ const dataSources = this.state.customerArr || [];
|
|
|
+ console.log(dataSources);
|
|
|
+ const options = dataSources.map((group) => (
|
|
|
+ <Select.Option key={group.id} value={group.companyName}>
|
|
|
+ {group.companyName}
|
|
|
+ </Select.Option>
|
|
|
+ ));
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 8 },
|
|
|
wrapperCol: { span: 14 },
|
|
@@ -2818,7 +3168,7 @@ const Task = React.createClass({
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</TabPane>
|
|
|
- <TabPane tab="外包(不走本部)" key="2">
|
|
|
+ <TabPane tab="外包/供应商信息" key="2">
|
|
|
{this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
|
|
|
<div style={{ marginTop: 10 }}>
|
|
|
<div className="clearfix">
|
|
@@ -2828,89 +3178,151 @@ const Task = React.createClass({
|
|
|
label={
|
|
|
<span>
|
|
|
<strong style={{ color: "#f00" }}>*</strong>
|
|
|
- 外包公司
|
|
|
+ 类型:
|
|
|
</span>
|
|
|
}
|
|
|
>
|
|
|
- <Input
|
|
|
- value={this.state.companyName}
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.startType}
|
|
|
onChange={(e) => {
|
|
|
- this.setState({
|
|
|
- companyName: e.target.value,
|
|
|
- });
|
|
|
+ this.setState({ startType: e.target.value });
|
|
|
}}
|
|
|
- placeholder="请填写外包公司名称"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <Radio value={0}>外包(不走总部)</Radio>
|
|
|
+ <Radio value={1}>供应商信息</Radio>
|
|
|
+ </Radio.Group>
|
|
|
</FormItem>
|
|
|
- <span className="tip" style={{ color: "red" }}>
|
|
|
- 如多个公司,请用间隔
|
|
|
- </span>
|
|
|
</div>
|
|
|
- <div className="clearfix">
|
|
|
+ {/* 专利类型 */}
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{
|
|
|
+ display: this.state.type == 1 ? "block" : "none",
|
|
|
+ }}
|
|
|
+ >
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
<strong style={{ color: "#f00" }}>*</strong>
|
|
|
- 单价(万元)
|
|
|
+ 专利类型:
|
|
|
</span>
|
|
|
}
|
|
|
>
|
|
|
- <Input
|
|
|
- value={this.state.unitPrice}
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.patentType}
|
|
|
onChange={(e) => {
|
|
|
- this.setState({
|
|
|
- unitPrice: e.target.value,
|
|
|
- });
|
|
|
+ this.setState({ patentType: e.target.value });
|
|
|
}}
|
|
|
- placeholder="请填写本次外包公司的价格"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <Radio value={0}>专利申请/变更/转让</Radio>
|
|
|
+ <Radio value={1}>专利买卖</Radio>
|
|
|
+ </Radio.Group>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <div className="clearfix">
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{
|
|
|
+ display: this.state.type == 1 ? "block" : "none",
|
|
|
+ }}
|
|
|
+ >
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
<strong style={{ color: "#f00" }}>*</strong>
|
|
|
- 数量(个)
|
|
|
+ 专利名称:
|
|
|
</span>
|
|
|
}
|
|
|
>
|
|
|
- <Input
|
|
|
- value={this.state.unitNumber}
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.patentNameType}
|
|
|
onChange={(e) => {
|
|
|
- this.setState({
|
|
|
- unitNumber: e.target.value,
|
|
|
- });
|
|
|
+ this.setState({ patentNameType: e.target.value });
|
|
|
}}
|
|
|
- placeholder="请填写本次外包公司的价格"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <Radio value={0}>实用新型专利</Radio>
|
|
|
+ <Radio value={1}>发明专利</Radio>
|
|
|
+ <Radio value={2}>外观专利</Radio>
|
|
|
+ <Radio value={3}>
|
|
|
+ 其他
|
|
|
+ <Input
|
|
|
+ value={this.state.patentName}
|
|
|
+ style={{ marginLeft: "15px" }}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({
|
|
|
+ patentName: e.target.value,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ placeholder="请填写专利名称"
|
|
|
+ />
|
|
|
+ </Radio>
|
|
|
+ </Radio.Group>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <div className="clearfix">
|
|
|
- <FormItem
|
|
|
- className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label={
|
|
|
- <span>
|
|
|
- <strong style={{ color: "#f00" }}>*</strong>
|
|
|
- 总金额(万元)
|
|
|
- </span>
|
|
|
- }
|
|
|
+ {/* 第三方信息专利 */}
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ display: this.state.type == 1 ? "block" : "none",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style={{
|
|
|
+ marginLeft: "50px",
|
|
|
+ fontSize: "18px",
|
|
|
+ }}
|
|
|
>
|
|
|
- <Input
|
|
|
- value={this.state.amount}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({
|
|
|
- amount: e.target.value,
|
|
|
- });
|
|
|
- }}
|
|
|
- placeholder="请填写本次外包公司的价格"
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
+ 第三方信息
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ style={{
|
|
|
+ display: "inline-block",
|
|
|
+ marginLeft: 10,
|
|
|
+ color: "red",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 金额总计(万元): {this.state.allTotalAmount}
|
|
|
+ </span>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={(e) => {
|
|
|
+ this.addThirdList();
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ marginRight: "50px",
|
|
|
+ marginBottom: "15px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ +新增供应商名称
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{
|
|
|
+ display: this.state.type == 1 ? "block" : "none",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Form layout="horizontal">
|
|
|
+ <Table
|
|
|
+ pagination={false}
|
|
|
+ columns={this.state.ContactsListsNew}
|
|
|
+ dataSource={this.state.thirdInfoList}
|
|
|
+ onRowClick={this.tableRowClickOne}
|
|
|
+ scroll={{ x: "max-content", y: 0 }}
|
|
|
+ bordered
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ <Col
|
|
|
+ span={24}
|
|
|
+ offset={9}
|
|
|
+ style={{ marginTop: "15px" }}
|
|
|
+ ></Col>
|
|
|
+ </Form>
|
|
|
+ </Spin>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
@@ -3282,6 +3694,26 @@ const Task = React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
+ label="官费"
|
|
|
+ style={{ display: this.state.displayFees }}
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ {this.state.officialCost == 0 ? "无官费" : "有官费"}
|
|
|
+ </span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="费减"
|
|
|
+ style={{ display: this.state.displayFees }}
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ {this.state.costReduction == 0 ? "无费减" : "有费减"}
|
|
|
+ </span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
label="金额(万元)"
|
|
|
>
|
|
|
<span>{this.state.commodityPrice ? "***" : 0}</span>
|
|
@@ -4248,6 +4680,128 @@ const Task = React.createClass({
|
|
|
</p>
|
|
|
</Spin>
|
|
|
</Modal>
|
|
|
+ <Modal
|
|
|
+ visible={this.state.ThirdListVisible}
|
|
|
+ onCancel={this.handleCancelclose}
|
|
|
+ width={800}
|
|
|
+ title="新增供应商"
|
|
|
+ footer=""
|
|
|
+ // width={1300}
|
|
|
+ className="admin-desc-content"
|
|
|
+ >
|
|
|
+ <Form
|
|
|
+ layout="horizontal"
|
|
|
+ // onSubmit={this.handleSubmit1}
|
|
|
+ // id="demand-form"
|
|
|
+ style={{ paddingBottom: "40px" }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix">
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem {...formItemLayout} label="供应商名称">
|
|
|
+ <AutoComplete
|
|
|
+ className="certain-category-search"
|
|
|
+ dropdownClassName="certain-category-search-dropdown"
|
|
|
+ dropdownMatchSelectWidth={false}
|
|
|
+ dropdownStyle={{ width: 220 }}
|
|
|
+ style={{ width: "220px" }}
|
|
|
+ dataSource={options}
|
|
|
+ placeholder="请输入供应商名称"
|
|
|
+ value={this.state.thirdCompanyName}
|
|
|
+ onChange={this.httpChange}
|
|
|
+ filterOption={true}
|
|
|
+ onBlur={this.blurChange}
|
|
|
+ onSelect={this.selectAuto}
|
|
|
+ required="required"
|
|
|
+ ></AutoComplete>
|
|
|
+ <span className="mandatory">*</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem {...formItemLayout} label="单价(万元)">
|
|
|
+ <Input
|
|
|
+ value={this.state.thirdUnitPrice}
|
|
|
+ placeholder="请输入金额(必填项)"
|
|
|
+ required="required"
|
|
|
+ onBlur={this.calculatedAmount}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({
|
|
|
+ thirdUnitPrice: e.target.value,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ style={{ width: "220px" }}
|
|
|
+ />
|
|
|
+ <span className="mandatory">*</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem {...formItemLayout} label="数量">
|
|
|
+ <Input
|
|
|
+ value={this.state.thirdQuantity}
|
|
|
+ placeholder="请输入数量(必填项)"
|
|
|
+ required="required"
|
|
|
+ onBlur={this.calculatedAmount}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({
|
|
|
+ thirdQuantity: e.target.value,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ style={{ width: "220px" }}
|
|
|
+ />
|
|
|
+ <span className="mandatory">*</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem {...formItemLayout} label="总价(万元)">
|
|
|
+ <span>{this.state.currentTotalPrice}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ style={{ height: "auto" }}
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="备注"
|
|
|
+ >
|
|
|
+ <TextArea
|
|
|
+ rows={4}
|
|
|
+ placeholder="请输入备注"
|
|
|
+ ref="signTotalAmount"
|
|
|
+ style={{ width: "95%" }}
|
|
|
+ value={this.state.thirdRemarks}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({
|
|
|
+ thirdRemarks: e.target.value,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <div className="addSave" style={{ marginTop: "15px" }}>
|
|
|
+ <Button
|
|
|
+ className="cancel"
|
|
|
+ type="primary"
|
|
|
+ onClick={this.handleCancelq}
|
|
|
+ style={{ marginLeft: "50px" }}
|
|
|
+ htmlType="submit"
|
|
|
+ >
|
|
|
+ 保存
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ className="cancel"
|
|
|
+ type="ghost"
|
|
|
+ onClick={this.handleCancelclose}
|
|
|
+ style={{ marginLeft: "50px" }}
|
|
|
+ >
|
|
|
+ 取消
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
);
|
|
|
},
|