Browse Source

Merge remote-tracking branch 'origin/master' into develop

pengyh 1 year ago
parent
commit
fd28f31df2
25 changed files with 6365 additions and 637 deletions
  1. 4801 224
      package-lock.json
  2. 1 0
      package.json
  3. 37 0
      src/api/workOrder/basicData.js
  4. 2 2
      src/components/Shortcut/index.vue
  5. 35 6
      src/components/template/operation_mixin.js
  6. 14 10
      src/components/template/template-page-1.vue
  7. 196 4
      src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue
  8. 198 6
      src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue
  9. 36 23
      src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue
  10. 36 23
      src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue
  11. 52 24
      src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue
  12. 53 25
      src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue
  13. 36 23
      src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue
  14. 112 0
      src/views/auxiliaryFittings/salesManagement/components/preview.vue
  15. 2 2
      src/views/login/index.vue
  16. 4 2
      src/views/mallManagement/configCenter/mallConfig/index.vue
  17. 64 59
      src/views/mallManagement/configCenter/slideshowConfig/index.vue
  18. 78 61
      src/views/setting/account/index.vue
  19. 116 69
      src/views/setting/menus/index.vue
  20. 79 12
      src/views/setting/organizationManagement/settledManagement/index.vue
  21. 115 27
      src/views/setting/organizationManagement/tenantDetails/index.vue
  22. 2 2
      src/views/setting/personal/index.vue
  23. 8 1
      src/views/setting/personal/renew.vue
  24. 253 0
      src/views/workOrder/projectMaintenance/basicData/index.vue
  25. 35 32
      src/views/workOrder/workOrderPool/index.vue

File diff suppressed because it is too large
+ 4801 - 224
package-lock.json


+ 1 - 0
package.json

@@ -51,6 +51,7 @@
     "vue": "2.6.10",
     "vue-demi": "^0.14.5",
     "vue-ls": "^4.0.0",
+    "vue-plugin-hiprint": "0.0.56",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuex": "3.1.0",

+ 37 - 0
src/api/workOrder/basicData.js

@@ -0,0 +1,37 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/engin/project/repair/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/engin/project/repair/list/export',
+    data,
+    name
+  })
+}
+
+// 保存
+export function save(data) {
+  return request({
+    url: `/engin/project/repair/save`,
+    method: 'post',
+    data
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/engin/project/repair/detail`,
+    method: 'post',
+    params
+  })
+}

+ 2 - 2
src/components/Shortcut/index.vue

@@ -128,7 +128,7 @@ export default {
     commonCompanywechatGet({ id: this.userInfo.companyWechatId }).then(res => {
       console.log(res)
       this.QRcodeList = []
-      if (res.data.qrcode1) {
+      if (res?.data?.qrcode1) {
         this.QRcodeList.push({
           codeUrl: res.data.qrcode1,
           name: "小程序",
@@ -137,7 +137,7 @@ export default {
           androidIcon: "https://fw.gd-jxm.com/gateway/pcapi/img/get?key=2023-10/1697680143828d678a6e5-307d-47d0-8ee9-1698f100feb4.jpg"
         })
       }
-      if (res.data.qrcode2) {
+      if (res?.data?.qrcode2) {
         this.QRcodeList.push({
           codeUrl: res.data.qrcode2,
           name: "公众号",

+ 35 - 6
src/components/template/operation_mixin.js

@@ -1,16 +1,45 @@
-function setBtnName(name,row){
-  if(!name){
+function setBtnName(name, row) {
+  if (!name) {
     return false
   }
-  if(typeof name == 'function'){
+  if (typeof name == 'function') {
     return name(row)
-  }else if (typeof name == 'string'){
+  } else if (typeof name == 'string') {
     return name
   }
 }
 
+function hasCommonElements(arr1, arr2) {
+  for (let i = 0; i < arr1.length; i++) {
+    if (arr2.includes(arr1[i])) {
+      return true;
+    }
+  }
+  return false;
+}
+
 export default {
   methods: {
+    optionsEvensAuth(key, obj) {
+      var roleItems = this.$route.meta.roleItems
+      if (!roleItems || !roleItems.length) {
+        return { isRole: false }
+      }
+      if (key instanceof Array) {
+        if (!hasCommonElements(roleItems.map(item => item.code), key)) {
+          return { isRole: false }
+        } else {
+          return typeof obj == 'function' ? obj(roleItems) : obj
+        }
+      } else {
+        var role = roleItems?.find(item => item.code === key)
+        if (!role) {
+          return { isRole: false }
+        } else {
+          return typeof obj == 'function' ? obj(role) : { name: role.moduleName, ...obj }
+        }
+      }
+    },
     operationBtn(opt = {}) {
       var roleItems = this.$route.meta.roleItems
       return (...p) => {
@@ -33,7 +62,7 @@ export default {
                         }}
                       >
                         <el-button size="mini" type={opt[key]?.btnType || 'primary'} slot="reference">
-                          {setBtnName(opt[key]?.name,{ row, index, column }) || role.moduleName}
+                          {setBtnName(opt[key]?.name, { row, index, column }) || role.moduleName}
                         </el-button>
                       </el-popconfirm>
                     ) : null
@@ -46,7 +75,7 @@ export default {
                           opt[key]?.click({ row, index, column })
                         }}
                       >
-                        {setBtnName(opt[key]?.name,{ row, index, column }) || role.moduleName}
+                        {setBtnName(opt[key]?.name, { row, index, column }) || role.moduleName}
                       </el-button>
                     ) : null
                   }

+ 14 - 10
src/components/template/template-page-1.vue

@@ -31,10 +31,12 @@ import { dictListDict } from '@/api/dataDictionary.js'
 import { zfireParamList, zfireParamSave, zfireParamDelete } from '@/api/zfireParam.js'
 import SelExportColumnList from './sel-export-column-list.vue'
 import selectData from './selectData.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: {
     SelExportColumnList
   },
+  mixins: [operation_mixin],
   props: {
     ellipsis: {
       type: Boolean,
@@ -143,15 +145,17 @@ export default {
       parameter: {},
       // 按钮集合
       evens: this.exportList
-        ? [
-          [
-            {
-              name: '导出',
-              click: this.export,
-              loading: false
-            }
-          ]
-        ]
+        ? [[
+          {
+            name: '导出',
+            click: this.export,
+            loading: false
+          }
+          // this.optionsEvensAuth("export", {
+          //   click: this.export,
+          //   loading: false
+          // })
+        ]]
         : [],
       // 表格属性
       defaultTableAttributes: {},
@@ -484,7 +488,7 @@ export default {
     },
     // 导出
     export() {
-      this.columnList = this.$refs.zjpage.columnList.filter(item=>!item.hidden)
+      this.columnList = this.$refs.zjpage.columnList.filter(item => !item.hidden)
     },
     async exportDetermine(data) {
       if (!this.exportList) {

+ 196 - 4
src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="140"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -19,6 +19,7 @@
 		<div class="detail" v-if="formDialog">
 			<attachmentSalesOrderDetail :id="id" @back="backList" :formType="formDialogType" :title="'配件销售订单' + formDialogTitles[formDialogType]"></attachmentSalesOrderDetail>
 		</div>
+		<print-preview ref="preView" @initPrint="handleInitPrint" @refreshList="handleRefreshList"  />
 	</div>
 </template>
 
@@ -30,8 +31,13 @@ import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { listPageV2,pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+import { getWebsit } from "@/api/customerManagement";
+import printPreview from '../components/preview.vue'
+import { disAutoConnect, hiprint } from 'vue-plugin-hiprint'
+
+disAutoConnect()
 export default {
-  components: { TemplatePage, ImageUpload, attachmentSalesOrderDetail },
+  components: { TemplatePage, ImageUpload, attachmentSalesOrderDetail, printPreview },
   mixins: [import_mixin],
   data() {
     return {
@@ -62,7 +68,8 @@ export default {
       formDialogTitles: ["新增","编辑", "详情"],
       formDialog: false,
 	  id: '',
-	  flag: ''
+	  flag: '',
+	  websitList:[]
     }
   },
   computed: {
@@ -70,7 +77,20 @@ export default {
     moreParameters() {
       return []
     },
-    formItems() {}
+    formItems() {},
+	filterArr(){
+		return function (arr, size) {
+		  //判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组
+		  if (!arr.length || !size || size < 1) return []
+		  let [start, end, result] = [null, null, []]
+		  for (let i = 0; i < Math.ceil(arr.length / size); i++) {
+		    start = i * size
+		    end = start + size
+		    result.push(arr.slice(start, end))
+		  }
+		  return result
+		}
+	}
   },
   methods: {
 	// 切换状态
@@ -126,6 +146,9 @@ export default {
 				this.formDialogType = row.flag == 'SAVE'?1:2
 				this.openForm()
 			}}>确认提货</el-button>:null}
+			<el-button type="text" onClick={() => this.toPrint(row, 2)}>
+			  打印
+			</el-button>
         </div>
       )
     },
@@ -136,6 +159,175 @@ export default {
     openForm() {
       this.formDialog = true;
     },
+	getWebsit(){
+		getWebsit({type: 'C'}).then(res => {
+			this.websitList = res.data
+		})
+	},
+	// 点击打印
+	async toPrint(row, type) {
+		this.getWebsit()
+		let pagingData = []
+		const { data } = await getDetail({
+		  salesId: row.salesId
+		})
+		pagingData = this.filterArr(data.items,4)
+		// 初始化模板,否则生成的模板叠加
+		hiprint.init()
+		this.hiprintTemplate = new hiprint.PrintTemplate()
+		// 兼容批量打印
+		// let params = !type ? this.filterArr() : [row.salesId]
+		let len = pagingData.length
+		let loadingLen = len
+		// 使用 i-- 提升for效率
+		this.$startLoading()
+		for (let i = 0; i < len; i++) {
+			try {
+			let websitHtml = ''
+			let html = ''
+			let num = 0
+			let totalAmount = 0
+			pagingData[i].forEach(item=>{
+				totalAmount = (Number(item.saleAmount)*100 + totalAmount*100)/100
+				num += Number(item.salesQty)
+				html += `
+					<tr align="center">
+					<td>${item.goodsName || ''}</td>
+					<td>${item.goodsSpecification || ''}</td>
+					<td>${item.goodsSalesUnit || ''}</td>
+					<td>${item.salesQty || ''}</td>
+					<td>${item.price || ''}</td>
+					<td>${item.saleAmount || ''}</td>
+					<td></td>
+					<td></td>
+					</tr>
+				`
+			})
+			this.websitList.slice(0,5).forEach(item=>{
+				websitHtml += `
+					<div style="display: flex;font-size: 14px;margin-bottom: 6px;">
+						<div style="margin-right: 10px;">${item.name}</div>
+						<div style="margin-right: 10px;">${item.websitPhone}</div>
+						<div>地址: ${item.address}</div>
+					</div>
+				`
+			})
+			// 模板基础配置
+			this.panel = this.hiprintTemplate.addPrintPanel({
+				height: 140,
+				width: 241,
+				fontFamily: '黑体',
+				fontSize: 13,
+				paperFooter: 340,
+				paperHeader: 10,
+				paperNumberDisabled: true
+			})
+		
+			// 获取收款单模板和基础配置
+			this.panel.addPrintHtml({
+				options: {
+				width: 633,
+				top: 30,
+				left: 20,
+				fontFamily: '黑体',
+				fontSize: 13,
+				content: this.setTableDom(data,html,websitHtml,totalAmount,num,len,i)
+				}
+			})
+		
+			loadingLen--
+			} catch (error) {
+			console.log(999,error)
+			this.$endLoading()
+			return
+			}
+		}
+		if (loadingLen === 0) {
+			this.$endLoading()
+		}
+		console.log(333)
+		// 预览打印内容
+		this.$refs.preView.show(this.hiprintTemplate, this.panel)
+	},
+	// 打印模板
+	setTableDom(data,html,websitHtml,totalAmount,num,length,page) {
+	  return `
+	   <div style="font-family:'黑体';font-size: 16px;">
+			<div style="display: flex;justify-content: space-between;align-items: center;">
+				<div style="width: 28%;"></div>
+				<h1 style="text-align:center;margin: 10px 0;">${data.websitName}销售单</h1>
+				<div>共 ${length}页 第 ${page+1} 页</div>
+			</div>
+		  <div style="display: flex;justify-content: space-between;">
+			<div style="width: 28%;"></div>
+			<div>单据日期: ${data.createTime}</div>
+			<div>单据编号: ${data.salesId}</div>
+		  </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
+		  	<div>客户: ${data.workerName}</div>
+		  	<div>摘要: ${data.payType == 'CASH'?'现金':'微信'}</div>
+		  </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin-bottom: 10px;">
+		  	<div>联系电话: ${data.workerMobile}</div>
+		  	<div>收货地址: </div>
+			<div style="width: 28%;"></div>
+		  </div>
+	      <div >
+	        <table border=".5" cellspacing="0" width="856"
+	         style="border-color: rgb(0,0,0);
+	          border-collapse: collapse;
+	          border-style: none;
+	          border: 1px solid rgb(0,0,0);
+	          font-weight: normal;
+	          
+	          text-decoration: none;
+	          vertical-align: middle;
+	          box-sizing: border-box;
+	          word-wrap: break-word;
+	          word-break: break-all;">
+				<tr align="center">
+					<td>商品名称</td>
+					<td>规格</td>
+					<td>单位</td>
+					<td>数量</td>
+					<td>单价</td>
+					<td>金额</td>
+					<td>仓库</td>
+					<td>备注</td>
+				</tr>
+	            ${html}
+				<tr align="center" align="center">
+				  <td>小计: </td>
+				  <td colspan="2"></td>
+				  <td>${num}</td>
+				  <td></td>
+				  <td>${totalAmount}</td>
+				  <td colspan="2">金额总计: ${totalAmount}</td>
+				</tr>
+	        </table>
+	      </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
+		  	<div>制单人: ${data.createBy || ''}</div>
+		  	<div>审核人: ${data.confirmBy || ''}</div>
+			<div>业务员: </div>
+			<div>签收人: </div>
+		  </div>
+		  ${websitHtml}
+	      <div style="margin:100px 0 0 0">
+	        <div></div>
+	      </div>
+	   </div>
+	  `
+	},
+	handleRefreshList() {
+	  this.recordSelected = []
+	  this.$refs.pageRef.refreshList()
+	},
+	handleInitPrint() {
+	  this.$nextTick(() => {
+	    this.initPrint()
+	  })
+	},
 	// 下载导入模版
 	handleDownload() {
 	  // downloadFiles('charging/standard/download');

+ 198 - 6
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="140"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -19,6 +19,7 @@
 		<div class="detail" v-if="formDialog">
 			<auxiliarySalesOrderDetail :id="id" @back="backList" :formType="formDialogType" :title="'辅材销售订单' + formDialogTitles[formDialogType]"></auxiliarySalesOrderDetail>
 		</div>
+		<print-preview ref="preView" @initPrint="handleInitPrint" @refreshList="handleRefreshList"  />
 	</div>
 </template>
 
@@ -30,8 +31,13 @@ import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { listPageV2,pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+import { getWebsit } from "@/api/customerManagement";
+import printPreview from '../components/preview.vue'
+import { disAutoConnect, hiprint } from 'vue-plugin-hiprint'
+
+disAutoConnect()
 export default {
-  components: { TemplatePage, ImageUpload, auxiliarySalesOrderDetail },
+  components: { TemplatePage, ImageUpload, auxiliarySalesOrderDetail, printPreview },
   mixins: [import_mixin],
   data() {
     return {
@@ -62,15 +68,29 @@ export default {
       formDialogTitles: ["新增","编辑", "详情"],
       formDialog: false,
 		id: '',
-		flag: ''
-    }
+		flag: '',
+		websitList:[]
+	}
   },
   computed: {
     // 更多参数
     moreParameters() {
       return []
     },
-    formItems() {}
+    formItems() {},
+	filterArr(){
+		return function (arr, size) {
+		  //判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组
+		  if (!arr.length || !size || size < 1) return []
+		  let [start, end, result] = [null, null, []]
+		  for (let i = 0; i < Math.ceil(arr.length / size); i++) {
+		    start = i * size
+		    end = start + size
+		    result.push(arr.slice(start, end))
+		  }
+		  return result
+		}
+	}
   },
   methods: {
 	// 切换状态
@@ -126,6 +146,9 @@ export default {
 				this.formDialogType = row.flag == 'SAVE'?1:2
 				this.openForm()
 			}}>确认提货</el-button>:null}
+			<el-button type="text" onClick={() => this.toPrint(row, 2)}>
+			  打印
+			</el-button>
         </div>
       )
     },
@@ -136,9 +159,178 @@ export default {
     openForm() {
       this.formDialog = true;
     },
+	getWebsit(){
+		getWebsit({type: 'C'}).then(res => {
+			this.websitList = res.data
+		})
+	},
+	// 点击打印
+	async toPrint(row, type) {
+		this.getWebsit()
+		let pagingData = []
+		const { data } = await getDetail({
+		  salesId: row.salesId
+		})
+		pagingData = this.filterArr(data.items,4)
+		// 初始化模板,否则生成的模板叠加
+		hiprint.init()
+		this.hiprintTemplate = new hiprint.PrintTemplate()
+		// 兼容批量打印
+		// let params = !type ? this.filterArr() : [row.salesId]
+		let len = pagingData.length
+		let loadingLen = len
+		// 使用 i-- 提升for效率
+		this.$startLoading()
+		for (let i = 0; i < len; i++) {
+			try {
+			let websitHtml = ''
+			let html = ''
+			let num = 0
+			let totalAmount = 0
+			pagingData[i].forEach(item=>{
+				totalAmount = (Number(item.saleAmount)*100 + totalAmount*100)/100
+				num += Number(item.salesQty)
+				html += `
+					<tr align="center">
+					<td>${item.goodsName}</td>
+					<td>${item.goodsSpecification}</td>
+					<td>${item.goodsSalesUnit}</td>
+					<td>${item.salesQty}</td>
+					<td>${item.price}</td>
+					<td>${item.saleAmount}</td>
+					<td></td>
+					<td></td>
+					</tr>
+				`
+			})
+			this.websitList.slice(0,5).forEach(item=>{
+				websitHtml += `
+					<div style="display: flex;font-size: 14px;margin-bottom: 6px;">
+						<div style="margin-right: 10px;">${item.name}</div>
+						<div style="margin-right: 10px;">${item.websitPhone}</div>
+						<div>地址: ${item.address}</div>
+					</div>
+				`
+			})
+			// 模板基础配置
+			this.panel = this.hiprintTemplate.addPrintPanel({
+				height: 140,
+				width: 241,
+				fontFamily: '黑体',
+				fontSize: 13,
+				paperFooter: 340,
+				paperHeader: 10,
+				paperNumberDisabled: true
+			})
+		
+			// 获取收款单模板和基础配置
+			this.panel.addPrintHtml({
+				options: {
+				width: 633,
+				top: 30,
+				left: 20,
+				fontFamily: '黑体',
+				fontSize: 13,
+				content: this.setTableDom(data,html,websitHtml,totalAmount,num,len,i)
+				}
+			})
+		
+			loadingLen--
+			} catch (error) {
+			console.log(999,error)
+			this.$endLoading()
+			return
+			}
+		}
+		if (loadingLen === 0) {
+			this.$endLoading()
+		}
+		console.log(333)
+		// 预览打印内容
+		this.$refs.preView.show(this.hiprintTemplate, this.panel)
+	},
+	// 打印模板
+	setTableDom(data,html,websitHtml,totalAmount,num,length,page) {
+	  return `
+	   <div style="font-family:'黑体';font-size: 16px;">
+			<div style="display: flex;justify-content: space-between;align-items: center;">
+				<div style="width: 28%;"></div>
+				<h1 style="text-align:center;margin: 10px 0;">${data.websitName}销售单</h1>
+				<div>共 ${length}页 第 ${page+1} 页</div>
+			</div>
+		  <div style="display: flex;justify-content: space-between;">
+			<div style="width: 28%;"></div>
+			<div>单据日期: ${data.createTime}</div>
+			<div>单据编号: ${data.salesId}</div>
+		  </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
+		  	<div>客户: ${data.workerName}</div>
+		  	<div>摘要: ${data.payType == 'CASH'?'现金':'微信'}</div>
+		  </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin-bottom: 10px;">
+		  	<div>联系电话: ${data.workerMobile}</div>
+		  	<div>收货地址: </div>
+			<div style="width: 28%;"></div>
+		  </div>
+	      <div >
+	        <table border=".5" cellspacing="0" width="856"
+	         style="border-color: rgb(0,0,0);
+	          border-collapse: collapse;
+	          border-style: none;
+	          border: 1px solid rgb(0,0,0);
+	          font-weight: normal;
+	          
+	          text-decoration: none;
+	          vertical-align: middle;
+	          box-sizing: border-box;
+	          word-wrap: break-word;
+	          word-break: break-all;">
+				<tr align="center">
+					<td>商品名称</td>
+					<td>规格</td>
+					<td>单位</td>
+					<td>数量</td>
+					<td>单价</td>
+					<td>金额</td>
+					<td>仓库</td>
+					<td>备注</td>
+				</tr>
+	            ${html}
+				<tr align="center" align="center">
+				  <td>小计: </td>
+				  <td colspan="2"></td>
+				  <td>${num}</td>
+				  <td></td>
+				  <td>${totalAmount}</td>
+				  <td colspan="2">金额总计: ${totalAmount}</td>
+				</tr>
+	        </table>
+	      </div>
+		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
+		  	<div>制单人: ${data.createBy || ''}</div>
+		  	<div>审核人: ${data.confirmBy || ''}</div>
+			<div>业务员: </div>
+			<div>签收人: </div>
+		  </div>
+		  ${websitHtml}
+	      <div style="margin:100px 0 0 0">
+	        <div></div>
+	      </div>
+	   </div>
+	  `
+	},
+	handleRefreshList() {
+	  this.recordSelected = []
+	  this.$refs.pageRef.refreshList()
+	},
+	handleInitPrint() {
+	  this.$nextTick(() => {
+	    this.initPrint()
+	  })
+	},
 	// 下载导入模版
 	handleDownload() {
-	  // downloadFiles('charging/standard/download');
+		// downloadFiles('charging/standard/download');
 	},
   }
 }

+ 36 - 23
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -24,7 +24,7 @@
 								<el-input type="text" :value="companyName" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
 								<el-select v-model="formData.websit" value-key="websitId" disabled @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -37,35 +37,48 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" disabled value-key="nickName" @focus="()=>{
-									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
-								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in workerList"
-								      :key="item.id"
-								      :label="item.nickName"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅身份证" prop="identity" :required="true">
-								<el-input type="text" v-model="formData.identity" disabled placeholder="请输入"></el-input>
+							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.buyPeople">
+									<el-radio disabled label="WORKER">内部师傅</el-radio>
+									<el-radio disabled label="CUSTOMER">客户</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.buyPeople == 'CUSTOMER'">
+							<el-col :span="8">
+								<el-form-item label="客户姓名" prop="workerName" :required="true">
+									<el-input type="text" disabled v-model="formData.workerName" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="8">
+								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" disabled v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<template v-else>
+							<el-col :span="8">
+								<el-form-item label="师傅姓名" prop="worker" :required="true">
+									<el-input type="text" v-model="formData.workerName" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<!-- <el-col :span="8">
+								<el-form-item label="师傅身份证" prop="identity" :required="true">
+									<el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col> -->
+							<el-col :span="8">
+								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
 						<el-col :span="8">
-							<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
-								<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="8">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>

+ 36 - 23
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -24,7 +24,7 @@
 								<el-input type="text" :value="companyName" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
 								<el-select v-model="formData.websit" disabled value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -37,35 +37,48 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" disabled value-key="nickName" @focus="()=>{
-									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
-								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in workerList"
-								      :key="item.id"
-								      :label="item.nickName"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅身份证" prop="identity" :required="true">
-								<el-input type="text" v-model="formData.identity" disabled placeholder="请输入"></el-input>
+							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.buyPeople">
+									<el-radio disabled label="WORKER">内部师傅</el-radio>
+									<el-radio disabled label="CUSTOMER">客户</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.buyPeople == 'CUSTOMER'">
+							<el-col :span="8">
+								<el-form-item label="客户姓名" prop="workerName" :required="true">
+									<el-input type="text" disabled v-model="formData.workerName" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="8">
+								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" disabled v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<template v-else>
+							<el-col :span="8">
+								<el-form-item label="师傅姓名" prop="worker" :required="true">
+									<el-input type="text" v-model="formData.workerName" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<!-- <el-col :span="8">
+								<el-form-item label="师傅身份证" prop="identity" :required="true">
+									<el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col> -->
+							<el-col :span="8">
+								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
 						<el-col :span="8">
-							<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
-								<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="8">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>

+ 52 - 24
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -24,7 +24,7 @@
 								<el-input type="text" :value="companyName" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
 								<el-select v-model="formData.websit" :disabled="formType == 2" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -37,29 +37,51 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" :disabled="formType == 2" value-key="nickName" @focus="()=>{
-									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
-								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in workerList"
-								      :key="item.id"
-								      :label="item.nickName"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅身份证" prop="identity" :required="true">
-								<el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
-								<el-input type="text" v-model="formData.workerMobile" :disabled="formType == 2" placeholder="请输入"></el-input>
+							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.buyPeople">
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="WORKER">内部师傅</el-radio>
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="CUSTOMER">客户</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.buyPeople == 'CUSTOMER'">
+							<el-col :span="8">
+								<el-form-item label="客户姓名" prop="workerName" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerName" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="8">
+								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<template v-else>
+							<el-col :span="8">
+								<el-form-item label="师傅姓名" prop="worker" :required="true">
+									<el-select v-model="formData.worker" :disabled="formType == 2" value-key="nickName" @focus="()=>{
+										if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
+									}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
+									    <el-option
+									      v-for="item in workerList"
+									      :key="item.id"
+									      :label="item.nickName + '-' + item.mobile"
+									      :value="item">
+									    </el-option>
+									  </el-select>
+								</el-form-item>
+							</el-col>
+							<!-- <el-col :span="8">
+								<el-form-item label="师傅身份证" prop="identity" :required="true">
+									<el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col> -->
+							<el-col :span="8">
+								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" v-model="formData.workerMobile" :disabled="formType == 2" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
 						<el-col :span="6" v-if="id">
 							<el-form-item label="单据金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
@@ -223,7 +245,8 @@
 					source: 'SELF',
 					payType: '',
 					totalAmount: '',
-					remark: ''
+					remark: '',
+					buyPeople: 'WORKER'
 				},
 				isEdit: 0,
 				timer: '',
@@ -246,9 +269,12 @@
 						{ pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号格式不正确', trigger: 'blur' }
 					],
 					workerMobile: [
-						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
+						{ required: true, message: '请输入联系电话', trigger: 'blur' },
 						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
+					workerName: [
+						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
+					],
 				}
 			};
 		},
@@ -446,6 +472,7 @@
 								workerId: this.formData.workerId,
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
+								buyPeople: this.formData.buyPeople,
 								items: this.dataList
 							}).then(res => {
 								if(res.code == 200){
@@ -466,6 +493,7 @@
 								workerId: this.formData.workerId,
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
+								buyPeople: this.formData.buyPeople,
 								items: this.dataList
 							}).then(res => {
 								if(res.code == 200){

+ 53 - 25
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -24,7 +24,7 @@
 								<el-input type="text" :value="companyName" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
 								<el-select v-model="formData.websit" :disabled="formData.flag != 'SAVE' && formType!=0" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -37,30 +37,52 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" :disabled="formData.flag != 'SAVE' && formType!=0" value-key="nickName" @focus="()=>{
-									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
-								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in workerList"
-								      :key="item.id"
-								      :label="item.nickName"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅身份证" prop="identity" :required="true">
-								<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.identity" placeholder="请输入"></el-input>
+							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.buyPeople">
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="WORKER">内部师傅</el-radio>
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="CUSTOMER">客户</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
-								<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
+						<template v-if="formData.buyPeople == 'CUSTOMER'">
+							<el-col :span="8">
+								<el-form-item label="客户姓名" prop="workerName" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerName" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="8">
+								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<template v-else>
+							<el-col :span="8">
+								<el-form-item label="师傅姓名" prop="worker" :required="true">
+									<el-select v-model="formData.worker" :disabled="formData.flag != 'SAVE' && formType!=0" value-key="nickName" @focus="()=>{
+										if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
+									}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
+									    <el-option
+									      v-for="item in workerList"
+									      :key="item.id"
+									      :label="item.nickName + '-' + item.mobile"
+									      :value="item">
+									    </el-option>
+									  </el-select>
+								</el-form-item>
+							</el-col>
+							<!-- <el-col :span="8">
+								<el-form-item label="师傅身份证" prop="identity" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.identity" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col> -->
+							<el-col :span="8">
+								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<el-col :span="8" v-if="id">
 							<el-form-item label="单据金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>
@@ -248,7 +270,8 @@
 					source: 'SELF',
 					payType: '',
 					remark: '',
-					totalAmount: ''
+					totalAmount: '',
+					buyPeople: 'WORKER'
 				},
 				isEdit: 0,
 				is_submit: true,
@@ -272,9 +295,12 @@
 						{ pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号格式不正确', trigger: 'blur' }
 					],
 					workerMobile: [
-						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
+						{ required: true, message: `请输入联系电话`, trigger: 'blur' },
 						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
+					workerName: [
+						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
+					],
 				}
 			};
 		},
@@ -521,6 +547,7 @@
 								workerId: this.formData.workerId,
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
+								buyPeople: this.formData.buyPeople,
 								items: this.dataList
 							}).then(res => {
 								if(res.code == 200){
@@ -541,6 +568,7 @@
 								workerId: this.formData.workerId,
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
+								buyPeople: this.formData.buyPeople,
 								items: this.dataList
 							}).then(res => {
 								if(res.code == 200){

+ 36 - 23
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -24,7 +24,7 @@
 								<el-input type="text" :value="companyName" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
 								<el-select v-model="formData.websit" disabled value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -37,35 +37,48 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" disabled value-key="nickName" @focus="()=>{
-									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
-								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in workerList"
-								      :key="item.id"
-								      :label="item.nickName"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="师傅身份证" prop="identity" :required="true">
-								<el-input type="text" v-model="formData.identity" disabled placeholder="请输入"></el-input>
+							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.buyPeople">
+									<el-radio disabled label="WORKER">内部师傅</el-radio>
+									<el-radio disabled label="CUSTOMER">客户</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.buyPeople == 'CUSTOMER'">
+							<el-col :span="8">
+								<el-form-item label="客户姓名" prop="workerName" :required="true">
+									<el-input type="text" disabled v-model="formData.workerName" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="8">
+								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" disabled v-model="formData.workerMobile" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
+						<template v-else>
+							<el-col :span="8">
+								<el-form-item label="师傅姓名" prop="worker" :required="true">
+									<el-input type="text" v-model="formData.workerName" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<!-- <el-col :span="8">
+								<el-form-item label="师傅身份证" prop="identity" :required="true">
+									<el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col> -->
+							<el-col :span="8">
+								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+									<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+						</template>
 						<el-col :span="8">
-							<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
-								<el-input type="text" v-model="formData.workerMobile" disabled placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="8">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>

+ 112 - 0
src/views/auxiliaryFittings/salesManagement/components/preview.vue

@@ -0,0 +1,112 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    :show-close="false"
+    :maskClosable="false"
+    :close-on-click-modal="false"
+    @cancel="hideModal"
+    :width="350 + 'mm'"
+  >
+    <div v-loading="spinning" style="min-height: 100px">
+      <div id="preview_content" ref="printDom"></div>
+    </div>
+    <template slot="title">
+      <div>
+        <el-button :loading="waitShowPrinter" type="primary" icon="printer" @click.stop="print">打印</el-button>
+      </div>
+    </template>
+    <template slot="footer">
+      <el-button key="close" type="info" @click="hideModal"> 关闭 </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+    name: 'PrintPreview',
+  props: {
+    addPrint: {
+      type: Function,
+      default: null
+    },
+  },
+ 
+  data() {
+    return {
+      visible: false,
+      spinning: true,
+      waitShowPrinter: false,
+      // 纸张宽 mm
+      width: 0,
+      // 模板
+      hiprintTemplate: {},
+      // 数据
+      printData: {}
+    }
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    hideModal() {
+      this.visible = false
+      this.waitShowPrinter = false
+      // console.log(this.$parent);
+    },
+    show(hiprintTemplate, printData, width = '210') {
+      this.visible = true
+      this.width = width
+      this.hiprintTemplate = hiprintTemplate
+      setTimeout(() => {
+        // eslint-disable-next-line no-undef
+        $('#preview_content').html(hiprintTemplate.getHtml(printData))
+        this.spinning = false
+      }, 500)
+    },
+    print() {
+      this.hiprintTemplate.print()
+      setTimeout(() => {
+        this.hideModal()
+        this.$emit('refreshList')
+      }, 2000)
+
+    }
+    // toPdf() {
+    //   downloadPDF(this.$refs.printDom);
+    //   this.hiprintTemplate.toPdf({}, '打印预览');
+    // },
+  }
+}
+</script>
+
+<style scoped>
+::v-deep .el-dialog__body {
+  padding: 0;
+}
+
+::v-deep tr {
+  height: 40px !important;
+}
+
+::v-deep .hiprint-printPaper {
+  margin: 0 auto;
+}
+
+/* ::v-deep tr td {
+  border: 0 !important;
+
+} */
+
+::v-deep .hiprint-paperNumber {
+  display: none;
+}
+
+.ant-modal-body {
+  padding: 0px;
+}
+
+.ant-modal-content {
+  margin-bottom: 24px;
+}
+</style>

+ 2 - 2
src/views/login/index.vue

@@ -35,7 +35,7 @@
                   </span>
                   <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
                     placeholder="请输入密码" name="password" tabindex="2" auto-complete="off"
-                    @keyup.enter.native="handleLogin" />
+                    />
                   <span class="show-pwd" @click="showPwd">
                     <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
                   </span>
@@ -46,7 +46,7 @@
                     <svg-icon icon-class="password" />
                   </span>
                   <el-input ref="codeValue" v-model="loginForm.codeValue" placeholder="请输入验证码" name="codeValue"
-                    type="text" tabindex="3" auto-complete="off" @keyup.enter.native="handleLogin" />
+                    type="text" tabindex="3" auto-complete="off" />
                   <div class="code" @click="getCode"><img :src="'data:image/jpeg;base64,' + codeImage" alt="" /></div>
                 </el-form-item>
 

+ 4 - 2
src/views/mallManagement/configCenter/mallConfig/index.vue

@@ -359,9 +359,9 @@
 
       <div class="page-footer">
         <div class="footer" :class="classObj">
-          <el-button type="primary" @click="submitStep1Form" :loading="formLoading" v-if="step == 'first'">{{ formLoading
+          <el-button type="primary" @click="submitStep1Form" :loading="formLoading" v-if="step == 'first' && $restrict('save')">{{ formLoading
             ? '保存中 ...' : '保 存' }}</el-button>
-          <el-button type="primary" @click="submitStep2Form" :loading="formLoading" v-if="step == 'second'">{{ formLoading
+          <el-button type="primary" @click="submitStep2Form" :loading="formLoading" v-if="step == 'second' && $restrict('save')">{{ formLoading
             ? '保存中 ...' : '保 存' }}</el-button>
         </div>
       </div>
@@ -378,7 +378,9 @@
 import { getToken, getUserid } from '@/utils/auth';
 import { getTemplate, editAccount, editTemplate, getDetail } from "@/api/merchant";
 import { getInfo } from '@/api/user'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
+	mixins: [operation_mixin],
   data() {
     return {
       isAdmin: JSON.parse(localStorage.getItem("greemall_user")).type === 2,

+ 64 - 59
src/views/mallManagement/configCenter/slideshowConfig/index.vue

@@ -1,7 +1,7 @@
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -23,32 +23,12 @@ import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { carouselMapListPageV2, carouselMapPageExport, changeBannerStatus, addBanner, editBanner, getBannerDetail, deleteBanner, getGoodsList, batchDeleteBanner } from '@/api/setting'
 import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '新增轮播图',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-        [
-          [
-            {
-              name: '批量删除',
-              isRole: true,
-              click: this.batchDelete
-            }
-          ],
-        ],
-      ],
       // 表格属性
       tableAttributes: {
         // 启用勾选列
@@ -78,6 +58,30 @@ export default {
     }
   },
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			],
+			[
+				[
+					this.optionsEvensAuth("del", {
+						name: '批量删除',
+						click: () => {
+							this.batchDelete
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     moreParameters() {
       return []
@@ -219,42 +223,43 @@ export default {
       this.recordSelected = data
     },
     // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getBannerDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data, {
-                imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
-              })
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteBanner({ carouselMapId: row.id }).then(() => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-          <el-popconfirm
-            title={`确定${row.state ? '隐藏' : '显示'}吗?`}
-            onConfirm={() => {
-              changeBannerStatus({ carouselMapId: row.id, state: !row.state }).then(() => {
-                this.$message({ type: 'success', message: `${row.state ? '隐藏' : '显示'}成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">{row.state ? '隐藏' : '显示'}</el-button>
-          </el-popconfirm>
-        </div>
-      )
+    operation() {
+		return this.operationBtn({
+		  edit: {
+		    click: ({ row, index, column }) => {
+		      getBannerDetail({ id: row.id }).then(res => {
+		        Object.assign(this.formData, res.data, {
+		          imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
+		        })
+		        this.formDialogType = 1
+		        this.openForm()
+		      })
+		    }
+		  },
+		  del: {
+			prompt: '确定删除吗?',
+		    click: ({ row, index, column }) => {
+		      deleteBanner({ carouselMapId: row.id }).then(() => {
+		        this.$message({ type: 'success', message: '删除成功!' })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  },
+		  status: {
+			name: ({ row, index, column }) => {
+				return row.state ? '隐藏' : '显示'
+			},
+		  	prompt:  ({ row, index, column }) => {
+				return `确定${row.state ? '隐藏' : '显示'}吗?`
+			},
+		    click: ({ row, index, column }) => {
+		      changeBannerStatus({ carouselMapId: row.id, state: !row.state }).then(() => {
+		        this.$message({ type: 'success', message: `${row.state ? '隐藏' : '显示'}成功!` })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  },
+		})
     },
     addData() {
       this.formDialogType = 0

+ 78 - 61
src/views/setting/account/index.vue

@@ -9,13 +9,17 @@
           <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')">新增账户</el-button>
         </div>
         <div class="fr">
-          <el-select v-model="screenForm.role" placeholder="全部" size="small" style="width: 120px; margin-right: 10px;" @change="getListByScreen">
+          <el-select v-model="screenForm.role" placeholder="全部" size="small" style="width: 120px; margin-right: 10px;"
+            @change="getListByScreen">
             <el-option label="全部角色" value=""></el-option>
-            <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
+            <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList"
+              :key="index"></el-option>
           </el-select>
-          <el-select v-model="screenForm.status" placeholder="全部" size="small" style="width: 120px; margin-right: 10px;" @change="getListByScreen">
+          <el-select v-model="screenForm.status" placeholder="全部" size="small" style="width: 120px; margin-right: 10px;"
+            @change="getListByScreen">
             <el-option label="全部状态" value=""></el-option>
-            <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+            <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status"
+              :key="index"></el-option>
           </el-select>
           <el-input placeholder="请输入内容" v-model="screenForm.keyword" size="small" style="width: 180px;">
             <el-button slot="append" icon="el-icon-search" size="small" @click="getListByScreen"></el-button>
@@ -24,8 +28,8 @@
       </div>
 
       <div class="table">
-        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row
+          stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column align="center" label="账号" prop="userName" min-width="120"></el-table-column>
           <el-table-column align="center" label="用户名" prop="nickName" min-width="120"></el-table-column>
@@ -34,34 +38,31 @@
           <el-table-column align="center" label="最后登录时间" prop="lastLoginTime" min-width="160"></el-table-column>
           <el-table-column align="center" label="状态" class-name="status-col">
             <template slot-scope="scope">
-              <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '正常':'冻结' }}</el-tag>
+              <el-tag :type="scope.row.status ? 'success' : 'danger'">{{ scope.row.status ? '正常' : '冻结' }}</el-tag>
             </template>
           </el-table-column>
           <el-table-column align="center" label="操作" min-width="160">
             <template slot-scope="scope">
-              <el-popconfirm v-if="scope.row.status" style="margin-right: 10px;" title="确定冻结吗?" @confirm="changeStatus(scope.row.adminUserId, 0)" >
+              <el-popconfirm v-if="scope.row.status" style="margin-right: 10px;" title="确定冻结吗?"
+                @confirm="changeStatus(scope.row.adminUserId, 0)">
                 <el-button slot="reference" type="text">冻结</el-button>
               </el-popconfirm>
-              <el-popconfirm v-else style="margin-right: 10px;" title="确定恢复吗?" @confirm="changeStatus(scope.row.adminUserId, 1)" >
+              <el-popconfirm v-else style="margin-right: 10px;" title="确定恢复吗?"
+                @confirm="changeStatus(scope.row.adminUserId, 1)">
                 <el-button slot="reference" type="text">恢复</el-button>
               </el-popconfirm>
-              
+
               <el-button type="text" @click="addOrEdit('edit', scope.row.adminUserId)">编辑</el-button>
               <el-button type="text" @click="handleReset(scope.row.adminUserId)">重置密码</el-button>
             </template>
           </el-table-column>
         </el-table>
       </div>
-      
+
       <div class="pagination clearfix">
         <div class="fr">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal">
           </el-pagination>
         </div>
@@ -69,16 +70,19 @@
     </div>
 
     <!-- 重置密码 -->
-    <el-dialog title="重置密码" :visible.sync="resetFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
+    <el-dialog title="重置密码" :visible.sync="resetFormVisible" :show-close="false" width="40%"
+      :close-on-click-modal="false">
       <el-form ref="resetForm" :model="resetForm" :rules="resetFormRules" label-position="left" label-width="100px">
         <el-form-item label="输入新密码" prop="newPassword">
-          <el-input v-model="resetForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入新密码" :type="passwordType1"></el-input>
+          <el-input v-model="resetForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入新密码"
+            :type="passwordType1"></el-input>
           <span class="show-pwd" @click="showPwd(1)">
             <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
         <el-form-item label="确认密码" prop="confirmPassword">
-          <el-input v-model="resetForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入新密码" :type="passwordType2"></el-input>
+          <el-input v-model="resetForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入新密码"
+            :type="passwordType2"></el-input>
           <span class="show-pwd" @click="showPwd(2)">
             <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
           </span>
@@ -91,43 +95,47 @@
     </el-dialog>
 
     <!-- 新增编辑账户 -->
-    <el-dialog :title="addFormType == 'add' ? '新增账户':'编辑账户'" :visible.sync="addFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
-      <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="80px">
+    <el-dialog :title="addFormType == 'add' ? '新增账户' : '编辑账户'" :visible.sync="addFormVisible" :show-close="false"
+      width="500px" :close-on-click-modal="false">
+      <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="120px">
         <el-form-item label="账号" prop="account">
           <el-input v-model="addForm.account" autocomplete="off" placeholder="请输入账号"></el-input>
         </el-form-item>
         <el-form-item label="用户名" prop="nickName">
           <el-input v-model="addForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
         </el-form-item>
+        <el-form-item label="手机号" prop="linkPhone">
+          <el-input v-model="addForm.linkPhone" autocomplete="off" placeholder="请输入手机号"></el-input>
+        </el-form-item>
         <el-form-item label="角色组" prop="role">
           <el-select v-model="addForm.role" placeholder="请选择角色组" style="width: 100%;">
-            <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
+            <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList"
+              :key="index"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="网点" prop="adminWebsitId">
-          <!-- filterable -->
-          <el-cascader
-            style="width: 100%"
-            :options="departmentList"
-            :props="{ checkStrictly: true, value: 'websitId', label: 'name' }"
-            v-model="addForm.adminWebsitId"
-            clearable
-          >
+          <el-cascader style="width: 100%" :options="departmentList"
+            :props="{ checkStrictly: true, value: 'websitId', label: 'name' }" v-model="addForm.adminWebsitId" clearable>
           </el-cascader>
         </el-form-item>
         <el-form-item label="密码" prop="newPassword">
-          <el-input v-model="addForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码" :type="passwordType1"></el-input>
+          <el-input v-model="addForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码"
+            :type="passwordType1"></el-input>
           <span class="show-pwd" @click="showPwd(1)">
             <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
         <el-form-item label="确认密码" prop="confirmPassword">
-          <el-input v-model="addForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码" :type="passwordType2"></el-input>
+          <el-input v-model="addForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码"
+            :type="passwordType2"></el-input>
           <span class="show-pwd" @click="showPwd(2)">
             <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
-
+        <el-form-item label="是否公众号通知" prop="pubNotice">
+          <el-switch v-model="addForm.pubNotice" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelAddForm">取 消</el-button>
@@ -209,7 +217,7 @@ export default {
       },
       merchantList: [], // 商户列表
 
-      resetId:  null,
+      resetId: null,
       resetFormVisible: false,
       resetForm: {
         newPassword: '', // 新密码
@@ -224,16 +232,18 @@ export default {
         ],
       },
 
-      editId:  null,
+      editId: null,
       addFormType: 'add',
       addFormVisible: false,
       addForm: {
         account: '', // 账号
         nickName: '', // 用户名
         role: '', // 角色组
-        adminWebsitId:'',
+        adminWebsitId: '',
         newPassword: '', // 新密码
         confirmPassword: '', // 确认密码
+        pubNotice: true,
+        linkPhone:"",
       },
       addFormRules: {
         account: [
@@ -242,6 +252,9 @@ export default {
         nickName: [
           { required: true, message: '请输入用户名', trigger: 'blur' }
         ],
+        linkPhone: [
+          { required: true, message: '请输入手机号', trigger: 'blur' }
+        ],
         role: [
           { required: true, message: '请选择角色组', trigger: 'change' }
         ],
@@ -262,7 +275,7 @@ export default {
   },
   async created() {
     await this.getRoleList();
-    if(this.$route.query.type) {
+    if (this.$route.query.type) {
       let index = this.$findElem(this.roleList, 'name', '企业负责人');
       this.screenForm.role = this.roleList[index].adminRoleId;
     }
@@ -270,7 +283,7 @@ export default {
   },
   watch: {
     'addForm.role'() {
-      if(this.addForm.role) {
+      if (this.addForm.role) {
         let index = this.$findElem(this.roleList, 'adminRoleId', this.addForm.role);
       }
     }
@@ -285,8 +298,8 @@ export default {
         userName: this.screenForm.keyword,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        ...(()=>{
-          if(this.$route.query.companyWechatId){
+        ...(() => {
+          if (this.$route.query.companyWechatId) {
             return {
               companyWechatId: this.$route.query.companyWechatId
             }
@@ -311,7 +324,7 @@ export default {
     // 获取角色列表
     async getRoleList() {
       const result = await new Promise((resolve, reject) => {
-        getRoleList({pageNum: 1, pageSize: 1000}).then(res => {
+        getRoleList({ pageNum: 1, pageSize: 1000 }).then(res => {
           this.roleList = res.data.records;
           resolve(res.data);
         }).catch(res => {
@@ -349,7 +362,7 @@ export default {
     // 操作 - 更改状态(type: 禁用0,启用1)
     changeStatus(id, type) {
       type = type ? true : false
-      changeAccountStatus({adminUserId: id, status: type}).then(res => {
+      changeAccountStatus({ adminUserId: id, status: type }).then(res => {
         this.getList();
         this.$successMsg();
       })
@@ -357,7 +370,7 @@ export default {
 
     // 显示隐藏密码
     showPwd(num) {
-      if(num == 1) {
+      if (num == 1) {
         if (this.passwordType1 === 'password') {
           this.passwordType1 = ''
         } else {
@@ -367,7 +380,7 @@ export default {
           this.$refs.password1.focus()
         })
       }
-      if(num == 2) {
+      if (num == 2) {
         if (this.passwordType2 === 'password') {
           this.passwordType2 = ''
         } else {
@@ -386,7 +399,7 @@ export default {
     },
 
     // 取消重置密码
-    cancelResetForm(){
+    cancelResetForm() {
       this.resetFormVisible = false;
       this.passwordType1 = 'password';
       this.passwordType2 = 'password';
@@ -416,21 +429,23 @@ export default {
       this.addFormVisible = true;
       this.departmentList = await this.getDepartmentList();
 
-      if(type == 'edit') {
+      if (type == 'edit') {
         this.editId = id;
-        getUserInfo({adminUserId: id}).then(res => {
+        getUserInfo({ adminUserId: id }).then(res => {
           this.addForm = {
             account: res.data.userName,
             role: res.data.roleId,
             nickName: res.data.nickName,
-            adminWebsitId: res.data.adminWebsitId
+            pubNotice: res.data.pubNotice,
+            adminWebsitId: res.data.adminWebsitId,
+            linkPhone: res.data.linkPhone
           }
         })
       }
     },
 
     // 取消 新增编辑账户
-    cancelAddForm(){
+    cancelAddForm() {
       this.addFormVisible = false;
       this.passwordType1 = 'password';
       this.passwordType2 = 'password';
@@ -453,15 +468,17 @@ export default {
             roleId: this.addForm.role,
             adminWebsitId: adminWebsitId,
             password: this.addForm.newPassword,
+            pubNotice: this.addForm.pubNotice,
+            linkPhone: this.addForm.linkPhone,
           }
-          if(this.addFormType == 'edit') {
+          if (this.addFormType == 'edit') {
             params.adminUserId = this.editId;
             editAccount(params).then(res => {
               this.cancelAddForm();
               this.getList();
               this.$successMsg('编辑成功');
             })
-          }else {
+          } else {
             addAccount(params).then(res => {
               this.cancelAddForm();
               this.getList();
@@ -477,12 +494,12 @@ export default {
 </script>
 
 <style scoped lang="scss">
-  .show-pwd {
-    position: absolute;
-    right: 15px;
-    top: 0;
-    font-size: 16px;
-    cursor: pointer;
-    user-select: none;
-  }
+.show-pwd {
+  position: absolute;
+  right: 15px;
+  top: 0;
+  font-size: 16px;
+  cursor: pointer;
+  user-select: none;
+}
 </style>

+ 116 - 69
src/views/setting/menu/index.vue → src/views/setting/menus/index.vue

@@ -17,7 +17,7 @@
           default-expand-all
           :tree-props="{ children: 'pages' }"
         >
-          <el-table-column prop="moduleName" label="菜单名称" min-width="150" />
+        <el-table-column prop="moduleName" label="菜单名称" min-width="150" />
           <el-table-column prop="url" label="菜单URL" min-width="150" />
           <el-table-column prop="fullUrl" label="菜单全URL" min-width="200" />
           <el-table-column align="center" prop="icon" label="菜单图标">
@@ -32,24 +32,16 @@
           </el-table-column>
           <el-table-column align="center" prop="isCache" label="状态">
             <template slot-scope="scope">
-              <span>{{ ['缓存', '不缓存'][[1,0].indexOf(scope.row.isCache)] || '' }}</span>
+              <span>{{ ['缓存', '不缓存'][[1, 0].indexOf(scope.row.isCache)] || '' }}</span>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="sortNum" label="排序" />
           <el-table-column align="right" label="操作" width="150" fixed="right">
             <template slot-scope="scope">
-              <el-button
-                type="primary"
-                size="mini"
-                icon="el-icon-plus"
-                @click="addOrEditChild('add', scope.row.moduleId)"
-              />
-              <el-button
-                type="primary"
-                size="mini"
-                icon="el-icon-edit"
-                @click="addOrEditChild('edit', scope.row.moduleId)"
-              />
+              <el-button type="primary" size="mini" icon="el-icon-plus"
+                @click="addOrEditChild('add', scope.row.moduleId)" />
+              <el-button type="primary" size="mini" icon="el-icon-edit"
+                @click="addOrEditChild('edit', scope.row.moduleId)" />
               <el-popconfirm style="margin-left: 10px" title="确定删除吗?" @confirm="handleDelete(scope.row.moduleId)">
                 <el-button slot="reference" size="mini" icon="el-icon-delete" />
               </el-popconfirm>
@@ -72,7 +64,7 @@
         :model="addParentForm"
         :rules="addParentFormRules"
         label-position="left"
-        label-width="140px"
+        label-width="120px"
       >
         <el-form-item label="类型" prop="type">
           <el-radio-group v-model="addParentForm.type">
@@ -104,24 +96,26 @@
           <el-input v-model.number="addParentForm.sort" placeholder="请输入排序" />
         </el-form-item>
         <el-form-item label="是否显示" prop="status">
-          <el-switch
-            v-model="addParentForm.status"
-            :active-value="true"
-            :inactive-value="false"
-            active-color="#13ce66"
-            inactive-color="#ff4949"
-          />
+          <el-switch v-model="addParentForm.status" :active-value="true" :inactive-value="false" active-color="#13ce66"
+            inactive-color="#ff4949" />
         </el-form-item>
         <el-form-item label="是否缓存页面" prop="isCache">
-          <el-switch
-            v-model="addParentForm.isCache"
-            :active-value="1"
-            :inactive-value="0"
-            active-color="#13ce66"
-            inactive-color="#ff4949"
-          />
+          <el-switch v-model="addParentForm.isCache" :active-value="1" :inactive-value="0" active-color="#13ce66"
+            inactive-color="#ff4949" />
         </el-form-item>
       </el-form>
+      <div v-if="addParentForm.type === 2">
+        <el-button style="margin-bottom: 10px" type="primary" size="small" @click="hasShowTable">新增</el-button>
+        <zj-table
+          ref="tableEl"
+          :is-drop="true"
+          :columns="columns"
+          :table-data="tableData"
+          :table-attributes="{
+            border: true
+          }"
+        />
+      </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelAddParentForm">取 消</el-button>
         <el-button type="primary" @click="submitAddParentForm">确 定</el-button>
@@ -141,7 +135,7 @@
         :model="addChildForm"
         :rules="addChildFormRules"
         label-position="left"
-        label-width="140px"
+        label-width="120px"
       >
         <el-form-item label="类型" prop="type">
           <el-radio-group v-model="addChildForm.type">
@@ -183,24 +177,26 @@
           <el-input v-model.number="addChildForm.sort" placeholder="请输入排序" />
         </el-form-item>
         <el-form-item label="是否显示" prop="status">
-          <el-switch
-            v-model="addChildForm.status"
-            :active-value="true"
-            :inactive-value="false"
-            active-color="#13ce66"
-            inactive-color="#ff4949"
-          />
+          <el-switch v-model="addChildForm.status" :active-value="true" :inactive-value="false" active-color="#13ce66"
+            inactive-color="#ff4949" />
         </el-form-item>
         <el-form-item label="是否缓存页面" prop="isCache">
-          <el-switch
-            v-model="addChildForm.isCache"
-            :active-value="1"
-            :inactive-value="0"
-            active-color="#13ce66"
-            inactive-color="#ff4949"
-          />
+          <el-switch v-model="addChildForm.isCache" :active-value="1" :inactive-value="0" active-color="#13ce66"
+            inactive-color="#ff4949" />
         </el-form-item>
       </el-form>
+      <div v-if="addChildForm.type === 2">
+        <el-button style="margin-bottom: 10px" type="primary" size="small" @click="hasShowTable">新增</el-button>
+        <zj-table
+          ref="tableEl"
+          :is-drop="true"
+          :columns="columns"
+          :table-data="tableData"
+          :table-attributes="{
+            border: true
+          }"
+        />
+      </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelAddChildForm">取 消</el-button>
         <el-button type="primary" @click="submitAddChildForm">确 定</el-button>
@@ -213,24 +209,13 @@
       width="40%"
       :close-on-click-modal="false"
     >
-      <el-form ref="formData" :model="formData" :rules="formDataRules" label-position="left" label-width="140px">
+      <el-form ref="formData" :model="formData" :rules="formDataRules" label-position="left" label-width="100px">
         <el-form-item label="code" prop="code">
           <el-input v-model="formData.code" placeholder="请输入类型" clearable></el-input>
         </el-form-item>
         <el-form-item label="名称" prop="moduleName">
           <el-input v-model="formData.moduleName" placeholder="请输入接口名称" clearable></el-input>
         </el-form-item>
-        <el-form-item label="API" prop="apis">
-          <el-select v-model="formData.apis" style="width: 100%" placeholder="请选择API" multiple clearable filterable>
-            <el-option
-              v-for="item in apiList"
-              :key="item.id"
-              :label="item.tag + '  >  ' + item.operation + '  -  ' + item.url"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button
@@ -286,6 +271,7 @@ export default {
         fullUrl: '',
         icon: '',
         sort: 0,
+        flag: '',
         type: 1,
         status: true,
         isCache: 1
@@ -296,6 +282,7 @@ export default {
         code: [{ required: true, message: '请填写菜单CODE', trigger: 'blur' }],
         url: [{ required: true, message: '请填写菜单URL', trigger: 'blur' }],
         icon: [{ required: true, message: '请选择图标', trigger: 'blur' }],
+        flag: [{ required: true, message: '请选择所属', trigger: 'blur' }]
       },
       editChildId: null,
       addChildFormType: 'add',
@@ -308,9 +295,10 @@ export default {
         fullUrl: '',
         icon: '',
         sort: 0,
+        flag: '',
         type: 1,
         status: true,
-        isCache:1
+        isCache: 1
       },
       addChildFormRules: {
         type: [{ required: true, message: '请选择类型', trigger: 'change' }],
@@ -319,6 +307,7 @@ export default {
         twoMenu: [{ required: true, message: '请填写二级菜单', trigger: 'blur' }],
         code: [{ required: true, message: '请填写菜单CODE', trigger: 'blur' }],
         url: [{ required: true, message: '请填写菜单URL', trigger: 'blur' }],
+        flag: [{ required: true, message: '请选择所属', trigger: 'blur' }]
       },
       isChooseIconDialog: false,
       iconList: iconList,
@@ -342,23 +331,80 @@ export default {
       formData: {
         code: '',
         moduleName: '',
-        apis: []
       },
       formDataRules: {
         code: [{ required: true, message: '请选择类型', trigger: 'blur' }],
         moduleName: [{ required: true, message: '请选择类型', trigger: 'blur' }]
-        // apis: [{ required: true, message: '请选择类型', trigger: 'change' }]
       },
-      apiList: [],
       operateType: null
     }
   },
   computed: {
     ...mapGetters(['userid', 'name']),
     isAdmin() {
-      const type = JSON.parse(localStorage.getItem('greemall_user')).type
+      const type = JSON.parse(localStorage.getItem('supply_user')).type
       return type === 2
     },
+    columns() {
+      return [
+        {
+          columnAttributes: {
+            label: '名称',
+            prop: 'moduleName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: 'code',
+            prop: 'code'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '操作',
+            prop: ''
+          },
+          render: (h, { row, column, $index }) => {
+            return (
+              <div style="padding-left:10px">
+                <el-button
+                  size="mini"
+                  type="text"
+                  onClick={() => {
+                    getMenuDetail({ moduleId: row.moduleId }).then(res => {
+                      this.formData = {
+                        ...this.formData,
+                        ...res.data
+                      }
+                      this.dialogVisible = true
+                    })
+                  }}
+                >
+                  编辑
+                </el-button>
+                <el-popconfirm
+                  title="确定删除吗?"
+                  onConfirm={() => {
+                    deleteMenu({ id: row.moduleId }).then(res => {
+                      this.$successMsg('删除成功')
+                      getMenuDetail({ moduleId: this.operateType === 1 ? this.editParentId : this.editChildId }).then(
+                        res => {
+                          this.tableData = res.data.childList
+                        }
+                      )
+                    })
+                  }}
+                >
+                  <el-button slot="reference" type="text" size="mini">
+                    删除
+                  </el-button>
+                </el-popconfirm>
+              </div>
+            )
+          }
+        }
+      ]
+    }
   },
   created() {
     this.getList()
@@ -382,8 +428,6 @@ export default {
       if (!arr.length) return
       for (let i = 0; i < arr.length; i++) {
         if (arr[i].children.length) {
-          // arr[i].pages 页面级, 页面类型  [1, 2, 4]
-          // arr[i].controls 操作级, 操作类型  [3]
           arr[i].pages = []
           arr[i].controls = []
           for (let j = 0; j < arr[i].children.length; j++) {
@@ -414,6 +458,7 @@ export default {
             fullUrl: res.data.fullUrl,
             icon: res.data.icon,
             sort: res.data.sortNum,
+            flag: res.data.flag,
             type: res.data.type,
             status: res.data.status,
             isCache: res.data.isCache,
@@ -441,10 +486,11 @@ export default {
             fullUrl: this.addParentForm.fullUrl,
             icon: this.addParentForm.icon,
             sortNum: this.addParentForm.sort,
+            flag: this.addParentForm.flag,
             parentId: 0,
             type: this.addParentForm.type,
             status: this.addParentForm.status,
-            isCache: this.addParentForm.isCache,
+            isCache: this.addParentForm.isCache
           }
           if (this.addParentFormType == 'edit') {
             params.moduleId = this.editParentId
@@ -485,6 +531,7 @@ export default {
             fullUrl: res.data.fullUrl,
             icon: res.data.icon,
             sort: res.data.sortNum,
+            flag: res.data.flag,
             type: res.data.type,
             status: res.data.status,
             isCache: res.data.isCache,
@@ -504,7 +551,6 @@ export default {
             code: this.formData.code,
             type: 3,
             childList: this.formData.childList || null,
-            apiList: this.formData.apis
           }
           if (this.formData.moduleId) {
             params.parentId = null
@@ -533,7 +579,6 @@ export default {
       this.formData = {
         code: '',
         moduleName: '',
-        apis: []
       }
     },
     hasShowTable() {
@@ -567,9 +612,10 @@ export default {
               fullUrl: this.addChildForm.fullUrl,
               icon: this.addChildForm.icon,
               sortNum: this.addChildForm.sort,
+              flag: this.addChildForm.flag,
               type: this.addChildForm.type,
               status: this.addChildForm.status,
-              isCache: this.addChildForm.isCache,
+              isCache: this.addChildForm.isCache
             }
             editMenu(params).then(res => {
               this.cancelAddChildForm()
@@ -585,9 +631,10 @@ export default {
               fullUrl: this.addChildForm.fullUrl,
               icon: this.addChildForm.icon,
               sortNum: this.addChildForm.sort,
+              flag: this.addChildForm.flag,
               type: this.addChildForm.type,
               status: this.addChildForm.status,
-              isCache: this.addChildForm.isCache,
+              isCache: this.addChildForm.isCache
             }
             addMenu(params).then(res => {
               this.cancelAddChildForm()
@@ -687,4 +734,4 @@ export default {
 // th {
 //   text-align: center !important;
 // }
-</style>
+</style>

+ 79 - 12
src/views/setting/organizationManagement/settledManagement/index.vue

@@ -59,6 +59,23 @@
               <svg-icon icon-class="question" slot="reference" />
             </el-popover>
           </el-form-item>
+          <el-form-item label="到期时间" prop="expireTime">
+            <el-date-picker style="width: 100%;" v-model="step1Form.expireTime" type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
+            <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
+            </el-switch>
+          </el-form-item>
+          <el-form-item label="延保权限" prop="moduleYb">
+            <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
+            </el-switch>
+          </el-form-item>
+          <el-form-item label="工程维保权限" prop="moduleWb">
+            <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
+            </el-switch>
+          </el-form-item>
         </el-form>
       </el-card>
     </div>
@@ -156,8 +173,8 @@
           <div class="images">
             <div class="main-img">
               <div class="img" v-if="qrcode1_url" @mouseover="qrcode1_hover = true;" @mouseout="qrcode1_hover = false;">
-                <el-image ref="qrcode1" :src="qrcode1_url" :preview-src-list="[qrcode1_url]" style="width: 120px; height: 120px"
-                  fit="contain"></el-image>
+                <el-image ref="qrcode1" :src="qrcode1_url" :preview-src-list="[qrcode1_url]"
+                  style="width: 120px; height: 120px" fit="contain"></el-image>
                 <div class="mask" v-show="qrcode1_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode1')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode1')"></i>
@@ -174,8 +191,8 @@
           <div class="images">
             <div class="main-img">
               <div class="img" v-if="qrcode2_url" @mouseover="qrcode2_hover = true;" @mouseout="qrcode2_hover = false;">
-                <el-image ref="qrcode2" :src="qrcode2_url" :preview-src-list="[qrcode2_url]" style="width: 120px; height: 120px"
-                  fit="contain"></el-image>
+                <el-image ref="qrcode2" :src="qrcode2_url" :preview-src-list="[qrcode2_url]"
+                  style="width: 120px; height: 120px" fit="contain"></el-image>
                 <div class="mask" v-show="qrcode2_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode2')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode2')"></i>
@@ -257,6 +274,33 @@
           <el-form-item label="微信订阅模版" prop="templateId">
             <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
           </el-form-item>
+          <el-form-item label="公众号appid" prop="pubAppId">
+            <el-input v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
+          </el-form-item>
+          <el-form-item label="公众号密钥" prop="pubAppSecret">
+            <el-input v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
+          </el-form-item>
+
+
+
+          <el-form-item label="改派通知" prop="pubTemplateId1">
+            <el-input v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
+          </el-form-item>
+          <el-form-item label="发货通知" prop="pubTemplateId2">
+            <el-input v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
+          </el-form-item>
+          <el-form-item label="维权订单提醒" prop="pubTemplateId3">
+            <el-input v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
+          </el-form-item>
+          <el-form-item label="支付成功通知" prop="pubTemplateId4">
+            <el-input v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
+          </el-form-item>
+          <el-form-item label="维保费用申请" prop="pubTemplateId5">
+            <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
+          </el-form-item>
+
+
+
         </el-card>
       </el-form>
     </div>
@@ -333,8 +377,12 @@ export default {
         address: '', // 地址
         newPassword: '', // 登录密码
         confirmPassword: '', // 确认密码
-        qrcode1:'',
-        qrcode2:''
+        qrcode1: '',
+        qrcode2: '',
+        expireTime: '',
+        moduleMaterialPart: false,
+        moduleYb: false,
+        moduleWb: false,
       },
       step1FormRules: {
         account: [
@@ -372,10 +420,10 @@ export default {
       img2_hover: false,
       img3_url: '',
       img3_hover: false,
-      qrcode1_url:'',
-      qrcode1_hover:false,
-      qrcode2_url:'',
-      qrcode2_hover:false,
+      qrcode1_url: '',
+      qrcode1_hover: false,
+      qrcode2_url: '',
+      qrcode2_hover: false,
 
       step3Form: {
         enterpriseId: '',
@@ -390,6 +438,13 @@ export default {
         childKey: '',
         childMerchantId: '',
         templateId: '',
+        pubAppId: '',
+        pubAppSecret: '',
+        pubTemplateId1:'',
+        pubTemplateId2:'',
+        pubTemplateId3:'',
+        pubTemplateId4:'',
+        pubTemplateId5:'',
       },
       step3FormRules: {
         enterpriseId: [
@@ -541,7 +596,11 @@ export default {
             lng: this.step1Form.lng,
             address: this.step1Form.address,
             password: this.step1Form.confirmPassword,
-
+            expireTime: this.step1Form.expireTime,
+            moduleMaterialPart: this.step1Form.moduleMaterialPart,
+            moduleYb: this.step1Form.moduleYb,
+            moduleWb: this.step1Form.moduleWb,
+            
             minLogo1: this.img1_url,
             minLogo2: this.img2_url,
             minLogo3: this.img3_url,
@@ -560,6 +619,13 @@ export default {
             subSecret: this.step3Form.childKey,
             subMchId: this.step3Form.childMerchantId,
             template: this.step3Form.templateId,
+            pubAppId: this.step3Form.pubAppId,
+            pubAppSecret: this.step3Form.pubAppSecret,
+            pubTemplateId1: this.step3Form.pubTemplateId1,
+            pubTemplateId2: this.step3Form.pubTemplateId2,
+            pubTemplateId3: this.step3Form.pubTemplateId3,
+            pubTemplateId4: this.step3Form.pubTemplateId4,
+            pubTemplateId5: this.step3Form.pubTemplateId5,
           }
           addAccount(params).then(res => {
             this.$successMsg('开通成功');
@@ -723,4 +789,5 @@ export default {
       color: #ffffff;
     }
   }
-}</style>
+}
+</style>

+ 115 - 27
src/views/setting/organizationManagement/tenantDetails/index.vue

@@ -36,15 +36,24 @@
           <el-input v-model="step1Form.password" type="password" disabled></el-input>
           <el-button class="reset" @click="handleReset()">重置密码</el-button>
         </el-form-item>
-		<el-form-item label="到期时间" prop="companyExpireTime">
-		  <el-date-picker
-		        v-model="step1Form.companyExpireTime"
-		        type="datetime"
-				value-format="yyyy-MM-dd HH:mm:ss"
-		        placeholder="选择日期时间">
-		  </el-date-picker>
-		  <el-button type="primary" @click="saveTime()">保存</el-button>
-		</el-form-item>
+        <el-form-item label="到期时间" prop="companyExpireTime">
+          <el-date-picker v-model="step1Form.companyExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择日期时间">
+          </el-date-picker>
+          <el-button type="primary" @click="saveTime()">保存</el-button>
+        </el-form-item>
+        <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
+          <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+        <el-form-item label="延保权限" prop="moduleYb">
+          <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+        <el-form-item label="工程维保权限" prop="moduleWb">
+          <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
         <!-- <el-form-item class="tr">
           <el-button type="primary" @click="submitStep1Form">保存</el-button>
         </el-form-item> -->
@@ -198,6 +207,33 @@
           <el-form-item label="微信订阅模版" prop="templateId">
             <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
           </el-form-item>
+
+
+
+          <el-form-item label="公众号appid" prop="pubAppId">
+            <el-input v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
+          </el-form-item>
+          <el-form-item label="公众号密钥" prop="pubAppSecret">
+            <el-input v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
+          </el-form-item>
+
+          <el-form-item label="改派通知" prop="pubTemplateId1">
+            <el-input v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
+          </el-form-item>
+          <el-form-item label="发货通知" prop="pubTemplateId2">
+            <el-input v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
+          </el-form-item>
+          <el-form-item label="维权订单提醒" prop="pubTemplateId3">
+            <el-input v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
+          </el-form-item>
+          <el-form-item label="支付成功通知" prop="pubTemplateId4">
+            <el-input v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
+          </el-form-item>
+          <el-form-item label="维保费用申请" prop="pubTemplateId5">
+            <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
+          </el-form-item>
+
+
         </el-card>
       </el-form>
     </div>
@@ -268,6 +304,8 @@
     </div>
     <div class="page-footer">
       <div class="footer" :class="classObj">
+        <el-button type="primary" @click="submitStep1Form" :loading="formLoading" v-if="step == 'first'">{{ formLoading ?
+          '保存中 ...' : '保 存' }}</el-button>
         <el-button type="primary" @click="submitStep2Form" :loading="formLoading" v-if="step == 'second'">{{ formLoading ?
           '保存中 ...' : '保 存' }}</el-button>
         <el-button type="primary" @click="submitStep3Form" :loading="formLoading" v-if="step == 'third'">{{ formLoading ?
@@ -356,7 +394,10 @@ export default {
         address: '', // 地址
         newPassword: '', // 新密码
         confirmPassword: '', // 确认密码
-		companyExpireTime: ''
+        companyExpireTime: '',
+        moduleMaterialPart: '',
+        moduleYb: '',
+        moduleWb: '',
       },
 
       passwordType1: 'password',
@@ -401,6 +442,14 @@ export default {
         childKey: '',
         childMerchantId: '',
         templateId: '',
+        pubAppId: '',
+        pubAppSecret: '',
+
+        pubTemplateId1:'',
+        pubTemplateId2:'',
+        pubTemplateId3:'',
+        pubTemplateId4:'',
+        pubTemplateId5:'',
       },
       step3FormRules: {
         enterpriseId: [
@@ -475,7 +524,10 @@ export default {
         this.step1Form.email = res.data.email;
         this.step1Form.address = res.data.address;
         this.step1Form.password = '************';
-		this.step1Form.companyExpireTime = res.data.companyExpireTime
+        this.step1Form.companyExpireTime = res.data.companyExpireTime
+        this.step1Form.moduleMaterialPart = res.data.moduleMaterialPart
+        this.step1Form.moduleYb = res.data.moduleYb
+        this.step1Form.moduleWb = res.data.moduleWb
 
         this.img1_url = res.data.minLogo1;
         this.img2_url = res.data.minLogo2;
@@ -495,6 +547,15 @@ export default {
         this.step3Form.childKey = res.data.subSecret;
         this.step3Form.childMerchantId = res.data.subMchId;
         this.step3Form.templateId = res.data.template;
+        this.step3Form.pubAppId = res.data.pubAppId;
+        this.step3Form.pubAppSecret = res.data.pubAppSecret;
+        
+        this.step3Form.pubTemplateId1 = res.data.pubTemplateId1;
+        this.step3Form.pubTemplateId2 = res.data.pubTemplateId2;
+        this.step3Form.pubTemplateId3 = res.data.pubTemplateId3;
+        this.step3Form.pubTemplateId4 = res.data.pubTemplateId4;
+        this.step3Form.pubTemplateId5 = res.data.pubTemplateId5;
+
         this.companyWechatId = res.data.companyWechatId;
 
         this.step4Form.dayNum = res.data.dayNum
@@ -515,22 +576,22 @@ export default {
       this.passwordType2 = 'password';
       this.$refs.resetForm.resetFields();
     },
-	
-	saveTime(){
-		request({
-			url: '/admin/user/user/updateCompanyWechat',
-			method: 'post',
-			data: {
-				expireTime: this.step1Form.companyExpireTime,
-				companyWechatId: this.companyWechatId
-			}
-		}).then(res =>{
-			if(res.code == 200){
-				this.$successMsg('保存成功');
-				this.getDetail()
-			}
-		})
-	},
+
+    saveTime() {
+      request({
+        url: '/admin/user/user/updateCompanyWechat',
+        method: 'post',
+        data: {
+          expireTime: this.step1Form.companyExpireTime,
+          companyWechatId: this.companyWechatId
+        }
+      }).then(res => {
+        if (res.code == 200) {
+          this.$successMsg('保存成功');
+          this.getDetail()
+        }
+      })
+    },
 
     // 提交重置密码
     submitResetForm() {
@@ -597,6 +658,24 @@ export default {
       this.$refs[type].showViewer = true;
     },
 
+    submitStep1Form() {
+      this.formLoading = true;
+      let params = {
+        // adminUserId: this.id,
+        companyWechatId: this.companyWechatId,
+        moduleMaterialPart: this.step1Form.moduleMaterialPart,
+        moduleYb: this.step1Form.moduleYb,
+        moduleWb: this.step1Form.moduleWb,
+      }
+      editAccount(params).then(res => {
+        this.$successMsg('保存成功');
+        setTimeout(() => {
+          this.goBack();
+        }, 1500)
+      }).finally(res => {
+        this.formLoading = false;
+      })
+    },
 
     submitStep2Form() {
       if (!this.img1_url) {
@@ -645,6 +724,15 @@ export default {
             subSecret: this.step3Form.childKey,
             subMchId: this.step3Form.childMerchantId,
             template: this.step3Form.templateId,
+            pubAppId: this.step3Form.pubAppId,
+            pubAppSecret: this.step3Form.pubAppSecret,
+
+            pubTemplateId1: this.step3Form.pubTemplateId1,
+            pubTemplateId2: this.step3Form.pubTemplateId2,
+            pubTemplateId3: this.step3Form.pubTemplateId3,
+            pubTemplateId4: this.step3Form.pubTemplateId4,
+            pubTemplateId5: this.step3Form.pubTemplateId5,
+            
             companyWechatId: this.companyWechatId
           }
           editAccount(params).then(res => {

+ 2 - 2
src/views/setting/personal/index.vue

@@ -18,7 +18,7 @@
 					<div style="height: 120px;display: flex;flex-direction: column;justify-content: space-around;">
 						<div>用户名: {{userInfo.nickName}}</div>
 						<div>负责人: {{userInfo.linkName}}</div>
-						<div>开通时间: {{userInfo.companyOpenTime.substring(0,10)}}</div>
+						<div>开通时间: {{userInfo.companyOpenTime?userInfo.companyOpenTime.substring(0,10):''}}</div>
 					</div>
 				</el-col>
 				<el-col :span="12">
@@ -26,7 +26,7 @@
 						<div>账号: {{userInfo.userName}}</div>
 						<div>手机号码: {{userInfo.linkPhone}}</div>
 						<div class="flex">
-							<span style="color: #169dff;margin-right: 10px;">到期时间: {{userInfo.companyExpireTime.substring(0,10)}}</span>
+							<span style="color: #169dff;margin-right: 10px;">到期时间: {{userInfo.companyExpireTime?userInfo.companyExpireTime.substring(0,10):''}}</span>
 							<el-tooltip effect="dark" content="账号到期后将自动停用系统功能,续费后功能恢复使用!" placement="top">
 							    <i class="el-icon-question icon-question"></i>
 							</el-tooltip>

+ 8 - 1
src/views/setting/personal/renew.vue

@@ -25,7 +25,14 @@
 					<div class="flex" style="align-items: center;">
 						<div>实付: <span style="font-size: 20px;color: #ff6804;">¥</span><span style="font-size: 36px;color: #ff6804;font-weight: bold;">{{(goodsList[goodsIndex].normAmount * 100 - goodsList[goodsIndex].discountAmount * 100)/100}}</span></div>
 						<div style="margin: 0 20px;">已优惠: <span style="font-size: 18px;color: #ff6804;">¥</span><span style="font-size: 20px;color: #ff6804;">{{goodsList[goodsIndex].discountAmount}}</span></div>
-						<el-tooltip effect="dark" content="购买年限越大越优惠,优惠价格按年份增加折扣,第1年8.8折,第2年8折,第3年7折,第4年6折,第5年5折。举例: 原价1000元/年,张三购买了3年限套餐,所需支付价格为: 第1年880.00元+第2年800.00元+第三年700.00元,需支付金额: 2380.00元" placement="top">
+						<el-tooltip effect="dark" placement="right-start">
+							<div slot="content">
+								购买年限越大越优惠,优惠价格按年份增加折扣,第1年<br/>
+								8.8折,第2年8折,第3年7折,第4年6折,第5年5折。<br/>
+								举例: 原价1000元/年,张三购买了3年限套餐,所需支付<br/>
+								价格为: 第1年880.00元+第2年800.00元+第三年700.00元,<br/>
+								需支付金额: 2380.00元
+							</div>
 						    <i class="el-icon-question icon-question"></i>
 						</el-tooltip>
 					</div>

+ 253 - 0
src/views/workOrder/projectMaintenance/basicData/index.vue

@@ -0,0 +1,253 @@
+<template>
+	<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="80"
+	  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+	  :operation="operation()">
+	  <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
+	    :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
+	    <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+	      <zj-form-module :title="formDialogTitles[formDialogType]" label-width="100px" :showPackUp="false"
+	        :form-data="formData" :form-items="formItems" :disabled="formDialogType==2">
+	      </zj-form-module>
+	    </zj-form-container>
+	    <div slot="footer" class="dialog-footer">
+			<el-button size="mini" @click="formCancel">取 消</el-button>
+			<el-button size="mini" v-if="formDialogType !== 2" type="primary" @click="formConfirm()">确定</el-button>
+	    </div>
+	  </el-dialog>
+	</template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { listPageV2,pageExport, getDetail, save } from "@/api/workOrder/basicData";
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ["新增","编辑", "详情"],
+      formDialog: false,
+      formData: {
+		companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+		orderSmallTypeText: '',
+		orderType: '',
+		status: true,
+		sortNum: '',
+		imgUrl: []
+      }
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			]
+		]
+	},
+    formItems() {
+      return [{
+        md: 24,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', disabled: true },
+        formItemAttributes: {
+          label: '所属商户',
+          prop: 'companyName',
+          rules: [...required]
+        },
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-select',
+		options: [{label: '安装',value: 'INSTALL'},{label: '维修',value: 'REPAIR'}],
+        attributes: { placeholder: '请选择' },
+        formItemAttributes: {
+          label: '所属业务线',
+          prop: 'orderType',
+          rules: [...required]
+        },
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入工单类型', },
+        formItemAttributes: {
+          label: '工单类型',
+          prop: 'orderSmallTypeText',
+          rules: [...required]
+        }
+      },{
+        md: 24,
+        isShow: true,
+        name: 'slot-component',
+        attributes: { },
+        formItemAttributes: {
+          label: '状态',
+          prop: 'status',
+          rules: [...required]
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<el-radio-group v-model={this.formData.status}>
+				    <el-radio disabled={this.formDialogType==2} label={true}>启用</el-radio>
+				    <el-radio disabled={this.formDialogType==2} label={false}>禁用</el-radio>
+				</el-radio-group>
+			)
+		}
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '排序数字越小越靠前', type: 'number' },
+        formItemAttributes: {
+          label: '排序',
+          prop: 'sortNum',
+          rules: []
+        }
+      }, {
+		md: 24,
+		isShow: true,
+		name: 'slot-component',
+		formItemAttributes: {
+			label: '上传图片',
+			prop: 'imgUrl',
+			rules: [...required]
+		},
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<div>
+					<ImageUpload fileList={this.formData.imgUrl} fileType={['image']} limit={1} isEdit={this.formDialogType !== 2} />
+					<div style="color: #EA8000">上传后在小程序首页自助服务展示</div>
+				</div>
+			)
+		}
+	}]
+    }
+  },
+  methods: {
+    // 列表请求函数
+	getList: listPageV2,
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+		if (item.jname === 'imgUrl') {
+		        defaultData.render = (h, { row, index, column }) => {
+		          return (
+		            <div style="padding:0 6px;cursor: pointer;">
+		              {row.imgUrl ? row.imgUrl.split(",").map(url => <el-image src={url} preview-src-list={[url]} fit="cover" style="width:80px;height:80px;" />) : null}
+		            </div>
+		          )
+		        }
+		      }
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation() {
+		return this.operationBtn({
+			edit: {
+				click: ({ row, index, column }) => {
+					getDetail({ id: row.id }).then(res => {
+						Object.assign(this.formData, res.data,{
+							imgUrl:res.data?.imgUrl?  res.data?.imgUrl?.split(",").map(item=>({url:item})) : []
+						})
+						console.log(this.formData)
+						this.formDialogType = 1
+						this.openForm()
+					})
+				}
+			},
+			detail: {
+				click: ({ row, index, column }) => {
+					getDetail({ id: row.id }).then(res => {
+						Object.assign(this.formData, res.data,{
+							imgUrl:res.data?.imgUrl?  res.data?.imgUrl?.split(",").map(item=>({url:item})) : []
+						})
+						console.log(this.formData)
+						this.formDialogType = 2
+						this.openForm()
+					})
+				}
+			},
+			expenseApply: {
+				click: ({ row, index, column }) => {
+					
+				}
+			},
+			serviceOrderDetail: {
+				click: ({ row, index, column }) => {
+					
+				}
+			}
+		})
+    },
+    addData() {
+      this.formDialogType = 0
+      this.openForm()
+    },
+    openForm() {
+      this.formDialog = true;
+    },
+    formCancel() {
+      this.$refs.formRef.$refs.inlineForm.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          (save)({
+			  ...this.formData,
+			  imgUrl:this.formData.imgUrl.map(item=>item.url).join(",")
+		  }).then(res => {
+            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>

+ 35 - 32
src/views/workOrder/workOrderPool/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 工单池 -->
-  <template-page ref="pageRef" :getList="getList" :operation="operation" :exportList="exportList"
+  <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
     :optionsEvensGroup="optionsEvensGroup" :columnParsing="columnParsing" :tableAttributes="tableAttributes"
     :tableEvents="tableEvents" :moreParameters="moreParameters" :screeningAnalysis="screeningAnalysis"
     :filterMethod="filterMethod" :replaceOrNotMap="true" :defaultSearchData="defaultSearchData">
@@ -12,7 +12,8 @@
     </div>
     <!-- 工单详情 -->
     <div class="cartographer_big">
-      <el-dialog title="工单详情" width="100%" :modal="false" :visible.sync="detailFormBool" :before-close="handleClose">
+      <el-dialog :title="'工单详情-' + id" width="100%" :modal="false" :visible.sync="detailFormBool"
+        :before-close="handleClose">
         <Detail v-if="detailFormBool" :id="id" />
       </el-dialog>
     </div>
@@ -36,6 +37,7 @@
 import { EventBus } from '@/utils/eventBus'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 import { listPageV2 } from "@/api/workOrder/orderType";
 import { orderBaseList, orderBaseListExport, orderBaseStatusCount, orderBaseImport } from "@/api/workOrderPool.js"
 import workOrderInfo from './detailModule/workOrderInfo/index.vue'
@@ -53,7 +55,7 @@ export default {
     Reassignment,
     Reschedule
   },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
       id: this.$route.query.id || '',
@@ -113,26 +115,26 @@ export default {
       return [
         [
           [
-            {
-              name: '创建工单',
+            this.optionsEvensAuth("createWorkOrder", {
               click: () => {
                 this.createFormBool = true
               }
-            },
+            })
           ],
           [
-            {
+            this.optionsEvensAuth(["importTemplate", "downloadImportTemplate"], {
               name: '导入工单',
               click: () => { }
-            },
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(orderBaseImport, '导入模板')
+            }),
+            this.optionsEvensAuth("importTemplate", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(orderBaseImport, moduleName)
+                }
               }
-            },
-            {
-              name: '下载导入模板',
+            }),
+            this.optionsEvensAuth("downloadImportTemplate", {
               click: () => {
                 commonTemplateDownload({ name: '工单导入模板.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -145,15 +147,14 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            },
+            }),
           ],
           [
-            {
+            this.optionsEvensAuth(["bulkOrder", "lotOrder"], {
               name: '批量操作',
               click: () => { }
-            },
-            {
-              name: '批量派单',
+            }),
+            this.optionsEvensAuth("bulkOrder", {
               click: () => {
                 if (this.recordSelected.length === 0) {
                   this.$message.warning('请勾选工单')
@@ -161,9 +162,8 @@ export default {
                 }
                 this.reassignmentBool = true
               }
-            },
-            {
-              name: '批量约单',
+            }),
+            this.optionsEvensAuth("lotOrder", {
               click: () => {
                 if (this.recordSelected.length === 0) {
                   this.$message.warning('请勾选工单')
@@ -171,7 +171,7 @@ export default {
                 }
                 this.rescheduleBool = true
               }
-            },
+            }),
           ],
         ]
       ]
@@ -230,9 +230,11 @@ export default {
         }
       }
     },
+    
     selectable(row, index) {
       return !["YWG", "YJS", "YQX"].includes(Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0])
     },
+    
     screeningAnalysis(jname, val) {
       if (jname == 'orderFlags') {
         return (val || []).map(item => item.tagName).join(',')
@@ -240,13 +242,14 @@ export default {
         return val
       }
     },
+    
     filterMethod(value, row, column) {
       if (column['property'] == 'orderFlags') {
         return (row[column['property']] || []).map(item => item.tagName).join(',') === value
       }
       return row[column['property']] === value
     },
-
+    
     // 获取统计
     getOrderBaseStatusCount(...p) {
       orderBaseStatusCount(...p).then(res => {
@@ -360,17 +363,17 @@ export default {
       this.recordSelected = data
     },
 
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
+    operation() {
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
             this.id = row.id
             this.$nextTick(() => {
               this.detailFormBool = true
             })
-          }}>编辑</el-button>
-        </div>
-      )
+          }
+        }
+      })
     },
 
     handleClose() {

Some files were not shown because too many files changed in this diff