Selaa lähdekoodia

no message

master
vanhempi
commit
ca88582d40
6 muutettua tiedostoa jossa 92 lisäystä ja 45 poistoa
  1. +24
    -16
      src/pages/Common/altLog.vue
  2. +7
    -6
      src/pages/order/detail.vue
  3. +52
    -20
      src/pages/order/orderCheck.vue
  4. +2
    -1
      src/pages/order/orderMoney.vue
  5. +5
    -0
      src/router/config.js
  6. +2
    -2
      src/router/index.js

+ 24
- 16
src/pages/Common/altLog.vue Näytä tiedosto

@@ -1,10 +1,8 @@
<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">
<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-modal>
</template>

<script>
@@ -12,15 +10,15 @@ import {getLogs} from "@/services/order/Order";
import {formatDate} from "@/services/Common";
export default {
name: "bnOrderLogList",
props:['orderId','type'],
props:['type'],
data(){
return{
tableLoad: false,showLog:false,confirmSubmit:false,
tableLoad: false,confirmSubmit:false,orderId:'',
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' },},
],
tableData:[],
@@ -33,23 +31,32 @@ export default {
},
}
},
mounted() {
let orderLogId = this.$route.query.id;
if (orderLogId) this.fnShowLog(orderLogId);
},
methods:{
//展示日志
fnShowLog(){
this.showLog=true;
fnShowLog(id,type){
this.showLog = true;
this.orderId = id;
this.getLogList();
},
async getLogList(page){
this.tableLoad = true;
if(typeof(page)=='object') this.pagination.current = page.current;
let count = (this.pagination.current)*this.pagination.pageSize;
let count = this.pagination.current;
let params={
page:count,
pageSize:this.pagination.pageSize,
}
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;
},
formatDateTime(time){
@@ -60,5 +67,6 @@ export default {
</script>

<style scoped>

.tablesa *{font-size:12px;}
.note{word-break: break-all; max-height:200px; overflow-y: auto;}
</style>

+ 7
- 6
src/pages/order/detail.vue Näytä tiedosto

@@ -5,7 +5,7 @@
<!-- <bnOrderLogList :order-id="orderId" />-->
<a-button type="primary" @click="fnShowOrderMoney">调整订单金额</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>
<template v-else>
<a-button type="danger" @click="upOrderEdit">保存修改</a-button>
@@ -107,7 +107,9 @@
<orderCheck :isAlt="true" :orderInfo="orderDetail" :orderId="orderId" ref="formOC"></orderCheck>
</a-modal>
<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>
</template>

@@ -126,7 +128,7 @@ export default {
// components: {bnOrderLogList,bnOrderCancel,BnSetPurchaseStatus},
data(){
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:'',
layout:{labelCol:{span:5},wrapperCol:{span:19},},
formPQ:{},typeList:{},arrSpecialList:[],selSL:[],
@@ -394,10 +396,9 @@ export default {
this.getOrderDetail();
},
//展示日志
fnShowLog(){
fnShowLog1(){
this.showLog = true;
this.$refs.altLog.orderId = this.orderId;
this.$refs.altLog.fnShowLog();
// this.$refs.altLog.fnShowLog(this.orderId,'orderLog');
},
getSelTxt(type,key){
return resSelects(type,key===0?key:key||'null');


+ 52
- 20
src/pages/order/orderCheck.vue Näytä tiedosto

@@ -27,6 +27,8 @@
</a-form-model-item>
<a-form-model-item label="备注说明">
<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 label="是否发邮件">
<a-radio-group button-style="solid" v-model="form.sendEmail">
@@ -50,9 +52,7 @@ import { quillEditor } from "vue-quill-editor";

export default {
name: "reviewOrder",
components: {
quillEditor
},
components: {quillEditor},
props:['isAlt','hidden','orderId','orderInfo'],
data(){
return{
@@ -66,22 +66,34 @@ export default {
},
editorOption:{
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: '请输入正文'
}
@@ -104,15 +116,35 @@ export default {
this.fnIsST24();
},
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(){
this.$refs.ruleForm.validate(valid => {
if (valid) {
console.log(1,this.isST24)
// console.log(1,this.isST24)
if (this.isST24 && (this.form.contentType===0 || this.form.contentType==='')){
this.$message.warn('请选择备注类型')
return false;
}
if (this.form.content.length > 4000){
this.$message.warn('备注说明过长,请缩减至4000字符内!')
return false;
}
this.loadPage = true;
OrderCheck(this.form).then(res=>{
if (res.success) this.$message.success(res.message);


+ 2
- 1
src/pages/order/orderMoney.vue Näytä tiedosto

@@ -83,6 +83,7 @@ export default {
fnGetOrderMoney(){
if (this.tabMoneyForm.indexOf(this.sourceType)<0){
this.$message.warn('暂无匹配的价格模板!');
this.fnHideAlt();
return false;
}
this.isEdit = false;
@@ -127,4 +128,4 @@ export default {
/deep/ .ant-form-item-label{white-space:pre-wrap}
.ant-form-item{margin-bottom:5px}
.bn{text-align:center; clear:both; padding:20px 0}
</style>
</style>

+ 5
- 0
src/router/config.js Näytä tiedosto

@@ -31,6 +31,11 @@ const options = {
component: () => import('@/pages/order/orderCheck'),
},
{
path: '/orderLog',
name: '订单日志',
component: () => import('@/pages/Common/altLog'),
},
{
path: '/account',
name: '帐号管理',
component: TabsView,


+ 2
- 2
src/router/index.js Näytä tiedosto

@@ -13,7 +13,7 @@ Router.prototype.push = function push(location) {
// 不需要登录拦截的路由配置
const loginIgnore = {
names: ['404', '403'], //根据路由名称匹配
paths: ['/loginjmp', '/loginOA','/orderCheck'], //根据路由fullPath匹配
paths: ['/loginjmp', '/loginOA','/orderCheck','/orderLog'], //根据路由fullPath匹配
/**
* 判断路由是否包含在该配置中
* @param route vue-router 的 route 对象
@@ -38,4 +38,4 @@ function initRouter(isAsync) {
export {
loginIgnore,
initRouter
}
}

Ladataan…
Peruuta
Tallenna