commit
This commit is contained in:
@@ -24,6 +24,7 @@ import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.welfare.feature.WelfareFeature;
|
||||
import io.v.nutz.zhgh.welfare.mode.CourierNumberExcelMode;
|
||||
import io.v.nutz.zhgh.welfare.mode.WelfareProvideMode;
|
||||
import io.v.nutz.zhgh.welfare.model.*;
|
||||
import io.v.nutz.zhgh.welfare.service.WelfareListService;
|
||||
import io.v.nutz.zhgh.welfare.service.WelfareProjectService;
|
||||
@@ -284,13 +285,19 @@ public class WelfareListController {
|
||||
Cnd.where("welfareId", "=", editData.getString("projectId"))
|
||||
.and("selectUserId", "=", editData.getString("userId")));
|
||||
String finalSign = sign;
|
||||
WelfareProject project = dao.fetch(WelfareProject.class, editData.getString("projectId"));
|
||||
boolean personalProvideMode = project != null && WelfareProvideMode.PERSONAL.getCode().equals(project.getProvideMode());
|
||||
List<WelfareUserSelection> userSelections = optionList.stream().map(v -> {
|
||||
WelfareUserSelection selection = new WelfareUserSelection();
|
||||
selection.setSelectTime(new Date());
|
||||
selection.setWelfareId(editData.getString("projectId"));
|
||||
selection.setSelectUserId(editData.getString("userId"));
|
||||
selection.setSelectOptionId(v.getString("id"));
|
||||
selection.setReceiveAddress(StrUtil.isNotBlank(v.getString("shoppingId")) ? v.getString("receiveAddress") : editData.getString("receiveAddress"));
|
||||
// 邮寄到家保存整单收货地址,其他模式保留供应商门店地址优先逻辑。
|
||||
String receiveAddress = personalProvideMode
|
||||
? editData.getString("receiveAddress")
|
||||
: StrUtil.isNotBlank(v.getString("shoppingId")) ? v.getString("receiveAddress") : editData.getString("receiveAddress");
|
||||
selection.setReceiveAddress(receiveAddress);
|
||||
selection.setSubjectId(v.getString("subjectId"));
|
||||
selection.setSelectNum(v.getInt("selectNum"));
|
||||
selection.setUserSign(finalSign);
|
||||
|
||||
@@ -621,6 +621,31 @@ layout("/layouts/platform.html"){
|
||||
<script>
|
||||
<!--#include("/platform/welfare/include/common.js"){}#-->
|
||||
|
||||
const welfareReceiveAreaList = ["道里区", "南岗区", "道外区", "香坊区", "呼兰区", "松北区", "阿城区", "双城区", "平房区"]
|
||||
|
||||
// 添加收货地址时,地址信息选择范围与用户选择福利页面保持一致。
|
||||
function getWelfareReceiveDzOptions() {
|
||||
const province = chengShiList.find((c) => c.label === "黑龙江省")
|
||||
if (!province) {
|
||||
return []
|
||||
}
|
||||
const city = province.children.find((c) => c.label === "哈尔滨市")
|
||||
if (!city) {
|
||||
return []
|
||||
}
|
||||
return [
|
||||
{
|
||||
...province,
|
||||
children: [
|
||||
{
|
||||
...city,
|
||||
children: city.children.filter((county) => welfareReceiveAreaList.includes(county.label))
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins, minixs],
|
||||
@@ -671,7 +696,7 @@ layout("/layouts/platform.html"){
|
||||
tableColumns: commonColumns.concat([
|
||||
{ prop: "isChoose", label: "是否选择", width: "100px", sortable: true },
|
||||
{ prop: "gist_list", label: "所选福利"},
|
||||
{ prop: "receiveAddress", label: "取货门店"},
|
||||
// { prop: "receiveAddress", label: "取货门店"},
|
||||
{ prop: "userSign", label: "签字", width: "100px", checked: 0 },
|
||||
{ prop: "isAudit", label: "是否核对" },
|
||||
{ prop: "auditTime", label: "核对时间", checked: 0 }
|
||||
@@ -698,7 +723,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
addressOptions: [],
|
||||
addressDialogVisible: false,
|
||||
dzOptions: chengShiList,
|
||||
dzOptions: getWelfareReceiveDzOptions(),
|
||||
|
||||
judgmentAuthority,
|
||||
|
||||
@@ -890,9 +915,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
openAddress() {
|
||||
this.formData = {
|
||||
this.$set(this, "dzOptions", getWelfareReceiveDzOptions())
|
||||
this.$set(this, "formData", {
|
||||
userId: this.editWelfareData.userId
|
||||
}
|
||||
})
|
||||
this.addressDialogVisible = true
|
||||
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user