Browse Source

Merge remote-tracking branch 'origin/dev' into dev

wangzhuo 2 years ago
parent
commit
061d7a825d

+ 0 - 2
src/api/basicData/EquipmentArchives.js

@@ -48,5 +48,3 @@ export const corpequipmentarchivesitemRemove = (data) => {
 
 
 
-
-

+ 12 - 30
src/api/basicData/maintenanceQ.js

@@ -3,7 +3,7 @@ import request from '@/router/axios';
 // 设备维修 列表
 export const maintenanceList = (current, size, params) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenance/list',
+    url: '/api/blade-sales-part/maintenance/list',
     method: 'get',
     params: {
       ...params,
@@ -16,7 +16,7 @@ export const maintenanceList = (current, size, params) => {
 // 设备维修 详情
 export const maintenanceDetail = (data) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenance/detail',
+    url: '/api/blade-sales-part/maintenance/detail',
     method: 'get',
     params: data
   })
@@ -24,7 +24,7 @@ export const maintenanceDetail = (data) => {
 // 设备维修 保存
 export const maintenanceSubmit = (data) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenance/submit',
+    url: '/api/blade-sales-part/maintenance/submit',
     method: 'post',
     data: data
   })
@@ -40,33 +40,27 @@ export const maintenanceRemove = (data) => {
 // 设备维修 费用明细删除
 export const maintenanceFeesRemove = (data) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenanceFees/remove',
-    method: 'post',
-    params: data
-  })
-}
-// 设备维修 附件明细删除
-export const maintenanceFilesRemove = (data) => {
-  return request({
-    url: '/api/blade-purchase-sales/maintenanceFiles/remove',
+    url: '/api/blade-sales-part/maintenanceFees/remove',
     method: 'post',
     params: data
   })
 }
+
+
 // 设备维修 确认派工
-export const maintenanceFilesDispatchingWorkers = (data) => {
+export const maintenanceDispatchingWorkers = (data) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenance/dispatchingWorkers',
+    url: '/api/blade-sales-part/maintenance/dispatchingWorkers',
     method: 'post',
-    params: data
+    data: data
   })
 }
 // 设备维修 撤销派工
-export const maintenanceFilesRevokeDispatchingWorkers = (data) => {
+export const maintenanceRevokeDispatchingWorkers = (data) => {
   return request({
-    url: '/api/blade-purchase-sales/maintenance/revokeDispatchingWorkers',
+    url: '/api/blade-sales-part/maintenance/revokeDispatchingWorkers',
     method: 'post',
-    params: data
+    data: data
   })
 }
 
@@ -76,18 +70,6 @@ export const maintenanceFilesRevokeDispatchingWorkers = (data) => {
 
 
 
-// 设备档案 列表
-export const corpequipmentarchivesList = (current, size, params) => {
-  return request({
-    url: '/api/blade-client/corpequipmentarchives/list',
-    method: 'get',
-    params: {
-      ...params,
-      current,
-      size,
-    }
-  })
-}
 // 设备档案 详情
 export const corpequipmentarchivesDetail = (data) => {
   return request({

+ 79 - 6
src/views/EquipmentArchives/detailsPage.vue

@@ -39,6 +39,29 @@
                                  placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input>
                 <span v-else>{{ row.code }}</span>
             </template>
+            <template slot="exitDate" slot-scope="{ row, index }">
+                <el-date-picker
+                    v-if="row.$cellEdit"
+                    v-model="row.exitDate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    size="small"
+                    placeholder="选择日期">
+                </el-date-picker>
+                <span v-else>{{ row.exitDate }}</span>
+            </template>
+
+            <template slot="maintenanceDate" slot-scope="{ row, index }">
+                <el-date-picker
+                    v-if="row.$cellEdit"
+                    v-model="row.maintenanceDate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    size="small"
+                    placeholder="选择日期">
+                </el-date-picker>
+                <span v-else>{{ row.maintenanceDate }}</span>
+            </template>
 
           <template slot="menu" slot-scope="{ row, index }">
               <el-button size="small" type="text" v-if="row.url" @click="imgurlfun(row)">信息码
@@ -172,7 +195,7 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 8,
+            span: 16,
           },
             {
                 label: "编号",
@@ -183,17 +206,58 @@ export default {
                 span: 8,
             },
             {
+                label: "联系人",
+                prop: "contacts",
+                search: true,
+                overHidden: true,
+                span: 8,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
+                label: "联系电话",
+                prop: "contactsTel",
+                search: true,
+                overHidden: true,
+                span: 8,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
+                label: "地址",
+                prop: "address",
+                overHidden: true,
+                span: 8,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
                 label: "设备数量",
                 prop: "equipmentNumber",
                 disabled:true,
                 overHidden: true,
-                span: 8,
+                span: 4,
             },
             {
                 label: "维修次数",
                 prop: "maintenanceSecond",
                 disabled:true,
-                span: 8,
+                span: 4,
             },
           {
             label: "签约时间",
@@ -466,6 +530,8 @@ export default {
     },
       // 获取下拉字典
     getAllWorkDicts() {
+        // 获取地址信息
+        // this.findObject(this.option.column, "address").dicData = JSON.parse(localStorage.getItem('areaTypeTree'))
         getGoodstype().then(res => {
             this.findObject(this.optionList.column, "goodsTypeId").dicData = res.data.data;
         });
@@ -615,11 +681,15 @@ export default {
                     specs:item.specs,
                     remarks:item.remarks,
                     goodsTypeId:item.goodsTypeId,
-                    goodsTypeName:item.goodsTypeName,
-                    exitDate:item.exitDate,
-                    repairReportDate:item.repairReportDate
+                    // goodsTypeName:item.goodsTypeName,
+                    maintenanceSecond:item.maintenanceSecond?item.maintenanceSecond:0,
+                    exitDate:item.exitDate?item.exitDate + ' 00:00:00':item.exitDate,
+                    maintenanceDate:item.maintenanceDate?item.maintenanceDate + ' 00:00:00':item.maintenanceDate,
+                    repairReportDate:item.repairReportDate,
+                    url:item.url?item.url:null,
                 }
             })
+            console.log(arr,633)
             const obj = {
                 id:this.form.id?this.form.id:null,
                 corpId:this.form.corpId,
@@ -629,6 +699,9 @@ export default {
                 maintenanceSecond:this.form.maintenanceSecond?this.form.maintenanceSecond:0,
                 signingDateStart:this.form.signingDateStart,
                 signingDateEnd:this.form.signingDateEnd,
+                contacts:this.form.contacts,
+                contactsTel:this.form.contactsTel,
+                address:this.form.address,
                 remarks:this.form.remarks,
                 corpEquipmentArchivesItemList:arr
             }

+ 21 - 0
src/views/EquipmentArchives/js/optionList.js

@@ -70,6 +70,12 @@ export const option = {
       index: 12
     },
     {
+      label: "维修时间",
+      prop: "updateTime",
+      width: 200,
+      index: 12
+    },
+    {
       label: "签约时间",
       prop: "signingDateStart",
       width: 200,
@@ -132,6 +138,21 @@ export const optionList = {
       overHidden: true
     },
     {
+      label: "出厂日期",
+      prop: "exitDate",
+      overHidden: true
+    },
+    {
+      label: "保养日期",
+      prop: "maintenanceDate",
+      overHidden: true
+    },
+    {
+      label: "维修次数",
+      prop: "maintenanceSecond",
+      overHidden: true
+    },
+    {
       label: "商品分类",
       prop: "goodsTypeId",
       type: 'select',

+ 267 - 0
src/views/ServiceLtems/detailsPage_1.vue

@@ -0,0 +1,267 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList">
+            返回列表
+          </el-button>
+        </div>
+        <div class="add-customer-btn">
+            <el-button type="primary" size="small" @click="addnew">添加分类</el-button>
+          <el-button type="primary" size="small" @click="editCustomer">
+            保存数据
+          </el-button>
+        </div>
+      </div>
+      <trade-card title="项目数据" style="margin: 60px 300px 0;">
+          <div class="flexbox">
+              <div class="flexImg" @click="excelBoxfun">
+                  <img v-if="outerform.url" style="width: 100%;height: 100%" :src="outerform.url" alt="">
+                  <i v-else class="el-icon-plus"></i>
+              </div>
+              <div class="flexText">
+                  <el-form ref="form" :model="outerform" label-width="80px">
+                      <el-form-item label="项目名称">
+                          <el-input size="small" v-model="outerform.cname"></el-input>
+                      </el-form-item>
+                      <el-form-item label="备注">
+                          <el-input type="textarea" size="small" v-model="outerform.cname"></el-input>
+                      </el-form-item>
+                  </el-form>
+              </div>
+          </div>
+      </trade-card>
+
+        <el-card class="box-card" style="margin: 10px 5px" v-for="item in cardData">
+            <div class="flexbox">
+                <div class="flexImg_subset flexImg">
+                    <i class="el-icon-plus"></i>
+                </div>
+
+                <div class="flexText_subset">
+                    <el-form ref="form" :model="outerform" label-width="80px">
+                        <el-form-item label="项目名称">
+                            <el-input size="small" v-model="outerform.cname"></el-input>
+                        </el-form-item>
+                        <el-form-item label="备注">
+                            <el-input type="textarea" size="small" v-model="outerform.remarks"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
+
+            <div class="subset_product">
+                <div class="addBox">新增产品</div>
+
+                <div style="display: flex;flex-wrap: wrap;justify-content: space-between;">
+                    <div class="subset_productBox flexbox" v-for="item in [1,2,3,4,5]">
+                        <div class="subset_productBox_left flexImg">
+                            <i class="el-icon-plus"></i>
+                        </div>
+                        <div class="subset_productBox_right">
+                            <div class="subset_productBox_title">标题</div>
+                            <div class="subset_productBox_img flexImg">
+                                <i class="el-icon-plus"></i>
+                            </div>
+                            <div class="subset_productBox_button">
+                                <div class="productBox_view">查看</div>
+                                <div class="productBox_edit">编辑</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </el-card>
+    </div>
+
+
+      <el-dialog
+          title="上传附件"
+          append-to-body
+          :visible.sync="excelBox"
+          width="555px"
+          :close-on-click-modal="false"
+          v-dialog-drag
+      >
+          <el-upload
+              class="upload-demo"
+              drag
+              style="text-align: center"
+              ref="upload"
+              :action="action"
+              :headers="headers"
+              :on-success="onSuccess"
+              multiple
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+              <div class="el-upload__tip" slot="tip">
+                  如上传文件过大,请耐心等待上传成功
+              </div>
+          </el-upload>
+      </el-dialog>
+      <div style="height: 60px"></div>
+  </div>
+</template>
+
+<script>
+import goodsType from '@/components/goodsType/index'
+import {getToken} from "@/util/auth";
+export default {
+  name: "index",
+  data() {
+    return {
+        // 最大的对象
+        outerform:{},
+        // 附件弹窗
+        excelBox:false,
+        action: "/api/blade-resource/oss/endpoint/put-file",
+        headers: { "Blade-Auth": "Bearer " + getToken() },
+
+
+        cardData:[{
+          name:'扒台机'
+        },{
+            name:'纯水机'
+        }
+        ]
+    };
+  },
+  components: {
+    goodsType
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  async created() {
+    // if (this.detailData.id) {
+    //   this.projectGoodsDetailfun(this.detailData.id);
+    // }
+    // if (this.detailData.status == 1) {
+    //   this.option.disabled = true;
+    // }
+  },
+  methods: {
+      // 添加分类
+      addnew(){
+
+      },
+      // 保存数据
+      editCustomer(){
+
+      },
+      excelBoxfun(){
+          this.excelBox = true
+      },
+      //新增上传成功
+      onSuccess(response, file, fileList) {
+          console.log(response,file,fileList,315)
+          this.excelBox = false
+          this.outerform.url = response.data.link
+          this.outerform.fileName = response.data.originalName
+          // this.$refs.crud.rowCellAdd({
+          //     fileName: response.data.originalName,
+          //     url: response.data.link
+          // });
+          // this.uploadCount++;
+          // if (this.uploadCount === fileList.length) {
+          //     this.$refs.upload.clearFiles();
+          //     this.excelBox = false;
+          //     this.uploadCount = 0;
+          // }
+      },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+    .flexbox {
+        display: flex;
+        align-items: center;
+        .flexImg {
+            width: 200px;
+            height: 200px;
+            border: 1px dashed #d9d9d9;
+            border-radius: 6px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            font-size: 30px;
+            color: #d9d9d9;
+        }
+        .flexText {
+            width: calc(100% - 200px);
+        }
+        .flexImg_subset {
+            width: 160px;
+            height: 160px;
+        }
+        .flexText_subset {
+            width: calc(100% - 160px);
+        }
+        .subset_productBox_left {
+            width: 140px;
+            height: 140px;
+        }
+        .subset_productBox_right {
+            margin-left: 20px;
+            width: calc(100% - 140px);
+            .subset_productBox_title {
+                font-size: 18px;
+                color: #000;
+            }
+            .subset_productBox_img {
+                width: 100px;
+                height: 100px;
+            }
+            .subset_productBox_button {
+                display: flex;
+                align-items: center;
+                justify-content: space-around;
+                font-size: 14px;
+                margin-top: 10px;
+                .productBox_view {
+                    padding: 4px 10px;
+                    border-radius: 6px;
+                    border: 1px solid #1e9fff;
+                    color: #1e9fff;
+                }
+                .productBox_edit {
+                    padding: 4px 10px;
+                    border-radius: 6px;
+                    border: 1px solid #1e9fff;
+                    color: #1e9fff;
+                }
+            }
+        }
+    }
+    .subset_product {
+        margin-top: 20px;
+    }
+    .subset_productBox {
+        width: 24%;
+        box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.2);
+        padding: 10px 15px;
+        box-sizing: border-box;
+        margin-bottom: 20px;
+    }
+    .addBox {
+        width: 80px;
+        height: 30px;
+        border-radius: 4px;
+        background: #1e9fff;
+        color: #fff;
+        font-size: 14px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-bottom: 10px;
+    }
+</style>

+ 22 - 32
src/views/ServiceLtems/index.vue

@@ -1,36 +1,26 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
-      <el-row>
-        <el-col :span="4">
-          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:82vh;">
-            <template slot="addBtn">
-              <i class="el-icon-setting" @click="goodsTypeVisible = true"
-                style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"></i>
-            </template>
-          </avue-tree>
-        </el-col>
-        <el-col :span="20">
-          <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
-            @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
-            @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-            @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+        <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+                   @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+                   @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+                   @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
             <template slot="menuLeft">
-              <el-button type="primary" size="mini" @click.stop="newAdd()">新建项目
-              </el-button>
+                <el-button type="primary" size="mini" @click.stop="newAdd()">新建项目
+                </el-button>
             </template>
             <template slot-scope="{ row, index }" slot="cname">
               <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
               </span>
             </template>
             <template slot-scope="{ row, index }" slot="menu">
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">
-                <i class="tradingIcon icon-del" @click.stop="rowDel(row, index)" />
-              </el-tooltip>
+                <el-button type="primary" size="mini" @click.stop="newAdd()">图片
+                </el-button>
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
+                    <i class="tradingIcon icon-del" @click.stop="rowDel(row, index)" />
+                </el-tooltip>
             </template>
-          </avue-crud>
-        </el-col>
-      </el-row>
+        </avue-crud>
     </basic-container>
 
     <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
@@ -94,7 +84,7 @@
 </template>
 
 <script>
-import detailsPage from "./detailsPage";
+import detailsPage from "./detailsPage_1";
 import { option } from "./js/optionList";
 import { optionTwo } from "./js/optionListTwo";
 import { getList, remove, getAllgoods, getGoodstype, goodsTypesubmit } from "@/api/basicData/product";
@@ -304,15 +294,15 @@ export default {
     },
       // 添加项目
     newAdd() {
-        if(!this.search.goodsTypeId) {
-            return this.$message.warning('请先选中类别');
-        }
-        console.log('添加')
-        this.tableData = []
-        this.goodsListSave = []
-        // 获取产品弹窗的左侧类型
-        this.getGoodstypefun()
-        this.productVisible = true
+        this.show = false
+        // if(!this.search.goodsTypeId) {
+        //     return this.$message.warning('请先选中类别');
+        // }
+        // this.tableData = []
+        // this.goodsListSave = []
+        // // 获取产品弹窗的左侧类型
+        // this.getGoodstypefun()
+        // this.productVisible = true
     },
       // 设置产品分类的确认按钮
     saveGoodstype() {

+ 9 - 67
src/views/ServiceLtems/js/optionList.js

@@ -17,89 +17,31 @@ export const option = {
   searchIndex: 2,
   column: [
     {
-      label: "商品名称",
+      label: "项目名称",
       prop: "cname",
-      // type: "select",
-      // dicUrl:"/api/blade-client/goodsdesc/descListByCname?cname={{key}}",
-      // filterable:true,
-      // remote:true,
-      // props: {
-      //   label: "cname",
-      //   value: "cname"
-      // },
+      width:200,
       search: true,
       overHidden: true,
       index: 1
     },
     {
-      label: "商品类型",
-      prop: "goodsTypeId",
-      type: 'select',
-      dicData: [],
-      props: {
-        label: 'cname',
-        value: 'id'
-      },
-      index:2,
-    },
-    {
-      label: "单位",
-      prop: "unit",
-      type: "select",
-      filterable:true,
-      props: {
-        label: "dictValue",
-        value: "dictValue"
-      },
-      dicData:[],
+      label: "备注",
+      prop: "remarks",
       search: true,
       overHidden: true,
-      index: 4
+      index: 2
     },
     {
-      label: "参考售价",
+      label: "录入日期",
       prop: "price",
       overHidden: true,
-      index: 5
+      index: 3
     },
     {
-      label: "厂家",
-      prop: "corpId",
-      type: "select",
-      props: {
-        label: "cname",
-        value: "id"
-      },
-      width:160,
-      dicData: [],
-      span: 6,
-      index: 13
-    },
-    {
-      label: "规格",
+      label: "操作人",
       prop: "specs",
-      span: 6,
-      index: 15
-    },
-    {
-      label: "品牌",
-      prop: "brand",
-      type: "select",
-      props: {
-        label: "cname",
-        value: "id"
-      },
-      dicData: [],
-      span: 6,
-      index: 16
+      index: 4
     },
-    {
-      label: "备注",
-      prop: "remarks",
-      search: true,
-      overHidden: true,
-      index: 17
-    }
   ]
 }
 export const optionList = {

+ 275 - 519
src/views/maintenanceQ/detailsPage.vue

@@ -10,10 +10,17 @@
         <div class="add-customer-btn">
           <!--<el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印-->
           <!--</el-button>-->
+            <el-button v-if="form.dispatchingWorkers == 2" type="warning" size="small" :disabled="option.disabled" @click="editCustomer(2)">
+                撤销派工
+            </el-button>
+            <el-button v-else type="warning" size="small" :disabled="option.disabled && (form.dispatchingWorkers == 0 || form.dispatchingWorkers == 1)" @click="editCustomer(1)">
+                派工
+            </el-button>
+
           <el-button type="primary" size="small"
             class="el-button--small-yh"  :disabled="!option.disabled" @click.stop="openEdit">编辑
           </el-button>
-          <el-button type="primary" size="small" :disabled="option.disabled" @click="editCustomer">
+          <el-button type="primary" size="small" :disabled="option.disabled" @click="editCustomer(0)">
             保存数据
           </el-button>
         </div>
@@ -24,9 +31,14 @@
             <crop-select v-model="form.corpId" corpType="KH" :disabled="option.disabled"
               @getCorpData="getCorpData"></crop-select>
           </template>
+
+            <template slot="maintenanceAmount">
+                <el-input v-model="form.maintenanceAmount" type="number" disabled
+                          placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input>
+            </template>
         </avue-form>
       </trade-card>
-      <trade-card title="商品信息" v-loading="loadingBtn">
+      <trade-card title="维修项目" v-loading="loadingBtn">
         <avue-crud ref="crud" :option="optionList" :data="data" :table-loading="loading" @saveColumn="saveColumn"
           @resetColumn="resetColumn" :cell-style="cellStyle">
           <template slot="headerSerial">
@@ -34,15 +46,25 @@
               :disabled="option.disabled" circle></el-button>
           </template>
 
-            <template slot="code" slot-scope="{ row, index }">
-                <el-input v-if="row.$cellEdit" v-model="row.code"
-                                 placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input>
-                <span v-else>{{ row.code }}</span>
+            <template slot="costName" slot-scope="{ row, index }">
+                <el-input v-if="row.$cellEdit" v-model="row.costName"
+                          placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input>
+                <span v-else>{{ row.costName }}</span>
+            </template>
+            <template slot="amount" slot-scope="{ row, index }">
+                <el-input v-if="row.$cellEdit" v-model="row.amount"
+                                 placeholder="请输入" size="small" :controls="false" style="width:100%;"
+                @blur="amountblur">
+                </el-input>
+                <span v-else>{{ row.amount }}</span>
+            </template>
+            <template slot="remarks" slot-scope="{ row, index }">
+                <el-input v-if="row.$cellEdit" v-model="row.remarks"
+                          placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input>
+                <span v-else>{{ row.remarks }}</span>
             </template>
 
           <template slot="menu" slot-scope="{ row, index }">
-              <el-button size="small" type="text" v-if="row.url" @click="imgurlfun(row)">信息码
-              </el-button>
             <el-button size="small" type="text" :disabled="option.disabled" @click="rowCell(row, index)">{{
                 row.$cellEdit ? "保存" : "修改"
             }}</el-button>
@@ -52,100 +74,43 @@
         </avue-crud>
       </trade-card>
 
-      <!--<containerTitle title="上传附件"></containerTitle>-->
-      <!--<c-upload v-loading="loadingBtn" typeUpload="CD"-->
-      <!--  deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="orderFilesList" display-->
-      <!--  :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>-->
+      <containerTitle title="上传附件"></containerTitle>
+      <c-upload v-loading="loadingBtn" typeUpload="CD"
+        deleteUrl="/api/blade-sales-part/maintenanceFiles/remove" :data="maintenanceFiles" display
+        :enumerationValue="35.1"></c-upload>
+
+
+
+
       <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts">
       </dictbiz-dialog>
 
       <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="配件系统-采购单" @onClose="onClose()">
       </report-dialog>
 
-        <!--图片查看-->
-        <el-dialog
-            title="信息码"
-            :visible.sync="imgfalse"
-            width="50%"
-            append-to-body
-            :before-close="imgfalseClose">
-            <div>
-                <img :src="imgtext" alt="">
-            </div>
-        </el-dialog>
-
-        <el-dialog title="导入项目" append-to-body class="el-dialogDeep" :visible.sync="productVisible" width="80%"
-                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
-            <el-row>
-                <el-col :span="5" style="height: 100%;overflow-y: auto">
-                    <div>
-                        <el-scrollbar>
-                            <basic-container>
-                                <avue-tree :option="productOption" :data="productDataGoods" @node-click="productnodeClick" />
-                            </basic-container>
-                        </el-scrollbar>
-                    </div>
-                </el-col>
-                <el-col :span="19">
-                    <basic-container>
-                        <avue-crud ref="productCrud" :option="optionTwo" :data="productListShow" :page.sync="productPage"
-                                   :search.sync="productSearch" @selection-change="productSelection" @search-change="goodsSearch"
-                                   @current-change="productCurrent" @size-change="productSize"
-                                   @refresh-change="productRefresh" @on-load="productonLoad" :table-loading="loading"
-                                   @saveColumn="productSave" @resetColumn="productReset" :cell-style="cellStyle">
-                            <template slot="menuLeft" slot-scope="{size}">
-                                <el-tabs v-model="activeName" @tab-click="tabHandle">
-                                    <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
-                                    <el-tab-pane label="已选定数据" name="importStaging"></el-tab-pane>
-                                </el-tabs>
-                            </template>
-                            <template slot-scope="scope" slot="menu">
-                                <el-button type="text" icon="el-icon-edit" size="small"
-                                           @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
-                                           :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
-                                </el-button>
-                                <el-button type="text" icon="el-icon-delete" size="small"
-                                           @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
-                                </el-button>
-                            </template>
-                        </avue-crud>
-                    </basic-container>
-                </el-col>
-            </el-row>
-            <span slot="footer" class="dialog-footer">
-            <el-button @click="productVisible = false">取 消</el-button>
-              <el-button type="primary" @click="importGoods">导入</el-button>
-          </span>
-        </el-dialog>
+
     </div>
   </div>
 </template>
 
 <script>
 import { optionList } from "./js/optionList";
-import { optionTwo } from "./js/optionListTwo";
-import { getDetails, submit, getCorpDetails, remove, getAllgoods, save, fixSave, revoke, collectPayment, getStoragelist } from "@/api/basicData/salesOrder";
 import reportDialog from "@/components/report-dialog/main";
 import { multiply, sum, subtract } from "@/util/calculate";
-import { getList as KHgetList} from "@/api/basicData/client";
-import { getList } from "@/api/basicData/product";
-import {getList as getListpp } from "@/api/tirePartsMall/basicData/brandPage";
-import {
-    projectGoodsSubmit
-} from "@/api/basicData/ServiceLtems";
+import {getList as yhgetList} from "@/api/system/user";
+
 import {
-    corpequipmentarchivesDetail,
-    corpequipmentarchivesitemRemove,
-    corpequipmentarchivesSubmit
-} from "@/api/basicData/EquipmentArchives";
+    maintenanceDetail,
+    maintenanceDispatchingWorkers,
+    maintenanceFeesRemove, maintenanceRevokeDispatchingWorkers,
+    maintenanceSubmit
+} from "@/api/basicData/maintenanceQ";
 import { getGoodstype } from "@/api/basicData/product";
+import { getList as CPgetList } from "@/api/basicData/product";
 export default {
   name: "index",
   data() {
     return {
-        // 图片的弹窗的开启
-        imgfalse:false,
-        imgtext:'',
       switchDialog: false,
       loadingBtn: false,
       addressTitle: null,
@@ -165,7 +130,6 @@ export default {
           {
             label: "客户名称",
             prop: "corpId",
-
             rules: [
               {
                 required: true,
@@ -173,196 +137,138 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 8,
-          },
-          {
-            label: "签约时间",
-            prop: "signingDateStart",
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
-            span: 8,
+            span: 16,
+
           },
+            {
+                label: "客户电话",
+                prop: "corpTel",
+                span: 8,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
+                label: "设备名称",
+                prop: "deviceId",
+                dicData:[],
+                dataType: "string",
+                type: "select",
+                props: {
+                    label: 'cname',
+                    value: 'id'
+                },
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+                span: 12,
+                change: (val) => {
+                    val.column.dicData.map(item=>{
+                        if (val.value == item.id){
+                            this.form.deviceName = item.cname
+                        }
+                    })
+                },
+            },
+            {
+                label: "设备地址",
+                prop: "deviceAddress",
+                span: 12,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
+                label: "故障描述",
+                prop: "faultDescribe",
+                type: "textarea",
+                minRows: 3,
+                span: 24,
+            },
+            {
+                label: "维修工名称",
+                prop: "maintenanceWorkerId",
+                dicData:[],
+                dataType: "string",
+                type: "select",
+                props: {
+                    label: 'name',
+                    value: 'id'
+                },
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+                span: 8,
+                change: (val) => {
+                    val.column.dicData.map(item=>{
+                        if (val.value == item.id){
+                            this.form.maintenanceWorkerName = item.name
+                        }
+                    })
+                },
+            },
+            {
+                label: "维修工电话",
+                prop: "maintenanceWorkerTel",
+                span: 8,
+                rules: [
+                    {
+                        required: true,
+                        message: "",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            {
+                label: "维修金额",
+                prop: "maintenanceAmount",
+                disabled:true,
+                span: 8,
+                type: "number",
+            },
           {
-            label: "解约时间",
-            prop: "signingDateEnd",
+            label: "报修日期",
+            prop: "repairReportDate",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 00:00:00",
             span: 8,
           },
-          {
-            label: "备注",
-            prop: "remarks",
-            type: "textarea",
-            minRows: 3,
-            span: 16,
-          }
-        ]
-      },
-      option2: {
-        menuBtn: false,
-        labelWidth: 80,
-        disabled: false,
-        column: [
-          {
-            label: "税率",
-            prop: "exchangeRate",
-            type: "select",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
+            {
+                label: "状态",
+                prop: "status",
+                dataType: "string",
+                type: "select",
+                disabled:true,
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=state_Q",
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+                span: 8,
             },
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=tax_rate",
-            span: 4,
-          },
-          {
-            label: "采购总数量",
-            prop: "storageQuantity",
-            disabled: true,
-            span: 4,
-          },
-          {
-            label: "成本",
-            prop: "costAmount",
-            disabled: true,
-            span: 4,
-          },
-          {
-            label: "毛利",
-            prop: "grossProfit",
-            disabled: true,
-            span: 4,
-          },
-          {
-            label: "订单金额",
-            prop: "purchaseAmount",
-            disabled: true,
-            span: 4,
-          },
-          {
-            label: "优惠金额",
-            prop: "thisUsedProfit",
-            span: 4,
-          },
-          {
-            label: "合同金额",
-            prop: "orderAmount",
-            disabled: true,
-            span: 8,
-          },
-          {
-            label: "应付金额",
-            prop: "balanceAmount",
-            disabled: true,
-            span: 8,
-          },
-          {
-            label: "已付金额",
-            prop: "settlmentAmount",
-            disabled: true,
-            span: 8,
-          }
-        ]
-      },
-      optiontabs1: {
-        menuBtn: false,
-        labelWidth: 90,
-        column: [
-          {
-            label: "简称",
-            prop: "a",
-            type: "select",
-            span: 24,
-          },
-          {
-            label: "地址",
-            prop: "b",
-            type: "select",
-            span: 24,
-          },
-          {
-            label: "详细地址",
-            prop: "c",
-            span: 24,
-          },
-          {
-            label: "邮编",
-            prop: "d",
-            span: 24,
-          },
-          {
-            label: "备注",
-            prop: "e",
-            type: 'textarea',
-            minRows: 3,
-            span: 24,
-          },
-          {
-            label: "地址智能识别",
-            prop: "ad",
-            placeholder: "例:上海市徐汇区枫林街道斜土路100号",
-            type: "textarea",
-            minRows: 3,
-            span: 24,
-          }
-        ]
-      },
-      optiontabs2: {
-        menuBtn: false,
-        labelWidth: 80,
-        column: [
-          {
-            label: "目的地",
-            prop: "a",
-            type: "select",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 24,
-          },
-          {
-            label: "物流公司",
-            prop: "b",
-            span: 24,
-          },
-          {
-            label: "电话",
-            prop: "c",
-            span: 24,
-          },
-          {
-            label: "地址",
-            prop: "d",
-            span: 24,
-          },
-          {
-            label: "详细地址",
-            prop: "e",
-            span: 24,
-          },
-          {
-            label: "邮编",
-            prop: "f",
-            span: 24,
-          },
           {
             label: "备注",
             prop: "remarks",
             type: "textarea",
             minRows: 3,
-            span: 24,
-          },
-          {
-            label: "地址智能识别",
-            prop: "g",
-            type: "textarea",
-            minRows: 3,
-            span: 24,
+            span: 16,
           }
         ]
       },
@@ -371,42 +277,8 @@ export default {
         // 商品产品下拉数据
       goodsoptions: [],
         // 附件
-      orderFilesList: [],
-
-        // 导入项目的弹窗
-        productVisible:false,
-        // 产品左侧类别
-        productOption: {
-            addBtn: false,
-            menu: false,
-            size: "small",
-            props: {
-                labelText: "标题",
-                label: "title",
-                value: "value",
-            }
-        },
-        // 产品左侧是数据
-        productDataGoods:[],
-        // 产品弹窗列表
-        optionTwo:optionTwo,
-        productPage:{
-            pageSize: 20,
-            currentPage: 1,
-            total: 0,
-            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-        },
-        productListShow:[],
-        // 暂存的数据
-        goodsListSave:[],
-        // 产品弹窗tabs切换
-        activeName:'searchList',
-        // 弹窗选中的数据
-        tableData:[],
-        productSearch:{},
-
+        maintenanceFiles: [],
         loading:false,
-
     };
   },
   props: {
@@ -417,6 +289,7 @@ export default {
   components: {
     reportDialog
   },
+
   async created() {
     this.optionList = optionList
       // 获取字典数据
@@ -426,15 +299,10 @@ export default {
         this.option.disabled = true
       this.getDetail(this.detailData.id);
     }
-
     if (this.detailData.status == 1) {
       this.option.disabled = true;
-      this.option2.disabled = true;
     }
-      // 获取产品数据
-    // getAllgoods().then(res => {
-    //   this.goodsoptions = res.data.data
-    // });
+
   },
   methods: {
       // 打印报表按钮事件
@@ -446,17 +314,27 @@ export default {
     },
       // 获取下拉字典
     getAllWorkDicts() {
-        getGoodstype().then(res => {
-            this.findObject(this.optionList.column, "goodsTypeId").dicData = res.data.data;
-        });
-        // 获取品牌数据
-        getListpp().then(res=>{
-            this.findObject(this.optionList.column, "brand").dicData = res.data.data.records
+        // 获取地址信息
+        // this.findObject(this.option.column, "deviceAddress").dicData = JSON.parse(localStorage.getItem('areaTypeTree'))
+        // 获取维修工信息
+        yhgetList().then(res=>{
+            this.findObject(this.option.column, "maintenanceWorkerId").dicData = res.data.data.records
+        })
+        CPgetList().then(res=>{
+            this.findObject(this.option.column, "deviceId").dicData = res.data.data.records
         })
     },
     cellStyle() {
       return "padding:0;height:40px;";
     },
+      // 维修项目的失焦事件
+      amountblur(){
+        let sum = 0
+        this.data.map(item=>{
+            sum += Number(item.amount)
+        })
+        this.form.maintenanceAmount = sum
+      },
 
     amountChange() {
       let val = 0
@@ -479,11 +357,11 @@ export default {
       // 获取详情数据
     getDetail(id) {
       this.loadingBtn = true
-      corpequipmentarchivesDetail({ id: id })
+        maintenanceDetail({ id: id })
         .then(res => {
           this.form = res.data.data;
-          this.data = res.data.data.corpEquipmentArchivesItemList;
-          // this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
+          this.data = res.data.data.maintenanceFees;
+          this.maintenanceFiles = res.data.data.maintenanceFiles ? res.data.data.maintenanceFiles : [];
         })
         .finally(() => {
           this.loadingBtn = false;
@@ -501,28 +379,30 @@ export default {
     },
 
     addRow() {
+        // this.data.push({ $cellEdit: true, storageId: this.form.storageId })
        this.$refs["form"].validate((valid, done) => {
           done();
           if (valid) {
-             // this.data.push({ $cellEdit: true, storageId: this.form.storageId })
-              this.tableData = []
-              this.goodsListSave = []
-              // 获取产品弹窗的左侧类型
-              this.getGoodstypefun()
-              this.productVisible = true
+             this.data.push({ $cellEdit: true, storageId: this.form.storageId })
           } else {
              return false;
           }
        });
     },
     rowCell(row, index) {
+        if (!row.costName) {
+            return this.$message.warning('维修项目不能为空');
+        }
+        if (!row.amount) {
+            return this.$message.warning('金额不能我空');
+        }
       if (row.$cellEdit == true) {
         this.$set(row, "$cellEdit", false);
       } else {
         this.$set(row, "$cellEdit", true);
       }
     },
-      // 删除
+      // 费用删除
     rowDel(row, index) {
       this.$confirm("确定删除数据?", {
         confirmButtonText: "确定",
@@ -530,7 +410,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          corpequipmentarchivesitemRemove({ids:row.id}).then(res => {
+          maintenanceFeesRemove({ids:row.id}).then(res => {
             this.$message({
               type: "success",
               message: "删除成功!"
@@ -544,101 +424,106 @@ export default {
           });
           this.data.splice(index, 1);
         }
+        this.amountblur()
       });
     },
-    //修改提交触发
-    editCustomer() {
+    //修改提交触发1 派工2 撤销派工3
+    editCustomer(index) {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
           if (this.data.length == 0) {
-            return this.$message.error('请添加一条商品信息');
+            return this.$message.error('请添加一条维修项目');
           }
-            // corpId	客户id
-            // corpName	客户名称
-            // sysNo	编号
-            // equipmentNumber	设备数量
-            // maintenance_second	维修次数
-            // signingDate_start	签约开始时间
-            // signingDate_end	签约结束时间
-            // remarks	备注(收费指示)
-            // updateUser	修改人
-            // createUser	创建人
-            // createTime	创建时间
-            // updateTime	修改时间
-            // status	状态(0 正常 1停用)
-            // corpEquipmentArchivesItemList 设备明细
-
-            // cname	设备名称
-            // code	设备编码
-            // brand	品牌
-            // specs	规格尺寸
-            // category	产品类别
-            // categoryitem	产品分类
-            // url	图片
-            // goodsTypeId	商品类型id
-            // exitDate	出场日期
-            // repairReportDate	报修日期
-            // brandId	品牌id
             let arr = this.data.map(item=>{
                 return {
                     id:item.id?item.id:null,
-                    cname:item.cname,
-                    code:item.code,
-                    brand:item.brand,
-                    specs:item.specs,
-                    remarks:item.remarks,
-                    goodsTypeId:item.goodsTypeId,
-                    goodsTypeName:item.goodsTypeName,
-                    exitDate:item.exitDate,
-                    repairReportDate:item.repairReportDate
+                    costId:item.costId?item.costId:null,
+                    costName:item.costName,
+                    amount:item.amount,
+                    number:1,
+                    price:item.amount,
+                    currency:'CNY',
+                    settlementAmount:item.settlementAmount?item.settlementAmount:0,
+                    remarks:item.remarks
                 }
             })
+            let list = this.maintenanceFiles.map(item=>{
+                item.sort = 1
+                return item
+            })
             const obj = {
                 id:this.form.id?this.form.id:null,
+                sysNo:this.form.sysNo?this.form.sysNo:null,
+                deviceId:this.form.deviceId,
+                deviceName:this.form.deviceName,
                 corpId:this.form.corpId,
                 corpName:this.form.corpName,
-                sysNo:null,
-                equipmentNumber:this.data.length,
-                maintenanceSecond:this.form.maintenanceSecond?this.form.maintenanceSecond:0,
-                signingDateStart:this.form.signingDateStart,
-                signingDateEnd:this.form.signingDateEnd,
+                corpTel:this.form.corpTel,
+                deviceAddress:this.form.deviceAddress,
+                faultDescribe:this.form.faultDescribe,
+                maintenanceWorkerId:this.form.maintenanceWorkerId,
+                maintenanceWorkerName:this.form.maintenanceWorkerName,
+                maintenanceWorkerTel:this.form.maintenanceWorkerTel,
+                maintenanceAmount:this.form.maintenanceAmount,
+                repairReportDate:this.form.repairReportDate,
+                settlementAmount:this.form.settlementAmount?this.form.settlementAmount:0,
                 remarks:this.form.remarks,
-                corpEquipmentArchivesItemList:arr
+                status:this.form.status,
+                maintenanceFees:arr,
+                maintenanceFiles:list
             }
             this.loadingBtn = true;
-            // 附件
-            // console.log(this.orderFilesList,522)
-          corpequipmentarchivesSubmit({
-              ...obj,
-          })
-            .then(res => {
-              this.$message.success("保存成功");
-              this.form = res.data.data;
-              this.data = res.data.data.corpEquipmentArchivesItemList;
-              // this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
-              this.detailData.status = 1
-              this.option.disabled = true;
-              this.option2.disabled = true;
-              this.$refs.crud.refreshTable();
-            })
-            .finally(() => {
-              this.loadingBtn = false;
-            });
+
+            this.maintenanceSubmitfun(obj,index)
         } else {
           return false;
         }
       });
     },
-      // 查看图片
-      imgurlfun(row){
-        this.imgfalse = true
-          this.imgtext = row.url
+      // 派工接口
+      maintenanceDispatchingWorkersfun(obj){
+          maintenanceDispatchingWorkers(obj).then(res=>{
+              this.$message.success("派工成功");
+              this.form = res.data.data;
+              this.data = res.data.data.maintenanceFees;
+              this.maintenanceFiles = res.data.data.maintenanceFiles ? res.data.data.maintenanceFiles : [];
+              this.option.disabled = true;
+          })
       },
-      imgfalseClose(){
-        this.imgtext = ''
-          this.imgfalse = false
+      // 撤销派工
+      maintenanceRevokeDispatchingWorkersfun(obj){
+          maintenanceRevokeDispatchingWorkers(obj).then(res=>{
+              this.$message.success("撤销派工成功");
+              this.form = res.data.data;
+              this.data = res.data.data.maintenanceFees;
+              this.maintenanceFiles = res.data.data.maintenanceFiles ? res.data.data.maintenanceFiles : [];
+              this.option.disabled = true;
+          })
+      },
+      // 保存接口
+      maintenanceSubmitfun(obj,index){
+          maintenanceSubmit(obj).then(res => {
+              this.form = res.data.data;
+              // this.data = res.data.data.maintenanceFees;
+              // this.maintenanceFiles = res.data.data.maintenanceFiles ? res.data.data.maintenanceFiles : [];
+              this.detailData.status = 1
+              this.option.disabled = true;
+
+              if (index == 0) {
+                  this.$message.success("保存成功");
+                  this.getDetail(this.form.id)
+              }else if (index == 1) {
+                  this.maintenanceDispatchingWorkersfun(obj)
+              }else if (index == 2) {
+                  this.maintenanceRevokeDispatchingWorkersfun(obj)
+              }else {}
+              this.$refs.crud.refreshTable();
+          }).finally(() => {
+              this.loadingBtn = false;
+          });
       },
+
     async saveColumn() {
       const inSave = optionList
       if (inSave) {
@@ -665,143 +550,14 @@ export default {
     openEdit() {
       // this.detailData.status = 2
         this.option.disabled = false
-      this.option = this.$options.data().option;
-      this.option2 = this.$options.data().option2;
-      this.$refs.crud.refreshTable();
+      // this.option = this.$options.data().option;
+      // this.$refs.crud.refreshTable();
     },
     //返回列表
     backToList() {
       this.$emit("goBack");
     },
-      // ---------------------------------产品弹窗----------------------------------------
-      // 产品弹窗导入
-      importGoods(){
-          if (this.goodsListSave.length > 0) {
-              for (let item of this.goodsListSave) {
-                  delete item.id
-                  this.data.push({
-                      $cellEdit: true,
-                      storageId: this.form.storageId,
-                      ...item
-                  })
-              }
-          }else {
-              for (let item of this.tableData) {
-                  delete item.id
-                  this.data.push({
-                      $cellEdit: true,
-                      storageId: this.form.storageId,
-                      ...item
-                  })
-              }
-          }
-          this.productVisible = false
-      },
-      // 产品选择左侧数据
-      productnodeClick(data){
-          this.productSearch.goodsTypeId = data.value
-          this.productPage.currentPage = 1;
-          this.productonLoad(this.productPage, this.productSearch);
-      },
-      // 产品弹窗的列表数据获取
-      productonLoad(page, params = {}){
-          let data = this.deepClone(Object.assign(params, this.productSearch));
-          this.loading = true;
-          getList(
-              page.currentPage,
-              page.pageSize,
-              data
-          ).then(res=>{
-              // this.productListShow = res.data.data.records ? res.data.data.records : [];
-              this.productListShow = res.data.data.records
-              this.productPage.total = res.data.data.total;
-              this.$nextTick(() => {
-                  this.$refs.productCrud.doLayout();
-              });
-          }).finally(() => {
-              this.loading = false;
-          });
-      },
-      // 标签页切换
-      tabHandle(data) {
-          if (data.name == 'searchList') {
-              this.productListShow = this.data;
-              // this.productSearch.total = this.pageList.total
-              this.productonLoad(this.productPage,this.productSearch);
-          } else if (data.name == 'importStaging') {
-              this.productListShow = this.goodsListSave;
-              this.productSearch.total = 0
-          }
-      },
-      // 获取产品左侧数据
-      getGoodstypefun(){
-          getGoodstype().then(res => {
-              this.productDataGoods = res.data.data;
-              // this.findObject(this.option2.column, "parentId").dicData = res.data.data;
-          });
-      },
-      // 弹窗选中的数据
-      importStagList(row, index) {
-          this.goodsListSave.push(row);
-      },
-      // 产品弹窗移除
-      removeStagList(row, index) {
-          this.goodsListSave.splice(row.$index, 1)
-      },
-      // 产品弹窗刷新触发
-      productRefresh(){
-          // this.treeDeptId = '';
-          this.productPage.currentPage = 1;
-          this.productonLoad(this.productPage,this.productSearch);
-      },
-      // 产品弹窗选择触发
-      productSelection(list) {
-          this.tableData = list
-      },
-      // 产品弹窗搜索按钮触发
-      goodsSearch(params, done) {
-          // this.treeDeptId = '';
-          this.productonLoad(this.productPage,params);
-          done()
-      },
-      // 产品弹窗分页
-      productCurrent(val){
-          this.productPage.currentPage = val;
-      },
-      productSize(val){
-          this.productPage.currentPage = 1;
-          this.productPage.pageSize = val;
-      },
-      // 产品弹窗的重置和保存
-      productSave(){
-          const inSave = optionTwo
-          if (inSave) {
-              this.$nextTick(() => {
-                  this.$refs.productCrud.doLayout();
-              });
-              this.$message.success("保存成功");
-              //关闭窗口
-              this.$refs.productCrud.$refs.dialogColumn.columnBox = false;
-          }
-      },
-      productReset(){
-          this.optionTwo = optionTwo;
-          const inSave = option
-          if (inSave) {
-              this.$nextTick(() => {
-                  this.$refs.productCrud.doLayout();
-              });
-              this.getAllWorkDicts()
-              this.$message.success("重置成功");
-              this.$refs.productCrud.$refs.dialogColumn.columnBox = false;
-          }
-      },
-      // 关闭弹窗的回调
-      closeGoods() {
-          this.productDataGoods = [];
-          // this.treeDeptId = "";
-          this.activeName = "searchList";
-      },
+
   },
   watch: {
     // data: function (rows) {

+ 7 - 9
src/views/maintenanceQ/index.vue

@@ -6,7 +6,7 @@
                        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
                        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
                 <template slot="menuLeft">
-                    <el-button type="primary" size="mini" @click.stop="newAdd()">新建设备档案
+                    <el-button type="primary" size="mini" @click.stop="newAdd()">新建维修
                     </el-button>
                 </template>
                 <template slot="corpIdSearch">
@@ -37,9 +37,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import {
-    corpequipmentarchivesList, corpequipmentarchivesRemove
-} from "@/api/basicData/maintenanceQ";
+import { maintenanceList, maintenanceRemove} from "@/api/basicData/maintenanceQ";
 import {
     allCropList,
 } from "@/api/basicData/customerInformation";
@@ -116,13 +114,13 @@ export default {
         },
         newAdd() {
             this.show = false;
-            this.$store.commit("IN_PJCG_STATUS");
+            // this.$store.commit("IN_PJCG_STATUS");
         },
         // 列表数据
         onLoad(page, params = {}) {
             let data = this.deepClone(Object.assign(params, this.search));
             this.loading = true;
-            corpequipmentarchivesList(
+            maintenanceList(
                 page.currentPage,
                 page.pageSize,
                 data
@@ -142,7 +140,7 @@ export default {
                 status: status
             };
             this.show = false;
-            this.$store.commit("IN_PJCG_STATUS");
+            // this.$store.commit("IN_PJCG_STATUS");
         },
         currentChange(val) {
             this.page.currentPage = val;
@@ -157,7 +155,7 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
             }).then(() => {
-                corpequipmentarchivesRemove({ids:row.id}).then(res => {
+                maintenanceRemove({ids:row.id}).then(res => {
                     if (res.data.code == 200) {
                         this.$message({
                             type: "success",
@@ -199,7 +197,7 @@ export default {
             this.detailData = this.$options.data().detailData;
             this.show = true;
             this.onLoad(this.page, this.search);
-            this.$store.commit("OUT_PJCG_STATUS");
+            // this.$store.commit("OUT_PJCG_STATUS");
         },
     }
 }

+ 94 - 46
src/views/maintenanceQ/js/optionList.js

@@ -52,39 +52,110 @@ export const option = {
       index: 1
     },
     {
-      label: "号",
+      label: "号",
       prop: "sysNo",
       search: true,
       overHidden: true,
-      index: 3
+      index: 2
     },
     {
-      label: "设备数量",
-      prop: "equipmentNumber",
+      label: "设备名称",
+      prop: "deviceName",
       overHidden: true,
-      index: 4
+      index: 3
     },
     {
-      label: "维修次数",
-      prop: "maintenanceSecond",
-      index: 12
+      label: "客户电话",
+      prop: "corpTel",
+      index: 4
     },
     {
-      label: "签约时间",
-      prop: "signingDateStart",
+      label: "设备地址",
+      prop: "deviceAddress",
       width: 200,
-      index: 12
+      index: 5
+    },
+    {
+      label: "故障描述",
+      prop: "faultDescribe",
+      overHidden: true,
+      index: 6
+    },
+    {
+      label: "维修工",
+      prop: "maintenanceWorkerName",
+      index: 7
+    },
+    {
+      label: "维修电话",
+      prop: "maintenanceWorkerTel",
+      index: 8
+    },
+
+    {
+      label: "维修金额",
+      prop: "maintenanceAmount",
+      index: 9
     },
     {
-      label: "解约时间",
-      prop: "signingDateEnd",
+      label: "报修日期",
+      prop: "repairReportDate",
       width: 200,
-      index: 12
+      index: 10
+    },
+    {
+      label: "是否派工",
+      prop: "dispatchingWorkers",
+      dataType: "string",
+      type: "select",
+      disabled:true,
+      dicUrl: "/api/blade-system/dict-biz/dictionary?code=Dispatching_workers_Q",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      index:10
+    },
+    {
+      label: "完成日期",
+      prop: "completeDate",
+      index: 11
+    },
+    {
+      label: "支付状态",
+      prop: "paymentStatus",
+      dataType: "string",
+      type: "select",
+      disabled:true,
+      dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_status_Q",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      index:12
+    },
+    {
+      label: "状态",
+      prop: "status",
+      dataType: "string",
+      type: "select",
+      disabled:true,
+      dicUrl: "/api/blade-system/dict-biz/dictionary?code=state_Q",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      index:13
+    },
+    {
+      label: "结算金额",
+      prop: "settlementAmount",
+      index: 13
     },
     {
       label: "备注",
       prop: "remarks",
-      index: 12
+      index: 14
     }
   ]
 }
@@ -121,39 +192,21 @@ export const optionList = {
   ],
   column: [
     {
-      label: "商品名称",
-      prop: "cname",
+      label: "维修项目",
+      prop: "costName",
       width:'250px',
       overHidden: true
     },
     {
-      label: "设备编号",
-      prop: "code",
+      label: "金额",
+      prop: "amount",
       overHidden: true
     },
     {
-      label: "商品分类",
-      prop: "goodsTypeId",
-      type: 'select',
-      dicData: [],
-      props: {
-        label: 'title',
-        value: 'id'
-      },
-    },
-    {
-      label: "规格",
-      prop: "specs",
-    },
-    {
-      label: "品牌",
-      prop: "brand",
-      type: "select",
-      props: {
-        label: "cname",
-        value: "id"
-      },
-      dicData: [],
+      label: "结算金额",
+      prop: "settlementAmount",
+      type:'number',
+      overHidden: true
     },
     {
       label: "备注",
@@ -161,11 +214,6 @@ export const optionList = {
       cell: false,
       overHidden: true
     }
-    // ,{
-    //   label: "进价",
-    //   prop: "purchasePrice",
-    //   overHidden: true
-    // }
   ]
 }
 

+ 6 - 0
src/views/maintenanceQ/js/optionListTwo.js

@@ -79,6 +79,12 @@ export const optionTwo = {
     {
       label: "品牌",
       prop: "brand",
+      type: "select",
+      props: {
+        label: "cname",
+        value: "id"
+      },
+      dicData: [],
       span: 6,
       index: 16
     },