|
@@ -162,18 +162,37 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改费用信息对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="500px" append-to-body>
|
|
|
+ <el-dialog
|
|
|
+ v-dialogDrag
|
|
|
+ :fullscreen="dialogFull"
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="open"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="80%"
|
|
|
+ append-to-body>
|
|
|
+ <template slot="title">
|
|
|
+ <div class="avue-crud__dialog__header">
|
|
|
+ <span class="el-dialog__title">
|
|
|
+ <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
|
|
|
+ 添加费用信息
|
|
|
+ </span>
|
|
|
+ <div class="avue-crud__dialog__menu enlarge" @click="full">
|
|
|
+ <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="编号" prop="fNo">
|
|
|
- <el-input v-model="form.fNo" placeholder="请输入编号" />
|
|
|
+ <el-input v-model="form.fNo" placeholder="请输入编号" style="width:80%"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="名称" prop="fName">
|
|
|
- <el-input v-model="form.fName" placeholder="请输入名称" />
|
|
|
+ <el-input v-model="form.fName" placeholder="请输入名称" style="width:80%" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -181,7 +200,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="费用属性" prop="fFeetype">
|
|
|
- <el-select v-model="form.fFeetype" placeholder="请选择费用属性">
|
|
|
+ <el-select v-model="form.fFeetype" placeholder="请选择费用属性" style="width:80%">
|
|
|
<el-option
|
|
|
v-for="dict in fFeetypeOptions"
|
|
|
:key="dict.dictValue"
|
|
@@ -192,8 +211,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="计量单位" prop="fFeeunitid">
|
|
|
- <el-select v-model="form.fFeeunitid" placeholder="请选择计量单位">
|
|
|
+ <el-form-item label="计量单位" prop="fFeeunitid" >
|
|
|
+ <el-select v-model="form.fFeeunitid" placeholder="请选择计量单位" style="width:80%">
|
|
|
<el-option
|
|
|
v-for="dict in fFeeunitidOptions"
|
|
|
:key="dict.dictValue"
|
|
@@ -208,12 +227,12 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="币种" prop="fCurrency">
|
|
|
- <el-input v-model="form.fCurrency" placeholder="请输入币种" />
|
|
|
+ <el-input v-model="form.fCurrency" placeholder="请输入币种" style="width:80%" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="状态">
|
|
|
- <el-select v-model="form.fStatus" placeholder="状态">
|
|
|
+ <el-form-item label="状态" >
|
|
|
+ <el-select v-model="form.fStatus" placeholder="状态" style="width:80%">
|
|
|
<el-option
|
|
|
v-for="dict in fDocumentOptions"
|
|
|
:key="dict.dictValue"
|
|
@@ -225,7 +244,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="收付方向">
|
|
|
- <el-select v-model="form.fDc" placeholder="">
|
|
|
+ <el-select v-model="form.fDc" placeholder="" style="width:80%">
|
|
|
<el-option label="收" value="D"/>
|
|
|
<el-option label="付" value="C"/>
|
|
|
<el-option label="收付" value="DC"/>
|
|
@@ -248,13 +267,69 @@
|
|
|
|
|
|
<script>
|
|
|
import { listFees, getFees, delFees, addFees, updateFees, exportFees } from "../../../api/basicdata/fees";
|
|
|
+import Vue from 'vue'
|
|
|
+Vue.directive('dialogDrag', {
|
|
|
+ bind(el, binding, vnode, oldVnode) {
|
|
|
+ const dialogHeaderEl = el.querySelector('.el-dialog__header')
|
|
|
+ const dragDom = el.querySelector('.el-dialog')
|
|
|
+ const enlarge = el.querySelector('.enlarge')
|
|
|
+ dialogHeaderEl.style.cursor = 'move'
|
|
|
+
|
|
|
+ // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
|
|
+ const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
|
|
|
+ if(enlarge){
|
|
|
+ enlarge.onclick = (e) => {
|
|
|
+ dragDom.style.top = '0px'
|
|
|
+ dragDom.style.left = '0px'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dialogHeaderEl.onmousedown = (e) => {
|
|
|
+ // 鼠标按下,计算当前元素距离可视区的距离
|
|
|
+ const disX = e.clientX - dialogHeaderEl.offsetLeft
|
|
|
+ const disY = e.clientY - dialogHeaderEl.offsetTop
|
|
|
+
|
|
|
+ // 获取到的值带px 正则匹配替换
|
|
|
+ let styL, styT
|
|
|
+
|
|
|
+ // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
|
|
|
+ if (sty.left.includes('%')) {
|
|
|
+ styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
|
|
|
+ styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
|
|
|
+ } else {
|
|
|
+ styL = +sty.left.replace(/\px/g, '')
|
|
|
+ styT = +sty.top.replace(/\px/g, '')
|
|
|
+ }
|
|
|
+
|
|
|
+ document.onmousemove = function(e) {
|
|
|
+ // 通过事件委托,计算移动的距离
|
|
|
+ const l = e.clientX - disX
|
|
|
+ const t = e.clientY - disY
|
|
|
|
|
|
+ // 移动当前元素
|
|
|
+
|
|
|
+ if ((t + styT) >= 0){
|
|
|
+ dragDom.style.top = `${t + styT}px`
|
|
|
+ }
|
|
|
+ dragDom.style.left = `${l + styL}px`
|
|
|
+ // 将此时的位置传出去
|
|
|
+ // binding.value({x:e.pageX,y:e.pageY})
|
|
|
+ }
|
|
|
+
|
|
|
+ document.onmouseup = function(e) {
|
|
|
+ document.onmousemove = null
|
|
|
+ document.onmouseup = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|
|
|
export default {
|
|
|
name: "Fees",
|
|
|
components: {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //全屏放大
|
|
|
+ dialogFull:false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -316,6 +391,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ full(){
|
|
|
+ this.dialogFull = !this.dialogFull
|
|
|
+ },
|
|
|
// 费用属性默认为仓储、计量单位默认为毛重
|
|
|
query() {
|
|
|
this.$set(this.form, "fFeetype", "1");
|
|
@@ -449,3 +527,35 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style lang="scss">
|
|
|
+.avue-crud__dialog__header {
|
|
|
+ display: -webkit-box;
|
|
|
+ display: -ms-flexbox;
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ -ms-flex-align: center;
|
|
|
+ align-items: center;
|
|
|
+ -webkit-box-pack: justify;
|
|
|
+ -ms-flex-pack: justify;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+.el-dialog__title {
|
|
|
+ color: rgba(0,0,0,.85);
|
|
|
+ font-weight: 500;
|
|
|
+ word-wrap: break-word;
|
|
|
+}
|
|
|
+.avue-crud__dialog__menu {
|
|
|
+ padding-right: 20px;
|
|
|
+ float: left;
|
|
|
+}
|
|
|
+.avue-crud__dialog__menu i {
|
|
|
+ color: #909399;
|
|
|
+ font-size: 15px;
|
|
|
+}
|
|
|
+.el-icon-full-screen{
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.el-icon-full-screen:before {
|
|
|
+ content: "\e719";
|
|
|
+}
|
|
|
+</style>
|