|
|
@@ -127,10 +127,7 @@ class PublicContent extends Component {
|
|
|
let rangeEndMinuteVal = dayjs(this.props.dtails.releaseEnds).format("YYYY-MM-DD HH:mm:ss")
|
|
|
let assistTypeName = ''
|
|
|
let assistContentTypeName = ''
|
|
|
- if ([5, 6].indexOf(this.props.dtails.type) > -1) {
|
|
|
- rangeStartMinuteVal = dayjs(this.props.dtails.releaseStarts).format("YYYY-MM-DD")
|
|
|
- rangeEndMinuteVal = dayjs(this.props.dtails.releaseEnds).format("YYYY-MM-DD")
|
|
|
-
|
|
|
+ if ([5, 6].indexOf(this.props.dtails.type) > -1 || this.props.dtails.type == 0 && list.length) {
|
|
|
const assistType = this.props.dtails.assistType || ''
|
|
|
const assistContentType = this.props.dtails.assistContentType || ''
|
|
|
|
|
|
@@ -281,6 +278,11 @@ class PublicContent extends Component {
|
|
|
assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
|
|
|
assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
|
|
|
};
|
|
|
+ if (this.state.cList.length) {
|
|
|
+ datas.assistType = this.state.assistType
|
|
|
+ datas.assistContentType = this.state.assistContentType
|
|
|
+ datas.assistContent = this.state.assistContent
|
|
|
+ }
|
|
|
} else if (this.props.dtails.type == 2) {
|
|
|
datas = {
|
|
|
id: this.props.dtails.id,
|
|
|
@@ -844,7 +846,7 @@ class PublicContent extends Component {
|
|
|
<timePicker
|
|
|
config={{
|
|
|
endDate: true,
|
|
|
- column: dtails.type == 5 ? "day" : "minute",
|
|
|
+ column: [5, 6].indexOf(dtails.type) > -1 ? "day" : "minute",
|
|
|
dateLimit: false,
|
|
|
initStartTime: this.state.rangeStartMinuteVal, //默认开始时间
|
|
|
initEndTime: this.state.rangeEndMinuteVal, //默认结束时间
|
|
|
@@ -1056,7 +1058,7 @@ class PublicContent extends Component {
|
|
|
以地图为中心100米范围为可打卡区域,移动红标只需要拖动地图即可
|
|
|
</View>
|
|
|
|
|
|
- { dtails.type == 5 ? (
|
|
|
+ { [5, 6].indexOf(dtails.type) > -1 || (dtails.type == 0 && this.state.cList.length) ? (
|
|
|
<Fragment>
|
|
|
<View className="formItem">
|
|
|
<View className="formName">协单类型:</View>
|
|
|
@@ -1106,7 +1108,7 @@ class PublicContent extends Component {
|
|
|
style={{ display: "block", paddingTop: "15px" }}
|
|
|
>
|
|
|
{/* 公出目标 */}
|
|
|
- {dtails.type != 0 && (<View className="formName">
|
|
|
+ {[1, 2, 5, 6].indexOf(dtails.type) > -1 && (<View className="formName">
|
|
|
<Text>
|
|
|
<Text style={{ color: "red" }}>*</Text>
|
|
|
公出目标:</Text>
|
|
|
@@ -1132,7 +1134,7 @@ class PublicContent extends Component {
|
|
|
</View>
|
|
|
</View>)}
|
|
|
{/* 公出计划 */}
|
|
|
- {(dtails.type != 2 || dtails.type != 0) && (
|
|
|
+ {[1, 5, 6].indexOf(dtails.type) > -1 && (
|
|
|
<View className="formName">
|
|
|
<Text>
|
|
|
<Text style={{ color: "red" }}>*</Text>
|
|
|
@@ -1156,7 +1158,7 @@ class PublicContent extends Component {
|
|
|
</View>
|
|
|
)}
|
|
|
{/* 预计效果 */}
|
|
|
- {(dtails.type != 2 || dtails.type != 0) && (
|
|
|
+ {[1, 5, 6].indexOf(dtails.type) > -1 && (
|
|
|
<View className="formName">
|
|
|
<Text>
|
|
|
<Text style={{ color: "red" }}>*</Text>
|
|
|
@@ -1288,12 +1290,12 @@ class PublicContent extends Component {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if ([5, 6].indexOf(this.props.dtails.type) > -1 && !this.state.assistType) {
|
|
|
+ if (([5, 6].indexOf(this.props.dtails.type) > -1 || (this.props.dtails.type == 0 && this.state.cList.length)) && !this.state.assistType) {
|
|
|
Taro.showToast({ title: "请选择协单类型", icon: "none" });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if ([5, 6].indexOf(this.props.dtails.type) > -1 && !this.state.assistContentType) {
|
|
|
+ if (([5, 6].indexOf(this.props.dtails.type) > -1 || (this.props.dtails.type == 0 && this.state.cList.length)) && !this.state.assistContentType) {
|
|
|
Taro.showToast({ title: "请选择协单内容", icon: "none" });
|
|
|
return;
|
|
|
}
|