fix-0609-xwk
向文可 3 years ago
parent 4f59674e77
commit 18c30d6dc5

@ -115,7 +115,7 @@ const actions = {
data.virtualProductModifyDTOList = data.fileList.map((item) => { data.virtualProductModifyDTOList = data.fileList.map((item) => {
return { return {
shipType: 1, shipType: 1,
shipContent: item, shipContent: encodeURIComponent(item),
}; };
}); });
if (data.autoSend) { if (data.autoSend) {

@ -109,7 +109,12 @@
/> />
</div> </div>
<div class="input"> <div class="input">
<el-input v-model="state.message" placeholder="请输入要发送的内容" type="textarea" /> <el-input
v-model="state.message"
placeholder="请输入要发送的内容shift+enter换行enter发送"
type="textarea"
@keypress.enter.prevent="handleSendMessage"
/>
</div> </div>
<div class="send"> <div class="send">
<el-button type="primary" @click="handleSendMessage()"></el-button> <el-button type="primary" @click="handleSendMessage()"></el-button>
@ -188,12 +193,16 @@
const handleLoadMore = () => { const handleLoadMore = () => {
store.dispatch('chat/querySessionMessage', { topMessageId: unref(sessionMessageList)[0].id }); store.dispatch('chat/querySessionMessage', { topMessageId: unref(sessionMessageList)[0].id });
}; };
const handleSendMessage = () => { const handleSendMessage = (e) => {
if (state.message) { if (e && e.shiftKey) {
store.dispatch('chat/submitMessage', { text: state.message }); state.message += '\n';
state.message = '';
} else { } else {
proxy.$message.warning('发送消息不能为空'); if (state.message) {
store.dispatch('chat/submitMessage', { text: state.message });
state.message = '';
} else {
proxy.$message.warning('发送消息不能为空');
}
} }
}; };

@ -114,6 +114,7 @@
phone: '', phone: '',
remark: '', remark: '',
userName: '', userName: '',
password: '',
roleIds: [], roleIds: [],
}); });
const permissionList = reactive([]); const permissionList = reactive([]);
@ -156,9 +157,19 @@
data.voucherClueUrl = data.voucherClueUrls.join(','); data.voucherClueUrl = data.voucherClueUrls.join(',');
let res = await store.dispatch('employee/save', data); let res = await store.dispatch('employee/save', data);
if (res) { if (res) {
if (!data.id) { Object.assign(form, {
unref(refsForm).resetFields(); id: null,
} departmentId: null,
email: '',
employeeName: '',
employeeType: 1,
isEnable: false,
phone: '',
remark: '',
userName: '',
password: '',
roleIds: [],
});
handleClose(); handleClose();
} }
} catch (e) { } catch (e) {

@ -118,10 +118,13 @@
<template #default="{ row }">{{ new Number(row.realAmount).toFixed(2) }}</template> <template #default="{ row }">{{ new Number(row.realAmount).toFixed(2) }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<h3 class="summary"> <div class="summary">
<span>合计</span> <div class="left">买家留言{{ state.form.useMessage || '无' }}</div>
<span class="red">{{ new Number(state.sum).toFixed(2) }}</span> <h3 class="right">
</h3> <span>合计</span>
<span class="red">{{ new Number(state.sum).toFixed(2) }}</span>
</h3>
</div>
<br /> <br />
<h3>费用信息</h3> <h3>费用信息</h3>
<el-table border :data="[state.form]"> <el-table border :data="[state.form]">
@ -274,8 +277,14 @@
margin-bottom: @layout-space; margin-bottom: @layout-space;
} }
.summary { .summary {
text-align: right; display: flex;
margin-top: @layout-space; justify-content: space-between;
align-items: center;
margin: @layout-space 0;
.right {
text-align: right;
margin-bottom: 0;
}
} }
} }
.red { .red {

@ -148,7 +148,7 @@
data.mainPicture = data.pictureList[0]; data.mainPicture = data.pictureList[0];
state.form.id = await store.dispatch('product/save', state.form); state.form.id = await store.dispatch('product/save', state.form);
if (state.form.id) { if (state.form.id) {
unref(state.refsForm).resetFields(); store.commit('layout/closeTab', { current: true });
router.push({ router.push({
name: 'UpdateProduct', name: 'UpdateProduct',
params: { params: {
@ -156,6 +156,24 @@
step: 2, step: 2,
}, },
}); });
state.form = {
id: null,
categoryId: null,
productType: 1,
name: null,
remark: null,
isRecommend: false,
singleBuyLimit: 1,
limit: 0,
postage: 0,
remoteAreaPostage: 10,
pictureList: [],
fileList: [],
autoSend: null,
detail: null,
isEnable: false,
virtualProductModifyDTOList: [],
};
} }
} catch (e) { } catch (e) {
console.info('取消保存', e); console.info('取消保存', e);

@ -121,6 +121,7 @@
skuValue: [], skuValue: [],
form: { form: {
id: null, id: null,
productType: 1,
attrsGroupList: [], attrsGroupList: [],
skuInfos: [], skuInfos: [],
}, },
@ -130,7 +131,11 @@
const id = route.params.id; const id = route.params.id;
if (id && id !== state.form.id) { if (id && id !== state.form.id) {
state.form.id = id; state.form.id = id;
let res = await store.dispatch('productSkus/search', id); let res = await store.dispatch('product/detail', id);
if (res) {
Object.assign(state.form, state.form);
}
res = await store.dispatch('productSkus/search', id);
state.form.skuInfos = res.map((item) => { state.form.skuInfos = res.map((item) => {
return { return {
...item, ...item,

Loading…
Cancel
Save