Parcourir la source

内蒙17划分两种价格,工料机库左右拖动bug

zhongzewei il y a 6 ans
Parent
commit
eab237dd19

+ 12 - 4
web/common/js/slideResize.js

@@ -15,6 +15,8 @@
  * */
 
 const SlideResize = (function() {
+    // 水平拖动条的宽度
+    let resizeWidth = 10;
     //函数防抖
     let timer = null;
     function deBounce(fn, wait) {
@@ -26,14 +28,13 @@ const SlideResize = (function() {
     //设置水平拖动条的宽度
     //@param {Object dom}resize滚动条
     function setResizeWidth (resize) {
-        const fixedWidth = 10;
         //滚动条节点 及 同层非滚动条节点的索引
         let bros = resize.parent().children();
         let index = bros.index(resize),
             otherIndex = index ? 0 : 1;
         const other = resize.parent().children(`:eq(${otherIndex})`);
         let resizeParentWidth = resize.parent().width();
-        let resizeDecimalWidth = fixedWidth / resizeParentWidth,
+        let resizeDecimalWidth = resizeWidth / resizeParentWidth,
             otherDecimalWidth = 1 - resizeDecimalWidth;
         let resizePercentWidth = resizeDecimalWidth * 100 + '%',
             otherPercentWidth = otherDecimalWidth * 100 + '%';
@@ -68,7 +69,6 @@ const SlideResize = (function() {
         });
         $('body').mousemove(function (e) {
             if (drag) {
-                console.log('drag');
                 let moveSize = e.clientX - startPoint;
                 leftChange = leftWidth + moveSize;
                 leftChange = leftChange < limit.min ? limit.min : leftChange;
@@ -259,5 +259,13 @@ const SlideResize = (function() {
         }
     }
 
-    return {setResizeWidth, horizontalSlide, loadHorizonWidth, verticalSlide, loadVerticalHeight, loadMultiVerticalHeight}
+    return {
+        resizeWidth,
+        setResizeWidth,
+        horizontalSlide,
+        loadHorizonWidth,
+        verticalSlide,
+        loadVerticalHeight,
+        loadMultiVerticalHeight
+    }
 })();

+ 2 - 2
web/maintain/std_glj_lib/js/glj.js

@@ -36,9 +36,9 @@ $(document).ready(function () {
     rightElesObj.left = $('#midContent');
     rightElesObj.right = $('#rightContent');
     SlideResize.horizontalSlide(rightElesObj, {min: 200, max: `$('#dataRow').width() - $('#leftContent').width() - 200`}, function () {
-        let resizeRate = 500 / $('#midContent').width(),
+        let resizeRate = SlideResize.resizeWidth * 100 / $('#midContent').width(),
             sheetRate = 100 - resizeRate;
-        $('#leftResize').css('width', `${resizeRate}%`);
+        $('#slideResizeLeft').css('width', `${resizeRate}%`);
         $('#GLJListSheet').css('width', `${sheetRate}%`);
        refreshALlWorkBook();
     });

+ 50 - 0
web/over_write/js/neimenggu_2017.js

@@ -158,4 +158,54 @@ if (typeof module !== 'undefined') {
             return updatePrc;
         }
     };
+}
+//计税方式
+const taxModel = {'common': 1, 'simple': 2};
+//价格属性:计税方式
+const pricePropertiesTemplate = [
+    {
+        region: '全省',
+        taxModel: taxModel.common,
+        price: {
+            dataCode: 'price1',
+            dataName: '单价-一般'
+        }
+    },
+    {
+        region: '全省',
+        taxModel: taxModel.simple,
+        price: {
+            dataCode: 'price2',
+            dataName: '单价-简易'
+        }
+    }
+];
+
+//消耗量属性:计税方式
+const consumeAmtPropertiesTemplate = [
+    {
+        region: '全省',
+        taxModel: taxModel.common,
+        consumeAmt: {
+            dataCode: 'consumeAmt1',
+            dataName: '消耗-一般',
+            refPrice: 'price1' //关联的单价字段
+        }
+    },
+    {
+        region: '全省',
+        taxModel: taxModel.simple,
+        consumeAmt: {
+            dataCode: 'consumeAmt2',
+            dataName: '消耗-简易',
+            refPrice: 'price2' //关联的单价字段
+        }
+    }
+];
+
+if(typeof module !== 'undefined'){
+    module.exports = {
+        pricePropertiesTemplate: pricePropertiesTemplate,
+        consumeAmtPropertiesTemplate: consumeAmtPropertiesTemplate
+    };
 }