فهرست منبع

Merge branch 'develop_yh05' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_lb1

lilei 3 سال پیش
والد
کامیت
1d57f0e555

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
 {
   "message": "发现有新版本发布,确定更新系统?",
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
   "vendorJsVersion": "",
-  "version": 1653991379567
+  "version": 1654476458610
 }
 }

+ 2 - 2
src/components/tools/UserMenu.vue

@@ -102,7 +102,7 @@ export default {
     NoticeIcon
     NoticeIcon
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo', 'nowRoute', 'theme', 'fontSize']),
+    ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo', 'nowRoute', 'theme', 'fontSize', 'printDefNeedle']),
     authOrgsList () { //  过滤掉当前登录账户(不可由自己切换为自己)
     authOrgsList () { //  过滤掉当前登录账户(不可由自己切换为自己)
       const _this = this
       const _this = this
       const arr = []
       const arr = []
@@ -124,7 +124,7 @@ export default {
       return isSaleOrder || isSalesReturn || isPurchaseOrder || isPurchaseReturn
       return isSaleOrder || isSalesReturn || isPurchaseOrder || isPurchaseReturn
     },
     },
     printName () {
     printName () {
-      const defName = this.$store.state.app.printDefNeedle
+      const defName = this.printDefNeedle
       return defName && defName != 'undefined' ? defName : null
       return defName && defName != 'undefined' ? defName : null
     }
     }
   },
   },

+ 27 - 25
src/libs/JGPrint.js

@@ -145,6 +145,7 @@ export const getPrintList = function(){
       printList.push({name:pname,value:i})
       printList.push({name:pname,value:i})
     }
     }
   }
   }
+  // store.state.app.printDefNeedle = LODOP.GET_PRINTER_NAME(-1)
   return printList
   return printList
 }
 }
 // 获取打印机状态
 // 获取打印机状态
@@ -204,31 +205,32 @@ export const pdfPrint = function (data,index){
        zIndex: 100000
        zIndex: 100000
      })
      })
    }else{
    }else{
-     if(printTaskID){
-       getStatusValue('PRINT_STATUS_BUSY',printTaskID,function(isExist){
-         console.log(isExist)
-         if(isExist.length){
-           if(isExist != '0'){
-             confirm({
-               title: '提示',
-               content: h => <div style='font-size:14px;'><div>打印机正在打印中或有未完成的打印任务</div><div>是否继续添加打印任务?</div></div>,
-               okText: '继续打印',
-               okType: 'danger',
-               cancelText: '取消',
-               centered: true,
-               zIndex: 100000,
-               onOk () {
-                 noCallback()
-               }
-             })
-           }else{
-             noCallback()
-           }
-         }
-       })
-     }else{
-       noCallback()
-     }
+     noCallback()
+     // if(printTaskID){
+     //   getStatusValue('PRINT_STATUS_BUSY',printTaskID,function(isExist){
+     //     console.log(isExist)
+     //     if(isExist.length){
+     //       if(isExist != '0'){
+     //         confirm({
+     //           title: '提示',
+     //           content: h => <div style='font-size:14px;'><div>打印机正在打印中或有未完成的打印任务</div><div>是否继续添加打印任务?</div></div>,
+     //           okText: '继续打印',
+     //           okType: 'danger',
+     //           cancelText: '取消',
+     //           centered: true,
+     //           zIndex: 100000,
+     //           onOk () {
+     //             noCallback()
+     //           }
+     //         })
+     //       }else{
+     //         noCallback()
+     //       }
+     //     }
+     //   })
+     // }else{
+     //   noCallback()
+     // }
    }
    }
  }
  }
 // 打印控件
 // 打印控件

+ 4 - 4
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -231,8 +231,8 @@ export default {
   methods: {
   methods: {
     //  时间  change
     //  时间  change
     dateChange (date) {
     dateChange (date) {
-      this.queryParam.auditBeginDate = date[0]
-      this.queryParam.auditEndDate = date[1]
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
     },
     },
     auditDateChange (date) {
     auditDateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditBeginDate = date[0]
@@ -316,8 +316,8 @@ export default {
     // 重置数据
     // 重置数据
     resetData (flag) {
     resetData (flag) {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
-      this.queryParam.auditBeginDate = flag ? '' : getDate.getCurrMonthDays().starttime
-      this.queryParam.auditEndDate = flag ? '' : getDate.getCurrMonthDays().endtime
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.$refs.auditRangeDate.resetDate('')
       this.$refs.auditRangeDate.resetDate('')
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
       this.queryParam.auditEndDate = ''

+ 71 - 12
src/views/common/pdfViewModal.vue

@@ -8,19 +8,37 @@
     :title="modalTit"
     :title="modalTit"
     :zIndex="1001"
     :zIndex="1001"
     destroyOnClose
     destroyOnClose
-    :bodyStyle="{padding: modalTit?'15px 15px 20px':'50px 32px 15px',background: '#f2f2f2'}"
     @cancel="handleCommonCancel"
     @cancel="handleCommonCancel"
-    width="1024px">
+    width="1000px">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
       <div class="common-main">
-        <vue-scroll :ops="ops" style="width: 100%;height: 70vh;">
-          <!-- {{ page }} <span @click="page=page+1">下一页</span> -->
+        <div id="canvas"></div>
+        <div class="tools">
+          <div>
+            调整比例:{{ Math.round(scalVal*100) }}%
+            <div>
+              <a-button size="small" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</a-button>
+              <a-button size="small" @click="setScalVal(1)"><a-icon type="plus" /> 放大</a-button>
+            </div>
+          </div>
+          <div>
+            选择打印机:
+            <div>
+              <a-select size="small" style="width:200px;" v-model="printIndex" @change="changePrint" placeholder="选择打印机">
+                <a-select-option v-for="item in printList" :key="'print-'+item.value" :value="item.name">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </div>
+          </div>
+        </div>
+        <vue-scroll :ops="ops" :style="{width: Math.round(scalVal*100)+'%',height: '70vh',margin:'0 auto'}">
           <div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
           <div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
           <pdf
           <pdf
             ref="pdf"
             ref="pdf"
             v-for="(item,index) in pdfList"
             v-for="(item,index) in pdfList"
             :key="'pdf-'+index"
             :key="'pdf-'+index"
-            style="width: 100%;"
+            :style="{width: '100%'}"
             :src="getUrl('data:application/pdf;base64,' + item)"
             :src="getUrl('data:application/pdf;base64,' + item)"
             :page="page"
             :page="page"
             :rotate="rotate"
             :rotate="rotate"
@@ -77,6 +95,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      scalVal: 0.75,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       show: true,
       show: true,
       pdfList: [],
       pdfList: [],
@@ -101,12 +120,31 @@ export default {
           size: '10px',
           size: '10px',
           'overflow-x': 'hidden'
           'overflow-x': 'hidden'
         }
         }
-      }
+      },
+      printIndex: undefined,
+      printList: []
     }
     }
   },
   },
   methods: {
   methods: {
+    // 选择打印机
+    changePrint (v) {
+      this.printIndex = v
+      this.$store.commit('SET_printDefNeedle', this.printIndex)
+      this.$store.state.app.printTaskID = undefined
+    },
+    // 缩放
+    setScalVal (t) {
+      this.scalVal = this.scalVal + (t ? 0.05 : -0.05)
+      if (this.scalVal > 1) {
+        this.scalVal = 1
+      }
+      if (this.scalVal < 0.5) {
+        this.scalVal = 0.5
+      }
+    },
     getUrl (item) {
     getUrl (item) {
-      return pdf.createLoadingTask({ url: item, CMapReaderFactory })
+      const src = pdf.createLoadingTask({ url: item, CMapReaderFactory })
+      return src
     },
     },
     setData (data) {
     setData (data) {
       // console.log(data)
       // console.log(data)
@@ -114,6 +152,10 @@ export default {
       this.src = data[0]
       this.src = data[0]
       this.curpage = 1
       this.curpage = 1
       this.total = data.length
       this.total = data.length
+      // 获取打印机列表
+      this.printList = getPrintList()
+      const defPrint = this.$store.state.app.printDefNeedle
+      this.printIndex = defPrint ? (defPrint == 'undefined' ? undefined : defPrint) : undefined
     },
     },
     error: function (err) {
     error: function (err) {
       console.log(err)
       console.log(err)
@@ -121,16 +163,14 @@ export default {
     // 确定
     // 确定
     handleCommonOk () {
     handleCommonOk () {
       const _this = this
       const _this = this
-      const printDefNeedle = _this.$store.state.app.printDefNeedle
-      const hasPrint = getPrintList().find(item => item.name == printDefNeedle)
+      const hasPrint = this.printList.find(item => item.name == this.printIndex)
       // 已选择打印机
       // 已选择打印机
       if (hasPrint) {
       if (hasPrint) {
         hasExitTaskByName(function () {
         hasExitTaskByName(function () {
           pdfPrint(_this.$store.state.app.pdfPrintList, 0)
           pdfPrint(_this.$store.state.app.pdfPrintList, 0)
         })
         })
       } else {
       } else {
-        // 选择打印机
-        _this.$store.commit('SET_showSelectPrint', true)
+        this.$message.info('请选择打印机')
       }
       }
       _this.$emit('ok')
       _this.$emit('ok')
     },
     },
@@ -141,10 +181,11 @@ export default {
       this.$store.commit('SET_pdfPrintList', [])
       this.$store.commit('SET_pdfPrintList', [])
       this.$store.commit('SET_showPdfPrint', false)
       this.$store.commit('SET_showPdfPrint', false)
       this.$emit('cancel')
       this.$emit('cancel')
+      this.scalVal = 0.75
     },
     },
     // 下载
     // 下载
     handleDownload () {
     handleDownload () {
-
+      console.log(this.$refs.pdf[0].pdf)
     }
     }
   },
   },
   watch: {
   watch: {
@@ -164,7 +205,25 @@ export default {
 
 
 <style lang="less">
 <style lang="less">
   .common-pdfView-modal{
   .common-pdfView-modal{
+    .ant-modal-body{
+      padding: 0 0 30px 0;
+    }
     .common-main{
     .common-main{
+      background-color: #fff;
+      .tools{
+        padding: 10px;
+        display: flex;
+        align-items: center;
+        border-bottom: 1px solid #eee;
+        background-color: #f8f8f8;
+        > div{
+          display: flex;
+          align-items: center;
+          >div{
+            padding: 0 10px;
+          }
+        }
+      }
     }
     }
     .btn-box{
     .btn-box{
       text-align: center;
       text-align: center;

+ 2 - 1
src/views/financialManagement/settleModal/settleModal.vue

@@ -54,11 +54,12 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { VSelect } from '@/components'
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import settleAccount from '@/views/common/settleAccount'
 import settleAccount from '@/views/common/settleAccount'
 export default {
 export default {
   name: 'SettleModal',
   name: 'SettleModal',
-  components: { settleAccount },
+  components: { settleAccount, VSelect },
   mixins: [commonMixin],
   mixins: [commonMixin],
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态

+ 2 - 2
src/views/productManagement/productInfo/list.vue

@@ -53,7 +53,7 @@
       <div class="table-operator">
       <div class="table-operator">
         <a-button v-if="$hasPermissions('B_product_dealerProduct_add')" id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
         <a-button v-if="$hasPermissions('B_product_dealerProduct_add')" id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
         <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
         <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
-        <a-dropdown>
+        <a-dropdown v-if="$hasPermissions('B_product_dealerProduct_enable')">
           <a-menu slot="overlay" @click="handleMenuClick">
           <a-menu slot="overlay" @click="handleMenuClick">
             <a-menu-item key="1"> 批量启用</a-menu-item>
             <a-menu-item key="1"> 批量启用</a-menu-item>
             <a-menu-item key="2"> 批量禁用</a-menu-item>
             <a-menu-item key="2"> 批量禁用</a-menu-item>
@@ -68,7 +68,7 @@
         ref="table"
         ref="table"
         :style="{ height: tableHeight + 84.5 + 'px' }"
         :style="{ height: tableHeight + 84.5 + 'px' }"
         size="small"
         size="small"
-        :row-selection="rowSelection"
+        :row-selection="$hasPermissions('B_product_dealerProduct_enable')?rowSelection:null"
         @rowSelection="rowSelectionFun"
         @rowSelection="rowSelectionFun"
         rowKeyName="productSn"
         rowKeyName="productSn"
         :rowKey="(record) => record.productSn"
         :rowKey="(record) => record.productSn"

+ 2 - 2
src/views/productManagement/productInfoJg/list.vue

@@ -49,7 +49,7 @@
       </a-form>
       </a-form>
     </div>
     </div>
     <!-- 操作按钮 -->
     <!-- 操作按钮 -->
-    <div class="table-operator">
+    <div class="table-operator" v-if="$hasPermissions('B_JgProduct_enable')">
       <a-dropdown>
       <a-dropdown>
         <a-menu slot="overlay" @click="handleMenuClick">
         <a-menu slot="overlay" @click="handleMenuClick">
           <a-menu-item key="1"> 批量启用</a-menu-item>
           <a-menu-item key="1"> 批量启用</a-menu-item>
@@ -65,7 +65,7 @@
       ref="table"
       ref="table"
       :style="{ height: tableHeight+84.5+'px' }"
       :style="{ height: tableHeight+84.5+'px' }"
       size="small"
       size="small"
-      :row-selection="rowSelection"
+      :row-selection="$hasPermissions('B_JgProduct_enable')?rowSelection:null"
       @rowSelection="rowSelectionFun"
       @rowSelection="rowSelectionFun"
       rowKeyName="productSn"
       rowKeyName="productSn"
       :rowKey="(record) => record.productSn"
       :rowKey="(record) => record.productSn"