Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

master
paulGao 2022-09-06 19:45:13 +08:00
commit 3639804d1b
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) let params = Object.assign(this.info, this.form)
params.images = this.uploadList.toString() params.images = this.uploadList.toString()
params.orderItemSn = this.$route.query.sn params.orderItemSn = this.$route.query.sn
params.reason = this.reasonList.find(item => item.id == params.reason).reason
applyAfterSale(params).then(res => { applyAfterSale(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('售后申请提交成功,请到售后订单查看!') this.$Message.success('售后申请提交成功,请到售后订单查看!')

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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