再来一单快捷发货改造
This commit is contained in:
parent
66cc63d791
commit
f983571bbb
10
.idea/deploymentTargetDropDown.xml
Normal file
10
.idea/deploymentTargetDropDown.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -5,7 +5,7 @@
|
|||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="1.8" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
6
.idea/kotlinc.xml
Normal file
6
.idea/kotlinc.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.6.10" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.idea/migrations.xml
Normal file
10
.idea/migrations.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -11,11 +11,14 @@ import android.widget.TextView
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import com.dahe.mylibrary.base.BaseActivity
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
|
import com.dahe.mylibrary.utils.TimeConstants
|
||||||
import com.dahe.mylibrary.utils.TimeUtil
|
import com.dahe.mylibrary.utils.TimeUtil
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.DatePicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.DatimePicker
|
import com.github.gzuliyujiang.wheelpicker.DatimePicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.OptionPicker
|
import com.github.gzuliyujiang.wheelpicker.OptionPicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode
|
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.TimeMode
|
import com.github.gzuliyujiang.wheelpicker.annotation.TimeMode
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity
|
||||||
import com.github.gzuliyujiang.wheelpicker.entity.DatimeEntity
|
import com.github.gzuliyujiang.wheelpicker.entity.DatimeEntity
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.lxj.xpopup.XPopup
|
import com.lxj.xpopup.XPopup
|
||||||
@ -274,21 +277,60 @@ class AnotherOrderActivity : BaseActivity() {
|
|||||||
startActivity(`in`)
|
startActivity(`in`)
|
||||||
}
|
}
|
||||||
tvStartTime.setOnClickListener(View.OnClickListener { V: View? ->
|
tvStartTime.setOnClickListener(View.OnClickListener { V: View? ->
|
||||||
val ap = DatimePicker(this)
|
// val ap = DatimePicker(this)
|
||||||
|
// val wheelLayout = ap.wheelLayout
|
||||||
|
// ap.setOnDatimePickedListener { year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int ->
|
||||||
|
// val text =
|
||||||
|
// year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(
|
||||||
|
// minute)
|
||||||
|
// oib.sendTableData.get(0).setLoadingDeadline(text)
|
||||||
|
// tvStartTime.setText(text)
|
||||||
|
// }
|
||||||
|
// wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||||
|
// wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND)
|
||||||
|
// wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10))
|
||||||
|
// wheelLayout.setDateLabel("年", "月", "日")
|
||||||
|
// wheelLayout.setTimeLabel("时", "分", "")
|
||||||
|
// ap.show()
|
||||||
|
|
||||||
|
val ap = DatePicker(this)
|
||||||
val wheelLayout = ap.wheelLayout
|
val wheelLayout = ap.wheelLayout
|
||||||
ap.setOnDatimePickedListener { year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int ->
|
ap.setOnDatePickedListener { year: Int, month: Int, day: Int ->
|
||||||
val text =
|
val text =
|
||||||
year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(
|
year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(23) + ":" + getRead(
|
||||||
minute)
|
59
|
||||||
oib.sendTableData.get(0).setLoadingDeadline(text)
|
)
|
||||||
tvStartTime.setText(text)
|
oib.sendTableData[0].loadingDeadline = text
|
||||||
|
tvStartTime.text = text
|
||||||
|
|
||||||
|
//卸货截止日期
|
||||||
|
val endDate = TimeUtil.getString(
|
||||||
|
text,
|
||||||
|
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||||
|
14400,
|
||||||
|
TimeConstants.MIN
|
||||||
|
)
|
||||||
|
oib.putTableData[0].loadingDeadline = endDate
|
||||||
|
tvEndTimeDis.text = endDate
|
||||||
|
|
||||||
|
//订单有效期根据装货截止时间延长15天
|
||||||
|
// }
|
||||||
|
|
||||||
|
//订单有效期根据装货截止时间延长15天
|
||||||
|
val waybillEndDate = TimeUtil.getString(
|
||||||
|
text,
|
||||||
|
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||||
|
21600,
|
||||||
|
TimeConstants.MIN
|
||||||
|
)
|
||||||
|
effectiveTime.text = waybillEndDate
|
||||||
|
oib.formData.effectiveTime = waybillEndDate
|
||||||
}
|
}
|
||||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||||
wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND)
|
wheelLayout.setRange(DateEntity.today(), DateEntity.yearOnFuture(10))
|
||||||
wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10))
|
|
||||||
wheelLayout.setDateLabel("年", "月", "日")
|
wheelLayout.setDateLabel("年", "月", "日")
|
||||||
wheelLayout.setTimeLabel("时", "分", "")
|
|
||||||
ap.show()
|
ap.show()
|
||||||
|
|
||||||
})
|
})
|
||||||
ryPretend.addItemDecoration(RecyclerViewDecoration(this,
|
ryPretend.addItemDecoration(RecyclerViewDecoration(this,
|
||||||
RecyclerViewDecoration.VERTICAL_LIST))
|
RecyclerViewDecoration.VERTICAL_LIST))
|
||||||
@ -343,10 +385,10 @@ class AnotherOrderActivity : BaseActivity() {
|
|||||||
r3.setOnClickListener {
|
r3.setOnClickListener {
|
||||||
if (isLogin()) {
|
if (isLogin()) {
|
||||||
etMoney.clearFocus()
|
etMoney.clearFocus()
|
||||||
val ctb = TypeParts.getCarTypeLong(this)
|
val ctb = TypeParts.getCarTypeShort(this)
|
||||||
val data: MutableList<OptionBaseBean?> = java.util.ArrayList()
|
val data: MutableList<OptionBaseBean?> = ArrayList()
|
||||||
for (typeDTO in ctb.data.type) {
|
for (typeDTO in ctb.data) {
|
||||||
data.add(OptionBaseBean(typeDTO.value, typeDTO.name))
|
data.add(OptionBaseBean(typeDTO.value, typeDTO.label))
|
||||||
}
|
}
|
||||||
val picker = OptionPicker(this)
|
val picker = OptionPicker(this)
|
||||||
picker.setBodyWidth(140)
|
picker.setBodyWidth(140)
|
||||||
@ -406,10 +448,11 @@ class AnotherOrderActivity : BaseActivity() {
|
|||||||
r7.setOnClickListener {
|
r7.setOnClickListener {
|
||||||
if (isLogin()) {
|
if (isLogin()) {
|
||||||
etMoney.clearFocus()
|
etMoney.clearFocus()
|
||||||
val al = TypeParts.getNpType(this)
|
|
||||||
val data: MutableList<OptionBaseBean?> = java.util.ArrayList()
|
val ctb = TypeParts.getGoodsTypeShort(this)
|
||||||
for (datum in al.data) {
|
val data: MutableList<OptionBaseBean?> = ArrayList()
|
||||||
data.add(OptionBaseBean(datum.id, datum.cateName))
|
for (typeDTO in ctb.data) {
|
||||||
|
data.add(OptionBaseBean(typeDTO.id, typeDTO.cateName))
|
||||||
}
|
}
|
||||||
val picker = OptionPicker(this)
|
val picker = OptionPicker(this)
|
||||||
picker.setBodyWidth(140)
|
picker.setBodyWidth(140)
|
||||||
@ -500,33 +543,30 @@ class AnotherOrderActivity : BaseActivity() {
|
|||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TimeUtil.compareDate(tvEndTimeDis.text.toString(),
|
// if (!TimeUtil.compareDate(tvEndTimeDis.text.toString(),
|
||||||
TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
// TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||||
Locale.getDefault())),
|
// Locale.getDefault())),
|
||||||
SimpleDateFormat("yyyy-MM-dd HH:mm",
|
// SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||||
Locale.getDefault()))
|
// Locale.getDefault()))
|
||||||
) {
|
// ) {
|
||||||
showToast("卸货截止时间不能小于当前时间")
|
// showToast("卸货截止时间不能小于当前时间")
|
||||||
return@setOnClickListener
|
// return@setOnClickListener
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!TimeUtil.compareDate(effectiveTime.text.toString(),
|
// if (!TimeUtil.compareDate(effectiveTime.text.toString(),
|
||||||
TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
// TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||||
Locale.getDefault())),
|
// Locale.getDefault())),
|
||||||
SimpleDateFormat("yyyy-MM-dd HH:mm",
|
// SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||||
Locale.getDefault()))
|
// Locale.getDefault()))
|
||||||
) {
|
// ) {
|
||||||
showToast("订单有效期不能小于当前时间")
|
// showToast("订单有效期不能小于当前时间")
|
||||||
return@setOnClickListener
|
// return@setOnClickListener
|
||||||
}
|
// }
|
||||||
if (etMoney.text.toString().isEmpty()) {
|
if (etMoney.text.toString().isEmpty()) {
|
||||||
showToast("请输入运费信息")
|
showToast("请输入运费信息")
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (oib.sendTableData[0].goods.size > 0 && oib.putTableData[0].goods.size > 0 && !TextUtils.isEmpty(
|
if (oib.sendTableData[0].goods.size > 0 && oib.putTableData[0].goods.size > 0 && !TextUtils.isEmpty(
|
||||||
oib.formData.shipperCarId)
|
oib.formData.shipperCarId)
|
||||||
) {
|
) {
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="@dimen/dp_24"
|
android:layout_marginLeft="@dimen/dp_24"
|
||||||
android:text="货物大类(交通厅)"
|
android:text="货物大类"
|
||||||
android:textColor="#ff999999"
|
android:textColor="#ff999999"
|
||||||
android:textSize="@dimen/sp_14" />
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
@ -281,11 +281,13 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_1"
|
android:layout_height="@dimen/dp_1"
|
||||||
android:background="#8AA5E1"
|
android:background="#8AA5E1"
|
||||||
android:alpha="0.5"/>
|
android:alpha="0.5"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/r8"
|
android:id="@+id/r8"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -328,11 +330,13 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_1"
|
android:layout_height="@dimen/dp_1"
|
||||||
android:background="#8AA5E1"
|
android:background="#8AA5E1"
|
||||||
android:alpha="0.5"/>
|
android:alpha="0.5"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/r5"
|
android:id="@+id/r5"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user