diff --git a/src/pages/Common/altLog.vue b/src/pages/Common/altLog.vue index a494371..c432215 100644 --- a/src/pages/Common/altLog.vue +++ b/src/pages/Common/altLog.vue @@ -1,10 +1,8 @@ diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index af32ed0..209bd86 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -5,7 +5,7 @@ 调整订单金额 审核订单 - 查看日志 + 查看日志 修改订单 @@ -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'); diff --git a/src/pages/order/orderCheck.vue b/src/pages/order/orderCheck.vue index 062ecd0..9c58e58 100644 --- a/src/pages/order/orderCheck.vue +++ b/src/pages/order/orderCheck.vue @@ -27,6 +27,8 @@ + 备注字数 ( {{form.content.length}} / 4000 ) + @@ -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); diff --git a/src/pages/order/orderMoney.vue b/src/pages/order/orderMoney.vue index 0f56d5f..32d5882 100644 --- a/src/pages/order/orderMoney.vue +++ b/src/pages/order/orderMoney.vue @@ -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} - \ No newline at end of file + diff --git a/src/router/config.js b/src/router/config.js index 670c0ce..29d8b21 100644 --- a/src/router/config.js +++ b/src/router/config.js @@ -31,6 +31,11 @@ const options = { component: () => import('@/pages/order/orderCheck'), }, { + path: '/orderLog', + name: '订单日志', + component: () => import('@/pages/Common/altLog'), + }, + { path: '/account', name: '帐号管理', component: TabsView, diff --git a/src/router/index.js b/src/router/index.js index 0a94b4e..67ecfbd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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 -} \ No newline at end of file +}