|
@@ -272,7 +272,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
- <el-dialog title="提示" :visible.sync="showSetting" width="700px">
|
|
|
+ <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
|
|
|
+ <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>
|
|
|
+ </template>
|
|
|
<div>配置排序列数据(拖动调整顺序)</div>
|
|
|
<div style="margin-left: 17px">
|
|
|
<el-checkbox
|
|
@@ -382,7 +389,7 @@
|
|
|
<span v-if="scope.row.fBillstatus === 6">全部入账</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -449,9 +456,9 @@
|
|
|
<template slot="title">
|
|
|
<div class="avue-crud__dialog__header">
|
|
|
<span class="el-dialog__title">
|
|
|
- <span style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
|
|
|
+ <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" @click="dialogFull?dialogFull=false:dialogFull=true">
|
|
|
+ <div class="avue-crud__dialog__menu enlarge" @click="full">
|
|
|
<i class="el-icon-full-screen"></i>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -517,7 +524,7 @@
|
|
|
style="width: 80%"
|
|
|
type="date"
|
|
|
:disabled="browseStatus || formBrowseStatus"
|
|
|
-
|
|
|
+ @change="changeDate"
|
|
|
value-format="timestamp"
|
|
|
placeholder="入库日期"
|
|
|
>
|
|
@@ -792,7 +799,6 @@
|
|
|
type="date"
|
|
|
style="width:80%"
|
|
|
:disabled="browseStatus || formBrowseStatus"
|
|
|
- value-format="timestamp"
|
|
|
placeholder="仓储费计算日期"
|
|
|
>
|
|
|
</el-date-picker>
|
|
@@ -2509,6 +2515,7 @@
|
|
|
</el-dialog>
|
|
|
<!-- 选择作业费协议数据 -->
|
|
|
<el-dialog
|
|
|
+ v-dialogDrag
|
|
|
title="作业费协议"
|
|
|
:close-on-click-modal="false"
|
|
|
:modal="false"
|
|
@@ -2516,6 +2523,13 @@
|
|
|
:visible.sync="warehousingagreements"
|
|
|
width="70%"
|
|
|
>
|
|
|
+ <template slot="作业费协议">
|
|
|
+ <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>
|
|
|
+ </template>
|
|
|
<el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal" @select="handleSelect">
|
|
|
<el-menu-item index="1">车队作业费</el-menu-item>
|
|
|
<el-menu-item index="2">劳务作业费</el-menu-item>
|
|
@@ -2975,6 +2989,62 @@ import Cookies from 'js-cookie'
|
|
|
import { addSet, select } from '@/api/system/set'
|
|
|
import draggable from "vuedraggable";
|
|
|
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: "Warehousebills",
|
|
|
components: {
|
|
@@ -2984,6 +3054,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ positionX: 0,
|
|
|
+ positionY: 0,
|
|
|
//全屏放大
|
|
|
dialogFull:false,
|
|
|
//自定义列宽属性
|
|
@@ -3493,20 +3565,15 @@ export default {
|
|
|
fBusinessType:null,
|
|
|
fItemsStatus: null,
|
|
|
fFeetunit: '2',
|
|
|
- fBstime:''
|
|
|
+ fBstime:'',
|
|
|
+
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
fDeptid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fMblno: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
- fCorpid: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
+ fCorpid: [{ required: true, message: " ", trigger: "blur", },],
|
|
|
fFeetunit: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fPlanqty: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fPlangrossweight: [{ required: true, message: " ", trigger: "blur" }],
|
|
@@ -3517,27 +3584,11 @@ export default {
|
|
|
fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fSbu: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fBusinessType:[{ required: true, message: " ", trigger: "blur" }],
|
|
|
- fStorekeeper: {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ fStorekeeper: { required: true, message: " ", trigger: "blur", },
|
|
|
// fleet:[{required: this.isrequired == '1' ? true : false,message: " ", trigger: "blur"}],
|
|
|
fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
- fbillingway: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- fTocorpid: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
+ fbillingway: [{ required: true, message: " ", trigger: "blur", },],
|
|
|
+ fTocorpid: [{ required: true, message: " ", trigger: "blur", },],
|
|
|
},
|
|
|
defaultTitle:[]
|
|
|
};
|
|
@@ -3600,13 +3651,56 @@ export default {
|
|
|
this.adoPt()
|
|
|
},
|
|
|
methods: {
|
|
|
- full(e){
|
|
|
- // console.log(document.body.clientWidth)
|
|
|
- // console.log(document.documentElement.clientWidth)
|
|
|
- console.log(e.clientX,e.clientY)
|
|
|
- console.log(this.offset.Left)
|
|
|
+ full(){
|
|
|
+ this.dialogFull = !this.dialogFull
|
|
|
+ },
|
|
|
+ move(){
|
|
|
+ const dialogHeaderEl = document.querySelector('.el-dialog__header')
|
|
|
+ const dragDom = document.querySelector('.el-dialog')
|
|
|
+ dialogHeaderEl.style.cursor = 'move'
|
|
|
+
|
|
|
+ // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
|
|
+ const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
|
|
|
+
|
|
|
+ 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
|
|
|
|
|
|
+ // 移动当前元素
|
|
|
+ dragDom.style.left = `${l + styL}px`
|
|
|
+ dragDom.style.top = `${t + styT}px`
|
|
|
+
|
|
|
+ // 将此时的位置传出去
|
|
|
+ // binding.value({x:e.pageX,y:e.pageY})
|
|
|
+ }
|
|
|
+
|
|
|
+ document.onmouseup = function(e) {
|
|
|
+ document.onmousemove = null
|
|
|
+ document.onmouseup = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //计算仓储费日期变更
|
|
|
+ changeDate(){
|
|
|
+ this.$set(this.form,'fChargedate',this.form.fBsdate)
|
|
|
},
|
|
|
//列设置全选
|
|
|
allChecked() {
|
|
@@ -3784,7 +3878,6 @@ export default {
|
|
|
adoPt(){
|
|
|
this.approval = this.$route.query.data
|
|
|
if (this.approval){
|
|
|
- console.log("111")
|
|
|
let queryParams = { pageNum: 1, pageSize: 10, fDc:'C'};
|
|
|
listFees(queryParams).then((response) => {
|
|
|
this.fCNameOptions = response.rows;
|
|
@@ -5535,7 +5628,7 @@ export default {
|
|
|
this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
|
|
|
this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
|
|
|
this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
- this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
|
|
|
+ // this.$set(this.form, "fChargedate",this.form.fChargedate);
|
|
|
this.dataList = response.data.warehousebillsitems
|
|
|
for (let list in this.dataList) {
|
|
|
this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
|
|
@@ -5999,18 +6092,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* dialog*/
|
|
|
-.el-dialog__header {
|
|
|
- padding: 15px 20px 15px;
|
|
|
-}
|
|
|
-.el-dialog__headerbtn{
|
|
|
- top: 15px;
|
|
|
-}
|
|
|
-
|
|
|
-/*dialog header*/
|
|
|
-.el-dialog__header{
|
|
|
- background: #e3eaed;
|
|
|
-}
|
|
|
+///* dialog*/
|
|
|
+//.el-dialog__header {
|
|
|
+// padding: 15px 20px 15px;
|
|
|
+//}
|
|
|
+//.el-dialog__headerbtn{
|
|
|
+// top: 15px;
|
|
|
+//}
|
|
|
+//
|
|
|
+///*dialog header*/
|
|
|
+//.el-dialog__header{
|
|
|
+// background: #e3eaed;
|
|
|
+//}
|
|
|
.avue-crud__dialog__header {
|
|
|
display: -webkit-box;
|
|
|
display: -ms-flexbox;
|