|
@@ -70,6 +70,7 @@ const PaiDan = React.createClass({
|
|
|
orderNo: this.state.orderNoSearch, //订单编号
|
|
|
starTime: this.state.releaseDate[0], //开始时间
|
|
|
endTime: this.state.releaseDate[1], //结束时间
|
|
|
+ tag: this.state.tag, // 标签
|
|
|
outsource: 0
|
|
|
},
|
|
|
success: function (data) {
|
|
@@ -99,6 +100,7 @@ const PaiDan = React.createClass({
|
|
|
createDate: thisdata.createDate, //下单时间
|
|
|
settlementAmount: thisdata.settlementAmount, //已交款项
|
|
|
depName: thisdata.depName, //部门名称
|
|
|
+ tag: thisdata.tag, // 标签
|
|
|
ischange: thisdata.ischange //是否通过变更生成的
|
|
|
});
|
|
|
}
|
|
@@ -125,6 +127,7 @@ const PaiDan = React.createClass({
|
|
|
},
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ orderNo: [], //
|
|
|
distribution: "0",
|
|
|
activeKey: "1",
|
|
|
customerArr: [],
|
|
@@ -161,16 +164,16 @@ const PaiDan = React.createClass({
|
|
|
dataIndex: "orderNo",
|
|
|
key: "orderNo",
|
|
|
render: (text, record) => {
|
|
|
- if (record.ischange == 1) {
|
|
|
- return (
|
|
|
- <span>
|
|
|
- <Tag color="#f50">变更</Tag>
|
|
|
- {text}
|
|
|
- </span>
|
|
|
- );
|
|
|
- } else {
|
|
|
- return <span>{text}</span>;
|
|
|
- }
|
|
|
+ return <div>
|
|
|
+ {record.ischange == 1 && <Tag color="#f50">变更</Tag>}
|
|
|
+ {text}
|
|
|
+ {record.tag == 1
|
|
|
+ ? <Tag color="#169BD5">待处理</Tag> : record.tag == 2
|
|
|
+ ? <Tag color="#008000">待派单</Tag> : record.tag == 3
|
|
|
+ ? <Tag color="#CC9999">暂不处理</Tag> : record.tag == 4
|
|
|
+ ? <Tag color="#666666">已过期</Tag> : record.tag == 5
|
|
|
+ ? <Tag color="#996600">已作废</Tag> : null}
|
|
|
+ </div>;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -890,12 +893,14 @@ const PaiDan = React.createClass({
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
+
|
|
|
closeDesc(e, s) {
|
|
|
this.state.showDesc = e;
|
|
|
if (s) {
|
|
|
this.loadData(this.state.page);
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
closeAssign(e, s) {
|
|
|
this.state.assignVisible = e;
|
|
|
if (s) {
|
|
@@ -905,19 +910,24 @@ const PaiDan = React.createClass({
|
|
|
this.jiedian(this.state.orderNo);
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
search() {
|
|
|
this.loadData();
|
|
|
},
|
|
|
+
|
|
|
reset() {
|
|
|
this.state.nameSearch = "";
|
|
|
this.state.customerName = "";
|
|
|
this.state.releaseDate = [];
|
|
|
this.state.orderNoSearch = "";
|
|
|
this.state.departmenttSearch = undefined;
|
|
|
+ this.state.tag = undefined;
|
|
|
+ this.state.orderNo = [];
|
|
|
this.state.distribution = "0";
|
|
|
this.Cascaders.empty();
|
|
|
this.loadData(this.state.page);
|
|
|
},
|
|
|
+
|
|
|
nextCancel() {
|
|
|
this.setState({
|
|
|
infoVisible: false,
|
|
@@ -927,6 +937,7 @@ const PaiDan = React.createClass({
|
|
|
this.xiangmu(this.state.orderNo);
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
//点击打卡项目详情
|
|
|
tableRowClickX(record) {
|
|
|
this.setState({
|
|
@@ -934,11 +945,13 @@ const PaiDan = React.createClass({
|
|
|
dataInfor: record,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
searchSwitch() {
|
|
|
this.setState({
|
|
|
searchMore: !this.state.searchMore
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
//关闭详情
|
|
|
visitCancel() {
|
|
|
this.setState({
|
|
@@ -946,12 +959,14 @@ const PaiDan = React.createClass({
|
|
|
});
|
|
|
this.loadData(this.state.page);
|
|
|
},
|
|
|
+
|
|
|
visitOk() {
|
|
|
this.setState({
|
|
|
visible: false
|
|
|
});
|
|
|
this.loadData(this.state.page);
|
|
|
},
|
|
|
+
|
|
|
resets() {
|
|
|
this.state.orderNo = "";
|
|
|
this.state.customerName = "";
|
|
@@ -960,6 +975,7 @@ const PaiDan = React.createClass({
|
|
|
this.state.releaseDate[1] = undefined;
|
|
|
this.Cascaders.empty();
|
|
|
},
|
|
|
+
|
|
|
//部门
|
|
|
departmentList() {
|
|
|
this.setState({
|
|
@@ -1000,6 +1016,7 @@ const PaiDan = React.createClass({
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
+
|
|
|
changeList(arr) {
|
|
|
const newArr = [];
|
|
|
this.state.columns.forEach(item => {
|
|
@@ -1013,6 +1030,7 @@ const PaiDan = React.createClass({
|
|
|
changeList: newArr
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
downImg() {
|
|
|
let num = 0;
|
|
|
for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
|
|
@@ -1029,6 +1047,7 @@ const PaiDan = React.createClass({
|
|
|
rotateDeg: 0,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
upImg() {
|
|
|
let num = 0;
|
|
|
for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
|
|
@@ -1045,12 +1064,14 @@ const PaiDan = React.createClass({
|
|
|
rotateDeg: 0,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
rotate() {
|
|
|
let rotateDeg = this.state.rotateDeg + 90;
|
|
|
this.setState({
|
|
|
rotateDeg,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
downImgs() {
|
|
|
let num = 0;
|
|
|
for (let i = 0; i < this.state.replenishUrl.length; i++) {
|
|
@@ -1067,6 +1088,7 @@ const PaiDan = React.createClass({
|
|
|
rotateDeg: 0,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
upImgs() {
|
|
|
let num = 0;
|
|
|
for (let i = 0; i < this.state.replenishUrl.length; i++) {
|
|
@@ -1083,15 +1105,18 @@ const PaiDan = React.createClass({
|
|
|
rotateDeg: 0,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
rotates() {
|
|
|
let rotateDeg = this.state.rotateDeg + 90;
|
|
|
this.setState({
|
|
|
rotateDeg,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
getOrgCodeUrl(e) {
|
|
|
this.setState({ orgCodeUrl: e });
|
|
|
},
|
|
|
+
|
|
|
getReplenishUrl(e) {
|
|
|
this.setState({ replenishUrl: e });
|
|
|
},
|
|
@@ -1107,6 +1132,38 @@ const PaiDan = React.createClass({
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ setTag(tag) {
|
|
|
+ if (this.state.orderNo.length == 0) {
|
|
|
+ message.warning("请先勾选项目");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/newOrder/updateTag",
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.orderNo.toString(),
|
|
|
+ tag,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.error.length || data.data == "") {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ message.success("标注成功~")
|
|
|
+ this.loadData(this.state.page)
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
|
|
|
render() {
|
|
|
const expandedRowRenderVip = (e) => {
|
|
@@ -1228,11 +1285,10 @@ const PaiDan = React.createClass({
|
|
|
}
|
|
|
};
|
|
|
const rowSelection = {
|
|
|
- selectedRowKeys: this.state.selectedRowKeys,
|
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
|
+ let list = selectedRows.map(item => { return item.orderNo })
|
|
|
this.setState({
|
|
|
- selectedRows: selectedRows.slice(-1),
|
|
|
- selectedRowKeys: selectedRowKeys.slice(-1)
|
|
|
+ orderNo: list,
|
|
|
});
|
|
|
}
|
|
|
};
|
|
@@ -1323,6 +1379,21 @@ const PaiDan = React.createClass({
|
|
|
<Option value="2">部分分配</Option>
|
|
|
<Option value="3">全部分配</Option>
|
|
|
</Select>
|
|
|
+ <Select
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ tag: e });
|
|
|
+ }}
|
|
|
+ style={{ width: 160, marginRight: 5 }}
|
|
|
+ placeholder="标签"
|
|
|
+ value={this.state.tag}
|
|
|
+ >
|
|
|
+ <Option value="0">默认</Option>
|
|
|
+ <Option value="1">待处理</Option>
|
|
|
+ <Option value="2">待派单</Option>
|
|
|
+ <Option value="3">暂不处理</Option>
|
|
|
+ <Option value="4">已过期</Option>
|
|
|
+ <Option value="5">已作废</Option>
|
|
|
+ </Select>
|
|
|
<Button type="primary" onClick={this.search}>
|
|
|
搜索
|
|
|
</Button>
|
|
@@ -1355,7 +1426,18 @@ const PaiDan = React.createClass({
|
|
|
</div>
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
- <TabPane tab="更改表格显示数据" key="2">
|
|
|
+ <TabPane tab="操作" key="2">
|
|
|
+ <div style={{ padding: "10px 0 0 10px" }}>
|
|
|
+ <Tag color="black" onClick={() => this.setTag(0)}>默认</Tag>
|
|
|
+ <Tag color="#666666" onClick={() => this.setTag(4)}>已过期</Tag>
|
|
|
+ <Tag color="#996600" onClick={() => this.setTag(5)}>已作废</Tag>
|
|
|
+ <Tag color="#169BD5" onClick={() => this.setTag(1)}>待处理</Tag>
|
|
|
+ <Tag color="#008000" onClick={() => this.setTag(2)}>待派单</Tag>
|
|
|
+ <Tag color="#CC9999" onClick={() => this.setTag(3)}>暂不处理</Tag>
|
|
|
+ <span style={{ color: "#169BD5" }}>注:先选项目,再点标签</span>
|
|
|
+ </div>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane tab="更改表格显示数据" key="3">
|
|
|
<div style={{ marginLeft: 10 }}>
|
|
|
<ChooseList
|
|
|
columns={this.state.columns}
|
|
@@ -1380,6 +1462,7 @@ const PaiDan = React.createClass({
|
|
|
}}
|
|
|
dataSource={this.state.dataSource}
|
|
|
pagination={this.state.pagination}
|
|
|
+ rowSelection={rowSelection}
|
|
|
onRowClick={this.tableRowClick.bind(this)}
|
|
|
bordered
|
|
|
size="small"
|
|
@@ -1469,7 +1552,7 @@ const PaiDan = React.createClass({
|
|
|
>
|
|
|
<span>{getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}</span>
|
|
|
<FlowChart
|
|
|
- orderNo={this.state.orderNo}
|
|
|
+ orderNo={this.state.orderNos}
|
|
|
/>
|
|
|
</FormItem>
|
|
|
<FormItem
|