@@ -1,10 +1,8 @@ | |||||
<template> | <template> | ||||
<a-modal title="订单日志" width="1000px" :visible="showLog" :confirm-loading="confirmSubmit" @cancel="showLog=false" :footer="null"> | |||||
<a-table class="tablesa" :columns="tableColumns" :data-source="tableData" :rowKey="lists => lists.id" :pagination="pagination" :loading="tableLoad" @change="getLogList"> | <a-table class="tablesa" :columns="tableColumns" :data-source="tableData" :rowKey="lists => lists.id" :pagination="pagination" :loading="tableLoad" @change="getLogList"> | ||||
<span slot="creationTime" slot-scope="text">{{formatDateTime(text)}}</span> | |||||
<span slot="creatorId" slot-scope="text" :title="text" style="max-width:68px; display:block; overflow: hidden; white-space:nowrap;">{{text}}</span> | |||||
<span slot="createTime" slot-scope="text">{{formatDateTime(text)}}</span> | |||||
<div slot="content" slot-scope="text"><div class="note">{{text}}</div></div> | |||||
</a-table> | </a-table> | ||||
</a-modal> | |||||
</template> | </template> | ||||
<script> | <script> | ||||
@@ -12,15 +10,15 @@ import {getLogs} from "@/services/order/Order"; | |||||
import {formatDate} from "@/services/Common"; | import {formatDate} from "@/services/Common"; | ||||
export default { | export default { | ||||
name: "bnOrderLogList", | name: "bnOrderLogList", | ||||
props:['orderId','type'], | |||||
props:['type'], | |||||
data(){ | data(){ | ||||
return{ | return{ | ||||
tableLoad: false,showLog:false,confirmSubmit:false, | |||||
tableLoad: false,confirmSubmit:false,orderId:'', | |||||
tableColumns:[ | tableColumns:[ | ||||
{title: '操作时间',dataIndex: 'creationTime',key: 'creationTime',width:'150px',scopedSlots: { customRender: 'creationTime' }}, | |||||
{title: '操作人ID',dataIndex: 'creatorId',key: 'creatorId',width:'100px',scopedSlots: { customRender: 'creatorId' }}, | |||||
{title: '操作类型',dataIndex: 'logTypeValue',key: 'logTypeValue',width:'120px'}, | |||||
{title: '修改内容',dataIndex: 'content',key: 'content'}, | |||||
{title: '操作时间',dataIndex: 'createTime',key: 'createTime',width:'150px',scopedSlots: { customRender: 'createTime'}}, | |||||
{title: '操作人ID',dataIndex: 'userId',key: 'userId',width:'100px',scopedSlots: { customRender: 'userId'},align:'center'}, | |||||
{title: '操作类型',dataIndex: 'type',key: 'type',width:'120px',align:'center'}, | |||||
{title: '修改内容',dataIndex: 'content',key: 'content',scopedSlots: { customRender: 'content'}}, | |||||
// {title: '内容前后',dataIndex: 'afterData',key: 'afterData',scopedSlots: { customRender: 'afterData' },}, | // {title: '内容前后',dataIndex: 'afterData',key: 'afterData',scopedSlots: { customRender: 'afterData' },}, | ||||
], | ], | ||||
tableData:[], | tableData:[], | ||||
@@ -33,23 +31,32 @@ export default { | |||||
}, | }, | ||||
} | } | ||||
}, | }, | ||||
mounted() { | |||||
let orderLogId = this.$route.query.id; | |||||
if (orderLogId) this.fnShowLog(orderLogId); | |||||
}, | |||||
methods:{ | methods:{ | ||||
//展示日志 | //展示日志 | ||||
fnShowLog(){ | |||||
this.showLog=true; | |||||
fnShowLog(id,type){ | |||||
this.showLog = true; | |||||
this.orderId = id; | |||||
this.getLogList(); | this.getLogList(); | ||||
}, | }, | ||||
async getLogList(page){ | async getLogList(page){ | ||||
this.tableLoad = true; | this.tableLoad = true; | ||||
if(typeof(page)=='object') this.pagination.current = page.current; | if(typeof(page)=='object') this.pagination.current = page.current; | ||||
let count = (this.pagination.current)*this.pagination.pageSize; | |||||
let count = this.pagination.current; | |||||
let params={ | let params={ | ||||
page:count, | page:count, | ||||
pageSize:this.pagination.pageSize, | pageSize:this.pagination.pageSize, | ||||
} | } | ||||
let res = await getLogs(params,this.orderId); | let res = await getLogs(params,this.orderId); | ||||
this.tableData = res.items; | |||||
// this.pagination.total = res.totalCount; | |||||
if (!res.success){ | |||||
this.$message.error('查询失败!'); | |||||
}else{ | |||||
this.tableData = res.data.item1; | |||||
this.pagination.total = res.data.item2; | |||||
} | |||||
this.tableLoad = false; | this.tableLoad = false; | ||||
}, | }, | ||||
formatDateTime(time){ | formatDateTime(time){ | ||||
@@ -60,5 +67,6 @@ export default { | |||||
</script> | </script> | ||||
<style scoped> | <style scoped> | ||||
.tablesa *{font-size:12px;} | |||||
.note{word-break: break-all; max-height:200px; overflow-y: auto;} | |||||
</style> | </style> |
@@ -5,7 +5,7 @@ | |||||
<!-- <bnOrderLogList :order-id="orderId" />--> | <!-- <bnOrderLogList :order-id="orderId" />--> | ||||
<a-button type="primary" @click="fnShowOrderMoney">调整订单金额</a-button> | <a-button type="primary" @click="fnShowOrderMoney">调整订单金额</a-button> | ||||
<a-button type="primary" @click="fnShowOrderCheck(1)">审核订单</a-button> | <a-button type="primary" @click="fnShowOrderCheck(1)">审核订单</a-button> | ||||
<a-button type="primary" @click="fnShowLog">查看日志</a-button> | |||||
<a-button type="primary" @click="fnShowLog1">查看日志</a-button> | |||||
<a-button v-if="!ifEdit" type="primary" :loading="loadOE" @click="BeforeOrderEdit">修改订单</a-button> | <a-button v-if="!ifEdit" type="primary" :loading="loadOE" @click="BeforeOrderEdit">修改订单</a-button> | ||||
<template v-else> | <template v-else> | ||||
<a-button type="danger" @click="upOrderEdit">保存修改</a-button> | <a-button type="danger" @click="upOrderEdit">保存修改</a-button> | ||||
@@ -107,7 +107,9 @@ | |||||
<orderCheck :isAlt="true" :orderInfo="orderDetail" :orderId="orderId" ref="formOC"></orderCheck> | <orderCheck :isAlt="true" :orderInfo="orderDetail" :orderId="orderId" ref="formOC"></orderCheck> | ||||
</a-modal> | </a-modal> | ||||
<orderMoney :showAlt="showSetOrderMoney" :fnHiddenAlt="fnHideOrderMoney" :sourceType="orderDetail.sourceType" :orderId="orderId" ref="formMoney"></orderMoney> | <orderMoney :showAlt="showSetOrderMoney" :fnHiddenAlt="fnHideOrderMoney" :sourceType="orderDetail.sourceType" :orderId="orderId" ref="formMoney"></orderMoney> | ||||
<altLog ref="altLog"></altLog> | |||||
<a-modal title="订单日志" width="1000px" :visible="showLog" :confirm-loading="confirmSubmit" @cancel="showLog=false" :footer="null"> | |||||
<altLog ref="altLog"></altLog> | |||||
</a-modal> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -126,7 +128,7 @@ export default { | |||||
// components: {bnOrderLogList,bnOrderCancel,BnSetPurchaseStatus}, | // components: {bnOrderLogList,bnOrderCancel,BnSetPurchaseStatus}, | ||||
data(){ | data(){ | ||||
return{ | return{ | ||||
loadPage:true,confirmSubmit:false,loadOE:false,ifEdit:false,loadEdit:false,loadOffer:false, | |||||
loadPage:true,confirmSubmit:false,loadOE:false,ifEdit:false,loadEdit:false,loadOffer:false,showLog:false, | |||||
orderId:'',orderStatus:0,orderDetail:{},orderParams:{},pcbDetail:{},isOutFactory:'', | orderId:'',orderStatus:0,orderDetail:{},orderParams:{},pcbDetail:{},isOutFactory:'', | ||||
layout:{labelCol:{span:5},wrapperCol:{span:19},}, | layout:{labelCol:{span:5},wrapperCol:{span:19},}, | ||||
formPQ:{},typeList:{},arrSpecialList:[],selSL:[], | formPQ:{},typeList:{},arrSpecialList:[],selSL:[], | ||||
@@ -394,10 +396,9 @@ export default { | |||||
this.getOrderDetail(); | this.getOrderDetail(); | ||||
}, | }, | ||||
//展示日志 | //展示日志 | ||||
fnShowLog(){ | |||||
fnShowLog1(){ | |||||
this.showLog = true; | this.showLog = true; | ||||
this.$refs.altLog.orderId = this.orderId; | |||||
this.$refs.altLog.fnShowLog(); | |||||
// this.$refs.altLog.fnShowLog(this.orderId,'orderLog'); | |||||
}, | }, | ||||
getSelTxt(type,key){ | getSelTxt(type,key){ | ||||
return resSelects(type,key===0?key:key||'null'); | return resSelects(type,key===0?key:key||'null'); | ||||
@@ -27,6 +27,8 @@ | |||||
</a-form-model-item> | </a-form-model-item> | ||||
<a-form-model-item label="备注说明"> | <a-form-model-item label="备注说明"> | ||||
<quill-editor :options="editorOption" ref="myTextEditor" v-model="form.content"></quill-editor> | <quill-editor :options="editorOption" ref="myTextEditor" v-model="form.content"></quill-editor> | ||||
<span v-if="form.content.length>2000" style="color:#999" :style="form.content.length>3000?'color:#f30':''"><a-icon type="info-circle" /> 备注字数 ( {{form.content.length}} / 4000 )</span> | |||||
<a-upload v-show="false" class="avatar-uploader1" name="file" :multiple="true" action="/api/app/order/up-load-file" @change="filesHandleChange" ></a-upload> | |||||
</a-form-model-item> | </a-form-model-item> | ||||
<a-form-model-item label="是否发邮件"> | <a-form-model-item label="是否发邮件"> | ||||
<a-radio-group button-style="solid" v-model="form.sendEmail"> | <a-radio-group button-style="solid" v-model="form.sendEmail"> | ||||
@@ -50,9 +52,7 @@ import { quillEditor } from "vue-quill-editor"; | |||||
export default { | export default { | ||||
name: "reviewOrder", | name: "reviewOrder", | ||||
components: { | |||||
quillEditor | |||||
}, | |||||
components: {quillEditor}, | |||||
props:['isAlt','hidden','orderId','orderInfo'], | props:['isAlt','hidden','orderId','orderInfo'], | ||||
data(){ | data(){ | ||||
return{ | return{ | ||||
@@ -66,22 +66,34 @@ export default { | |||||
}, | }, | ||||
editorOption:{ | editorOption:{ | ||||
modules: { | modules: { | ||||
toolbar: [ | |||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 | |||||
// ['blockquote', 'code-block'], // 引用 代码块 | |||||
// [{ header: 1 }, { header: 2 }], // 1、2 级标题 | |||||
// [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 | |||||
// [{ script: 'sub' }, { script: 'super' }], // 上标/下标 | |||||
// [{ indent: '-1' }, { indent: '+1' }], // 缩进 | |||||
// [{ direction: 'rtl' }], // 文本方向 | |||||
// [{ size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] }], // 字体大小 | |||||
[{ header: [1, 2, 3, 4, 5, 6] }], // 标题 | |||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 | |||||
// [{ font: ['songti'] }], // 字体种类 | |||||
[{ align: [] }], // 对齐方式 | |||||
['clean'], // 清除文本格式 | |||||
['image'] // 链接、图片、视频 | |||||
] | |||||
toolbar:{ | |||||
container:[ | |||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 | |||||
// ['blockquote', 'code-block'], // 引用 代码块 | |||||
// [{ header: 1 }, { header: 2 }], // 1、2 级标题 | |||||
// [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 | |||||
// [{ script: 'sub' }, { script: 'super' }], // 上标/下标 | |||||
// [{ indent: '-1' }, { indent: '+1' }], // 缩进 | |||||
// [{ direction: 'rtl' }], // 文本方向 | |||||
// [{ size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] }], // 字体大小 | |||||
[{ header: [1, 2, 3, 4, 5, 6] }], // 标题 | |||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 | |||||
// [{ font: ['songti'] }], // 字体种类 | |||||
[{ align: [] }], // 对齐方式 | |||||
['clean'], // 清除文本格式 | |||||
['image'] // 链接、图片、视频 | |||||
], | |||||
handlers: { | |||||
'image': function (value) { | |||||
if (value) { | |||||
// 触发input框选择图片文件 | |||||
document.querySelector('.avatar-uploader1 input').click() | |||||
} else { | |||||
this.quill.format('image', false); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | }, | ||||
placeholder: '请输入正文' | placeholder: '请输入正文' | ||||
} | } | ||||
@@ -104,15 +116,35 @@ export default { | |||||
this.fnIsST24(); | this.fnIsST24(); | ||||
}, | }, | ||||
methods:{ | methods:{ | ||||
filesHandleChange(e){ | |||||
this.loadPage = true; | |||||
if (e.file?.response?.success){ | |||||
const imageUrl = e.file.response.data; | |||||
console.log(imageUrl) | |||||
let quill = this.$refs.myTextEditor.quill;// 获取光标所在位置 | |||||
let length = quill.getSelection().index | |||||
quill.insertEmbed(length, 'image', imageUrl);// 插入图片 | |||||
quill.setSelection(length + 1);// 调整光标到最后 | |||||
this.loadPage = false; | |||||
} | |||||
if (e.file?.response?.success == false) { | |||||
this.$message.error('图片上传失败!'); | |||||
this.loadPage = false; | |||||
} | |||||
}, | |||||
//审核订单 | //审核订单 | ||||
fnOrderCheck(){ | fnOrderCheck(){ | ||||
this.$refs.ruleForm.validate(valid => { | this.$refs.ruleForm.validate(valid => { | ||||
if (valid) { | if (valid) { | ||||
console.log(1,this.isST24) | |||||
// console.log(1,this.isST24) | |||||
if (this.isST24 && (this.form.contentType===0 || this.form.contentType==='')){ | if (this.isST24 && (this.form.contentType===0 || this.form.contentType==='')){ | ||||
this.$message.warn('请选择备注类型') | this.$message.warn('请选择备注类型') | ||||
return false; | return false; | ||||
} | } | ||||
if (this.form.content.length > 4000){ | |||||
this.$message.warn('备注说明过长,请缩减至4000字符内!') | |||||
return false; | |||||
} | |||||
this.loadPage = true; | this.loadPage = true; | ||||
OrderCheck(this.form).then(res=>{ | OrderCheck(this.form).then(res=>{ | ||||
if (res.success) this.$message.success(res.message); | if (res.success) this.$message.success(res.message); | ||||
@@ -83,6 +83,7 @@ export default { | |||||
fnGetOrderMoney(){ | fnGetOrderMoney(){ | ||||
if (this.tabMoneyForm.indexOf(this.sourceType)<0){ | if (this.tabMoneyForm.indexOf(this.sourceType)<0){ | ||||
this.$message.warn('暂无匹配的价格模板!'); | this.$message.warn('暂无匹配的价格模板!'); | ||||
this.fnHideAlt(); | |||||
return false; | return false; | ||||
} | } | ||||
this.isEdit = false; | this.isEdit = false; | ||||
@@ -127,4 +128,4 @@ export default { | |||||
/deep/ .ant-form-item-label{white-space:pre-wrap} | /deep/ .ant-form-item-label{white-space:pre-wrap} | ||||
.ant-form-item{margin-bottom:5px} | .ant-form-item{margin-bottom:5px} | ||||
.bn{text-align:center; clear:both; padding:20px 0} | .bn{text-align:center; clear:both; padding:20px 0} | ||||
</style> | |||||
</style> |
@@ -31,6 +31,11 @@ const options = { | |||||
component: () => import('@/pages/order/orderCheck'), | component: () => import('@/pages/order/orderCheck'), | ||||
}, | }, | ||||
{ | { | ||||
path: '/orderLog', | |||||
name: '订单日志', | |||||
component: () => import('@/pages/Common/altLog'), | |||||
}, | |||||
{ | |||||
path: '/account', | path: '/account', | ||||
name: '帐号管理', | name: '帐号管理', | ||||
component: TabsView, | component: TabsView, | ||||
@@ -13,7 +13,7 @@ Router.prototype.push = function push(location) { | |||||
// 不需要登录拦截的路由配置 | // 不需要登录拦截的路由配置 | ||||
const loginIgnore = { | const loginIgnore = { | ||||
names: ['404', '403'], //根据路由名称匹配 | names: ['404', '403'], //根据路由名称匹配 | ||||
paths: ['/loginjmp', '/loginOA','/orderCheck'], //根据路由fullPath匹配 | |||||
paths: ['/loginjmp', '/loginOA','/orderCheck','/orderLog'], //根据路由fullPath匹配 | |||||
/** | /** | ||||
* 判断路由是否包含在该配置中 | * 判断路由是否包含在该配置中 | ||||
* @param route vue-router 的 route 对象 | * @param route vue-router 的 route 对象 | ||||
@@ -38,4 +38,4 @@ function initRouter(isAsync) { | |||||
export { | export { | ||||
loginIgnore, | loginIgnore, | ||||
initRouter | initRouter | ||||
} | |||||
} |