feat(updateAddress): 修改地址移除审核相关逻辑及字段

This commit is contained in:
woody 2025-05-26 11:35:11 +08:00
parent c8ebad167f
commit 754e739e8a
2 changed files with 132 additions and 388 deletions

View File

@ -3535,7 +3535,7 @@ export const constantRoutes = [
path: 'addressZxqc',
name: 'AddressZxqc',
component: () => import('@/views/selfService/updateAdress/addressZxqc'),
meta: { title: i18n.t('MN_F_T_205') }
meta: { title: '自提清单' }
},
{
path: 'inventory',

View File

@ -2,35 +2,35 @@
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="thetopbox">
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item :label="'订单编号'">
<el-input clearable v-model="queryParams.orderCode"></el-input>
<el-input v-model="queryParams.orderCode" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'会员编号'">
<el-input clearable v-model="queryParams.memberCode"></el-input>
<el-input v-model="queryParams.memberCode" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'会员姓名'">
<el-input clearable v-model="queryParams.memberName"></el-input>
<el-input v-model="queryParams.memberName" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'收货人'">
<el-input clearable v-model="queryParams.recName"></el-input>
<el-input v-model="queryParams.recName" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'联系方式'">
<el-input clearable v-model="queryParams.recPhone"></el-input>
<el-input v-model="queryParams.recPhone" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
@ -68,18 +68,18 @@
<el-col :span="8">
<el-form-item class="dizhi" :label="'详细地址'" prop="">
<el-cascader
v-model="queryParams.shoppingAddress"
style="width: 100%"
clearable
v-model="queryParams.shoppingAddress"
:options="areaData"
:props="regionParams"
@change="handleChange1"
></el-cascader>
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" label-width="40px">
<el-input clearable v-model="queryParams.recAddress"></el-input>
<el-input v-model="queryParams.recAddress" clearable />
</el-form-item>
</el-col>
</el-row>
@ -87,15 +87,14 @@
<el-col :span="8">
<el-form-item :label="'申请日期'">
<el-date-picker
@change="checkTime"
v-model="thetimes"
type="daterange"
range-separator="——"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
value-format="yyyy-MM-dd"
>
</el-date-picker>
@change="checkTime"
/>
</el-form-item>
</el-col>
@ -109,149 +108,65 @@
</el-form>
</div>
<div class="main">
<div class="maintop">
<div class="mainbtn">
<el-button
size="mini"
style="background: #009b58"
class="addBtn"
v-hasButtons="['addressYse']"
@click="agree()"
>{{ '同意' }}</el-button
>
<el-button
size="mini"
style="background: #c8161d; color: #fff; border: none"
class="addBtn"
v-hasButtons="['addressNo']"
@click="rejects()"
>{{ '驳回' }}</el-button
>
</div>
</div>
<div class="maintable">
<el-table
ref="multipleTable"
:data="tableData"
v-loading="loading"
:data="tableData"
height="640px"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="orderCode"
:label="'订单编号'"
width="180"
>
</el-table-column>
<el-table-column align="center" prop="orderTypeVal" :label="'订单类型'">
</el-table-column>
width="190"
/>
<el-table-column align="center" prop="orderTypeVal" :label="'订单类型'" />
<el-table-column
align="center"
prop="orderStatusVal"
:label="'订单状态'"
>
</el-table-column>
<el-table-column align="center" width="200"
prop="memberCode" :label="'会员编号'">
</el-table-column>
<el-table-column align="center" prop="memberName" :label="'会员姓名'">
</el-table-column>
<el-table-column min-width="120px" align="center" prop="recName" :label="'变更前收货人'">
</el-table-column>
<el-table-column width="180px" align="center" prop="recPhone" :label="'变更前联系方式'">
</el-table-column>
<el-table-column align="center" prop="recProvinceVal" :label="'变更前省'">
</el-table-column>
<el-table-column align="center" prop="recCityVal" :label="'变更前市'">
</el-table-column>
<el-table-column min-width="120px" align="center" prop="recCountyVal" :label="'变更前区/县'">
</el-table-column>
/>
<el-table-column
align="center"
width="200"
prop="memberCode"
:label="'会员编号'"
/>
<el-table-column align="center" prop="memberName" :label="'会员姓名'" />
<el-table-column min-width="120px" align="center" prop="recName" :label="'变更前收货人'" />
<el-table-column width="180px" align="center" prop="recPhone" :label="'变更前联系方式'" />
<el-table-column align="center" prop="recProvinceVal" :label="'变更前省'" />
<el-table-column align="center" prop="recCityVal" :label="'变更前市'" />
<el-table-column min-width="120px" align="center" prop="recCountyVal" :label="'变更前区/县'" />
<el-table-column
align="center"
min-width="150px"
prop="recAddress"
:label="'变更前详细地址'"
>
</el-table-column>
<el-table-column min-width="120px" align="center" prop="newRecName" :label="'变更后收货人'">
</el-table-column>
<el-table-column width="180px" align="center" prop="newRecPhone" :label="'变更后联系方式'">
</el-table-column>
<el-table-column align="center" prop="newRecProvinceVal" :label="'变更后省'">
</el-table-column>
<el-table-column align="center" prop="newRecCityVal" :label="'变更后市'">
</el-table-column>
<el-table-column min-width="120px" align="center" prop="newRecCountyVal" :label="'变更后区/县'">
</el-table-column>
/>
<el-table-column min-width="120px" align="center" prop="newRecName" :label="'变更后收货人'" />
<el-table-column width="180px" align="center" prop="newRecPhone" :label="'变更后联系方式'" />
<el-table-column align="center" prop="newRecProvinceVal" :label="'变更后省'" />
<el-table-column align="center" prop="newRecCityVal" :label="'变更后市'" />
<el-table-column min-width="120px" align="center" prop="newRecCountyVal" :label="'变更后区/县'" />
<el-table-column
align="center"
min-width="150px"
prop="newRecAddress"
:label="'变更后详细地址'"
>
</el-table-column>
<el-table-column align="center" prop="" :label="'备注'">
</el-table-column>
<el-table-column align="center"
/>
<el-table-column align="center" prop="" :label="'备注'" />
<el-table-column
align="center"
width="200"
prop="creationTime" :label="'申请日期'">
</el-table-column>
<el-table-column
align="center"
prop="approveStatusVal"
:end-placeholder="'审核状态'"
:label="'审核状态'"
>
<template slot-scope="scope">
<div v-if="scope.row.approveStatus == 3">
<el-popover placement="right"
width="400"
trigger="hover">
<div v-html="scope.row.rejectMsg"></div>
<div style="cursor: pointer;" slot="reference">{{ scope.row.approveStatusVal }}</div>
</el-popover>
</div>
<div v-else>{{ scope.row.approveStatusVal }}</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="time"
:label="'操作'"
fixed="right"
>
<template slot-scope="scope">
<el-button
v-if="scope.row.approveStatus == 0"
class="button-s"
type="text"
style="color: #009b58"
size="small"
v-hasButtons="['addressYse']"
@click="agree(scope.row)"
>
{{ '同意' }}
</el-button>
<el-button
v-if="scope.row.approveStatus == 0"
class="button-s"
type="text"
size="small"
v-hasButtons="['addressNo']"
style="color: #c8161d"
@click="rejects(scope.row)"
>
{{ '驳回' }}
</el-button>
</template>
</el-table-column>
prop="creationTime"
:label="'申请日期'"
/>
</el-table>
</div>
</div>
@ -262,40 +177,20 @@
:limit.sync="queryParams.pageSize"
@pagination="getSearch"
/>
<el-dialog
title="驳回意见"
:visible.sync="isShow"
width="40%"
center
:close-on-click-modal="false"
:before-close="handleClose1"
>
<div>
<editor
ref="sptwEditor"
v-model="relContent"
:min-height="283"
:upload-url="uploadImgUrl"
/>
</div>
<div class="button-s">
<div class="submit" @click="handleClose1"> {{ '取消' }}</div>
<div class="submit colors" @click="confirmSubmit"> {{ '确认' }}</div>
</div>
</el-dialog>
</div>
</template>
<script>
import topBar from "@/components/topBar";
import * as api from "@/api/site.js";
import * as log from "@/api/logistics";
import * as del from "@/api/delivery";
import ImageUpload from "@/components/ImageUpload";
import topBar from '@/components/topBar'
import * as api from '@/api/site.js'
import * as log from '@/api/logistics'
import * as del from '@/api/delivery'
import ImageUpload from '@/components/ImageUpload'
import Editor from '@/components/Editor/index.vue'
export default {
name: "UpdateAdress",
name: 'UpdateAdress',
components: {
topBar,
ImageUpload,
@ -306,12 +201,12 @@ export default {
isShow: false,
relContent: '',
rejectData: '',
moren: "updateAdress",
moren: 'updateAdress',
topList: [
{
name: '修改地址',
path: "updateAdress",
},
path: 'updateAdress'
}
],
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
tableData: [],
@ -319,61 +214,61 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 50,
shoppingAddress: ["", "", ""],
shoppingAddress: ['', '', '']
},
total: 0,
multipleSelection: [],
areaData: [],
regionParams: {
label: "name",
value: "id",
children: "children",
expandTrigger: "hover",
label: 'name',
value: 'id',
children: 'children',
expandTrigger: 'hover'
},
dialogVisible: false,
rules: {
storeName: [
{ required: true, message: '请输入店铺名称', trigger: "blur" },
{ required: true, message: '请输入店铺名称', trigger: 'blur' }
],
memberCode: [
{ required: true, message: '请输入店长编号', trigger: "blur" },
{ required: true, message: '请输入店长编号', trigger: 'blur' }
],
pkStoreLevel: [
{ required: true, message: '请选择店铺等级', trigger: "change" },
{ required: true, message: '请选择店铺等级', trigger: 'change' }
],
shoppingAddress: [
{ required: true, message: '请选择收货地址', trigger: "change" },
{ required: true, message: '请选择收货地址', trigger: 'change' }
],
picture: [
{
required: true,
message: '请上传图片',
trigger: "change",
},
],
trigger: 'change'
}
]
},
form: {
storeCode: "",
storeName: "",
province: "",
city: "",
county: "",
address: "",
memberCode: "",
shopowner: "",
pkStoreLevel: "",
picture: "",
shoppingAddress: ["", "", ""],
storeCode: '',
storeName: '',
province: '',
city: '',
county: '',
address: '',
memberCode: '',
shopowner: '',
pkStoreLevel: '',
picture: '',
shoppingAddress: ['', '', '']
},
orderTypeList: [],
orderStatusList: [],
thetimes: [],
};
thetimes: []
}
},
created() {
this.getSearch();
this.getData();
this.getSearch()
this.getData()
},
methods: {
handleClose1() {
@ -383,14 +278,14 @@ export default {
getDetails(obj, index) {
log.queryPass(obj).then((res) => {
this.$router.push({
path: "addressZxqc",
path: 'addressZxqc',
query: {
data: JSON.stringify(res.data),
approvalBusiness: 131,
businessNoList: JSON.stringify(obj.businessNoList),
},
});
});
businessNoList: JSON.stringify(obj.businessNoList)
}
})
})
},
//
confirmSubmit() {
@ -405,225 +300,74 @@ export default {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
type: 'success'
})
this.isShow = false
this.relContent = ''
this.getSearch();
this.getSearch()
}
});
})
},
rejectAddress(obj) {
this.isShow = true
this.rejectData = obj
},
rejects(item) {
let obj;
if (item) {
obj = {
businessNoList: [item.businessNo],
approveOperation: 2,
};
this.rejectAddress(obj, 2);
} else {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请选择订单',
type: "warning",
});
} else {
let has = false;
this.multipleSelection.forEach((item) => {
if (item.approveStatus == 3) {
has = true;
}
});
if (has) {
this.$message({
message: '含有已驳回订单',
type: "warning",
});
return false;
} else {
let arr = this.multipleSelection.map((item) => {
return item.businessNo;
});
obj = {
businessNoList: arr,
approveOperation: 2,
};
this.rejectAddress(obj, 2);
}
}
}
},
agree(item) {
let obj;
if (item) {
obj = {
businessNoList: [item.businessNo],
approveOperation: 1,
};
this.getDetails(obj, 1);
} else {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请选择订单',
type: "warning",
});
} else {
let has = false;
this.multipleSelection.forEach((item) => {
if (item.approveStatus == 3) {
has = true;
}
});
if (has) {
this.$message({
message: '含有已驳回订单',
type: "warning",
});
return false;
} else {
let arr = this.multipleSelection.map((item) => {
return item.businessNo;
});
obj = {
businessNoList: arr,
approveOperation: 1,
};
this.getDetails(obj, 1);
}
}
}
// this.multipleSelection
// const flags = this.verifySelect();
// if (item != "" || flags != undefined) {
// if (
// this.$refs.multipleTable.selection[0].approveStatus == 2 ||
// this.$refs.multipleTable.selection[0].approveStatus == 4
// ) {
// this.$router.push({
// path: "hjbgQc",
// query: {
// data: JSON.stringify([
// item || this.$refs.multipleTable.selection[0],
// ]),
// approvalBusiness: 132,
// },
// });
// } else if (this.$refs.multipleTable.selection[0].approveStatus == 3) {
// this.$message({
// message: ",",
// type: "warning",
// });
// }
// }
},
// rejects(id) {
// const flags = this.verifySelect();
// if (id != "" || flags != undefined) {
// if (
// this.$refs.multipleTable.selection[0].approveStatus == 2 ||
// this.$refs.multipleTable.selection[0].approveStatus == 4
// ) {
// this.$confirm("?", '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: "warning",
// }).then((_) => {
// domicileReject({
// pkId: id || this.$refs.multipleTable.selection[0].pkId,
// }).then((res) => {
// if (res.code == "200") {
// this.$message({
// message: res.msg,
// type: "success",
// });
// this.getDataList();
// } else {
// this.$message({
// message: res.msg,
// type: "error",
// });
// }
// });
// });
// } else if (this.$refs.multipleTable.selection[0].approveStatus == 3) {
// this.$message({
// message: ",",
// type: "warning",
// });
// }
// }
// },
verifySelect() {
const len = this.$refs.multipleTable.selection.length;
if (len === 0) {
this.$message({ message: '请选择一条数据', type: "warning" });
} else if (len > 1) {
this.$message({ message: '只能选择一条', type: "warning" });
} else {
return true;
}
},
handleClose() {
this.dialogVisible = false;
this.$refs["form"].clearValidate();
this.$refs["form"].resetFields();
this.dialogVisible = false
this.$refs['form'].clearValidate()
this.$refs['form'].resetFields()
},
checkTime(val) {
this.queryParams.startDate = val[0];
this.queryParams.endDate = val[1];
this.queryParams.startDate = val[0]
this.queryParams.endDate = val[1]
},
handleChange1(val) {
this.queryParams.recProvince = val[0];
this.queryParams.recCity = val[1];
this.queryParams.recCounty = val[2] || "";
this.queryParams.recProvince = val[0]
this.queryParams.recCity = val[1]
this.queryParams.recCounty = val[2] || ''
},
getData() {
//
log.getOrderType().then((res) => {
this.orderTypeList = res.data;
});
this.orderTypeList = res.data
})
api.areaList().then((res) => {
this.areaData = res.data;
});
this.areaData = res.data
})
del.getOrderStatus().then((res) => {
this.orderStatusList = res.data;
});
this.orderStatusList = res.data
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
reChongzhi() {
this.queryParams = {
pageNum: 1,
pageSize: 50,
shoppingAddress: ["", "", ""],
};
this.getSearch();
shoppingAddress: ['', '', '']
}
this.getSearch()
this.thetimes = []
},
getSearch() {
this.loading = true
log.getModifyAddress(this.queryParams).then((res) => {
this.loading = false
this.tableData = res.rows;
this.total = res.total;
const regex = new RegExp('<img', 'gi');
this.tableData = res.rows
this.total = res.total
const regex = new RegExp('<img', 'gi')
this.tableData.forEach(item => {
if (item.rejectMsg) {
item.rejectMsg= item.rejectMsg.replace(regex, `<img style="max-width: 200px;"`);
item.rejectMsg = item.rejectMsg.replace(regex, `<img style="max-width: 200px;"`)
}
})
});
},
},
};
})
}
}
}
</script>
<style lang="scss" scoped>