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

This commit is contained in:
Chopper711 2025-02-20 14:57:21 +08:00
commit ebf4d6d3eb
8 changed files with 135 additions and 211 deletions

View File

@ -619,7 +619,6 @@ table {
.div-express-log {
max-height: 300px;
border: solid 1px #e7e7e7;
background: #fafafa;
overflow-y: auto;

View File

@ -192,9 +192,6 @@
</div>
</TabPane>
<TabPane label="TA收货地址" name="address">
<Row class="operation padding-row">
<Button @click="addMemberAddress" type="primary">新增</Button>
</Row>
<Table
:loading="loading"
border
@ -398,7 +395,6 @@
],
consigneeAddressPath: [{required: true, message: "收货人地址不能为空"}],
detail: [{required: true, message: "收货人详细地址不能为空"}],
alias: [{required: true, message: "收货人地址别名不能为空"}],
},//
//
pointsColumns: [
@ -669,58 +665,6 @@
}
},
{
title: "操作",
key: "action",
align: "center",
width: 120,
fixed: "right",
render: (h, params) => {
return h("div", {
style: {
display: "flex",
justifyContent: "center"
}
}, [
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.memberAddressRemove(params.row);
},
},
},
"删除"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.editAddress(params.row);
},
},
},
"编辑"
),
]);
},
},
],
addressData: [],//
@ -954,25 +898,6 @@
});
this.loading = false;
},
//TA
addMemberAddress() {
this.addressModalTitle = "新增会员地址";
this.addressModalVisible = true
this.addressForm = {
id: "",
isDefault: 0,
}
},
//TA
editAddress(v) {
this.addressModalTitle = "修改会员地址";
this.addressForm = JSON.parse(JSON.stringify(v));
this.addressForm.isDefault = v.isDefault?1:0;
// this.$set(this, "addressForm", v);
delete this.addressForm.updateTime;
this.addressModalVisible = true
},
//
addressSubmit() {
this.addressForm.memberId = this.id

View File

@ -73,6 +73,7 @@ export default {
WALLET: "余额支付",
},
supportForm: "", //
checkSupport: {},
};
},
props: ["res", "type"],
@ -96,7 +97,7 @@ export default {
this.setupSetting();
},
onCancel: () => {
val.splice(val.length - 1, 1);
this.formValidate = JSON.parse(JSON.stringify(this.checkSupport));
},
});
},
@ -105,6 +106,7 @@ export default {
setSetting(this.type, { paymentSupportItems: this.formValidate }).then(
(res) => {
if (res.success) {
this.checkSupport = JSON.parse(JSON.stringify(this.formValidate));
this.$Message.success("保存成功!");
this.$Modal.remove();
} else {
@ -117,12 +119,13 @@ export default {
//
async init() {
this.formValidate = JSON.parse(this.res).paymentSupportItems;
this.checkSupport = JSON.parse(JSON.stringify(this.formValidate));
console.log(this.formValidate);
await getPaymentSupportForm().then((res) => {
// res.result.payments = ["H5", "PC"];
this.supportForm = res.result;
});
},
},

View File

@ -28,18 +28,26 @@
<FormItem label="APIv3密钥" prop="apiKey3">
<Input maxlength="300" v-model="formValidate.apiKey3" />
</FormItem>
<FormItem label="apiclient_cert_p12" class="label-item" prop="apiclient_cert_p12">
<Input maxlength="300" v-model="formValidate.apiclient_cert_p12" />
</FormItem>
<FormItem label="apiclient_cert_pem" prop="apiclient_cert_pem">
<Input maxlength="300" v-model="formValidate.apiclient_cert_pem" />
</FormItem>
<FormItem label="apiclient_key" prop="apiclient_key">
<Input maxlength="300" v-model="formValidate.apiclient_key" />
</FormItem>
<FormItem label="API证书-证书序列号" prop="serialNumber">
<Input maxlength="300" v-model="formValidate.serialNumber" />
</FormItem>
<FormItem class="form-item-view-el" label="apiclient_key" prop="apiclient_key">
<Input v-model="formValidate.apiclientKey" :rows="6" maxlength="2500" show-word-limit type="textarea" placeholder="Enter something..." />
</FormItem>
<FormItem label="加签方式" prop="publicType">
<RadioGroup type="button" button-style="solid" v-model="formValidate.publicType" @change="handlePublicTypeChange">
<Radio label="CERT">平台证书</Radio>
<Radio label="KEY">微信支付公钥</Radio>
</RadioGroup>
<span class="desc">商户接收APIv3的请求应答回调时验签使用以下两种方式只能使用一种</span>
</FormItem>
<!-- 当加签方式选择KEY时展示 -->
<FormItem v-if="formValidate.publicType === 'KEY'" label="公钥证书ID" prop="publicId">
<Input maxlength="300" v-model="formValidate.publicId" />
</FormItem>
<FormItem v-if="formValidate.publicType === 'KEY'" class="form-item-view-el" label="公钥证书" prop="publicKey">
<Input v-model="formValidate.publicKey" :rows="6" maxlength="2500" show-word-limit type="textarea" placeholder="Enter something..." />
</FormItem>
<FormItem label="支付回调域名" prop="callbackUrl">
<Input maxlength="300" v-model="formValidate.callbackUrl" />
</FormItem>
@ -97,7 +105,7 @@ export default {
];
}
});
},
}
},
};
</script>

View File

@ -1,7 +1,7 @@
<template>
<div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="提现审核是否开启">
<i-switch v-model="formValidate.apply" style="margin-top:7px;"><span slot="open"></span>
<span slot="close"></span>
@ -36,12 +36,8 @@ export default {
data() {
return {
result:"",
formValidate: { //
apply: true,
minPrice: "",
type: "",
wechatAppId: "",
},
ruleValidate: {}, //
formValidate: {},//
switchTitle: "提现审核是否开启", // title
};
@ -72,7 +68,29 @@ export default {
//
init() {
this.result = JSON.parse(this.res);
Object.keys(this.result).map((item) => {
this.result[item] += "";
});
this.$set(this, "formValidate", { ...this.result });
Object.keys(this.formValidate).forEach((item) => {
this.ruleValidate[item] = [
{
required: true,
message: "请填写必填项",
trigger: "blur",
},
{
validator: (rule, value, callback) => {
if (value < 0) {
callback(new Error("不能输入负数!"));
} else {
callback();
}
},
trigger: "change",
},
];
});
},
},
};

View File

@ -203,6 +203,7 @@
<AutoComplete ref="input" v-model="val.value"
:disabled="containsSameSkuItem"
:filter-method="filterMethod"
:maxlength="30" placeholder="请输入规格值" style="width: 180px"
@on-focus="changeSkuVals(val, item.name)"
@ -257,6 +258,7 @@
<FormItem v-if="item.spec_values.length < 10 && item.spec_values.length >= 1 && item.spec_values[0].value !== ''" class="sku-item-content-val flex" label="" style="line-height: 32px;">
<AutoComplete ref="input" v-model="newSkuValues[$index]"
:disabled="containsSameSkuItem"
:filter-method="filterMethod"
:maxlength="30" placeholder="自定义规格值" style="width: 180px"
@on-blur="addSpec($index, item)"
@ -630,6 +632,10 @@ export default {
skuTableColumn: [],
/** 表格数据 */
skuTableData: [],
// sku
skuTableDataCopy: [],
// sku
skuInfoCopy: [],
/** 默认的规格参数 */
skuData: [],
/** 默认的规格值 */
@ -671,6 +677,9 @@ export default {
shopCategory: [],
/** 商品单位列表 */
goodsUnitList: [],
containsSameSkuItem: false,
containsSameSkuValue: false,
containsSameSkuNewValue: false,
//
showGoodsVideo: false,
ignoreColumn: [
@ -729,17 +738,6 @@ export default {
desc: "视频大小不能超过10MB",
});
},
onAddSku(index) {
if (!this.newSkuValues[index]) {
this.$Message.error('请输入规格值')
return
}
this.skuInfo[index].spec_values.push({
name: this.newSkuValues[index].name,
value: this.newSkuValues[index],
images: this.openImage ? [] : this.baseInfoForm.goodsGalleryFiles
})
},
//
callbackSelected(val) {
this.picModelFlag = false;
@ -1246,6 +1244,14 @@ export default {
},
/** 添加规格项 */
addSkuItem() {
if (this.containsSameSkuItem) {
this.$Message.error("存在重复规格项!");
return;
}
if (this.containsSameSkuValue) {
this.$Message.error("存在重复规格值!");
return;
}
if (this.skuInfo.length >= 5) {
this.$Message.error("规格项不能大于5个");
return;
@ -1269,8 +1275,10 @@ export default {
editSkuItem(val, index, item) {
if (this.skuTableData.find((i) => i[val])) {
this.$Message.error("已存在相同规格项!");
this.containsSameSkuItem = true;
return;
}
this.containsSameSkuItem = false;
if (this.zz(0, val) > 20) {
this.$Message.error("规格值最多十个字符长度!");
// val = val.toString().slice(0, 4);
@ -1283,6 +1291,11 @@ export default {
delete e[this.currentSkuItem];
return e;
});
this.skuInfo[index].name = val;
this.skuInfo[index].spec_values.forEach((e) => {
e.name = val;
});
this.currentSkuItem = val;
this.renderTableData(this.skuTableData);
},
@ -1322,8 +1335,13 @@ export default {
skuValueChange(val, index, item, $index) {
if (this.skuTableData.find((i) => i[val.name] === val.value)) {
this.$Message.error("已存在相同规格值!");
this.skuInfo = cloneObj(this.skuInfoCopy);
this.skuTableData = cloneObj(this.skuTableDataCopy);
return;
}
this.containsSameSkuValue = false;
if (val.value === '') {
return;
}
@ -1343,6 +1361,8 @@ export default {
return e;
});
this.currentSkuVal = val.value;
this.skuTableDataCopy = cloneObj(this.skuTableData);
this.skuInfoCopy = cloneObj(this.skuInfo);
this.renderTableData(this.skuTableData);
},
//
@ -1366,6 +1386,12 @@ export default {
(e) => e[spec.name] !== this.lastEditSkuValue
);
}
//
if (!this.skuTableData.find((i) => i[val.name] === val.value)) {
this.skuTableDataCopy = cloneObj(this.skuTableData);
this.skuInfoCopy = cloneObj(this.skuInfo);
}
},
/** 移除当前规格项 进行数据变化*/
handleCloseSkuItem($index, item) {
@ -1456,6 +1482,21 @@ export default {
this.$Message.error("请输入规格值");
return;
}
if (this.containsSameSkuItem) {
this.$Message.error("存在重复规格项!");
return;
}
if (item.spec_values.find((i) => i.value === this.newSkuValues[$index])) {
this.newSkuValues[$index] = "";
this.skuInfo = cloneObj(this.skuInfoCopy);
this.skuTableData = cloneObj(this.skuTableDataCopy);
this.$Message.error("存在重复规格值!");
this.containsSameSkuNewValue = true;
return;
}
if (this.validateEmpty(item.spec_values)) {
if (item.spec_values.length >= 10) {
this.$Message.error("规格值不能大于10个");
@ -1514,6 +1555,9 @@ export default {
}
this.baseInfoForm.regeneratorSkuFlag = true;
this.newSkuValues[$index] = "";
this.skuTableDataCopy = cloneObj(this.skuTableData);
this.skuInfoCopy = cloneObj(this.skuInfo);
}
},
handleClearSku() {
@ -1780,6 +1824,14 @@ export default {
},
/** 添加商品 **/
save() {
if (this.containsSameSkuItem) {
this.$Message.error("存在重复规格项!");
return;
}
if (this.containsSameSkuValue) {
this.$Message.error("存在重复规格值!");
return;
}
this.submitLoading = true;
this.$refs["baseInfoForm"].validate((valid) => {
if (valid) {

View File

@ -442,7 +442,7 @@
<Form :model="faceSheetForm" ref="faceSheetForm" v-if="facesheetFlag" :rules="faceSheetFormValidate">
<FormItem label="物流公司" prop="logisticsId" style="position: relative" :label-width="90">
<Select v-model="faceSheetForm.logisticsId" placeholder="请选择" style="width: 250px">
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.id">{{ item.name }}
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.logisticsId">{{ item.name }}
</Option>
</Select>
</FormItem>
@ -451,7 +451,7 @@
:rules="orderDeliverFormValidate" style="position: relative">
<FormItem label="物流公司" prop="logisticsId">
<Select v-model="orderDeliveryForm.logisticsId" placeholder="请选择" style="width: 250px">
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.id">{{ item.name }}
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.logisticsId">{{ item.name }}
</Option>
</Select>
</FormItem>
@ -571,8 +571,9 @@
</div>
</template>
<template slot="numSlot" slot-scope="{ row, index }">
<InputNumber :min="0" :max="row.___num - row.deliverNumber" v-model="data[index].canNum">
</InputNumber>
<InputNumber v-model="row.canNum" :disabled="!selectGroupShipGoods.find(item=>item.id === row.id)"
:max="row.___num - row.deliverNumber - row.returnNum" :min="0"
@on-change="changeNum($event,index)"></InputNumber>
</template>
</Table>
<div slot="footer">
@ -872,6 +873,16 @@ export default {
}
});
},
changeNum(number, index) {
const current = this.data[index]
if (this.selectGroupShipGoods.length) {
this.selectGroupShipGoods.forEach(item => {
if (item.skuId === current.skuId) {
item.canNum = number
}
})
}
},
//
confirmShipGroupGoods () {
this.$refs.groupOrderDeliveryForm.validate(async (valid) => {
@ -1145,7 +1156,7 @@ export default {
})
},
toPrints () {
if (this.form.logisticsId != null && this.form.logisticsId != '') {
if (this.faceSheetForm.logisticsId != null && this.faceSheetForm.logisticsId != '') {
this.orderDeliverModal = false;
}
},
@ -1155,9 +1166,11 @@ export default {
this.$refs['faceSheetForm'].validate((valid) => {
if (valid) {
API_Order.getOrderFaceSheet(this.sn, this.faceSheetForm).then(res => {
if (res.success) {
if (res.success && res.result.printTemplate) {
this.someJSONdata = res.result.printTemplate;
this.toPrints();
}else{
this.$Message.success("电子面单发货失败!");
}
})
}

View File

@ -64,115 +64,19 @@
<!-- 分享卡片 -->
<FormItem label="分享卡片封面" prop="feedsImg">
<div class="upload-list" v-if="liveForm.feedsImg">
<template>
<img :src="liveForm.feedsImg" />
<div class="upload-list-cover">
<Icon
type="ios-eye-outline"
@click.native="handleView(liveForm.feedsImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('feedsImg')"
></Icon>
</div>
</template>
</div>
<Upload
v-if="liveForm.feedsImg.length == 0"
ref="upload"
:show-upload-list="false"
:on-success="handleFeedsImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon>
</div>
</Upload>
<upload-pic-thumb v-model="liveForm.feedsImg" :multiple="false"></upload-pic-thumb>
<div class="tips">直播间分享图图片规则建议像素800*640大小不超过1M</div>
</FormItem>
<!-- 直播间背景墙 -->
<FormItem label="直播间背景墙" prop="coverImg">
<div class="upload-list" v-if="liveForm.coverImg">
<template>
<img :src="liveForm.coverImg" />
<div class="upload-list-cover">
<Icon
type="ios-eye-outline"
@click.native="handleView(liveForm.coverImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('coverImg')"
></Icon>
</div>
</template>
</div>
<Upload
v-if="liveForm.coverImg.length == 0"
ref="upload"
:show-upload-list="false"
:on-success="handleCoverImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon>
</div>
</Upload>
<upload-pic-thumb v-model="liveForm.coverImg" :multiple="false"></upload-pic-thumb>
<div class="tips">直播间背景图图片规则建议像素1080*1920大小不超过1M</div>
</FormItem>
<!-- 直播间背景墙 -->
<FormItem label="直播间分享图" prop="shareImg">
<div class="upload-list" v-if="liveForm.shareImg">
<template>
<img :src="liveForm.shareImg" />
<div class="upload-list-cover">
<Icon
type="ios-eye-outline"
@click.native="handleView(liveForm.shareImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('shareImg')"
></Icon>
</div>
</template>
</div>
<Upload
v-if="liveForm.shareImg.length == 0"
ref="upload"
:show-upload-list="false"
:on-success="handleShareImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon>
</div>
</Upload>
<upload-pic-thumb v-model="liveForm.shareImg" :multiple="false"></upload-pic-thumb>
<div class="tips">直播间分享图图片规则建议像素800*640大小不超过1M</div>
</FormItem>
@ -261,6 +165,7 @@
<script>
import { uploadFile } from "@/libs/axios";
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
import {
addLive,
addLiveGoods,
@ -272,6 +177,7 @@ import liveGoods from "./liveGoods";
export default {
components: {
liveGoods,
uploadPicThumb,
},
data() {
return {