Parcourir la source

Merge branch 'linwenxin_workOrder' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin into develop

linwenxin il y a 1 an
Parent
commit
3723fcf2e2
25 fichiers modifiés avec 811 ajouts et 218 suppressions
  1. 6 2
      src/api/auxiliaryFittings/attachmentProfile.js
  2. 9 0
      src/api/goods.js
  3. 10 0
      src/api/workOrder/orderHome.js
  4. 1 1
      src/api/workOrder/rewardsPunishmentsOrder.js
  5. BIN
      src/assets/orderHome/djs.png
  6. BIN
      src/assets/orderHome/dpg.png
  7. BIN
      src/assets/orderHome/ffz.png
  8. BIN
      src/assets/orderHome/pj.png
  9. BIN
      src/assets/orderHome/yc.png
  10. 34 0
      src/utils/util.js
  11. 54 18
      src/views/auxiliaryFittings/attachmentProfile/index.vue
  12. 193 0
      src/views/mallManagement/brand/index.vue
  13. 59 40
      src/views/mallManagement/goods/classify_index/index.vue
  14. 66 4
      src/views/mallManagement/goods/goods_add/index.vue
  15. 9 1
      src/views/workOrder/appraise/index.vue
  16. 1 1
      src/views/workOrder/basicConfiguration/assessmentItemAllocation/index.vue
  17. 37 33
      src/views/workOrder/basicConfiguration/settlementStandard/components/install.vue
  18. 1 1
      src/views/workOrder/basicConfiguration/settlementStandard/components/other.vue
  19. 35 30
      src/views/workOrder/basicConfiguration/settlementStandard/components/repair.vue
  20. 97 48
      src/views/workOrder/orderHome/index.vue
  21. 28 15
      src/views/workOrder/settleAccountsManagement/rewardsPunishmentsOrder/index.vue
  22. 16 1
      src/views/workOrder/settleAccountsManagement/settleAccountsOrder/index.vue
  23. 143 16
      src/views/workOrder/settleAccountsManagement/summaryBill/detailList.vue
  24. 7 7
      src/views/workOrder/settleAccountsManagement/summaryBill/index.vue
  25. 5 0
      src/views/workOrder/workOrderPool/components/reschedule/index.vue

+ 6 - 2
src/api/auxiliaryFittings/attachmentProfile.js

@@ -72,6 +72,10 @@ export function getCategoryList(params) {
   })
 }
 
-export function listImport(data) {
-	return handleImport('/dictCompany/importExcel', data.formdata, data.id || '')
+export function listImport1(data) {
+	return handleImport('/websit/goods/p/import', data.formdata, data.id || '')
+}
+
+export function listImport2(data) {
+	return handleImport('/websit/goods/p/import2', data.formdata, data.id || '')
 }

+ 9 - 0
src/api/goods.js

@@ -108,6 +108,15 @@ export function getFreightList(params) {
   })
 }
 
+// 获取品牌
+export function getBrand(params) {
+  return request({
+    url: '/brand/list',
+    method: 'get',
+    params
+  })
+}
+
 // 添加商品
 export function addGoods(params) {
   return request({

+ 10 - 0
src/api/workOrder/orderHome.js

@@ -0,0 +1,10 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取工单状态统计
+export function getCount(data) {
+  return request({
+    url: `/order/base/count/status/count`,
+    method: 'post',
+    data
+  })
+}

+ 1 - 1
src/api/workOrder/rewardsPunishmentsOrder.js

@@ -12,7 +12,7 @@ export function listPageV2(data) {
 //导出
 export function pageExport(data, name) {
   return postBlob({
-    url: '/examine/project/list/export/export',
+    url: '/examine/project/list/export',
     data,
     name
   })

BIN
src/assets/orderHome/djs.png


BIN
src/assets/orderHome/dpg.png


BIN
src/assets/orderHome/ffz.png


BIN
src/assets/orderHome/pj.png


BIN
src/assets/orderHome/yc.png


+ 34 - 0
src/utils/util.js

@@ -70,6 +70,40 @@ export function downloadFiles(url, params = {}) {
   window.open(process.env.VUE_APP_BASE_API + newUrl)
 }
 
+export function downloadFiles2(url, params = {}, name) {
+  const newParams = deleteEmptyObj(params)
+  const newUrl = createParamsUrl(url, newParams)
+
+  axios({
+    url: process.env.VUE_APP_BASE_API + newUrl,
+    method: 'get',
+    responseType: 'blob',
+    headers: {
+      'x-token': getToken()
+    }
+  }).then(res => {
+    var blob = new Blob([res.data], {
+      type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8'
+    })
+    var filename = name + '.xlsx'
+    var downloadElement = document.createElement('a')
+    var href = window.URL.createObjectURL(blob) // 创建下载的链接
+    downloadElement.style.display = 'none'
+    downloadElement.href = href
+    downloadElement.download = filename // 下载后文件名
+    document.body.appendChild(downloadElement)
+    downloadElement.click() // 点击下载
+    document.body.removeChild(downloadElement) // 下载完成移除元素
+    window.URL.revokeObjectURL(href) // 释放掉blob对象
+  })
+
+  // params['x-token'] = getToken()
+  // const newParams = deleteEmptyObj(params)
+  // const newUrl = createParamsUrl(url, newParams)
+  // console.log(process.env.VUE_APP_BASE_API + newUrl)
+  // window.open(process.env.VUE_APP_BASE_API + newUrl)
+}
+
 /**
  * 导入功能
  * @param {*} url

+ 54 - 18
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -23,7 +23,8 @@ import import_mixin from '@/components/template/import_mixin.js'
 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, updateStatus, listImport, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
+import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport1, listImport2, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
+import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage, ImageUpload },
   mixins: [import_mixin],
@@ -59,22 +60,38 @@ export default {
 				}
 			]
 		],
-		// [
-  //         [
-  //           {
-  //             name: '下载导入模板',
-  //             click: this.handleDownload
-  //           }
-  //         ],
-  //         [
-  //           {
-  //             name: '导入模板',
-  //             render: () => {
-  //               return this.importButton(listImport, '导入模板')
-  //             }
-  //           }
-  //         ],
-  //       ],
+		[
+		  [
+		    {
+		      name: '下载配件物料导入模板',
+		      click: this.handleDownload1
+		    }
+		  ],
+		  [
+		    {
+		      name: '导入配件物料模板',
+		      render: () => {
+		        return this.importButton(listImport1, '导入模板')
+		      }
+		    }
+		  ],
+		],
+		[
+          [
+            {
+              name: '下载服务收费导入模板',
+              click: this.handleDownload2
+            }
+          ],
+          [
+            {
+              name: '导入服务收费模板',
+              render: () => {
+                return this.importButton(listImport2, '导入模板')
+              }
+            }
+          ],
+        ],
 	  ],
       // 表格属性
       tableAttributes: {
@@ -619,7 +636,26 @@ export default {
       })
     },
 	// 下载导入模版
-	handleDownload() {
+	handleDownload1() {
+		commonTemplateDownload({ name: '配件模板(配件物料).xlsx' }, `${this.$route.meta.title}`).then(res => {
+		    this.$message({
+		        message: '下载成功',
+		        type: 'success'
+		    })
+		}).catch(err => {
+		    this.$message.error('下载失败')
+		})
+	  // downloadFiles('charging/standard/download');
+	},
+	handleDownload2() {
+		commonTemplateDownload({ name: '配件模板(服务收费).xlsx' }, `${this.$route.meta.title}`).then(res => {
+		    this.$message({
+		        message: '下载成功',
+		        type: 'success'
+		    })
+		}).catch(err => {
+		    this.$message.error('下载失败')
+		})
 	  // downloadFiles('charging/standard/download');
 	},
   }

+ 193 - 0
src/views/mallManagement/brand/index.vue

@@ -0,0 +1,193 @@
+<template>
+  <div class="app-container">
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')">添加品牌</el-button>
+        </div>
+      </div>
+
+      <div class="table">
+        <el-table ref="noticeTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="服务品牌" prop="brandName" min-width="180"></el-table-column>
+          <el-table-column align="center" label="图片" prop="imageUrl">
+            <template slot-scope="scope">
+              <el-image style="width: 40px; height: 40px; display: block; margin: 0 auto;" :src="scope.row.imageUrl" :preview-src-list="[scope.row.imageUrl]" fit="cover">
+                <div slot="error" style="height: 100%;font-size: 40px;">
+                  <i class="el-icon-picture-outline"></i>
+                </div>
+              </el-image>
+            </template>
+          </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>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="创建人" prop="createBy" min-width="100"></el-table-column>
+          <el-table-column align="center" label="创建时间" prop="createTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="修改人" prop="updateBy" min-width="100"></el-table-column>
+          <el-table-column align="center" label="修改时间" prop="updateTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="操作" fixed="right" width="120">
+            <template slot-scope="scope">
+              <el-button type="text" @click="addOrEdit('edit', scope.row.id)">编辑</el-button>
+              <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.id)">
+                <el-button slot="reference" type="text">删除</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+
+
+    <!-- 新增编辑 -->
+    <el-dialog :title="addFormType === 'add' ? '新增品牌':'编辑品牌'" :visible.sync="addFormVisible" :show-close="false" width="50%" :close-on-click-modal="false">
+      <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="80px">
+        <el-form-item label="品牌名称" prop="name">
+          <el-input v-model="addForm.name" autocomplete="off" placeholder="请输入品牌名称"></el-input>
+        </el-form-item>
+        <el-form-item label="图片" prop="imgUrl">
+          <el-upload
+            class="avatar-uploader"
+            :action="baseURL + 'common/upload'"
+            :headers="myHeaders"
+            :show-file-list="false"
+            :on-success="uploadSuccess"
+            :before-upload="beforeUpload">
+            <img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar">
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="addForm.status">
+            <el-radio :label="true">开启</el-radio>
+            <el-radio :label="false">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelAddForm">取 消</el-button>
+        <el-button type="primary" @click="submitAddForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getBrandList, getBrandDetail, saveBrand, deleteBrand } from "@/api/miniapp";
+import { getToken } from '@/utils/auth'
+
+export default {
+  data() {
+    return {
+      baseURL: process.env.VUE_APP_BASE_API,
+      myHeaders: {'x-token': getToken()},
+      dataList: null, // 列表数据
+      listLoading: true, // 列表加载loading
+
+      editId:  null,
+      addFormType: 'add',
+      addFormVisible: false,
+      addForm: {
+        name: '', // 名称
+        imgUrl: '', // 图片
+        status: true,
+      },
+      addFormRules: {
+        name: [
+          { required: true, message: '请输入品牌名称', trigger: 'blur' }
+        ],
+        imgUrl: [
+          { required: true, message: '请上传图片', trigger: 'change' }
+        ],
+        status: [
+          { required: true, message: '请选择状态', trigger: 'change' }
+        ],
+      },
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    getList() {
+      getBrandList().then(res => {
+        this.dataList = res.data;
+        this.listLoading = false;
+      })
+    },
+
+    // 新增编辑
+    addOrEdit(type, id) {
+      this.addFormType = type;
+      this.addFormVisible = true;
+      if(type == 'edit') {
+        this.editId = id;
+        getBrandDetail({id: id}).then(res => {
+          this.addForm = {
+            name: res.data.brandName,
+            imgUrl: res.data.imageUrl,
+            status: res.data.status,
+          }
+        })
+      }
+    },
+
+    // 取消 新增编辑
+    cancelAddForm(){
+      this.addFormVisible = false;
+      this.$refs.addForm.resetFields();
+      this.selGoodsName = ''
+    },
+
+    // 提交 新增编辑
+    submitAddForm() {
+      this.$refs.addForm.validate((valid) => {
+        if (valid) {
+          let params = {
+            brandName: this.addForm.name,
+            imageUrl: this.addForm.imgUrl,
+            status: this.addForm.status,
+          }
+          if(this.addFormType == 'edit') {
+            params.id = this.editId;
+          }
+          saveBrand(params).then(res => {
+            this.cancelAddForm();
+            this.getList();
+            this.$successMsg('保存成功');
+          })
+        }
+      })
+    },
+
+    uploadSuccess(res, file) {
+      this.addForm.imgUrl = res.data.url;
+    },
+
+    beforeUpload(file) {
+      const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
+      const whiteList = ['jpg', 'jpeg', 'png'];
+      if (whiteList.indexOf(fileSuffix) === -1) {
+        this.$errorMsg('只支持上传jpg/png文件!');
+        return false;
+      }
+    },
+
+    // 操作 - 删除
+    handleDelete(id) {
+      deleteBrand({id: id}).then(res => {
+        this.getList();
+        this.$successMsg();
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 59 - 40
src/views/mallManagement/goods/classify_index/index.vue

@@ -101,20 +101,20 @@
           <el-input type="text" placeholder="请输入二级分类名称" v-model="addChildForm.twoClassify" maxlength="10" show-word-limit style="width: 250px;"></el-input>
         </el-form-item>
 
-        <el-form-item label="工单大类" prop="orderType">
-          <el-select v-model="addChildForm.orderType" placeholder="请选择工单大类" style="width: 250px;" @change="changeOrderType()">
-            <el-option :label="item.name" :value="item.number" v-for="(item, index) in orderMainType" :key="index">
-              <span style="color: #8492a6">{{ item.number }}</span>
-              <span style="margin-left: 10px;">{{ item.name }}</span>
+        <el-form-item label="工单大类" prop="main">
+          <el-select v-model="addChildForm.main" value-key="categoryId" placeholder="请选择工单大类" style="width: 250px;" @change="changeOrderType">
+            <el-option :label="item.name" :value="item" v-for="(item, index) in orderMainType" :key="index">
+             <!-- <span style="color: #8492a6">{{ item.number }}</span>
+              <span style="margin-left: 10px;">{{ item.name }}</span> -->
             </el-option>
           </el-select>
         </el-form-item>
 
         <el-form-item label="工单小类" prop="smallType">
-          <el-select v-model="addChildForm.smallType" placeholder="请选择工单小类" style="width: 250px;" :disabled="!addChildForm.orderType">
-            <el-option :label="item.name" :value="item.id" v-for="(item, index) in orderSmallType" :key="index">
-              <span style="color: #8492a6">{{ item.id }}</span>
-              <span style="margin-left: 10px;">{{ item.name }}</span>
+          <el-select v-model="addChildForm.small" value-key="categoryId" placeholder="请选择工单小类" style="width: 250px;" :disabled="!addChildForm.main.name">
+            <el-option :label="item.name" :value="item" v-for="(item, index) in orderSmallType" :key="index">
+             <!-- <span style="color: #8492a6">{{ item.id }}</span>
+              <span style="margin-left: 10px;">{{ item.name }}</span> -->
             </el-option>
           </el-select>
         </el-form-item>
@@ -168,6 +168,7 @@
 import { getToken } from '@/utils/auth'
 import { getClassifyList, addClassify, editClassify, deleteClassify, getClassifyDetail, getSmallType } from '@/api/goods'
 import { ORDER_MAIN_TYPE } from "@/utils/select_data";
+import { getMainList } from "@/api/workOrder/settlementStandardInstall";
 
 export default {
   data() {
@@ -208,8 +209,8 @@ export default {
       addChildForm: {
         oneClassify: '',
         twoClassify: '',
-        orderType: '',
-        smallType: '',
+		main: {},
+        small: {},
         workOrderType: 'REPAIR',
         imgUrl: '',
         taxNumber: '',
@@ -234,13 +235,15 @@ export default {
 
       classifyList: [],
 
-      orderMainType: ORDER_MAIN_TYPE,
+      // orderMainType: ORDER_MAIN_TYPE,
+			orderMainType: [],
       orderSmallType: [],
 
     }
   },
   created() {
     this.getList();
+	this.getMainList()
   },
   methods: {
 
@@ -255,6 +258,12 @@ export default {
         this.dataList = res.data;
       })
     },
+		
+	getMainList(){
+		getMainList({type: 2}).then(res => {
+			this.orderMainType = res.data
+		})
+	},
 
     // 筛选后重新获取列表
     getListByScreen() {
@@ -318,9 +327,10 @@ export default {
     },
 
     // 改变大类
-    changeOrderType() {
-      this.addChildForm.smallType = '';
-      this.getSmallType();
+    changeOrderType(e) {
+		this.orderSmallType = e.children
+		this.addChildForm.small = {};
+		// this.getSmallType();
     },
 
     getSmallType() {
@@ -334,6 +344,7 @@ export default {
 
     // 打开 新增编辑 二级分类
     addOrEditChild(type, cid) {
+	  this.getMainList()
       this.addChildFormType = type;
       this.addChildFormVisible = true;
       getClassifyList({name: ''}).then(res => {
@@ -349,21 +360,27 @@ export default {
 
       if(type == 'edit') {
         this.editChildId = cid;
-        getClassifyDetail({categoryId: cid}).then(res => {
-          this.addChildForm = {
-            oneClassify: res.data.parentId,
-            twoClassify: res.data.name,
-            orderType: Number(res.data.mainNumber),
-            smallType: Number(res.data.smallNumber),
-            workOrderType: res.data.workOrderType,
-            imgUrl: res.data.imgUrl,
-            taxNumber: res.data.taxNumber,
-            taxPercent: res.data.taxPercent,
-            status: res.data.status,
-            sort: res.data.sortNum
-          }
-          this.getSmallType();
-        })
+		getClassifyDetail({categoryId: cid}).then(res => {
+			console.log(this.orderMainType,'获取大类')
+			this.orderMainType.forEach(item =>{
+				if(item.categoryId == res.data.mainNumber){
+					this.orderSmallType = item.children
+				}
+			})
+			this.addChildForm = {
+				oneClassify: res.data.parentId,
+				twoClassify: res.data.name,
+				main: {name: res.data.mainName,categoryId: res.data.mainNumber},
+				small: {name: res.data.smallName,categoryId: res.data.smallNumber},
+				workOrderType: res.data.workOrderType,
+				imgUrl: res.data.imgUrl,
+				taxNumber: res.data.taxNumber,
+				taxPercent: res.data.taxPercent,
+				status: res.data.status,
+				sort: res.data.sortNum
+			}
+			// this.getSmallType();
+		})
       }
     },
 
@@ -377,21 +394,21 @@ export default {
     submitAddChildForm() {
       this.$refs.addChildForm.validate((valid) => {
         if (valid) {
-          let index = this.$findElem(ORDER_MAIN_TYPE, 'number', this.addChildForm.orderType);
-          let mainName = index >= 0 ? ORDER_MAIN_TYPE[index].name : '';
+          // let index = this.$findElem(ORDER_MAIN_TYPE, 'number', this.addChildForm.orderType);
+          // let mainName = index >= 0 ? ORDER_MAIN_TYPE[index].name : '';
 
-          let index2 = this.$findElem(this.orderSmallType, 'id', this.addChildForm.smallType);
-          let smallName = index2 >= 0 ? this.orderSmallType[index2].name : '';
+          // let index2 = this.$findElem(this.orderSmallType, 'id', this.addChildForm.smallType);
+          // let smallName = index2 >= 0 ? this.orderSmallType[index2].name : '';
           
           let params = {}
           if(this.addChildFormType == 'edit') {
             params = {
                 categoryId: this.editChildId,
                 name: this.addChildForm.twoClassify,
-                mainNumber: this.addChildForm.orderType || '',
-                mainName: mainName,
-                smallNumber: this.addChildForm.smallType || '',
-                smallName: smallName,
+                mainNumber: this.addChildForm.main.categoryId || '',
+                mainName: this.addChildForm.main.name || '',
+                smallNumber: this.addChildForm.small.categoryId || '',
+                smallName: this.addChildForm.small.name,
                 workOrderType: this.addChildForm.workOrderType,
                 imgUrl: this.addChildForm.imgUrl,
                 taxNumber: this.addChildForm.taxNumber,
@@ -409,8 +426,10 @@ export default {
               children: [{
                 parentId: this.addChildForm.oneClassify,
                 name: this.addChildForm.twoClassify,
-                mainNumber: this.addChildForm.orderType || '',
-                mainName: mainName,
+                mainNumber: this.addChildForm.main.categoryId || '',
+                mainName: this.addChildForm.main.name || '',
+                smallNumber: this.addChildForm.small.categoryId || '',
+                smallName: this.addChildForm.small.name,
                 imgUrl: this.addChildForm.imgUrl,
                 taxNumber: this.addChildForm.taxNumber,
                 taxPercent: this.addChildForm.taxPercent,

+ 66 - 4
src/views/mallManagement/goods/goods_add/index.vue

@@ -12,7 +12,33 @@
     <!-- 第一步 -->
     <div class="form-container" v-show="step == 0">
       <div class="title">基础信息</div>
-      <el-form ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="110px">
+      <el-form ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="120px">
+		<el-form-item label="品牌:" prop="brand">
+			<el-select v-model="step1Form.brand" value-key="id" placeholder="请选择">
+			    <el-option
+			      v-for="item in brandList"
+			      :key="item.id"
+			      :label="item.brandName"
+			      :value="item">
+			    </el-option>
+			</el-select>
+		</el-form-item>
+		<el-form-item label="工单类型:" prop="orderSmallType">
+			<el-select v-model="step1Form.orderSmallType" placeholder="请选择">
+			    <el-option
+			      v-for="item in orderTypeList"
+			      :key="item.id"
+			      :label="item.orderSmallTypeText"
+			      :value="item.id">
+			    </el-option>
+			</el-select>
+		</el-form-item>
+		<el-form-item label="是否虚拟商品:" prop="isVr">
+			 <el-radio-group v-model="step1Form.isVr">
+			    <el-radio :label="true">是</el-radio>
+			    <el-radio :label="false">否</el-radio>
+			  </el-radio-group>
+		</el-form-item>
         <el-form-item label="商品名称:" prop="goodsName">
           <el-input v-model="step1Form.goodsName" placeholder="请输入商品名称" maxlength="200" show-word-limit></el-input>
         </el-form-item>
@@ -379,7 +405,8 @@
 
 <script>
 import { getToken } from '@/utils/auth'
-import { getClassifyList, getFreightList, addGoods, editGoods, getGoodsDetail, getModuleList, getMarketingList, getTagList } from '@/api/goods'
+import { getClassifyList, getFreightList, addGoods, editGoods, getGoodsDetail, getModuleList, getMarketingList, getTagList, getBrand } from '@/api/goods'
+import { getTypeList } from "@/api/workOrder/settlementStandardInstall";
 import { quillEditor } from 'vue-quill-editor'
 import 'quill/dist/quill.core.css'
 import 'quill/dist/quill.snow.css'
@@ -425,6 +452,9 @@ export default {
         marketing: '',
         attrs: [],
         tags: [],
+		isVr: false,
+		orderSmallType: '',
+		brand: {},
         // logoUrl: '',
         // showDate: [],
       },
@@ -440,13 +470,24 @@ export default {
         ],
         classify: [
           { required: true, message: '请选择商品分类', trigger: 'change' }
-        ]
+        ],
+		brand: [
+          { required: true, message: '请选择品牌', trigger: 'change' }
+        ],
+		orderSmallType: [
+		  { required: true, message: '请选择工单类型', trigger: 'change' }
+		],
+		isVr: [
+		  { required: true, message: '请选择是否虚拟商品', trigger: 'change' }
+		]
       },
       imagesList: [], // 图片墙展示列表
 
       classifyList: [],
       freightList: [],
       moduleList: [],
+			orderTypeList: [],
+			brandList: [],
 
       step2Form: {
         specType: true,
@@ -571,6 +612,8 @@ export default {
 
     this.getFreightList();
     this.getModuleList();
+	this.getTypeList()
+	this.getBrand()
 
     if (this.isEdit) {
       this.canCompute = false;
@@ -597,7 +640,18 @@ export default {
         })
       })
     },
-
+		
+		getTypeList(){
+			getTypeList({pageNum: 1,pageSize: -1,params: [{param: 'a.order_type',compare: '=',value: 'INSTALL'},{param: 'a.status',compare: '=',value: true}]}).then(res => {
+				this.orderTypeList = res.data.records
+			})
+		},
+	getBrand(){
+		getBrand().then(res => {
+			this.brandList = res.data
+		})
+	},
+		
     // getMarketingList() {
     //   let classifyList = this.classifyList;
     //   let categoryId = '';
@@ -679,6 +733,9 @@ export default {
           marketing: data.marketingId,
           attrs: data.tags,
           tags: data.tagsLabel,
+		  brand: {id: data.brandId,brandName: data.brandName},
+		  isVr: data.isVr,
+		  orderSmallType: data.orderSmallType
           // logoUrl: data.logo,
           // showDate: data.logoStartTime ? [data.logoStartTime.slice(0, 10), data.logoEndTime.slice(0, 10)] : [],
         }
@@ -961,6 +1018,11 @@ export default {
 
         templateId: this.step3Form.moduleId,
         content: this.step3Form.detailContent,
+		
+		isVr: this.step1Form.isVr,
+		orderSmallType: this.step1Form.orderSmallType,
+		brandId: this.step1Form.brand.id,
+		brandName: this.step1Form.brand.brandName,
       }
       console.log(params);
 

+ 9 - 1
src/views/workOrder/appraise/index.vue

@@ -55,7 +55,15 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return (
 					<div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
-						<span style="color:#008dd4;" onClick={() => {}}>{row.id}</span>
+						<span style="color:#008dd4;" onClick={() => {
+							this.$router.push({
+									name: "workOrderPool",
+									query: {
+										id:row.id,
+										activeName: "Evaluation",
+									}
+							})
+						}}>{row.id}</span>
 						{column.isCopy ? (
             		    <i
 							style="color:#008dd4;"

+ 1 - 1
src/views/workOrder/basicConfiguration/assessmentItemAllocation/index.vue

@@ -82,7 +82,7 @@ export default {
         md: 24,
         isShow: true,
         name: 'el-input',
-        attributes: { placeholder: '请输入供应商名称', },
+        attributes: { placeholder: '请输入考核项目名称', },
         formItemAttributes: {
           label: '考核项目',
           prop: 'name',

+ 37 - 33
src/views/workOrder/basicConfiguration/settlementStandard/components/install.vue

@@ -84,10 +84,11 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index?(
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.types`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
-							<el-select value-key="orderSmallTypeText" value={row.types} placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.type`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
+							<el-select value={{orderSmallTypeText:row.typeName,id: row.type}} value-key="id" placeholder="请选择"
 								onInput={(val)=>{
-									row.types=val
+									row.type = val.id
+									row.typeName = val.orderSmallTypeText
 								}}>
 								{
 									this.typeList.map((item, index) => {
@@ -104,11 +105,14 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index?(
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.parentCategory`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
-							<el-select value={row.parentCategory} value-key="name" placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.parentCategoryId`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
+							<el-select value={{categoryId:row.parentCategoryId,name: row.parentCategoryName}} value-key="categoryId" placeholder="请选择"
 									onInput={(val)=>{
-										row.parentCategory=val
-										this.smallList = [...[{name: '通用', categoryId: 0}],...val.children]
+										row.parentCategoryId=val.categoryId
+										row.parentCategoryName=val.name
+										row.categoryName = ''
+										row.categoryId = ''
+										this.smallList = [...[{name: '通用', categoryId: '0'}],...(val.children?val.children:[])]
 									}}>
 								{
 									this.mainList.map((item, index) => {
@@ -125,10 +129,11 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index? (
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.category`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
-							<el-select value={row.category} value-key="name" placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.categoryId`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
+							<el-select value={{categoryId: row.categoryId,name: row.categoryName}} value-key="categoryId" placeholder="请选择"
 									onInput={(val)=>{
-										row.category=val
+										row.categoryName=val.name
+										row.categoryId=val.categoryId
 									}}>
 								{
 									this.smallList.map((item, index) => {
@@ -201,14 +206,9 @@ export default {
 				this.$refs.pageRef.tableForm().validate((valid) => {
 					if (valid) {
 						if(this.editIndex != index){
-							row = Object.assign(row,{
-								types: {orderSmallTypeText: row.typeName,id: row.type},
-								parentCategory: {name: row.parentCategoryName,categoryId: row.parentCategoryId},
-								category: {name: row.categoryName,categoryId: row.categoryId},
-							})
 							this.mainList.forEach(item =>{
 								if(item.categoryId == row.parentCategoryId){
-									this.smallList = [...[{name: '通用', categoryId: 0}],...item.children]
+									this.smallList = [...[{name: '通用', categoryId: '0'}],...(item.children?item.children:[])]
 								}
 							})
 							this.editIndex = index
@@ -247,14 +247,15 @@ export default {
 							this.$message.error(res.msg);
 						}
 					})
-				}): this.$refs.pageRef.deleteRowData(0)
+				}): this.$refs.pageRef.deleteRowData(0);this.editIndex = null
 			}}>删除</el-button>
         </div>
       )
     },
 	getMainList(){
 		getMainList({type: 2}).then(res => {
-			this.mainList = [...[{name: '通用', categoryId: 0}],...res.data]
+			this.mainList = [...[{name: '通用', categoryId: '0'}],...res.data]
+			console.log(this.mainList)
 		})
 	},
 	getTypeList(){
@@ -268,9 +269,12 @@ export default {
 				this.editIndex = 0
 				this.$refs.pageRef.insertionData(0,{
 					settleNormType: 'INSTALL',
-					types: '',
-					parentCategory: '',
-					category: '',
+					typeName: '',
+					type: '',
+					categoryName: '',
+					categoryId: '',
+					parentCategoryName: '',
+					parentCategoryId: '',
 					label: '',
 					normAmount: '',
 					remark: ''
@@ -287,12 +291,12 @@ export default {
     add(row){
 		add({
 			settleNormType: 'INSTALL',
-			typeName: row.types.orderSmallTypeText,
-			type: row.types.id,
-			parentCategoryName: row.parentCategory.name,
-			parentCategoryId: row.parentCategory.categoryId,
-			categoryName: row.category.name,
-			categoryId: row.category.categoryId,
+			typeName: row.typeName,
+			type: row.type,
+			parentCategoryName: row.parentCategoryName,
+			parentCategoryId: row.parentCategoryId,
+			categoryName: row.categoryName,
+			categoryId: row.categoryId,
 			label: row.label,
 			normAmount: row.normAmount,
 			remark: row.remark
@@ -308,12 +312,12 @@ export default {
 		edit({
 			id: row.id,
 			settleNormType: 'INSTALL',
-			typeName: row.types.orderSmallTypeText,
-			type: row.types.id,
-			parentCategoryName: row.parentCategory.name,
-			parentCategoryId: row.parentCategory.categoryId,
-			categoryName: row.category.name,
-			categoryId: row.category.categoryId,
+			typeName: row.typeName,
+			type: row.type,
+			parentCategoryName: row.parentCategoryName,
+			parentCategoryId: row.parentCategoryId,
+			categoryName: row.categoryName,
+			categoryId: row.categoryId,
 			label: row.label,
 			normAmount: row.normAmount,
 			remark: row.remark

+ 1 - 1
src/views/workOrder/basicConfiguration/settlementStandard/components/other.vue

@@ -189,7 +189,7 @@ export default {
 							this.$message.error(res.msg);
 						}
 					})
-				}): this.$refs.pageRef.deleteRowData(0)
+				}): this.$refs.pageRef.deleteRowData(0);this.editIndex = null
 			}}>删除</el-button>
         </div>
       )

+ 35 - 30
src/views/workOrder/basicConfiguration/settlementStandard/components/repair.vue

@@ -85,10 +85,11 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index?(
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.types`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
-							<el-select value-key="orderSmallTypeText" value={row.types} placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.type`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
+							<el-select value-key="id" value={{orderSmallTypeText:row.typeName,id: row.type}} placeholder="请选择"
 								onInput={(val)=>{
-									row.types=val
+									row.type = val.id
+									row.typeName = val.orderSmallTypeText
 								}}>
 								{
 									this.typeList.map((item, index) => {
@@ -105,11 +106,14 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index?(
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.parentCategory`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
-							<el-select value={row.parentCategory} value-key="name" placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.parentCategoryId`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
+							<el-select value={{categoryId:row.parentCategoryId,name: row.parentCategoryName}} value-key="name" placeholder="请选择"
 									onInput={(val)=>{
-										row.parentCategory=val
-										this.smallList = [...[{name: '通用', categoryId: 0}],...val.children]
+										row.parentCategoryId=val.categoryId
+										row.parentCategoryName=val.name
+										row.categoryName = ''
+										row.categoryId = ''
+										this.smallList = [...[{name: '通用', categoryId: '0'}],...(val.children?val.children:[])]
 									}}>
 								{
 									this.mainList.map((item, index) => {
@@ -126,10 +130,11 @@ export default {
 			defaultData.render = (h, { row, index, column }) => {
 			  	return this.editIndex == index? (
 					<div class="redbordererr">
-						<el-form-item prop={`tableData.${index}.category`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
-							<el-select value={row.category} value-key="name" placeholder="请选择"
+						<el-form-item prop={`tableData.${index}.categoryId`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
+							<el-select value={{categoryId: row.categoryId,name: row.categoryName}} value-key="name" placeholder="请选择"
 									onInput={(val)=>{
-										row.category=val
+										row.categoryName=val.name
+										row.categoryId=val.categoryId
 									}}>
 								{
 									this.smallList.map((item, index) => {
@@ -225,14 +230,11 @@ export default {
 					if (valid) {
 						if(this.editIndex != index){
 							row = Object.assign(row,{
-								types: {orderSmallTypeText: row.typeName,id: row.type},
-								parentCategory: {name: row.parentCategoryName,categoryId: row.parentCategoryId},
-								category: {name: row.categoryName,categoryId: row.categoryId},
 								label: row.label =='保内'?'INSIDE':'OUT'
 							})
 							this.mainList.forEach(item =>{
 								if(item.categoryId == row.parentCategoryId){
-									this.smallList = [...[{name: '通用', categoryId: 0}],...item.children]
+									this.smallList = [...[{name: '通用', categoryId: '0'}],...(item.children?item.children:[])]
 								}
 							})
 							this.editIndex = index
@@ -271,7 +273,7 @@ export default {
 							this.$message.error(res.msg);
 						}
 					})
-				}): this.$refs.pageRef.deleteRowData(0)
+				}): this.$refs.pageRef.deleteRowData(0);this.editIndex = null
 			}}>删除</el-button>
         </div>
       )
@@ -293,9 +295,12 @@ export default {
 				this.$refs.pageRef.insertionData(0,{
 					companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
 					settleNormType: 'REPAIR',
-					types: '',
-					parentCategory: '',
-					category: '',
+					typeName: '',
+					type: '',
+					categoryName: '',
+					categoryId: '',
+					parentCategoryName: '',
+					parentCategoryId: '',
 					label: '',
 					normAmount: '',
 					repairAmount: '',
@@ -313,12 +318,12 @@ export default {
     add(row){
 		add({
 			settleNormType: 'REPAIR',
-			typeName: row.types.orderSmallTypeText,
-			type: row.types.id,
-			parentCategoryName: row.parentCategory.name,
-			parentCategoryId: row.parentCategory.categoryId,
-			categoryName: row.category.name,
-			categoryId: row.category.categoryId,
+			typeName: row.typeName,
+			type: row.type,
+			parentCategoryName: row.parentCategoryName,
+			parentCategoryId: row.parentCategoryId,
+			categoryName: row.categoryName,
+			categoryId: row.categoryId,
 			label: row.label,
 			normAmount: row.normAmount,
 			repairAmount: row.repairAmount,
@@ -335,12 +340,12 @@ export default {
 		edit({
 			id: row.id,
 			settleNormType: 'REPAIR',
-			typeName: row.types.orderSmallTypeText,
-			type: row.types.id,
-			parentCategoryName: row.parentCategory.name,
-			parentCategoryId: row.parentCategory.categoryId,
-			categoryName: row.category.name,
-			categoryId: row.category.categoryId,
+			typeName: row.typeName,
+			type: row.type,
+			parentCategoryName: row.parentCategoryName,
+			parentCategoryId: row.parentCategoryId,
+			categoryName: row.categoryName,
+			categoryId: row.categoryId,
 			label: row.label,
 			normAmount: row.normAmount,
 			repairAmount: row.repairAmount,

+ 97 - 48
src/views/workOrder/orderHome/index.vue

@@ -2,7 +2,7 @@
 	<div class="dashboard_container">
 		<div class="container_top">
 			<div class="tab" v-for="(item,index) in tabs" :key='index'>
-				<el-image :src="item.url" fit="fit"></el-image>
+				<el-image class="img" :src="item.url" fit="fit"></el-image>
 				<div class="text">
 					<div class="title">{{item.title}}</div>
 					<div class="num">{{item.num}}</div>
@@ -13,7 +13,7 @@
 			<div class="chart">
 				<div class="head">
 					<div class="title">近7天订单趋势</div>
-					<div class="more">查看更多</div>
+					<div class="more" @click="openOrder">查看更多</div>
 				</div>
 				<div ref="chart1" style="width: 100%;height: 280px;"></div>
 			</div>
@@ -36,19 +36,80 @@
 </template>
 
 <script>
+	import { getCount } from "@/api/workOrder/orderHome";
 	export default{
 		data(){
 			return {
-				tabs: [{title: '待派工',num: 12,url: ''},{title: '待接收',num: 22,url: ''},{title: '服务中',num: 53,url: ''},{title: '异常待处理',num: 2,url: ''},{title: '差评统计',num: 0,url: ''}]
+				tabs: [{title: '待派工',num: 12,url: require('@/assets/orderHome/dpg.png')},{title: '待接收',num: 22,url: require('@/assets/orderHome/djs.png')},{title: '服务中',num: 53,url: require('@/assets/orderHome/ffz.png')},{title: '异常待处理',num: 2,url: require('@/assets/orderHome/yc.png')},{title: '差评统计',num: 0,url: require('@/assets/orderHome/pj.png')}],
+				qtsm: [],
+				qtddqs: {},
+				wglxfb: {}
+			}
+		},
+		computed: {
+			getDate(){
+				return function(d,t){
+					var date = new Date();
+					var base = Date.parse(date); // 转换为时间戳
+					var year = date.getFullYear(); //获取当前年份
+					var mon = date.getMonth() + 1; //获取当前月份
+					var day = date.getDate(); //获取当前日
+					var oneDay = 24 * 3600 *1000
+
+					var daytimeArr = []
+					for (var i = 0; i < d ; i++) { //前七天的时间
+						var now = new Date(t=='before'?(base - oneDay*i):(base + oneDay*i));
+						var myear = now.getFullYear();
+						var month = now.getMonth() + 1;
+						var mday = now.getDate()
+						daytimeArr.push([month >=10 ?month :'0'+ month, mday>=10?mday:'0'+mday].join('-'))
+					}
+					return t=='before'?daytimeArr.reverse():daytimeArr
+				}
+			},
+			filterOrderType(){
+				return function(obj,type){
+					let names = []
+					let series = []
+					for(let key in this[obj]){
+						names.push(key)
+						series.push({
+							name: key,
+							data: this[obj][key],
+							type: 'line',
+							smooth: true
+						})
+					}
+					return type=='name'?names:series
+				}
 			}
 		},
 		created() {
-			
+			this.getCount()
 		},
 		mounted() {
-			this.drawChat1()
+			// this.drawChat1()
 		},
 		methods: {
+			openOrder(){
+				this.$router.push({
+					name: "workOrderPool",
+					query: {}
+				})
+			},
+			getCount(){
+				getCount().then(res => {
+					this.tabs[0].num = res.data.dpg
+					this.tabs[1].num = res.data.djs
+					this.tabs[2].num = res.data.fwz
+					this.tabs[3].num = res.data.ycdcl
+					this.tabs[4].num = res.data.cp
+					this.qtsm = res.data.qtsm
+					this.qtddqs = res.data.qtddqs
+					this.wglxfb = res.data.wglxfb
+					this.drawChat1()
+				})
+			},
 			drawChat1(){
 				let chart1 = this.$echarts.init(this.$refs.chart1)
 				let chart2 = this.$echarts.init(this.$refs.chart2)
@@ -58,46 +119,42 @@
 					    trigger: 'axis'
 					},
 					legend: {
-					    data: ['新增工单', '完工工单', '进行中']
+					    data: this.filterOrderType('qtddqs','name')
 					},
 					xAxis: {
 						type: 'category',
-						data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+						boundaryGap: false,
+						data: this.getDate(7,'before')
 					},
 					yAxis: {
 						type: 'value'
 					},
-					series: [
-						{
-							name: '新增工单',
-							data: [820, 932, 901, 934, 1290, 1330, 2320],
-							type: 'line',
-							smooth: true
-						},{
-							name: '完工工单',
-							data: [420, 532, 801, 234, 1790, 1030, 3320],
-							type: 'line',
-							smooth: true
-						},{
-							name: '进行中',
-							data: [120, 532, 901, 1234, 1790, 1530, 1920],
-							type: 'line',
-							smooth: true
-						}
-					]
+					min: 0,
+					max: (value) => {  // 百位起最大值向上取整
+						return Math.ceil(value.max / 100) * 100;
+					},
+					series: this.filterOrderType('qtddqs','series')
 				};
 				let option2 = {
+					tooltip: {
+					    trigger: 'axis'
+					},
 					xAxis: {
 						type: 'category',
-						data: ['12-17', '12-18', '12-19', '12-20', '12-21', '12-22', '12-23']
+						boundaryGap: false,
+						data: this.getDate(7,'after')
 					},
 					yAxis: {
 						type: 'value'
 					},
+					min: 0,
+					max: (value) => {  // 百位起最大值向上取整
+						return Math.ceil(value.max / 100) * 100;
+					},
 					series: [
 						{
-							name: '',
-							data: [820, 932, 901, 934, 1290, 1330, 2320],
+							name: '工单数',
+							data: this.qtsm,
 							type: 'line',
 							smooth: true
 						}
@@ -108,33 +165,21 @@
 					    trigger: 'axis'
 					},
 					legend: {
-					    data: ['安装', '维修', '清洗']
+					    data: this.filterOrderType('wglxfb','name')
 					},
 					xAxis: {
 						type: 'category',
-						data: ['11-24', '11-25', '11-26', '11-27', '11-28', '11-29', '11-30', '12-01', '12-02', '12-03', '12-04', '12-05', '12-06', '12-07', '12-08', '12-09', '12-10', '12-11', '12-12', '12-13', '12-14', '12-15', '12-16', '12-17', '12-18', '12-19', '12-20', '12-21', '12-22', '12-23']
+						boundaryGap: false,
+						data: this.getDate(30,'before')
+					},
+					min: 0,
+					max: (value) => {  // 百位起最大值向上取整
+						return Math.ceil(value.max / 100) * 100;
 					},
 					yAxis: {
 						type: 'value'
 					},
-					series: [
-						{
-							name: '安装',
-							data: [820, 932, 901, 934, 1290, 1330, 2320, 320, 632, 301, 234, 1230, 1330, 1320,1220, 932, 511, 994, 1290, 1130, 1520,1220, 1232, 951, 2134, 1290, 5210, 2220,3420, 1932],
-							type: 'line',
-							smooth: true
-						},{
-							name: '维修',
-							data: [420, 532, 801, 234, 1790, 1030, 3320, 820, 932, 901, 934, 1290, 1330, 2320,820, 932, 901, 934, 1290, 1330, 2320,820, 932, 901, 934, 1290, 1330, 2320,820, 932],
-							type: 'line',
-							smooth: true
-						},{
-							name: '清洗',
-							data: [120, 532, 901, 1234, 1790, 1530, 1920, 1120, 532, 201, 534, 1190, 1230, 2320,2520, 222, 1111, 934, 4390, 2230, 2320, 1520, 922, 551, 224, 3520, 1230, 1620, 1820, 232],
-							type: 'line',
-							smooth: true
-						}
-					]
+					series: this.filterOrderType('wglxfb','series')
 				};
 				chart1.setOption(option1)
 				chart2.setOption(option2)
@@ -172,6 +217,10 @@
 						font-weight: bold;
 					}
 				}
+				.img{
+					width: 36px;
+					height: 36px;
+				}
 			}
 			.tab:last-child{
 				margin-right: 0;

+ 28 - 15
src/views/workOrder/settleAccountsManagement/rewardsPunishmentsOrder/index.vue

@@ -113,6 +113,11 @@ export default {
 					<el-select v-model={this.formData.websit} disabled={this.formDialogType!=0} value-key="websitId" onChange={(e)=>{
 						this.formData.websitId = e.websitId
 						this.formData.websitName = e.name
+						this.formData.worker = {}
+						this.formData.workerId = ''
+						this.formData.workerName = ''
+						this.formData.idcard = ''
+						this.formData.mobile = ''
 						this.getWorker()
 					}} placeholder="请选择" style="width: 100%;">
 						{
@@ -181,7 +186,7 @@ export default {
 				label: '联系电话',
 				prop: 'mobile',
 				rules: this.formData.mobile?[
-					{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+					{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 				]:[]
 			}
 		}, {
@@ -244,7 +249,7 @@ export default {
 			md: 12,
 			isShow: true,
 			name: 'el-input',
-			attributes: { placeholder: '请输入', type: 'number'},
+			attributes: { placeholder: '请输入'},
 			formItemAttributes: {
 				label: '关联工单号',
 				prop: 'orderBaseId',
@@ -279,8 +284,9 @@ export default {
     }
   },
   created(){
-	  this.getExamine()
-	  this.getWebsit()
+	  if(this.$route.query.id){
+		  this.openDetail(this.$route.query.id)
+	  }
   },
   methods: {
     // 列表请求函数
@@ -309,21 +315,26 @@ export default {
       return (
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
-		    getDetail({ id: row.id }).then(res => {
-		      Object.assign(this.formData, res.data,{
-		        fileUrl:res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
-				worker: {workerId: row.workerId,nickName: row.workerName},
-				websit: {websitId: row.websitId,websitName: row.websitName},
-				examineProject: {name: row.examineProjectName}
-		      })
-			  this.getWorker()
-		      this.formDialogType = 2
-		      this.openForm()
-		    })
+		    this.openDetail(row.id)
 		  }}>详情</el-button>
         </div>
       )
     },
+	openDetail(id){
+		getDetail({ id }).then(res => {
+		  Object.assign(this.formData, res.data,{
+		    fileUrl:res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+		    worker: {workerId: res.data.workerId,nickName: res.data.workerName},
+		    websit: {websitId: res.data.websitId,websitName: res.data.websitName},
+		    examineProject: {name: res.data.examineProjectName}
+		  })
+		  this.getExamine()
+		  this.getWebsit()
+		  this.getWorker()
+		  this.formDialogType = 2
+		  this.openForm()
+		})
+	},
 	getExamine(){
 		getExamine({pageNum: 1,pageSize: -1,params: []}).then(res => {
 			this.examineList = res.data.records
@@ -345,6 +356,8 @@ export default {
 		})
 	},
     addData() {
+		this.getExamine()
+		this.getWebsit()
       this.formDialogType = 0
       this.openForm()
     },

+ 16 - 1
src/views/workOrder/settleAccountsManagement/settleAccountsOrder/index.vue

@@ -160,7 +160,22 @@ export default {
       return (
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
-		    
+				if(row.settleOrderType == 'EXAMINE'){
+					this.$router.push({
+							name: "rewardsPunishmentsOrder",
+							query: {
+								id:row.examineProjectId
+							}
+					})
+				}else{
+					this.$router.push({
+							name: "workOrderPool",
+							query: {
+								id:row.orderBaseId,
+								activeName: "SettleAccounts",
+							}
+					})
+				}
 		  }}>详情</el-button>
         </div>
       )

+ 143 - 16
src/views/workOrder/settleAccountsManagement/summaryBill/detailList.vue

@@ -2,12 +2,78 @@
 	<div class="s-page">
 		<el-page-header @back="goBack" :content="title"></el-page-header>
 		<el-divider></el-divider>
-		<el-row style="margin-bottom: 10px;">
-			<el-col :span="24">
-				<el-button size="small" type="primary" @click="getList()">刷新</el-button>
-				<el-button size="small" type="primary" @click="derive()">导出</el-button>
-			</el-col>
-		</el-row>
+		<!-- 筛选条件 -->
+		<div class="screen-container">
+			<!-- <div class="top clearfix"><div class="title fl">条件筛选</div></div> -->
+			<el-form ref="screenForm" :model="screenForm" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20">
+					<el-col :span="6">
+						<el-form-item label="工单号" prop="orderBaseId">
+							<el-input v-model="screenForm.orderBaseId" placeholder="请输入工单号"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="工单类型" prop="orderSmallType">
+							<el-select v-model="screenForm.orderSmallType" filterable placeholder="请选择工单类型">
+							   <el-option
+							     v-for="item in orderTypeList"
+							     :key="item.id"
+							     :label="item.orderSmallTypeText"
+							     :value="item.id">
+							   </el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="结算单类型" prop="settleOrderType">
+							<el-select v-model="screenForm.settleOrderType" filterable placeholder="请选择结算单类型">
+							   <el-option
+							     v-for="item in [{id: 'INSTALL',name:'安装'},{id: 'REPAIR',name:'维修'},{id: 'OTHER',name:'其他'},{id: 'EXAMINE',name:'奖罚单'}]"
+							     :key="item.id"
+							     :label="item.name"
+							     :value="item.id">
+							   </el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="工程师姓名" prop="workerName">
+							<el-input v-model="screenForm.workerName" placeholder="请输入工程师姓名"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="工程师身份证" prop="idcard">
+							<el-input v-model="screenForm.idcard" placeholder="请输入工程师身份证"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="工程师联系电话" prop="mobile">
+							<el-input v-model="screenForm.mobile" placeholder="请输入工程师联系电话"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="客户姓名" prop="customerName">
+							<el-input v-model="screenForm.customerName" placeholder="请输入客户姓名"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="客户电话" prop="customerMobile">
+							<el-input v-model="screenForm.customerMobile" placeholder="请输入客户电话"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-row style="margin-bottom: 20px;" type="flex" justify="space-between">
+					<el-col :span="21">
+						<el-button size="small" type="primary" @click="getList()">刷新</el-button>
+						<el-button size="small" type="primary" @click="derive()">导出</el-button>
+					</el-col>
+					<el-col :span="3" style="display: flex;justify-content: flex-end;">
+						<el-button size="small" @click="resetScreenForm()">清空</el-button>
+						<el-button size="small" type="primary" @click="getList()">搜索</el-button>
+					</el-col>
+				</el-row>
+			</el-form>
+		</div>
 		<el-table :span-method="objectSpanMethod" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
 			<el-table-column prop="poolId" label="账单编号" align="center" width="180"></el-table-column>
 			<el-table-column prop="month" align="center" label="月份"></el-table-column>
@@ -37,17 +103,25 @@
 			<el-table-column prop="customerName" align="center" label="客户名字"></el-table-column>
 			<el-table-column prop="customerMobile" align="center" label="客户电话" width="110"></el-table-column>
 			<el-table-column prop="customerAddress" align="center" label="详细地址" width="180"></el-table-column>
-			<el-table-column prop="orderStatus" align="center" label="工单状态"></el-table-column>
+			<el-table-column prop="orderStatus" align="center" label="工单状态">
+				<template slot-scope="scope">
+					{{scope.row.orderStatus == 'DYY'?'待预约':scope.row.orderStatus == 'DSHPG'?'待商户派工':scope.row.orderStatus == 'DWDPG'?'待网点派工':scope.row.orderStatus == 'DJD'?'待接单':scope.row.orderStatus == 'FWZ'?'服务中':scope.row.orderStatus == 'YCD'?'异常单':scope.row.orderStatus == 'YWG'?'已完工待结算':scope.row.orderStatus == 'YJS'?'已结算':scope.row.orderStatus == 'YQX'?'已取消':''}}
+				</template>
+			</el-table-column>
 			<el-table-column prop="orderCreateTime" align="center" label="创建时间" width="160"></el-table-column>
 			<el-table-column prop="workerEndTime" align="center" label="完工时间" width="160"></el-table-column>
-			<el-table-column prop="orderType" align="center" label="工单类型"></el-table-column>
+			<el-table-column prop="orderTypeText" align="center" label="工单类型"></el-table-column>
 			<el-table-column prop="brand" align="center" label="产品品牌"></el-table-column>
 			<el-table-column prop="orderSource" align="center" label="工单来源"></el-table-column>
 			<el-table-column prop="parentCategoryName" align="center" label="产品大类"></el-table-column>
 			<el-table-column prop="categoryName" align="center" label="产品小类"></el-table-column>
 			<el-table-column prop="goodsName" align="center" label="机型名称"></el-table-column>
 			<el-table-column prop="orderNum" align="center" label="数量"></el-table-column>
-			<el-table-column prop="settleOrderType" align="center" label="结算单类型" width="110"></el-table-column>
+			<el-table-column prop="settleOrderType" align="center" label="结算单类型" width="110">
+				<template slot-scope="scope">
+					{{scope.row.settleOrderType == 'INSTALL'?'安装':scope.row.settleOrderType == 'REPAIR'?'维修':scope.row.settleOrderType == 'OTHER'?'其他':scope.row.settleOrderType == 'EXAMINE'?'奖罚单':''}}
+				</template>
+			</el-table-column>
 			<el-table-column prop="installLabel" align="center" label="安装功率"></el-table-column>
 			<el-table-column prop="installNormAmount" align="center" label="安装结算标准" width="110"></el-table-column>
 			<el-table-column prop="repairLabel" align="center" label="质保类型"></el-table-column>
@@ -59,13 +133,17 @@
 			<el-table-column prop="otherPrice" align="center" label="其他费用单价" width="110"></el-table-column>
 			<!-- <el-table-column prop="" align="center" label="其他费用结算数量" width="140"></el-table-column> -->
 			<el-table-column prop="examineProject" align="center" label="奖罚单考核项目" width="120"></el-table-column>
-			<el-table-column prop="examineType" align="center" label="奖罚单考核类型" width="120"></el-table-column>
+			<el-table-column prop="examineType" align="center" label="奖罚单考核类型" width="120">
+				<template slot-scope="scope">
+					{{scope.row.examineType == 'PUNISH'?'惩罚':scope.row.examineType == 'REWARD'?'奖励':''}}
+				</template>
+			</el-table-column>
 			<el-table-column prop="settleNum" align="center" label="结算数量"></el-table-column>
 			<el-table-column prop="settleAmount" align="center" label="结算金额"></el-table-column>
 			<el-table-column prop="remark" align="center" label="备注"></el-table-column>
 			<el-table-column label="操作" align="center" width="80" fixed="right">
-				<template slot-scope="scope">
-					<el-button type="text" style="color: #FF0000" @click="cancel(scope.row.id)">驳回</el-button>
+				<template slot-scope="scope" v-if="scope.row.status == 'NO'">
+					<el-button type="text" style="color: #FF0000" @click="cancel(scope.row.orderId,scope.row.poolId)">驳回</el-button>
 				</template>
 			</el-table-column>
 		</el-table>
@@ -74,13 +152,26 @@
 
 <script>
 	import { listPageV2,pageExport, cancel } from "@/api/workOrder/summaryBillDetail";
+	import { getTypeList } from "@/api/workOrder/settlementStandardInstall";
+	import { downloadFiles2 } from "@/utils/util.js";
 	export default {
 		props: ['id','title'],
 		data() {
 			return {
 				dataList: [],
+				orderTypeList: [],
 				cellList: [], // 单元格数组
 				count: null, // 计数
+				screenForm: {
+					customerMobile: '',
+					customerName: '',
+					idcard: '',
+					mobile: '',
+					orderSmallType: '',
+					orderBaseId: '',
+					settleOrderType: '',
+					workerName: '',
+				}
 			};
 		},
 		computed: {},
@@ -88,25 +179,56 @@
 			if(this.id){
 				this.getList()
 			}
+			this.getTypeList()
 		},
 		methods: {
 			// 返回
 			goBack() {
 				this.$emit('back');
 			},
+			getTypeList(){
+				getTypeList({pageNum: 1,pageSize: -1,params: [{param: 'a.order_type',compare: '=',value: 'INSTALL'},{param: 'a.status',compare: '=',value: true}]}).then(res => {
+					this.orderTypeList = res.data.records
+				})
+			},
+			derive(){
+				downloadFiles2('settle/order/export/pool/detail',{
+					id: this.id,
+					customerMobile: this.screenForm.customerMobile,
+					customerName: this.screenForm.customerName,
+					idcard: this.screenForm.idcard,
+					mobile: this.screenForm.mobile,
+					orderSmallType: this.screenForm.orderSmallType,
+					orderBaseId: this.screenForm.orderBaseId,
+					settleOrderType: this.screenForm.settleOrderType,
+					workerName: this.screenForm.workerName,
+				},'汇总结算单明细')
+			},
 			getList(){
-				listPageV2({id: this.id}).then(res => {
+				this.cellList = []
+				this.count = null
+				listPageV2({
+					id: this.id,
+					customerMobile: this.screenForm.customerMobile,
+					customerName: this.screenForm.customerName,
+					idcard: this.screenForm.idcard,
+					mobile: this.screenForm.mobile,
+					orderSmallType: this.screenForm.orderSmallType,
+					orderBaseId: this.screenForm.orderBaseId,
+					settleOrderType: this.screenForm.settleOrderType,
+					workerName: this.screenForm.workerName,
+				}).then(res => {
 					this.dataList = res.data
-					this.computeCell(res.data)
+					this.computeCell(this.dataList)
 				})
 			},
-			cancel(id){
+			cancel(id,poolId){
 				this.$confirm(`请确定是否驳回该数据, 是否继续?`, '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
 					type: 'warning'
 				}).then(() => {
-					cancel([id]).then(res => {
+					cancel({ids: [id],poolId}).then(res => {
 						if(res.code == 200){
 							this.$message.success('审核成功!')
 							this.goBack()
@@ -127,6 +249,11 @@
 					message: '复制成功!'
 				});
 			},
+			// 重置筛选表单
+			resetScreenForm() {
+				this.$refs.screenForm.resetFields();
+				this.getList();
+			},
 			computeCell(tableBody) {
 				// 循环遍历表体数据
 				for (let i = 0; i < tableBody.length; i++) {

+ 7 - 7
src/views/workOrder/settleAccountsManagement/summaryBill/index.vue

@@ -54,7 +54,7 @@ export default {
       // 表格属性
       tableAttributes: {
         // 启用勾选列
-        selectColumn: false
+        selectColumn: true
       },
       // 表格事件
       tableEvents: {
@@ -173,10 +173,10 @@ export default {
 					this.formDialog = true
 				}}>明细</el-button>
 				{row.status == 'NO'?<el-button type="text" onClick={() => {
-					this.confirm(row.id)
+					this.confirm([row.id])
 				}}>发放</el-button>:null}
 				{row.status == 'NO'?<el-button type="text" onClick={() => {
-					this.cancel(row.id)
+					this.cancel([row.id])
 				}}>驳回</el-button>:null}
 			</div>
 		)
@@ -185,7 +185,7 @@ export default {
 		if(this.recordSelected.length == 0){
 			return this.$message.warning('请至少勾选一条数据!');
 		}
-		this.cancel(this.recordSelected.map(item=>{return item.id}).join(','))
+		this.cancel(this.recordSelected.map(item=>{return item.id}))
 	},
     cancel(ids) {
 		this.$confirm('请确认是否驳回选中的数据, 是否继续?', '提示', {
@@ -193,7 +193,7 @@ export default {
 			cancelButtonText: '取消',
 			type: 'warning'
 		}).then(() => {
-			cancel([ids]).then(res => {
+			cancel(ids).then(res => {
 				this.$message({ type: 'success', message: `驳回成功!` })
 				this.$refs.pageRef.refreshList()
 			})
@@ -203,7 +203,7 @@ export default {
 		if(this.recordSelected.length == 0){
 			return this.$message.warning('请至少勾选一条数据!');
 		}
-		this.confirm(this.recordSelected.map(item=>{return item.id}).join(','))
+		this.confirm(this.recordSelected.map(item=>{return item.id}))
 	},
 	confirm(ids){
 		this.$confirm('请确认是否发放选中的数据, 是否继续?', '提示', {
@@ -211,7 +211,7 @@ export default {
 			cancelButtonText: '取消',
 			type: 'warning'
 		}).then(() => {
-			confirm([ids]).then(res => {
+			confirm(ids).then(res => {
 				this.$message({ type: 'success', message: `发放成功!` })
 				this.$refs.pageRef.refreshList()
 			})

+ 5 - 0
src/views/workOrder/workOrderPool/components/reschedule/index.vue

@@ -51,6 +51,11 @@ export default {
             style: { width: '100%' },
             placeholder: '请选择',
             'value-format': 'yyyy-MM-dd HH:mm:ss',
+            'picker-options': {
+              disabledDate: time => {
+                return time.getTime() < (Date.now() - 86400000)
+              }
+            }
           },
           formItemAttributes: {
             label: '预约上门日期',