@@ -538,38 +558,43 @@ layout("/layouts/platform.html"){
-
+
-
+
-
+
-
-
+
+
@@ -591,23 +616,23 @@ layout("/layouts/platform.html"){
@@ -694,12 +719,12 @@ layout("/layouts/platform.html"){
isChoose: 0
},
tableColumns: commonColumns.concat([
- { prop: "isChoose", label: "是否选择", width: "100px", sortable: true },
- { prop: "gist_list", label: "所选福利"},
+ {prop: "isChoose", label: "是否选择", width: "100px", sortable: true},
+ {prop: "gist_list", label: "所选福利"},
// { prop: "receiveAddress", label: "取货门店"},
- { prop: "userSign", label: "签字", width: "100px", checked: 0 },
- { prop: "isAudit", label: "是否核对" },
- { prop: "auditTime", label: "核对时间", checked: 0 }
+ {prop: "userSign", label: "签字", width: "100px", checked: 0},
+ {prop: "isAudit", label: "是否核对"},
+ {prop: "auditTime", label: "核对时间", checked: 0}
]),
formRules: {},
welfare,
@@ -808,7 +833,7 @@ layout("/layouts/platform.html"){
return
}
const msg = flag ? "您确定名单都已核实,准确无误,提交后无法撤回,是否确认提交?" : "您是否要取消核对名单?"
- const confirm = await this.$confirm(msg , "提示", {
+ const confirm = await this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
@@ -923,7 +948,7 @@ layout("/layouts/platform.html"){
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
},
async selectUserAddress() {
- const resp = await $.get("/platform/welfare/addressManage/selectUserAddress", { userId: this.editWelfareData.userId })
+ const resp = await $.get("/platform/welfare/addressManage/selectUserAddress", {userId: this.editWelfareData.userId})
resp.data.map((r) => {
let defaultName = r.isDefault ? "默认地址" : ""
r.defaultName = defaultName
@@ -975,7 +1000,7 @@ layout("/layouts/platform.html"){
})
},
handlePlusButtonClick(value, option, optionIndex) {
- const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
+ const {isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection} = this.projectInfo
if (isCheckBox === "checkBox") {
//判断是否支持单个多选
if (!singleOptionSupportMultipleSelection && value > 1) {
@@ -994,7 +1019,8 @@ layout("/layouts/platform.html"){
}
},
async openEditWelfare(row) {
- await this.getUserSelection(row.id)
+ const rowData = clone(row)
+ await this.getUserSelection(rowData.id)
this.welfareOptions.forEach((option) => {
if (option.shoppingId) {
const shopping = this.shoppingTypeOptions.find((s) => s.id === option.shoppingId)
@@ -1009,17 +1035,18 @@ layout("/layouts/platform.html"){
})
this.exportWelfareListDialog = true
- const data = await searchUser(row.loginname, null, null, null, null)
+ const data = await searchUser(rowData.loginname, null, null, null, null)
this.editWelfareData = {
mobile: data.length !== 0 ? data[0].mobile : "",
- username: row.username,
- loginname: row.loginname,
- receiveAddress: row.receiveAddress,
+ username: rowData.username,
+ loginname: rowData.loginname,
+ receiveAddress: rowData.receiveAddress,
projectId: this.pageForm.projectId,
- userId: row.id
+ userId: rowData.id
}
+ this.$set(this.formData, "addressId", null)
- const { v } = this.projectSelectOptions.find((p) => p.value === this.pageForm.projectId)
+ const {v} = this.projectSelectOptions.find((p) => p.value === this.pageForm.projectId)
this.projectInfo = v
await this.selectUserAddress()
this.optionIdsChange()
@@ -1150,7 +1177,7 @@ layout("/layouts/platform.html"){
doExportWelfare,
doExportWelfareReceive,
async doEditWelfareUnit(row) {
- const { listId, modifiedWelfareUnitId } = row
+ const {listId, modifiedWelfareUnitId} = row
this.$set(row, "editWelfareUnitLoading", true)
const resp = await $.post(loc() + "/editWelfareUnit", {
listId,
@@ -1200,7 +1227,7 @@ layout("/layouts/platform.html"){
callback: async (a, b) => {
if ("confirm" == a) {
//确认后再执行
- const resp = await $.post(loc() + "/delete", { id: JSON.stringify([row.listId]) })
+ const resp = await $.post(loc() + "/delete", {id: JSON.stringify([row.listId])})
if (resp.code === 0) {
this.pageData()
} else {
@@ -1211,7 +1238,7 @@ layout("/layouts/platform.html"){
})
},
dropdownCommand(command) {
- const { type, data } = command
+ const {type, data} = command
if (type == "view") {
this.openView(data)
} else if (type == "edit") {
@@ -1223,11 +1250,11 @@ layout("/layouts/platform.html"){
this.$set(data, "editWelfareUnit", true)
}
},
- openEdit({ id }) {
+ openEdit({id}) {
this.userId = id
this.$refs.guava.edit()
},
- openView({ id }) {
+ openView({id}) {
this.userId = id
this.$refs.guava.view()
},
@@ -1258,7 +1285,7 @@ layout("/layouts/platform.html"){
this.userSelection = resp.data
},
async getWelfareOptions() {
- const resp = await $.post(loc() + "/welfareOptions", { projectId: this.pageForm.projectId })
+ const resp = await $.post(loc() + "/welfareOptions", {projectId: this.pageForm.projectId})
resp.data.map((v) => {
const selection = this.userSelection.find((u) => u.selectOptionId === v.id)
if (selection && selection.selectNum) {