创建优惠吗添加开始时间
This commit is contained in:
@@ -1,298 +1,331 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
|
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
|
||||||
<a-modal
|
<a-modal
|
||||||
class="allUserPoeration_modal generalModel"
|
class="allUserPoeration_modal generalModel"
|
||||||
v-model:visible="operationsModal"
|
v-model:visible="operationsModal"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
:get-container="() => $refs.allUserPoerationModal"
|
:get-container="() => $refs.allUserPoerationModal"
|
||||||
width="50%"
|
width="50%"
|
||||||
:height="'77rem'"
|
:height="'77rem'"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:centered="true"
|
:centered="true"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
:mask="true"
|
:mask="true"
|
||||||
wrapClassName="#app"
|
wrapClassName="#app"
|
||||||
:keyboard="false"
|
:keyboard="false"
|
||||||
>
|
>
|
||||||
<div class="generalModel_btn">
|
<div class="generalModel_btn">
|
||||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||||
<svg
|
<svg
|
||||||
width="100%" height="100%"
|
width="100%" height="100%"
|
||||||
viewBox="0 0 46 46"
|
viewBox="0 0 46 46"
|
||||||
fill="none"
|
fill="none"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" />
|
<circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" />
|
||||||
<rect
|
<rect
|
||||||
x="32.5063"
|
x="32.5063"
|
||||||
y="12"
|
y="12"
|
||||||
width="3"
|
width="3"
|
||||||
height="29"
|
height="29"
|
||||||
rx="1.5"
|
rx="1.5"
|
||||||
transform="rotate(45 32.5063 12)"
|
transform="rotate(45 32.5063 12)"
|
||||||
fill="white"
|
fill="white"
|
||||||
/>
|
/>
|
||||||
<rect
|
<rect
|
||||||
x="34.6274"
|
x="34.6274"
|
||||||
y="32.5059"
|
y="32.5059"
|
||||||
width="3"
|
width="3"
|
||||||
height="29"
|
height="29"
|
||||||
rx="1.5"
|
rx="1.5"
|
||||||
transform="rotate(135 34.6274 32.5059)"
|
transform="rotate(135 34.6274 32.5059)"
|
||||||
fill="white"
|
fill="white"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal_title_text">
|
<div class="modal_title_text">
|
||||||
<div>{{ title }} Coupon</div>
|
<div>{{ title }} Coupon</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="allUserPoeration_center admin_page">
|
<div class="allUserPoeration_center admin_page">
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>Cooperator:</span>
|
<span>Cooperator:</span>
|
||||||
<input
|
<input
|
||||||
v-model="cooperator"
|
v-model="cooperator"
|
||||||
placeholder="Please enter cooperator"
|
placeholder="Please enter cooperator"
|
||||||
type="text"
|
type="text"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>percentOff(%): <span>*</span></span>
|
<span>percentOff(%): <span>*</span></span>
|
||||||
<input
|
<input
|
||||||
:class="{ active: title != 'Add' }"
|
:class="{ active: title != 'Add' }"
|
||||||
:disabled="title != 'Add'"
|
:disabled="title != 'Add'"
|
||||||
v-model="percentOff"
|
v-model="percentOff"
|
||||||
placeholder="Please enter percentOff"
|
placeholder="Please enter percentOff"
|
||||||
type="text"
|
type="text"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>Commission Rate: <span>*</span></span>
|
<span>Commission Rate: <span>*</span></span>
|
||||||
<input
|
<input
|
||||||
:class="{ active: title != 'Add' }"
|
:class="{ active: title != 'Add' }"
|
||||||
:disabled="title != 'Add'"
|
:disabled="title != 'Add'"
|
||||||
v-model="commissionRate"
|
v-model="commissionRate"
|
||||||
placeholder="Please enter commission rate"
|
placeholder="Please enter commission rate"
|
||||||
type="text"
|
type="text"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<!-- <div class="admin_state_item" > -->
|
<!-- <div class="admin_state_item" > -->
|
||||||
<span>End Time: <span>*</span></span>
|
<span>Start Time: <span>*</span></span>
|
||||||
<a-space direction="vertical" style="width: 220px">
|
<a-space direction="vertical" style="width: 220px">
|
||||||
<a-date-picker
|
<a-date-picker
|
||||||
v-model:value="rangePickerValue"
|
v-model:value="startTime"
|
||||||
:disabled="title != 'Add'"
|
:disabled="title != 'Add'"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
/>
|
/>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>MaxRedemptions:</span>
|
<!-- <div class="admin_state_item" > -->
|
||||||
<input
|
<span>End Time: <span>*</span></span>
|
||||||
:class="{ active: title != 'Add' }"
|
<a-space direction="vertical" style="width: 220px">
|
||||||
:disabled="title != 'Add'"
|
<a-date-picker
|
||||||
v-model="maxRedemptions"
|
v-model:value="endTime"
|
||||||
placeholder="Please enter maximum"
|
:disabled="title != 'Add'"
|
||||||
type="text"
|
style="width: 220px"
|
||||||
style="width: 220px"
|
/>
|
||||||
/>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>PaidCommission:</span>
|
<span>MaxRedemptions:</span>
|
||||||
<input
|
<input
|
||||||
v-model="paidCommission"
|
:class="{ active: title != 'Add' }"
|
||||||
placeholder="Please enter paidCommission"
|
:disabled="title != 'Add'"
|
||||||
type="text"
|
v-model="maxRedemptions"
|
||||||
style="width: 220px"
|
placeholder="Please enter maximum"
|
||||||
/>
|
type="text"
|
||||||
</div>
|
style="width: 220px"
|
||||||
<div class="admin_state_item">
|
/>
|
||||||
<span>Remark:</span>
|
</div>
|
||||||
<input
|
<div class="admin_state_item">
|
||||||
v-model="remark"
|
<span>PaidCommission:</span>
|
||||||
placeholder="Please enter remark"
|
<input
|
||||||
type="text"
|
v-model="paidCommission"
|
||||||
style="width: 220px"
|
placeholder="Please enter paidCommission"
|
||||||
/>
|
type="text"
|
||||||
</div>
|
style="width: 220px"
|
||||||
</div>
|
/>
|
||||||
<div class="allUserPoeration_btn admin_page">
|
</div>
|
||||||
<div class="admin_search_item" @click="cancelDsign">Close</div>
|
<div class="admin_state_item">
|
||||||
<div class="admin_search_item" @click="setOk">OK</div>
|
<span>Remark:</span>
|
||||||
</div>
|
<input
|
||||||
</a-modal>
|
v-model="remark"
|
||||||
<div class="mark_loading" v-show="loadingShow">
|
placeholder="Please enter remark"
|
||||||
<a-spin size="large" />
|
type="text"
|
||||||
</div>
|
style="width: 220px"
|
||||||
</template>
|
/>
|
||||||
<script>
|
</div>
|
||||||
import {
|
</div>
|
||||||
defineComponent,
|
<div class="allUserPoeration_btn admin_page">
|
||||||
ref,
|
<div class="admin_search_item" @click="cancelDsign">Close</div>
|
||||||
reactive,
|
<div class="admin_search_item" @click="setOk">OK</div>
|
||||||
watch,
|
</div>
|
||||||
onMounted,
|
</a-modal>
|
||||||
nextTick,
|
<div class="mark_loading" v-show="loadingShow">
|
||||||
toRefs,
|
<a-spin size="large" />
|
||||||
} from "vue";
|
</div>
|
||||||
import { Https } from "@/tool/https";
|
</template>
|
||||||
import { Modal, message } from "ant-design-vue";
|
<script>
|
||||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
import {
|
||||||
import { formatTime, isEmail } from "@/tool/util";
|
defineComponent,
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
ref,
|
||||||
import md5 from "md5";
|
reactive,
|
||||||
export default defineComponent({
|
watch,
|
||||||
components: {},
|
onMounted,
|
||||||
emits: ["searchHistoryList"],
|
nextTick,
|
||||||
setup(props, { emit }) {
|
toRefs,
|
||||||
let operations = reactive({
|
} from "vue";
|
||||||
operationsModal: false,
|
import { Https } from "@/tool/https";
|
||||||
operationsEdit: false,
|
import { Modal, message } from "ant-design-vue";
|
||||||
loadingShow: false,
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
title: "",
|
import { formatTime, isEmail } from "@/tool/util";
|
||||||
});
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
let operationsData = reactive({
|
import md5 from "md5";
|
||||||
rangePickerValue: "",
|
export default defineComponent({
|
||||||
percentOff: "",
|
components: {},
|
||||||
commissionRate: "",
|
emits: ["searchHistoryList"],
|
||||||
maxRedemptions: "",
|
setup(props, { emit }) {
|
||||||
cooperator: "",
|
let operations = reactive({
|
||||||
paidCommission: "",
|
operationsModal: false,
|
||||||
remark: "",
|
operationsEdit: false,
|
||||||
id: "",
|
loadingShow: false,
|
||||||
});
|
title: "",
|
||||||
let init = (funStr, data) => {
|
});
|
||||||
operations.operationsModal = true;
|
let operationsData = reactive({
|
||||||
operations.operationsEdit = true;
|
endTime: "",
|
||||||
operations.title = funStr;
|
startTime: "",
|
||||||
if (funStr == "Add") operations.operationsEdit = false;
|
percentOff: "",
|
||||||
if (funStr == "Edit") {
|
commissionRate: "",
|
||||||
operationsData.id = data.id;
|
maxRedemptions: "",
|
||||||
operationsData.percentOff = data.percentOff;
|
cooperator: "",
|
||||||
operationsData.commissionRate = data.commissionRate;
|
paidCommission: "",
|
||||||
operationsData.maxRedemptions = data.maxRedemptions;
|
remark: "",
|
||||||
operationsData.cooperator = data.cooperator;
|
id: "",
|
||||||
operationsData.paidCommission = data.paidCommission;
|
});
|
||||||
operationsData.remark = data.remark;
|
let init = (funStr, data) => {
|
||||||
operationsData.rangePickerValue = dayjs(
|
operations.operationsModal = true;
|
||||||
new Date(data.redeemBy * 1000).toISOString().split("T")[0],
|
operations.operationsEdit = true;
|
||||||
"YYYY/MM/DD"
|
operations.title = funStr;
|
||||||
);
|
if (funStr == "Add") operations.operationsEdit = false;
|
||||||
|
if (funStr == "Edit") {
|
||||||
// operationsData.rangePickerValue='2024-08-05T00:00:06'
|
operationsData.id = data.id;
|
||||||
// operationsData.validEndTime='2024-08-05T00:00:06'
|
operationsData.percentOff = data.percentOff;
|
||||||
// operationsData.commissionRate = data.commissionRate
|
operationsData.commissionRate = data.commissionRate;
|
||||||
// operationsData.maxRedemptions = data.maxRedemptions
|
operationsData.maxRedemptions = data.maxRedemptions;
|
||||||
// operationsData.validStartTime = formatTime(data.validStartTime)
|
operationsData.cooperator = data.cooperator;
|
||||||
// operationsData.validEndTime = formatTime(data.validEndTime)
|
operationsData.paidCommission = data.paidCommission;
|
||||||
}
|
operationsData.remark = data.remark;
|
||||||
};
|
operationsData.endTime = dayjs(
|
||||||
let setAddData = () => {
|
new Date(data.redeemBy * 1000).toLocaleDateString('zh-CN', {
|
||||||
const timestampMs =
|
year: 'numeric',
|
||||||
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
month: '2-digit',
|
||||||
return {
|
day: '2-digit'
|
||||||
percentOff: operationsData.percentOff,
|
}).replace(/\//g, '/'),
|
||||||
maxRedemptions: operationsData.maxRedemptions,
|
"YYYY/MM/DD"
|
||||||
commissionRate: operationsData.commissionRate,
|
);
|
||||||
timestamp: timestampMs,
|
// 确保格式一致
|
||||||
cooperator: operationsData.cooperator,
|
// operationsData.startTime = dayjs(
|
||||||
remark: operationsData.remark,
|
// new Date(data.startTime * 1000).toISOString().split("T")[0],
|
||||||
};
|
// "YYYY/MM/DD"
|
||||||
};
|
// );
|
||||||
let setEditData = () => {
|
operationsData.startTime = dayjs(
|
||||||
const timestampMs =
|
new Date(data.startTime * 1000).toLocaleDateString('zh-CN', {
|
||||||
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
year: 'numeric',
|
||||||
return {
|
month: '2-digit',
|
||||||
id: operationsData.id,
|
day: '2-digit'
|
||||||
paidCommission: operationsData.commissionRate,
|
}).replace(/\//g, '/'),
|
||||||
cooperator: operationsData.cooperator,
|
"YYYY/MM/DD"
|
||||||
remark: operationsData.remark,
|
);
|
||||||
};
|
// operationsData.endTime='2024-08-05T00:00:06'
|
||||||
};
|
// operationsData.validEndTime='2024-08-05T00:00:06'
|
||||||
let cancelDsign = () => {
|
// operationsData.commissionRate = data.commissionRate
|
||||||
operationsData.rangePickerValue = "";
|
// operationsData.maxRedemptions = data.maxRedemptions
|
||||||
operationsData.percentOff = "";
|
// operationsData.validStartTime = formatTime(data.validStartTime)
|
||||||
operationsData.commissionRate = "";
|
// operationsData.validEndTime = formatTime(data.validEndTime)
|
||||||
operationsData.maxRedemptions = "";
|
}
|
||||||
operationsData.cooperator = "";
|
};
|
||||||
operationsData.paidCommission = "";
|
let setAddData = () => {
|
||||||
operationsData.remark = "";
|
const emdTimeMs =
|
||||||
operationsData.id = "";
|
new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
|
||||||
operations.operationsModal = false;
|
const startTimeMs =
|
||||||
};
|
new Date(operationsData.startTime).getTime() / 1000; // 直接获取毫秒时间戳
|
||||||
let setOk = () => {
|
return {
|
||||||
let data;
|
percentOff: operationsData.percentOff,
|
||||||
if (operations.title == "Add") {
|
maxRedemptions: operationsData.maxRedemptions,
|
||||||
data = setAddData();
|
commissionRate: operationsData.commissionRate,
|
||||||
if (!data.commissionRate || !data.timestamp || !data.percentOff)
|
endTime: emdTimeMs,
|
||||||
return message.warning("Please check the input box marked with *");
|
startTime: startTimeMs,
|
||||||
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
|
cooperator: operationsData.cooperator,
|
||||||
if (rv) {
|
remark: operationsData.remark,
|
||||||
cancelDsign();
|
};
|
||||||
emit("searchHistoryList");
|
};
|
||||||
}
|
let setEditData = () => {
|
||||||
});
|
const timestampMs =
|
||||||
} else {
|
new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
|
||||||
data = setEditData();
|
return {
|
||||||
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, {
|
id: operationsData.id,
|
||||||
params: data,
|
paidCommission: operationsData.commissionRate,
|
||||||
}).then((rv) => {
|
cooperator: operationsData.cooperator,
|
||||||
if (rv) {
|
remark: operationsData.remark,
|
||||||
cancelDsign();
|
};
|
||||||
emit("searchHistoryList");
|
};
|
||||||
}
|
let cancelDsign = () => {
|
||||||
});
|
operationsData.endTime = "";
|
||||||
}
|
operationsData.startTime = "";
|
||||||
};
|
operationsData.percentOff = "";
|
||||||
return {
|
operationsData.commissionRate = "";
|
||||||
...toRefs(operations),
|
operationsData.maxRedemptions = "";
|
||||||
...toRefs(operationsData),
|
operationsData.cooperator = "";
|
||||||
cancelDsign,
|
operationsData.paidCommission = "";
|
||||||
init,
|
operationsData.remark = "";
|
||||||
focus,
|
operationsData.id = "";
|
||||||
blur,
|
operations.operationsModal = false;
|
||||||
setOk,
|
};
|
||||||
};
|
let setOk = () => {
|
||||||
},
|
let data;
|
||||||
data() {
|
if (operations.title == "Add") {
|
||||||
return {};
|
data = setAddData();
|
||||||
},
|
if (!data.commissionRate || !data.startTime || !data.percentOff || !data.endTime)
|
||||||
mounted() {},
|
return message.warning("Please check the input box marked with *");
|
||||||
methods: {},
|
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
|
||||||
});
|
if (rv) {
|
||||||
</script>
|
cancelDsign();
|
||||||
<style lang="less" scoped>
|
emit("searchHistoryList");
|
||||||
:deep(.allUserPoeration_modal) {
|
}
|
||||||
.ant-modal-body {
|
});
|
||||||
display: flex;
|
} else {
|
||||||
flex-direction: column;
|
data = setEditData();
|
||||||
|
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, {
|
||||||
|
params: data,
|
||||||
|
}).then((rv) => {
|
||||||
|
if (rv) {
|
||||||
|
cancelDsign();
|
||||||
|
emit("searchHistoryList");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
...toRefs(operations),
|
||||||
|
...toRefs(operationsData),
|
||||||
|
cancelDsign,
|
||||||
|
init,
|
||||||
|
focus,
|
||||||
|
blur,
|
||||||
|
setOk,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
:deep(.allUserPoeration_modal) {
|
||||||
|
.ant-modal-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
<style lang="less" scoped>
|
||||||
<style lang="less" scoped>
|
.allUserPoeration_modal {
|
||||||
.allUserPoeration_modal {
|
.closeIcon {
|
||||||
.closeIcon {
|
z-index: 2;
|
||||||
z-index: 2;
|
}
|
||||||
|
.allUserPoeration_btn {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: auto;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 1rem 0;
|
||||||
|
.admin_search_item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.allUserPoeration_center {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.allUserPoeration_btn {
|
</style>
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
height: auto;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 1rem 0;
|
|
||||||
.admin_search_item {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.allUserPoeration_center {
|
|
||||||
flex: 1;
|
|
||||||
overflow-y: auto;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -299,7 +299,11 @@ export default defineComponent({
|
|||||||
// ]
|
// ]
|
||||||
let isCurrent = list[i].id == detailData?.selectDetail?.id
|
let isCurrent = list[i].id == detailData?.selectDetail?.id
|
||||||
console.log(isCurrent,newData)
|
console.log(isCurrent,newData)
|
||||||
let color = (detailData.currentDetailType == 'color' && isCurrent)?(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):(list[i].color?.rgba?.r?`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:'')
|
let color = (detailData.currentDetailType == 'color' && isCurrent && !detailData.isEditPattern.value)?
|
||||||
|
(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):
|
||||||
|
(list[i].color?.rgba?.r?
|
||||||
|
`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:
|
||||||
|
'')
|
||||||
if(detailData.currentDetailType == 'sketch' && newData){
|
if(detailData.currentDetailType == 'sketch' && newData){
|
||||||
color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
|
color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
|
||||||
detailData.selectDetail.maskUrl = ''
|
detailData.selectDetail.maskUrl = ''
|
||||||
@@ -308,8 +312,8 @@ export default defineComponent({
|
|||||||
let data:any = {
|
let data:any = {
|
||||||
changed:false,
|
changed:false,
|
||||||
color,
|
color,
|
||||||
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.designType:list[i].designType,
|
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.designType:list[i].designType,
|
||||||
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.id:list[i].id,
|
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.id:list[i].id,
|
||||||
maskMinioUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskMinioUrl,
|
maskMinioUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskMinioUrl,
|
||||||
// maskUrl:'',
|
// maskUrl:'',
|
||||||
maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl,
|
maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl,
|
||||||
@@ -320,19 +324,19 @@ export default defineComponent({
|
|||||||
offset,
|
offset,
|
||||||
partialDesign:list[i].partialDesign || {},
|
partialDesign:list[i].partialDesign || {},
|
||||||
// partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{},
|
// partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{},
|
||||||
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.minIOPath:list[i].minIOPath,
|
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.minIOPath:list[i].minIOPath,
|
||||||
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
|
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
|
||||||
priority,
|
priority,
|
||||||
// scale:[
|
// scale:[
|
||||||
// 0.5,
|
// 0.5,
|
||||||
// 0.35822305
|
// 0.35822305
|
||||||
// ],
|
// ],
|
||||||
scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1],
|
scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1],
|
||||||
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.level2Type || newData.categoryValue:list[i].type,
|
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.level2Type || newData.categoryValue:list[i].type,
|
||||||
sketchString:list[i].sketchString?list[i].sketchString:'',
|
sketchString:list[i].sketchString?list[i].sketchString:'',
|
||||||
trims:(newData && detailData.currentDetailType == 'element' && isCurrent)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]},
|
trims:(newData && detailData.currentDetailType == 'element' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]},
|
||||||
}
|
}
|
||||||
if((list[i].color?.gradient || list[i].newDetail?.color?.gradient)){
|
if((list[i].color?.gradient || list[i].newDetail?.color?.gradient) && !detailData.isEditPattern.value){
|
||||||
gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient
|
gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient
|
||||||
gradient.colorImg = await setGradual(gradient,320,700)
|
gradient.colorImg = await setGradual(gradient,320,700)
|
||||||
data.gradient = gradient
|
data.gradient = gradient
|
||||||
@@ -388,7 +392,7 @@ export default defineComponent({
|
|||||||
designSingleItemDTOList:clothes,
|
designSingleItemDTOList:clothes,
|
||||||
isPreview:false,
|
isPreview:false,
|
||||||
// ifSubmit:designItemDetail.isPreview,
|
// ifSubmit:designItemDetail.isPreview,
|
||||||
gender:workspace?.sex == 'Male'?1:0,
|
gender:workspace?.sex,
|
||||||
sketchString:'',
|
sketchString:'',
|
||||||
modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'',
|
modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'',
|
||||||
modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'',
|
modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'',
|
||||||
|
|||||||
Reference in New Issue
Block a user