优化部分操作流程,修改售后显示问题,优化计量单位 商品规格添加重复问题

master
学习很差啦 2022-09-05 14:21:58 +08:00
parent ed59b389a5
commit 4651d74b7b
7 changed files with 96 additions and 40 deletions

View File

@ -165,6 +165,7 @@ export default {
let params = Object.assign(this.info, this.form)
params.images = this.uploadList.toString()
params.orderItemSn = this.$route.query.sn
params.reason = this.reasonList.find(item => item.id == params.reason).reason
applyAfterSale(params).then(res => {
if (res.success) {
this.$Message.success('售后申请提交成功,请到售后订单查看!')

View File

@ -220,6 +220,12 @@ export default {
this.submitLoading = true;
if (this.modalTitle == "添加") {
if(this.data.find(item=>item.name == this.form.name)){
this.$Message.error('请勿添加重复计量单位!')
this.submitLoading = false
return
}
// id
delete this.form.id;
addGoodsUnit(this.form).then((res) => {

View File

@ -264,6 +264,11 @@ export default {
if (valid) {
this.submitLoading = true;
if (this.modalType === 0) {
if(this.data.find(item=>item.specName == this.form.specName)){
this.$Message.error('请勿添加重复规格名称!')
this.submitLoading = false
return
}
// id
delete this.form.id;
insertSpec(this.form).then((res) => {

View File

@ -13,7 +13,7 @@
>
<!-- 页面展示 -->
<template slot="disableSlot" slot-scope="{row}">
<i-switch size="large" :value="row.switch" @on-change="changeSwitch(row)">
<i-switch size="large" :true-value="true" :false-value="false" :value="row.switch" @on-change="changeSwitch(row)">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
@ -48,18 +48,19 @@
<Input v-model="form.code" clearable style="width: 100%"/>
</FormItem>
<FormItem label="支持电子面单">
<i-switch v-model="form.standBy" size="large">
<span slot="OPEN"></span>
<span slot="CLOSE"></span>
<i-switch v-model="form.standBy" size="large">
<span slot="open"></span>
<span slot="close"></span>
</i-switch>
</FormItem>
<FormItem label="电子面单表单">
<Input v-model="form.formItems" clearable style="width: 100%"/>
</FormItem>
<FormItem label="禁用状态" prop="disabled">
<i-switch v-model="form.disabled" size="large">
<span slot="OPEN">开启</span>
<span slot="CLOSE">禁用</span>
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
</FormItem>
</Form>
@ -100,7 +101,7 @@
form: {
//
name: "",
disabled:"OPEN"
disabled:"CLOSE"
},
//
formValidate: {
@ -213,9 +214,11 @@
if (res.success) {
const data = res.result.records;
data.forEach(e => {
e.switch = e.disabled === 'OPEN' ? true : false
e.switch = e.disabled === 'OPEN' ? true : false;
e.standBy = e.standBy == 'null' || !e.standBy ? false : true;
});
this.data = data;
console.log(data)
this.total = res.result.total;
}
});
@ -241,14 +244,12 @@
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
this.form.disabled = this.form.disabled == true ? "OPEN" : "CLOSE"
if (this.modalTitle == "添加") {
// id
delete this.form.id;
this.form.disabled
? (this.form.disabled = "OPEN")
: (this.form.disabled = "CLOSE");
addLogistics(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
@ -287,12 +288,13 @@
this.form.name = v.name;
this.form.code = v.code;
console.log(v)
this.form.standBy = v.standBy;
this.form.formItems = v.formItems;
this.form.disabled = v.disabled;
this.form.disabled == "OPEN"
? (this.form.disabled = true)
: (this.form.disabled = false);
this.form.disabled = v.disabled
},
//
remove(v) {

View File

@ -94,7 +94,7 @@
<span class="label">退货地址</span>
<span class="info">
{{storeInfo.salesConsigneeName !== 'null' ? storeInfo.salesConsigneeName : '' || storeInfo.salesConsigneeMobile !=='null' ?storeInfo.salesConsigneeMobile:''|| storeInfo.salesConsigneeAddressPath !=='null'?storeInfo.salesConsigneeAddressPath:'' || storeInfo.salesConsigneeDetail !=='null'?storeInfo.salesConsigneeDetail:'' ?storeInfo.salesConsigneeName + storeInfo.salesConsigneeMobile +' '+ storeInfo.salesConsigneeAddressPath + storeInfo.salesConsigneeDetail:'暂未完善'}}
</span>
</p>
<p class="item">
@ -133,7 +133,7 @@
</span>
</p>
<p class="item">
<span class="label">营业执照号</span>
<span class="info">{{storeInfo.licenseNum}}</span>
</p>
@ -147,22 +147,48 @@
<img style="height: 100px;width: 100px" :src="storeInfo.licencePhoto">
</span>
</p>
<p class="item">
<span class="label">银行名称</span>
<span class="info">{{storeInfo.settlementBankAccountName}}</span>
<span class="info">
{{
storeInfo.settlementBankAccountName == "null" ||
!storeInfo.settlementBankAccountName
? ""
: storeInfo.settlementBankAccountName
}}
</span>
</p>
<p class="item">
<span class="label">银行账号</span>
<span class="info">{{storeInfo.settlementBankAccountNum}}</span>
<span class="info">
{{
storeInfo.settlementBankAccountNum == "null" ||
!storeInfo.settlementBankAccountNum
? ""
: storeInfo.settlementBankAccountNum
}}
</span>
</p>
<p class="item">
<span class="label">银行开户支行名称</span>
<span class="info">{{storeInfo.settlementBankBranchName}}</span>
<span class="info">
{{
storeInfo.settlementBankBranchName == "null" ||
!storeInfo.settlementBankBranchName
? ""
: storeInfo.settlementBankBranchName
}}
</span>
</p>
<p class="item">
<span class="label">银行支行联行号</span>
<span class="info">{{storeInfo.settlementBankJointName}}</span>
<span class="info">
{{
storeInfo.settlementBankJointName == "null" ||
!storeInfo.settlementBankJointName
? ""
: storeInfo.settlementBankJointName
}}</span>
</p>
<p class="item">
<span class="label">结算周期</span>
@ -176,7 +202,7 @@
>{{ item }}
</Tag>
</template>
</span>
</p>
</div>

View File

@ -1,4 +1,3 @@
<template>
<div class="search">
<Card>
@ -175,7 +174,6 @@ import {
addDepartment,
editDepartment,
deleteDepartment,
searchDepartment,
getUserByDepartmentId,
getRoleList,
updateDepartmentRole,
@ -197,7 +195,8 @@ export default {
editTitle: "", //
selectedRole: [], //
searchKey: "", //
form: { //
form: {
//
id: "",
title: "",
parentId: "",
@ -207,7 +206,8 @@ export default {
},
formAdd: {}, //
formValidate: { //
formValidate: {
//
title: [{ required: true, message: "名称不能为空", trigger: "blur" }],
sortOrder: [
{
@ -234,7 +234,7 @@ export default {
initDepartment().then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result;
this.data = this.bubbleSort(res.result);
}
});
},
@ -266,13 +266,13 @@ export default {
this.userLoading = true;
getUserByDepartmentId(data.id).then((res) => {
let way =[]
res.result && res.result.forEach((item) => {
way.push(item.roleId)
})
this.$set(this,'selectedRole',way)
console.warn( this.selectedRole);
let way = [];
res.result &&
res.result.forEach((item) => {
way.push(item.roleId);
});
this.$set(this, "selectedRole", way);
console.warn(this.selectedRole);
});
getRoleList({
@ -291,6 +291,23 @@ export default {
this.cancelSelect();
}
},
//
bubbleSort(array) {
const len = array.length;
if (len < 2) return array;
for (let i = 0; i < len; i++) {
for (let j = 0; j < i; j++) {
if (array[j].sortOrder > array[i].sortOrder) {
const temp = array[j].sortOrder;
array[j].sortOrder = array[i];
array[i] = temp;
}
}
}
return array;
},
//
cancelSelect() {
let data = this.$refs.tree.getSelectedNodes()[0];
@ -303,7 +320,6 @@ export default {
},
//
selectTreeEdit(v) {
if (v.length > 0) {
// null""
for (let attr in v[0]) {
@ -345,7 +361,7 @@ export default {
Promise.all([
editDepartment(this.form.id, this.form),
updateDepartmentRole(this.form.id, roleWay)
updateDepartmentRole(this.form.id, roleWay),
]).then((res) => {
this.submitLoading = false;
if (res[0].success) {
@ -447,5 +463,4 @@ export default {
</script>
<style lang="scss" scoped>
@import "@/styles/tree-common.scss";
</style>

View File

@ -495,6 +495,7 @@ export default {
this.submitLoading = true;
if (this.params.remark == "") {
this.$Message.error("请输入备注信息");
this.submitLoading = false;
return;
}
API_Order.afterSaleSellerReview(this.sn, this.params).then((res) => {