aXin-0810 10 ay önce
ebeveyn
işleme
49eded3d1e
22 değiştirilmiş dosya ile 1250 ekleme ve 968 silme
  1. 0 4
      src/components/barrageContainer/barrageContainer.vue
  2. 0 14
      src/components/barrageContainer/circularLinkedList.js
  3. 222 196
      src/views/userManagement/customerManagement/index.vue
  4. 5 0
      src/views/userManagement/distributorManagement/index.vue
  5. 1 1
      src/views/userManagement/masterManagement/index.vue
  6. 20 15
      src/views/workOrder/workOrderPool/detail.vue
  7. 20 16
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/abnormal.vue
  8. 20 16
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/activateOrder.vue
  9. 7 7
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/button_mixin.js
  10. 20 16
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cancelOrder.vue
  11. 43 23
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cloneWorkOrder.vue
  12. 13 11
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/copyInfo.vue
  13. 103 85
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/processFeedback.vue
  14. 20 16
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/unurgent.vue
  15. 20 16
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/urgent.vue
  16. 33 12
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue
  17. 152 122
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js
  18. 48 38
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/dispatchInfo.js
  19. 108 90
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js
  20. 316 200
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/wb_productColumns.js
  21. 70 70
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js
  22. 9 0
      src/views/workOrder/workOrderPool/index.vue

+ 0 - 4
src/components/barrageContainer/barrageContainer.vue

@@ -74,10 +74,6 @@ export default {
     push(val) {
       this.link.append(val)
     },
-    // 向前追加
-    unshift(val) {
-      this.link.prepend(val)
-    },
     // 执行开始
     execute() {
       if (this.link.getLength() > 0) {

+ 0 - 14
src/components/barrageContainer/circularLinkedList.js

@@ -26,20 +26,6 @@ export class CircularLinkedList {
     }
   }
 
-  // 向前追加
-  prepend(value) {
-    const newNode = new Node(value)
-    if (!this.head) {
-      this.head = newNode
-      this.tail = newNode
-      this.tail.next = this.head
-    } else {
-      newNode.next = this.head
-      this.head = newNode
-      this.tail.next = this.head
-    }
-  }
-
   // 获取链表长度
   getLength() {
     if (!this.head) return 0

+ 222 - 196
src/views/userManagement/customerManagement/index.vue

@@ -1,73 +1,101 @@
 <template>
-	<div>
-		<template-page v-if="!isShowMemberDetail" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="200"
-		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-		  :operation="operation()" :exportList="exportList">
-		  <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
-		    :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
-		    <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-		      <zj-form-module :title="formDialogTitles[formDialogType]" label-width="100px" :showPackUp="false"
-		        :form-data="formData" :form-items="formItems">
-		      </zj-form-module>
-		    </zj-form-container>
-		    <div slot="footer" class="dialog-footer">
-		      <el-button size="mini" @click="formCancel">取 消</el-button>
-		      <el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
-		    </div>
-		  </el-dialog>
-		<!-- 入驻网点 -->
-		<el-dialog title="设为工程师" :visible.sync="dialogVisible" @close="websitList = []" width="40%" :close-on-click-modal="false" :modal-append-to-body="false">
-			<el-form ref="workerForm" :model="workerForm" label-width="110px" size="small" label-position="left">
-				<el-row :gutter="20">
-					<el-col :span="24">
-						<el-form-item label="入驻网点" :required="true">
-							<el-select v-model="workerForm.websitId" placeholder="请选择" style="width: 100%;">
-							    <el-option
-							      v-for="item in websitList"
-							      :key="item.websitId"
-							      :label="item.name"
-							      :value="item.websitId">
-							    </el-option>
-							  </el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :span="24">
-						<el-form-item label="姓名" :required="true">
-							<el-input v-model="workerForm.name" placeholder="请输入"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :span="24">
-						<el-form-item label="银行卡号">
-							<el-input v-model="workerForm.bankAccount" placeholder="请输入"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :span="24">
-						<el-form-item label="身份证号码" :required="true">
-							<el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :span="24">
-						<el-form-item label="身份证正面照" :required="true">
-							<ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />
-						</el-form-item>
-					</el-col>
-					<el-col :span="24" v-for="(item,index) in imgList" :key="index">
-						<el-form-item :label="item.dictValue" :required="true">
-							<ImageUpload :fileList="item.imgs" :limit="1" :isEdit="true" />
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="dialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="memberInner()">确定</el-button>
-			</div>
-		</el-dialog>
-		</template-page>
-		<div class="detail" v-if="isShowMemberDetail">
-			<MemberDetail :user="queryUser" @backListFromDetail="backListFromMemberDetail" />
-		</div>
-	</div>
+  <div>
+    <template-page
+      v-if="!isShowMemberDetail"
+      ref="pageRef"
+      :get-list="getList"
+      :table-attributes="tableAttributes"
+      :table-events="tableEvents"
+      :operationColumnWidth="200"
+      :options-evens-group="optionsEvensGroup"
+      :moreParameters="moreParameters"
+      :column-parsing="columnParsing"
+      :operation="operation()"
+      :exportList="exportList"
+    >
+      <el-dialog
+        title=""
+        width="500px"
+        custom-class="diy-dialog"
+        append-to-body
+        :modal="true"
+        :visible.sync="formDialog"
+        :show-close="true"
+        :close-on-click-modal="false"
+        :modal-append-to-body="false"
+        :before-close="formCancel"
+      >
+        <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module
+            :title="formDialogTitles[formDialogType]"
+            label-width="100px"
+            :showPackUp="false"
+            :form-data="formData"
+            :form-items="formItems"
+          >
+          </zj-form-module>
+        </zj-form-container>
+        <div slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="formCancel">取 消</el-button>
+          <el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
+        </div>
+      </el-dialog>
+      <!-- 入驻网点 -->
+      <el-dialog
+        title="设为工程师"
+        :visible.sync="dialogVisible"
+        @close="websitList = []"
+        width="40%"
+        :close-on-click-modal="false"
+        :modal-append-to-body="false"
+      >
+        <el-form ref="workerForm" :model="workerForm" label-width="110px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :span="24">
+              <el-form-item label="入驻网点" :required="true">
+                <el-select v-model="workerForm.websitId" placeholder="请选择" style="width: 100%">
+                  <el-option v-for="item in websitList" :key="item.websitId" :label="item.name" :value="item.websitId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="姓名" :required="true">
+                <el-input v-model="workerForm.name" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="银行卡号">
+                <el-input v-model="workerForm.bankAccount" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="身份证号码" :required="true">
+                <el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="身份证正面照" :required="true">
+                <ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" v-for="(item, index) in imgList" :key="index">
+              <el-form-item :label="item.dictValue" :required="true">
+                <ImageUpload :fileList="item.imgs" :limit="1" :isEdit="true" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="memberInner()">确定</el-button>
+        </div>
+      </el-dialog>
+    </template-page>
+    <div class="detail" v-if="isShowMemberDetail">
+      <MemberDetail :user="queryUser" @backListFromDetail="backListFromMemberDetail" />
+    </div>
+  </div>
 </template>
 
 <script>
@@ -75,13 +103,13 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
-import { memberListPageV2,memberPageExport, memberAudit, memberInner, getWebsit } from "@/api/customerManagement";
-import MemberDetail from "@/components/Mall/Member/member-detail";
+import { memberListPageV2, memberPageExport, memberAudit, memberInner, getWebsit } from '@/api/customerManagement'
+import MemberDetail from '@/components/Mall/Member/member-detail'
 import request from '@/utils/request'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage, MemberDetail, ImageUpload },
-  mixins: [import_mixin,operation_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
       // 事件组合
@@ -101,23 +129,23 @@ export default {
       formDialogType: 0,
       formDialogTitles: [],
       formDialog: false,
-	  dialogVisible: false,
-	  	formData: {
-	  		storageName: '',
-	  		storageMobile: '',
-	  		storageAddress: '',
-	  	},
-	  websitList: [],
-	  workerForm: {
-	  		websitId: '',
-	  		userId: '',
-			idCard: '',
-			name: '',
-			bankAccount: ''
-	  },
-	  queryUser: {}, // 查询
-	  fileList: [],
-	  imgList: []
+      dialogVisible: false,
+      formData: {
+        storageName: '',
+        storageMobile: '',
+        storageAddress: ''
+      },
+      websitList: [],
+      workerForm: {
+        websitId: '',
+        userId: '',
+        idCard: '',
+        name: '',
+        bankAccount: ''
+      },
+      queryUser: {}, // 查询
+      fileList: [],
+      imgList: []
     }
   },
   computed: {
@@ -125,15 +153,13 @@ export default {
     moreParameters() {
       return []
     },
-    formItems() {
-      
-    },
-	isShowMemberDetail() {
-	  return this.queryUser.hasOwnProperty('userId')
-	}
+    formItems() {},
+    isShowMemberDetail() {
+      return this.queryUser.hasOwnProperty('userId')
+    }
   },
-  created(){
-	  this.getImgList()
+  created() {
+    this.getImgList()
   },
   methods: {
     // 列表请求函数
@@ -148,115 +174,115 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-	// 详情返回显示列表
-	backListFromMemberDetail() {
-	  this.queryUser = {}
-	},
-	getImgList(){
-		request({
-		  url: `/dictCompany/page`,
-		  method: 'post',
-		  data: { pageNum: 1, pageSize: -1, params: [{param: "a.dict_type", compare: "=", value: "WORKER_IMG"}] }
-		}).then(res=>{
-			this.imgList = res.data.records.filter(item=>{
-				return item.imgs = []
-			})
-		})
-	},
-	// 表格操作列
-	operation() {
-		return this.operationBtn({
-			detail: {
-				btnType: 'text',
-				click: ({ row, index, column }) => {
-					this.queryUser = row
-				}
-			},
-			setWorker: {
-				btnType: 'text',
-				prompt: '请确认是否设为工程师?',
-				click: ({ row, index, column }) => {
-					this.workerForm.userId = row.userId
-					getWebsit({type: 'C'}).then(res => {
-						this.websitList = res.data
-						this.dialogVisible = true
-					})
-				}
-			},
-			setService: {
-				btnType: 'text',
-				prompt: '请确认是否设为分销员?',
-				click: ({ row, index, column }) => {
-					memberInner({
-						type: 'SERVICE',
-						userId: row.userId
-					}).then(res => {
-						if (res.code == 200) {
-							this.$message({ type: 'success', message: '设为分销员成功!' })
-							this.$refs.pageRef.refreshList()
-						} else {
-							this.$message.error(res.msg);
-						}
-					})
-				}
-			},
-		})
-	},
+    // 详情返回显示列表
+    backListFromMemberDetail() {
+      this.queryUser = {}
+    },
+    getImgList() {
+      request({
+        url: `/dictCompany/page`,
+        method: 'post',
+        data: { pageNum: 1, pageSize: -1, params: [{ param: 'a.dict_type', compare: '=', value: 'WORKER_IMG' }] }
+      }).then(res => {
+        this.imgList = res.data.records.filter(item => {
+          return (item.imgs = [])
+        })
+      })
+    },
+    // 表格操作列
+    operation() {
+      return this.operationBtn({
+        detail: {
+          btnType: 'text',
+          click: ({ row, index, column }) => {
+            this.queryUser = row
+          }
+        },
+        setWorker: {
+          btnType: 'text',
+          prompt: '请确认是否设为工程师?',
+          click: ({ row, index, column }) => {
+            this.workerForm.userId = row.userId
+            getWebsit({ type: 'C' }).then(res => {
+              this.websitList = res.data
+              this.dialogVisible = true
+            })
+          }
+        },
+        setService: {
+          btnType: 'text',
+          prompt: '请确认是否设为分销员?',
+          click: ({ row, index, column }) => {
+            memberInner({
+              type: 'SERVICE',
+              userId: row.userId
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({ type: 'success', message: '设为分销员成功!' })
+                this.$refs.pageRef.refreshList()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+          }
+        }
+      })
+    },
     addData() {
       this.formDialogType = 0
       this.openForm()
     },
     openForm() {
-      this.formDialog = true;
+      this.formDialog = true
     },
     formCancel() {
       this.$refs.formRef.$refs.inlineForm.clearValidate()
       this.$data.formData = this.$options.data().formData
       this.formDialog = false
     },
-	memberInner(){
-		let workerImgs = []
-		for(var i = 0;i < this.imgList.length;i++){
-			if(this.imgList[i].imgs.length == 0){
-				return this.$message({ type: 'error', message: '请上传' + this.imgList[i].dictValue +'!' })
-				break;
-			}else{
-				workerImgs.push({
-					imgName: this.imgList[i].dictValue,
-					imgUrl: this.imgList[i].imgs.length>0?this.imgList[i].imgs[0].url:''
-				})
-			}
-		}
-		if(!this.workerForm.websitId){
-			return this.$message({ type: 'error', message: '请选择入驻网点!'})
-		}else if(!this.workerForm.name){
-			return this.$message({ type: 'error', message: '请输入姓名!' })
-		}else if(!this.workerForm.idCard){
-			return this.$message({ type: 'error', message: '请输入身份证号码!' })
-		}else if(!/^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}[\dXx]$/g.test(this.workerForm.idCard)){
-			return this.$message({ type: 'error', message: '请输入正确的身份证号码!' })
-		}else if(this.fileList.length == 0){
-			return this.$message({ type: 'error', message: '请上传身份证正面照!' })
-		}
-		memberInner({
-			type: 'WORKER',
-			userId: this.workerForm.userId,
-			websitId: this.workerForm.websitId,
-			name: this.workerForm.name,
-			idCard: this.workerForm.idCard,
-			bankAccount: this.workerForm.bankAccount,
-			idCardImg: this.fileList.map(item => item.url).join(","),
-			workerImgs
-		}).then(res => {
-			this.dialogVisible = false
-			this.$message({ type: 'success', message: '设置工程师成功!' })
-			this.$refs.pageRef.refreshList()
-		})
-	},
+    memberInner() {
+      let workerImgs = []
+      for (var i = 0; i < this.imgList.length; i++) {
+        if (this.imgList[i].imgs.length == 0) {
+          return this.$message({ type: 'error', message: '请上传' + this.imgList[i].dictValue + '!' })
+          break
+        } else {
+          workerImgs.push({
+            imgName: this.imgList[i].dictValue,
+            imgUrl: this.imgList[i].imgs.length > 0 ? this.imgList[i].imgs[0].url : ''
+          })
+        }
+      }
+      if (!this.workerForm.websitId) {
+        return this.$message({ type: 'error', message: '请选择入驻网点!' })
+      } else if (!this.workerForm.name) {
+        return this.$message({ type: 'error', message: '请输入姓名!' })
+      } else if (!this.workerForm.idCard) {
+        return this.$message({ type: 'error', message: '请输入身份证号码!' })
+      } else if (!/^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}[\dXx]$/g.test(this.workerForm.idCard)) {
+        return this.$message({ type: 'error', message: '请输入正确的身份证号码!' })
+      } else if (this.fileList.length == 0) {
+        return this.$message({ type: 'error', message: '请上传身份证正面照!' })
+      }
+      memberInner({
+        type: 'WORKER',
+        userId: this.workerForm.userId,
+        websitId: this.workerForm.websitId,
+        name: this.workerForm.name,
+        idCard: this.workerForm.idCard,
+        bankAccount: this.workerForm.bankAccount,
+        idCardImg: this.fileList.map(item => item.url).join(','),
+        workerImgs
+      }).then(res => {
+        this.dialogVisible = false
+        this.$message({ type: 'success', message: '设置工程师成功!' })
+        this.$refs.pageRef.refreshList()
+      })
+    },
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([addMember, editMember][this.formDialogType])(this.formData).then(res => {
+          ;[addMember, editMember][this.formDialogType](this.formData).then(res => {
             this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
             this.formCancel()
             this.$refs.pageRef.refreshList()
@@ -269,8 +295,8 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	.detail{
-		padding: 20px;
-		box-sizing: border-box;
-	}
+.detail {
+  padding: 20px;
+  box-sizing: border-box;
+}
 </style>

+ 5 - 0
src/views/userManagement/distributorManagement/index.vue

@@ -86,6 +86,11 @@
                 <el-input v-model="workerForm.bankAccount" placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item label="师傅编号" :required="true">
+                <el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="身份证正面照" :required="true">
                 <ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />

+ 1 - 1
src/views/userManagement/masterManagement/index.vue

@@ -574,7 +574,7 @@ export default {
         idCard: this.formData.idCard,
         idCardImg: this.formData.idCardImg[0].url,
         name: this.formData.nickName,
-        examineStatusEnum,
+        examineStatus: examineStatusEnum,
         examineRemark: this.formData.examineRemark,
         id: this.formData.id
       }).then(res => {

+ 20 - 15
src/views/workOrder/workOrderPool/detail.vue

@@ -7,13 +7,16 @@
       <el-tab-pane :label="`支付费用`" name="payFee" key="payFee"></el-tab-pane>
       <el-tab-pane v-if="EvaluationShow" label="评价信息" name="Evaluation" key="Evaluation"> </el-tab-pane>
       <el-tab-pane v-if="SettleAccountsShow" label="费用结算" name="SettleAccounts" key="SettleAccounts"> </el-tab-pane>
-      <el-tab-pane v-if="PartsApplicationShow" label="配件申请" name="PartsApplication" key="PartsApplication"> </el-tab-pane>
+      <el-tab-pane v-if="PartsApplicationShow" label="配件申请" name="PartsApplication" key="PartsApplication">
+      </el-tab-pane>
     </el-tabs>
     <div class="view_div">
-      <div :style="{
-        height: activeName === 'workOrderInfo' ? '100%' : '0px',
-        overflow: activeName === 'workOrderInfo' ? '' : 'hidden'
-      }">
+      <div
+        :style="{
+          height: activeName === 'workOrderInfo' ? '100%' : '0px',
+          overflow: activeName === 'workOrderInfo' ? '' : 'hidden'
+        }"
+      >
         <workOrderInfo :id="id" ref="workOrderInfo" :workOrderType="workOrderType" />
       </div>
       <OperationDetail v-if="activeName == 'operationDetails'" :id="id" ref="operationDetails" />
@@ -21,7 +24,11 @@
       <Payment v-if="activeName == 'payFee'" :id="id" ref="payFee" :workOrderType="workOrderType" />
       <Evaluation v-if="activeName == 'Evaluation' && EvaluationShow" :id="id" ref="Evaluation" />
       <SettleAccounts v-if="activeName == 'SettleAccounts' && SettleAccountsShow" :id="id" ref="SettleAccounts" />
-      <PartsApplication v-if="activeName == 'PartsApplication' && PartsApplicationShow" :id="id" ref="PartsApplication" />
+      <PartsApplication
+        v-if="activeName == 'PartsApplication' && PartsApplicationShow"
+        :id="id"
+        ref="PartsApplication"
+      />
     </div>
   </div>
 </template>
@@ -34,7 +41,7 @@ import Payment from './detailModule/Payment/index.vue'
 import Evaluation from './detailModule/Evaluation/index.vue'
 import SettleAccounts from './detailModule/SettleAccounts/index.vue'
 import PartsApplication from './detailModule/PartsApplication/index.vue'
-import { orderBaseDetail } from "@/api/workOrderPool.js"
+import { orderBaseDetail } from '@/api/workOrderPool.js'
 export default {
   components: {
     workOrderInfo,
@@ -53,30 +60,28 @@ export default {
     workOrderType: {
       type: [Number],
       default: null
-    },
+    }
   },
   data() {
     return {
       activeName: this?.$route?.params?.pagePam || 'workOrderInfo',
       EvaluationShow: false,
       SettleAccountsShow: false,
-      PartsApplicationShow: true,
+      PartsApplicationShow: true
     }
   },
   created() {
     orderBaseDetail({
       orderBaseId: this.id
     }).then(res => {
-      if (!~["DYY", "DSHPG", "DWDPG", "DJD", "FWZ", "YQX"].indexOf(res.data.orderStatus)) {
+      if (!~['DYY', 'DSHPG', 'DWDPG', 'DJD', 'FWZ', 'YQX'].indexOf(res.data.orderStatus)) {
         this.EvaluationShow = true
         this.SettleAccountsShow = true
       }
     })
   },
   methods: {
-    handleClick(tab, event) {
-
-    }
+    handleClick(tab, event) {}
   }
 }
 </script>
@@ -86,8 +91,8 @@ export default {
   height: calc(100vh - 140px) !important;
   overflow: hidden;
 
-  &> ::v-deep .el-tabs:nth-child(1) {
-    &>.el-tabs__header:nth-child(1) {
+  & > ::v-deep .el-tabs:nth-child(1) {
+    & > .el-tabs__header:nth-child(1) {
       margin-bottom: 0 !important;
     }
   }

+ 20 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/abnormal.vue

@@ -7,7 +7,7 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { MessageBox } from '@zjlib/element-ui2'
-import { orderBaseFlag } from "@/api/workOrderPool.js"
+import { orderBaseFlag } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   methods: {
@@ -17,23 +17,27 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        orderBaseFlag({ flag: true, orderBaseId: this.orderInfo.id, orderFlagEnum: "YI_CHANGE" }).then(res => {
-          this.unlockBtn()
-          // 编辑保存后不跳转列表,刷新数据
-          this.acquireVerify(this, 'getorderDetail')()
-          // 刷新操作记录
-          this.acquireVerify(this, 'getOrderBaseLogList')()
-          this.$message({
-            type: 'success',
-            message: '设置成功!'
-          })
-        }).catch(() => {
+      })
+        .then(() => {
+          orderBaseFlag({ flag: true, orderBaseId: this.orderInfo.id, orderFlagEnum: 'YI_CHANGE' })
+            .then(res => {
+              this.unlockBtn()
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '设置成功!'
+              })
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
+        })
+        .catch(() => {
           this.unlockBtn()
         })
-      }).catch(() => {
-        this.unlockBtn()
-      })
     }
   }
 }

+ 20 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/activateOrder.vue

@@ -7,7 +7,7 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { MessageBox } from '@zjlib/element-ui2'
-import { orderBaseActive } from "@/api/workOrderPool.js"
+import { orderBaseActive } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   methods: {
@@ -17,23 +17,27 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        orderBaseActive({ orderBaseId: this.orderInfo.id }).then(res => {
-          this.unlockBtn()
-          // 编辑保存后不跳转列表,刷新数据
-          this.acquireVerify(this, 'getorderDetail')()
-          // 刷新操作记录
-          this.acquireVerify(this, 'getOrderBaseLogList')()
-          this.$message({
-            type: 'success',
-            message: '激活成功!'
-          })
-        }).catch(() => {
+      })
+        .then(() => {
+          orderBaseActive({ orderBaseId: this.orderInfo.id })
+            .then(res => {
+              this.unlockBtn()
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '激活成功!'
+              })
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
+        })
+        .catch(() => {
           this.unlockBtn()
         })
-      }).catch(() => {
-        this.unlockBtn()
-      })
     }
   }
 }

+ 7 - 7
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/button_mixin.js

@@ -7,14 +7,14 @@ export default {
     orderType: {
       type: Number,
       default: null
-    },
+    }
   },
-  data(){
+  data() {
     return {
       disabled: false
     }
   },
-  methods:{
+  methods: {
     acquireVerify(v, name) {
       if (v.$parent[name]) {
         return v.$parent[name]
@@ -22,14 +22,14 @@ export default {
         return this.acquireVerify(v.$parent, name)
       }
     },
-    lockBtn(){
+    lockBtn() {
       this.disabled = true
-      setTimeout(()=>{
+      setTimeout(() => {
         this.disabled = false
       }, 5000)
     },
-    unlockBtn(){
+    unlockBtn() {
       this.disabled = false
-    },
+    }
   }
 }

+ 20 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cancelOrder.vue

@@ -7,7 +7,7 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { MessageBox } from '@zjlib/element-ui2'
-import { orderBaseCancel } from "@/api/workOrderPool.js"
+import { orderBaseCancel } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   methods: {
@@ -17,24 +17,28 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        orderBaseCancel({
-          orderBaseId: this.orderInfo.id
-        }).then(res => {
-          // 编辑保存后不跳转列表,刷新数据
-          this.acquireVerify(this, 'getorderDetail')()
-          // 刷新操作记录
-          this.acquireVerify(this, 'getOrderBaseLogList')()
-          this.$message({
-            type: 'success',
-            message: '取消成功!'
+      })
+        .then(() => {
+          orderBaseCancel({
+            orderBaseId: this.orderInfo.id
           })
-        }).catch(() => {
+            .then(res => {
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '取消成功!'
+              })
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
+        })
+        .catch(() => {
           this.unlockBtn()
         })
-      }).catch(() => {
-        this.unlockBtn()
-      })
     }
   }
 }

+ 43 - 23
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cloneWorkOrder.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="withinLine">
-    <el-button type="primary" :disabled="disabled" size="mini" @click="save">
-      创建服务单
-    </el-button>
+    <el-button type="primary" :disabled="disabled" size="mini" @click="save"> 创建服务单 </el-button>
   </div>
 </template>
 
@@ -13,30 +11,52 @@ export default {
   mixins: [buttonMixin],
   methods: {
     save() {
-      EventBus.$emit('cloneWorkOrder', {...this.removeFields(JSON.parse(JSON.stringify(this.orderInfo)), ["id","createBy","createDate","updateBy","updateTime","orderStatus","orderFlags","orderBaseId","orderWorkers","orderWorkers_cp",,"workerId","workerIdList","workerId_fz","workerIdcard","workerMobile","workerName","workerReceTime","workerRemark"]),orderWorkers:[]})
+      EventBus.$emit('cloneWorkOrder', {
+        ...this.removeFields(JSON.parse(JSON.stringify(this.orderInfo)), [
+          'id',
+          'createBy',
+          'createDate',
+          'updateBy',
+          'updateTime',
+          'orderStatus',
+          'orderFlags',
+          'orderBaseId',
+          'orderWorkers',
+          'orderWorkers_cp',
+          'workerId',
+          'workerIdList',
+          'workerId_fz',
+          'workerIdcard',
+          'workerMobile',
+          'workerName',
+          'workerReceTime',
+          'workerRemark'
+        ]),
+        orderWorkers: []
+      })
     },
     removeFields(jsonData, fieldsToRemove) {
-        if (typeof jsonData !== 'object' || jsonData === null) {
-            // 如果传入的不是对象,则直接返回
-            return jsonData;
-        } else if (Array.isArray(jsonData)) {
-            // 如果是数组,则递归处理每个元素
-            return jsonData.map(item => this.removeFields(item, fieldsToRemove));
-        } else {
-            // 如果是对象,则遍历键值对
-            for (var key in jsonData) {
-                if (jsonData.hasOwnProperty(key)) {
-                    if (fieldsToRemove.includes(key)) {
-                        // 如果字段名在指定的要删除的字段数组中,则删除该字段
-                        delete jsonData[key];
-                    } else {
-                        // 否则递归处理字段值
-                        jsonData[key] = this.removeFields(jsonData[key], fieldsToRemove);
-                    }
-                }
+      if (typeof jsonData !== 'object' || jsonData === null) {
+        // 如果传入的不是对象,则直接返回
+        return jsonData
+      } else if (Array.isArray(jsonData)) {
+        // 如果是数组,则递归处理每个元素
+        return jsonData.map(item => this.removeFields(item, fieldsToRemove))
+      } else {
+        // 如果是对象,则遍历键值对
+        for (var key in jsonData) {
+          if (jsonData.hasOwnProperty(key)) {
+            if (fieldsToRemove.includes(key)) {
+              // 如果字段名在指定的要删除的字段数组中,则删除该字段
+              delete jsonData[key]
+            } else {
+              // 否则递归处理字段值
+              jsonData[key] = this.removeFields(jsonData[key], fieldsToRemove)
             }
-            return jsonData;
+          }
         }
+        return jsonData
+      }
     }
   }
 }

+ 13 - 11
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/copyInfo.vue

@@ -48,17 +48,19 @@ export default {
       if (this.cpText) {
         return this.cpText
       }
-      return this.info.map(item => {
-        return `${item.formItemAttributes.label}: ${
-          item.getValue
-            ? item.getValue() || ''
-            : item.formItemAttributes.prop && item.formItemAttributes.prop !== '_'
-            ? item.options && this.orderInfo[item.formItemAttributes.prop]
-              ? item.options.find(val => val.value === this.orderInfo[item.formItemAttributes.prop])?.label || ''
-              : this.orderInfo[item.formItemAttributes.prop] || ''
-            : ''
-        }`
-      }).join(nrBR)
+      return this.info
+        .map(item => {
+          return `${item.formItemAttributes.label}: ${
+            item.getValue
+              ? item.getValue() || ''
+              : item.formItemAttributes.prop && item.formItemAttributes.prop !== '_'
+              ? item.options && this.orderInfo[item.formItemAttributes.prop]
+                ? item.options.find(val => val.value === this.orderInfo[item.formItemAttributes.prop])?.label || ''
+                : this.orderInfo[item.formItemAttributes.prop] || ''
+              : ''
+          }`
+        })
+        .join(nrBR)
     },
     // 绑定复制功能
     textCopy() {

+ 103 - 85
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/processFeedback.vue

@@ -1,11 +1,26 @@
 <template>
   <div class="withinLine">
     <el-button type="primary" size="mini" @click="open">{{ resultCodeName }}</el-button>
-    <el-dialog title="" width="750px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
-      :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
+    <el-dialog
+      title=""
+      width="750px"
+      custom-class="diy-dialog"
+      append-to-body
+      :modal="true"
+      :visible.sync="formDialog"
+      :show-close="true"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      :before-close="formCancel"
+    >
       <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
-        <zj-form-module :title="resultCodeName" label-width="140px" :showPackUp="false" :form-data="formData"
-          :form-items="formItems">
+        <zj-form-module
+          :title="resultCodeName"
+          label-width="140px"
+          :showPackUp="false"
+          :form-data="formData"
+          :form-items="formItems"
+        >
         </zj-form-module>
       </zj-form-container>
       <div slot="footer" class="dialog-footer">
@@ -20,7 +35,7 @@
 import buttonMixin from './button_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { required } from '@/components/template/rules_verify.js'
-import { orderBaseLogAdd } from "@/api/workOrderPool.js"
+import { orderBaseLogAdd } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   components: {
@@ -41,16 +56,14 @@ export default {
       type: this.resultCode ? [this.resultCode] : ['其他', '预约', '改约', '异常反馈', '完工反馈', '回访'],
       formDialog: false,
       formData: {
-        "orderBaseId": this.orderInfo.id,
-        "imgSrc": [],
-        "content": "",
-        "appointmentTime": "",
-        "type": this.resultCode,
-        "typeText": this.resultCode
-      },
-      formRules: {
-
+        orderBaseId: this.orderInfo.id,
+        imgSrc: [],
+        content: '',
+        appointmentTime: '',
+        type: this.resultCode,
+        typeText: this.resultCode
       },
+      formRules: {}
     }
   },
   computed: {
@@ -59,63 +72,66 @@ export default {
       return JSON.parse(localStorage.getItem('greemall_user'))
     },
     formItems() {
-      return [{
-        md: 24,
-        name: 'el-radio',
-        options: this.type.map(item => ({ label: item, value: item })),
-        attributes: {},
-        formItemAttributes: {
-          label: '反馈结果',
-          prop: 'type',
-          rules: [...required]
-        },
-        event: {
-          change: (val) => {
-            this.formData.typeText = this.formData.type
+      return [
+        {
+          md: 24,
+          name: 'el-radio',
+          options: this.type.map(item => ({ label: item, value: item })),
+          attributes: {},
+          formItemAttributes: {
+            label: '反馈结果',
+            prop: 'type',
+            rules: [...required]
+          },
+          event: {
+            change: val => {
+              this.formData.typeText = this.formData.type
+            }
           }
-        }
-      }, {
-        name: 'el-date-picker',
-        md: 12,
-        isShow: !!~['预约', '改约'].indexOf(this.formData.type),
-        attributes: {
-          style: { width: '100%' },
-          placeholder: '请选择',
-          'value-format': 'yyyy-MM-dd HH:mm:ss',
-          'picker-options': {
-            disabledDate: time => {
-              return time.getTime() < (Date.now() - 86400000)
+        },
+        {
+          name: 'el-date-picker',
+          md: 12,
+          isShow: !!~['预约', '改约'].indexOf(this.formData.type),
+          attributes: {
+            style: { width: '100%' },
+            placeholder: '请选择',
+            'value-format': 'yyyy-MM-dd HH:mm:ss',
+            'picker-options': {
+              disabledDate: time => {
+                return time.getTime() < Date.now() - 86400000
+              }
             }
+          },
+          formItemAttributes: {
+            label: '预约日期',
+            prop: 'appointmentTime',
+            rules: [...required]
           }
         },
-        formItemAttributes: {
-          label: '预约日期',
-          prop: 'appointmentTime',
-          rules: [...required]
-        }
-      }, {
-        md: 24,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "textarea" },
-        formItemAttributes: {
-          label: '反馈内容',
-          prop: 'content',
-          rules: !~['预约', '改约', '完工反馈', '回访'].indexOf(this.formData.type) ? [...required] : []
-        }
-      }, {
-        md: 24,
-        name: 'slot-component',
-        formItemAttributes: {
-          label: '上传图片(最多6个)',
-          prop: 'imgSrc',
-          rules: []
+        {
+          md: 24,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'textarea' },
+          formItemAttributes: {
+            label: '反馈内容',
+            prop: 'content',
+            rules: !~['预约', '改约', '完工反馈', '回访'].indexOf(this.formData.type) ? [...required] : []
+          }
         },
-        render: (h, { props, onInput }) => {
-          return (
-            <ImageUpload fileList={this.formData.imgSrc} limit={6} fileType={["image"]}/>
-          )
+        {
+          md: 24,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '上传图片(最多6个)',
+            prop: 'imgSrc',
+            rules: []
+          },
+          render: (h, { props, onInput }) => {
+            return <ImageUpload fileList={this.formData.imgSrc} limit={6} fileType={['image']} />
+          }
         }
-      }]
+      ]
     }
   },
   methods: {
@@ -125,12 +141,12 @@ export default {
     formCancel() {
       this.formDialog = false
       this.formData = {
-        "orderBaseId": this.orderInfo.id,
-        "imgSrc": [],
-        "content": "",
-        "appointmentTime": "",
-        "type": this.resultCode,
-        "typeText": this.resultCode
+        orderBaseId: this.orderInfo.id,
+        imgSrc: [],
+        content: '',
+        appointmentTime: '',
+        type: this.resultCode,
+        typeText: this.resultCode
       }
     },
     formConfirm() {
@@ -139,21 +155,23 @@ export default {
           this.lockBtn()
           orderBaseLogAdd({
             ...this.formData,
-            imgSrc: this.formData.imgSrc.map(item => item.url).join(",")
-          }).then(res => {
-            this.unlockBtn()
-            // 编辑保存后不跳转列表,刷新数据
-            this.acquireVerify(this, 'getorderDetail')()
-            // 刷新操作记录
-            this.acquireVerify(this, 'getOrderBaseLogList')()
-            this.$message({
-              type: 'success',
-              message: '反馈成功'
-            })
-            this.formCancel()
-          }).catch(() => {
-            this.unlockBtn()
+            imgSrc: this.formData.imgSrc.map(item => item.url).join(',')
           })
+            .then(res => {
+              this.unlockBtn()
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '反馈成功'
+              })
+              this.formCancel()
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
         }
       })
     }

+ 20 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/unurgent.vue

@@ -7,7 +7,7 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { MessageBox } from '@zjlib/element-ui2'
-import { orderBaseFlag } from "@/api/workOrderPool.js"
+import { orderBaseFlag } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   methods: {
@@ -17,23 +17,27 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        orderBaseFlag({ flag: false, orderBaseId: this.orderInfo.id, orderFlagEnum: "JIA_JI" }).then(res => {
-          this.unlockBtn()
-          // 编辑保存后不跳转列表,刷新数据
-          this.acquireVerify(this, 'getorderDetail')()
-          // 刷新操作记录
-          this.acquireVerify(this, 'getOrderBaseLogList')()
-          this.$message({
-            type: 'success',
-            message: '取消加急成功!'
-          })
-        }).catch(() => {
+      })
+        .then(() => {
+          orderBaseFlag({ flag: false, orderBaseId: this.orderInfo.id, orderFlagEnum: 'JIA_JI' })
+            .then(res => {
+              this.unlockBtn()
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '取消加急成功!'
+              })
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
+        })
+        .catch(() => {
           this.unlockBtn()
         })
-      }).catch(() => {
-        this.unlockBtn()
-      })
     }
   }
 }

+ 20 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/urgent.vue

@@ -7,7 +7,7 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { MessageBox } from '@zjlib/element-ui2'
-import { orderBaseFlag } from "@/api/workOrderPool.js"
+import { orderBaseFlag } from '@/api/workOrderPool.js'
 export default {
   mixins: [buttonMixin],
   methods: {
@@ -17,23 +17,27 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        orderBaseFlag({ flag: true, orderBaseId: this.orderInfo.id, orderFlagEnum: "JIA_JI" }).then(res => {
-          this.unlockBtn()
-          // 编辑保存后不跳转列表,刷新数据
-          this.acquireVerify(this, 'getorderDetail')()
-          // 刷新操作记录
-          this.acquireVerify(this, 'getOrderBaseLogList')()
-          this.$message({
-            type: 'success',
-            message: '加急成功!'
-          })
-        }).catch(() => {
+      })
+        .then(() => {
+          orderBaseFlag({ flag: true, orderBaseId: this.orderInfo.id, orderFlagEnum: 'JIA_JI' })
+            .then(res => {
+              this.unlockBtn()
+              // 编辑保存后不跳转列表,刷新数据
+              this.acquireVerify(this, 'getorderDetail')()
+              // 刷新操作记录
+              this.acquireVerify(this, 'getOrderBaseLogList')()
+              this.$message({
+                type: 'success',
+                message: '加急成功!'
+              })
+            })
+            .catch(() => {
+              this.unlockBtn()
+            })
+        })
+        .catch(() => {
           this.unlockBtn()
         })
-      }).catch(() => {
-        this.unlockBtn()
-      })
     }
   }
 }

+ 33 - 12
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue

@@ -1,16 +1,24 @@
 <template>
   <zj-page-container v-if="orderInfo">
     <zj-page-fill class="neibuview">
-      <zj-form-container ref="formRef" :form-data="orderInfo" :form-rules="formRules" :form-attributes="{ size: 'mini' }">
+      <zj-form-container
+        ref="formRef"
+        :form-data="orderInfo"
+        :form-rules="formRules"
+        :form-attributes="{ size: 'mini' }"
+      >
         <!-- 派工信息 创建不需要 -->
         <zj-form-module v-if="id" title="派工信息" label-width="90px" :form-data="orderInfo" :form-items="dispatchInfo">
-          <div slot="internal-bottom" style="text-align: right;">
+          <div slot="internal-bottom" style="text-align: right">
             <copy-info text="复制工单信息" :info="dispatchInfo" :order-info="orderInfo" />
           </div>
           <div slot="right" style="width: 55%; position: relative">
             <div class="pgxxTable">
-              <zj-table :columns="logColumns" :table-data="logList"
-                :table-attributes="{ height: '100%', border: true }" />
+              <zj-table
+                :columns="logColumns"
+                :table-data="logList"
+                :table-attributes="{ height: '100%', border: true }"
+              />
             </div>
           </div>
         </zj-form-module>
@@ -19,7 +27,11 @@
         <!-- 服务信息 -->
         <zj-form-module title="服务信息" label-width="110px" :form-data="orderInfo" :form-items="serviceInfo" />
         <!-- 产品信息 -->
-        <zj-form-module title="产品信息" :form-data="orderInfo" :form-items="workOrderType == 4 ? product_wb : product" />
+        <zj-form-module
+          title="产品信息"
+          :form-data="orderInfo"
+          :form-items="workOrderType == 4 ? product_wb : product"
+        />
         <!-- 其它信息 -->
         <!-- <zj-form-module title="其它信息" :form-data="orderInfo" :form-items="otherInfo" /> -->
         <!-- 派单信息 -->
@@ -34,8 +46,12 @@
         <!-- 1,保存  -->
         <commitSave v-if="~btnRestrict.indexOf(1)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 2,过程反馈  -->
-        <processFeedback v-if="~btnRestrict.indexOf(2)" resultCodeName="过程反馈" :orderInfo="orderInfo"
-          :orderType="orderType" />
+        <processFeedback
+          v-if="~btnRestrict.indexOf(2)"
+          resultCodeName="过程反馈"
+          :orderInfo="orderInfo"
+          :orderType="orderType"
+        />
         <!-- 3,设为异常  -->
         <abnormal v-if="~btnRestrict.indexOf(3)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 4,加急  -->
@@ -45,14 +61,19 @@
         <!-- 6,取消工单  -->
         <cancelOrder v-if="~btnRestrict.indexOf(6)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 7,回访  -->
-        <processFeedback v-if="~btnRestrict.indexOf(7)" resultCodeName="回访" resultCode="回访" :orderInfo="orderInfo"
-          :orderType="orderType" />
+        <processFeedback
+          v-if="~btnRestrict.indexOf(7)"
+          resultCodeName="回访"
+          resultCode="回访"
+          :orderInfo="orderInfo"
+          :orderType="orderType"
+        />
         <!-- 8,新建工单 -->
         <!-- 9,工单驳回 -->
         <orderReject v-if="~btnRestrict.indexOf(9)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 10,激活工单 -->
         <activateOrder v-if="~btnRestrict.indexOf(10)" :orderInfo="orderInfo" :orderType="orderType" />
-        <cloneWorkOrderBtn :orderInfo="orderInfo" :orderType="orderType"/>
+        <cloneWorkOrderBtn :orderInfo="orderInfo" :orderType="orderType" />
       </div>
       <div style="box-sizing: border-box; padding: 10px 10px 0" v-else>
         <!-- 关闭 -->
@@ -129,11 +150,11 @@ export default {
   box-sizing: border-box;
   padding-left: 16px;
 
-  ::v-deep &>.zj-page-fill-scroll {
+  ::v-deep & > .zj-page-fill-scroll {
     box-sizing: border-box;
     padding-right: 16px;
 
-    &>div:nth-child(1) {
+    & > div:nth-child(1) {
       margin-top: 20px;
     }
   }

+ 152 - 122
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js

@@ -1,6 +1,6 @@
 import { lbsAmapRegion } from '@/api/common.js'
-import { listPageV2, getDetail } from "@/api/engineeringMaintenance/basicData";
-import { orderEnginbaseList } from "@/api/basicEngineeringData";
+import { listPageV2, getDetail } from '@/api/engineeringMaintenance/basicData'
+import { orderEnginbaseList } from '@/api/basicEngineeringData'
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 export default {
   data() {
@@ -14,41 +14,41 @@ export default {
     }
   },
   created() {
-    function getTimef(sfm = "00:00:00") {
-      var currentDate = new Date();
-      var year = currentDate.getFullYear();
-      var month = ('0' + (currentDate.getMonth() + 1)).slice(-2); // 月份从0开始,需要加1
-      var day = ('0' + currentDate.getDate()).slice(-2);
+    function getTimef(sfm = '00:00:00') {
+      var currentDate = new Date()
+      var year = currentDate.getFullYear()
+      var month = ('0' + (currentDate.getMonth() + 1)).slice(-2) // 月份从0开始,需要加1
+      var day = ('0' + currentDate.getDate()).slice(-2)
       return year + '-' + month + '-' + day + ' ' + sfm
     }
     // 获取工程下拉
     orderEnginbaseList({
-      "pageNum": 1,
-      "pageSize": -1,
-      "params": []
+      pageNum: 1,
+      pageSize: -1,
+      params: []
     }).then(res => {
       this.gc_project = res.data.records.map(item => {
         return {
           value: item.projectNo,
           label: item.projectName,
-          data: item,
+          data: item
         }
       })
     })
     // 获取维保下拉
     listPageV2({
-      "pageNum": 1,
-      "pageSize": -1,
-      "params": [
-        { "param": "a.start_time", "compare": "<=", "value": getTimef() },
-        { "param": "a.end_time", "compare": ">=", "value": getTimef() }
+      pageNum: 1,
+      pageSize: -1,
+      params: [
+        { param: 'a.start_time', compare: '<=', value: getTimef() },
+        { param: 'a.end_time', compare: '>=', value: getTimef() }
       ]
     }).then(res => {
       this.wb_project = res.data.records.map(item => {
         return {
           value: item.id,
           label: item.projectName,
-          data: item,
+          data: item
         }
       })
     })
@@ -59,106 +59,112 @@ export default {
       return [
         ...(() => {
           if (this.workOrderType == 4) {
-            return [{
-              isShow: this.formOptions.rpProjectRepairId.isShow,
-              name: 'el-select',
-              md: 12,
-              options: this.wb_project,
-              attributes: {
-                disabled: !this.formOptions.rpProjectRepairId.isEdit,
-                placeholder: '请选择',
-                clearable: true,
-                filterable: true
-              },
-              formItemAttributes: {
-                label: '维保项目',
-                prop: 'rpProjectRepairId',
-                rules: this.formOptions.rpProjectRepairId.isRules
-              },
-              events: {
-                change: (val) => {
-                  this.getorderDetail(() => {
-                    if (val) {
-                      this.orderInfo.rpProjectRepairId = val
-                      this.orderInfo.rpProjectRepairName = this.wb_project.find(item => item.value == val).label
-                      this.getWeiBaoDetail()
-                    }
-                  })
+            return [
+              {
+                isShow: this.formOptions.rpProjectRepairId.isShow,
+                name: 'el-select',
+                md: 12,
+                options: this.wb_project,
+                attributes: {
+                  disabled: !this.formOptions.rpProjectRepairId.isEdit,
+                  placeholder: '请选择',
+                  clearable: true,
+                  filterable: true
+                },
+                formItemAttributes: {
+                  label: '维保项目',
+                  prop: 'rpProjectRepairId',
+                  rules: this.formOptions.rpProjectRepairId.isRules
+                },
+                events: {
+                  change: val => {
+                    this.getorderDetail(() => {
+                      if (val) {
+                        this.orderInfo.rpProjectRepairId = val
+                        this.orderInfo.rpProjectRepairName = this.wb_project.find(item => item.value == val).label
+                        this.getWeiBaoDetail()
+                      }
+                    })
+                  }
                 }
-              }
-            }, {
-              name: 'slot-component',
-              md: 12,
-              formItemAttributes: {
-                'label-width': '0px',
-                prop: '',
               },
-              render: (h, { props }) => {
-                return null
+              {
+                name: 'slot-component',
+                md: 12,
+                formItemAttributes: {
+                  'label-width': '0px',
+                  prop: ''
+                },
+                render: (h, { props }) => {
+                  return null
+                }
               }
-            },]
+            ]
           } else if (this.workOrderType == 2) {
-            return [{
-              isShow: this.formOptions.projectNo.isShow,
-              name: 'el-select',
-              md: 12,
-              options: this.gc_project,
-              attributes: {
-                disabled: !this.formOptions.projectNo.isEdit,
-                placeholder: '请选择',
-                clearable: true,
-                filterable: true
-              },
-              formItemAttributes: {
-                label: '工程名称',
-                prop: 'projectNo',
-                rules: this.formOptions.projectNo.isRules
-              },
-              events: {
-                change: (val) => {
-                  this.getorderDetail(() => {
-                    if (val) {
-                      this.orderInfo.projectNo = val
-                      var item = this.gc_project.find(item => item.value == val)
-                      if (item) {
-                        this.orderInfo.projectName = item.label
-                        var data = item.data
-                        if (data) {
-                          this.orderInfo.userName = data.manger
-                          this.orderInfo.linkName = data.manger
-                          this.orderInfo.userMobile = data.mobile
-                          this.orderInfo.provinceId = data.provinceId
-                          this.orderInfo.province = data.province
-                          this.orderInfo.cityId = data.cityId
-                          this.orderInfo.city = data.city
-                          this.orderInfo.areaId = data.areaId
-                          this.orderInfo.area = data.area
-                          this.orderInfo.streetId = data.streetId
-                          this.orderInfo.street = data.street
-                          this.orderInfo.gpsAddress = data.gpsAddress || data.address
-                          this.orderInfo.lat = data.lat
-                          this.orderInfo.lng = data.lng
-                          this.orderInfo.address = data.address
-                          this.getinitlbslist()
+            return [
+              {
+                isShow: this.formOptions.projectNo.isShow,
+                name: 'el-select',
+                md: 12,
+                options: this.gc_project,
+                attributes: {
+                  disabled: !this.formOptions.projectNo.isEdit,
+                  placeholder: '请选择',
+                  clearable: true,
+                  filterable: true
+                },
+                formItemAttributes: {
+                  label: '工程名称',
+                  prop: 'projectNo',
+                  rules: this.formOptions.projectNo.isRules
+                },
+                events: {
+                  change: val => {
+                    this.getorderDetail(() => {
+                      if (val) {
+                        this.orderInfo.projectNo = val
+                        var item = this.gc_project.find(item => item.value == val)
+                        if (item) {
+                          this.orderInfo.projectName = item.label
+                          var data = item.data
+                          if (data) {
+                            this.orderInfo.userName = data.manger
+                            this.orderInfo.linkName = data.manger
+                            this.orderInfo.userMobile = data.mobile
+                            this.orderInfo.provinceId = data.provinceId
+                            this.orderInfo.province = data.province
+                            this.orderInfo.cityId = data.cityId
+                            this.orderInfo.city = data.city
+                            this.orderInfo.areaId = data.areaId
+                            this.orderInfo.area = data.area
+                            this.orderInfo.streetId = data.streetId
+                            this.orderInfo.street = data.street
+                            this.orderInfo.gpsAddress = data.gpsAddress || data.address
+                            this.orderInfo.lat = data.lat
+                            this.orderInfo.lng = data.lng
+                            this.orderInfo.address = data.address
+                            this.getinitlbslist()
+                          }
                         }
                       }
-                    }
-                  })
+                    })
+                  }
                 }
-              }
-            }, {
-              isShow: true,
-              name: 'el-input',
-              md: 12,
-              attributes: {
-                disabled: true,
               },
-              formItemAttributes: {
-                label: '工程编号',
-                prop: 'projectNo',
-                rules: this.formOptions.projectNo.isRules
+              {
+                isShow: true,
+                name: 'el-input',
+                md: 12,
+                attributes: {
+                  disabled: true
+                },
+                formItemAttributes: {
+                  label: '工程编号',
+                  prop: 'projectNo',
+                  rules: this.formOptions.projectNo.isRules
+                }
               }
-            }]
+            ]
           }
           return []
         })(),
@@ -173,10 +179,10 @@ export default {
             rules: this.formOptions.userName.isRules
           },
           events: {
-            input: (v) => {
+            input: v => {
               this.orderInfo.linkName = v
               if (v) {
-                this.appointVerify(["linkName"], () => { }, false)
+                this.appointVerify(['linkName'], () => {}, false)
               }
             }
           }
@@ -225,9 +231,14 @@ export default {
             errLabel: '省'
           },
           options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
-          attributes: { disabled: !this.formOptions.gpsAddress.isEdit, clearable: true, filterable: true, placeholder: '请选择' },
+          attributes: {
+            disabled: !this.formOptions.gpsAddress.isEdit,
+            clearable: true,
+            filterable: true,
+            placeholder: '请选择'
+          },
           events: {
-            change: (val) => {
+            change: val => {
               // 获取省名称
               this.orderInfo.province = this.provinceList.find(item => item.id === val)?.name || ''
               // 清除市区街道以及详细地址数据
@@ -250,9 +261,14 @@ export default {
             errLabel: '市'
           },
           options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
-          attributes: { disabled: !this.formOptions.gpsAddress.isEdit, clearable: true, filterable: true, placeholder: '请选择' },
+          attributes: {
+            disabled: !this.formOptions.gpsAddress.isEdit,
+            clearable: true,
+            filterable: true,
+            placeholder: '请选择'
+          },
           events: {
-            change: (val) => {
+            change: val => {
               // 获取市名称
               this.orderInfo.city = this.cityList.find(item => item.id === val).name
               // 清除区街道以及详细地址数据
@@ -275,9 +291,14 @@ export default {
             errLabel: '区'
           },
           options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
-          attributes: { disabled: !this.formOptions.gpsAddress.isEdit, clearable: true, filterable: true, placeholder: '请选择' },
+          attributes: {
+            disabled: !this.formOptions.gpsAddress.isEdit,
+            clearable: true,
+            filterable: true,
+            placeholder: '请选择'
+          },
           events: {
-            change: (val) => {
+            change: val => {
               // 获取区名称
               this.orderInfo.area = this.areaList.find(item => item.id === val).name
               // 清除街道以及详细地址数据
@@ -300,9 +321,14 @@ export default {
             errLabel: '街道'
           },
           options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
-          attributes: { disabled: !this.formOptions.gpsAddress.isEdit, clearable: true, filterable: true, placeholder: '请选择' },
+          attributes: {
+            disabled: !this.formOptions.gpsAddress.isEdit,
+            clearable: true,
+            filterable: true,
+            placeholder: '请选择'
+          },
           events: {
-            change: (val) => {
+            change: val => {
               // 获取街道名称
               this.orderInfo.street = this.streetList.find(item => item.id === val).name
               // 清除详细地址数据
@@ -316,7 +342,7 @@ export default {
           md: 3,
           formItemAttributes: {
             'label-width': '0px',
-            prop: '',
+            prop: ''
           },
           render: (h, { props }) => {
             return (
@@ -381,7 +407,12 @@ export default {
           isShow: this.formOptions.address.isShow,
           name: 'el-input',
           md: 11,
-          formItemAttributes: { label: '', prop: 'address', 'label-width': '0px', rules: this.formOptions.address.isRules },
+          formItemAttributes: {
+            label: '',
+            prop: 'address',
+            'label-width': '0px',
+            rules: this.formOptions.address.isRules
+          },
           attributes: { disabled: !this.formOptions.address.isEdit, placeholder: '详细地址' }
         },
         {
@@ -409,7 +440,6 @@ export default {
         getDetail({
           id: this.orderInfo.rpProjectRepairId
         }).then(res => {
-
           if (!this.id) {
             this.orderInfo.userName = res.data.manger
             this.orderInfo.linkName = res.data.manger
@@ -444,7 +474,7 @@ export default {
           this.getWorkers()
 
           // 产品信息可选项
-          this.productList_wb = (res.data.productList || [])
+          this.productList_wb = res.data.productList || []
 
           this.getinitlbslist()
         })

+ 48 - 38
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/dispatchInfo.js

@@ -1,4 +1,4 @@
-import { orderBaseLogList } from "@/api/workOrderPool.js"
+import { orderBaseLogList } from '@/api/workOrderPool.js'
 import copyInfo from '../buttons/copyInfo.vue'
 import ImageUpload from '@/components/file-upload'
 export default {
@@ -27,9 +27,15 @@ export default {
             width: 150
           },
           render: (h, { row, column, index }) => {
-            return <div style="padding: 0 10px">
-              <ImageUpload fileList={row.imgSrc ? row.imgSrc.split(",").map(url => ({ url })) : []} limit={100} isEdit={false} />
-            </div>
+            return (
+              <div style="padding: 0 10px">
+                <ImageUpload
+                  fileList={row.imgSrc ? row.imgSrc.split(',').map(url => ({ url })) : []}
+                  limit={100}
+                  isEdit={false}
+                />
+              </div>
+            )
           }
         },
         {
@@ -59,15 +65,17 @@ export default {
           md: 24,
           attributes: { disabled: true, placeholder: '请输入' },
           formItemAttributes: { label: '工单单号', prop: 'id' },
-          slots:{
+          slots: {
             append: (h, { props, onInput }) => {
-              return <copyInfo
-                btnys={true}
-                slot="append"
-                text="复制"
-                columnCopyClass="columnCopyClass_cp_888aa"
-                cpText={props?.formData?.id}
-              ></copyInfo>
+              return (
+                <copyInfo
+                  btnys={true}
+                  slot="append"
+                  text="复制"
+                  columnCopyClass="columnCopyClass_cp_888aa"
+                  cpText={props?.formData?.id}
+                ></copyInfo>
+              )
             }
           }
         },
@@ -116,33 +124,35 @@ export default {
           formItemAttributes: { label: '接单时间', prop: 'workerReceTime' }
         },
         ...(() => {
-          var list = [];
-          (this.orderInfo.orderWorkers_cp || []).map(item => {
-            list.push({
-              name: 'slot-component',
-              md: 12,
-              formItemAttributes: { label: item.isMaster == '1' ? '主要工程师' : item.isMaster == '0' ? '辅助工程师' : '', prop: '' },
-              render: (h, { props, onInput }) => {
-                return (
-                  <el-input value={item.workerName} disabled={true} size="mini" ></el-input>
-                )
-              },
-              getValue: () => {
-                return item.workerName
-              }
-            }, {
-              name: 'slot-component',
-              md: 12,
-              formItemAttributes: { label: '手机号', prop: '' },
-              render: (h, { props, onInput }) => {
-                return (
-                  <el-input value={item.workerMobile} disabled={true} size="mini" ></el-input>
-                )
+          var list = []
+          ;(this.orderInfo.orderWorkers_cp || []).map(item => {
+            list.push(
+              {
+                name: 'slot-component',
+                md: 12,
+                formItemAttributes: {
+                  label: item.isMaster == '1' ? '主要工程师' : item.isMaster == '0' ? '辅助工程师' : '',
+                  prop: ''
+                },
+                render: (h, { props, onInput }) => {
+                  return <el-input value={item.workerName} disabled={true} size="mini"></el-input>
+                },
+                getValue: () => {
+                  return item.workerName
+                }
               },
-              getValue: () => {
-                return item.workerMobile
+              {
+                name: 'slot-component',
+                md: 12,
+                formItemAttributes: { label: '手机号', prop: '' },
+                render: (h, { props, onInput }) => {
+                  return <el-input value={item.workerMobile} disabled={true} size="mini"></el-input>
+                },
+                getValue: () => {
+                  return item.workerMobile
+                }
               }
-            })
+            )
           })
           return list
         })(),
@@ -175,6 +185,6 @@ export default {
           this.logList = res.data
         })
       }
-    },
+    }
   }
 }

+ 108 - 90
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js

@@ -1,5 +1,5 @@
-import { getWebsit } from "@/api/customerManagement.js"
-import { memberListPageV2 } from "@/api/masterManagement";
+import { getWebsit } from '@/api/customerManagement.js'
+import { memberListPageV2 } from '@/api/masterManagement'
 
 export default {
   data() {
@@ -23,11 +23,7 @@ export default {
             prop: 'isMaster'
           },
           render: (h, { row, column, index }) => {
-            return (
-              <div style="padding-left:10px">
-                {row.isMaster ? '主要工程师' : '辅助工程师'}
-              </div>
-            )
+            return <div style="padding-left:10px">{row.isMaster ? '主要工程师' : '辅助工程师'}</div>
           }
         },
         {
@@ -47,18 +43,23 @@ export default {
             return [
               {
                 columnAttributes: {
-                  label: '操作',
+                  label: '操作'
                 },
                 render: (h, { row, column, index }) => {
                   return !row.isMaster ? (
                     <div style="padding-left:10px">
-                      <el-button type="text" onClick={() => {
-                        this.orderInfo.orderWorkers.splice(index, 1)
-                      }}>删除</el-button>
+                      <el-button
+                        type="text"
+                        onClick={() => {
+                          this.orderInfo.orderWorkers.splice(index, 1)
+                        }}
+                      >
+                        删除
+                      </el-button>
                     </div>
                   ) : null
                 }
-              },
+              }
             ]
           }
           return []
@@ -81,14 +82,14 @@ export default {
           formItemAttributes: {
             label: '网点名称',
             prop: 'websitId',
-            rules: this.formOptions.websitId.isRules,
+            rules: this.formOptions.websitId.isRules
           },
           events: {
-            change: (val) => {
-              this.orderInfo.workerId = ""
-              this.orderInfo.workerName = ""
-              this.orderInfo.workerIdcard = ""
-              this.orderInfo.workerMobile = ""
+            change: val => {
+              this.orderInfo.workerId = ''
+              this.orderInfo.workerName = ''
+              this.orderInfo.workerIdcard = ''
+              this.orderInfo.workerMobile = ''
               this.workerList = []
               this.orderInfo.orderWorkers = []
               this.getWorkers()
@@ -105,12 +106,12 @@ export default {
           name: 'el-switch',
           md: 8,
           attributes: {
-            disabled: !this.formOptions.isQd.isEdit,
+            disabled: !this.formOptions.isQd.isEdit
           },
           formItemAttributes: {
             label: '是否抢单',
             prop: 'isQd',
-            rules: this.formOptions.isQd.isRules,
+            rules: this.formOptions.isQd.isRules
           }
         },
         {
@@ -133,84 +134,94 @@ export default {
         },
         ...(() => {
           if (this.formOptions.workerId.isEdit) {
-            return [{
-              isShow: this.formOptions.workerId.isShow,
-              name: 'el-select',
-              options: this.workerList.filter(item => this.orderInfo.workerId == item.value || !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)),
-              md: 8,
-              attributes: {
-                disabled: !this.formOptions.workerId.isEdit,
-                placeholder: '请选择',
-                clearable: true,
-                filterable: true
-              },
-              formItemAttributes: {
-                label: '主要工程师',
-                prop: 'workerId',
-                rules: this.formOptions.workerId.isRules,
-              },
-              events: {
-                change: (val) => {
-                  var index = this.orderInfo.orderWorkers.map(item => item.isMaster).indexOf(true)
-                  if (!!~index) {
-                    this.orderInfo.orderWorkers.splice(index, 1)
-                  }
-                  if (val) {
-                    var data = this.workerList.find(item => item.value == val).data
-                    this.orderInfo.workerName = data.workerName
-                    this.orderInfo.workerIdcard = data.workerIdcard
-                    this.orderInfo.workerMobile = data.workerMobile
-                    this.orderInfo.orderWorkers.unshift({ ...data, isMaster: true })
-                    if (data.slaveWorkerId) {
-                      var data2 = this.workerList.find(item => item.value == data.slaveWorkerId).data
-                      this.orderInfo.orderWorkers.push({ ...data2, isMaster: false })
-                      this.orderInfo.workerId_fz = ""
+            return [
+              {
+                isShow: this.formOptions.workerId.isShow,
+                name: 'el-select',
+                options: this.workerList.filter(
+                  item =>
+                    this.orderInfo.workerId == item.value ||
+                    !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)
+                ),
+                md: 8,
+                attributes: {
+                  disabled: !this.formOptions.workerId.isEdit,
+                  placeholder: '请选择',
+                  clearable: true,
+                  filterable: true
+                },
+                formItemAttributes: {
+                  label: '主要工程师',
+                  prop: 'workerId',
+                  rules: this.formOptions.workerId.isRules
+                },
+                events: {
+                  change: val => {
+                    var index = this.orderInfo.orderWorkers.map(item => item.isMaster).indexOf(true)
+                    if (!!~index) {
+                      this.orderInfo.orderWorkers.splice(index, 1)
                     }
-                    if (this.orderInfo.orderWorkers.length > 1) {
-                      this.orderInfo.orderWorkers.map((item, index) => {
-                        if (index > 0) {
-                          item.isMaster = false
-                        }
-                      })
+                    if (val) {
+                      var data = this.workerList.find(item => item.value == val).data
+                      this.orderInfo.workerName = data.workerName
+                      this.orderInfo.workerIdcard = data.workerIdcard
+                      this.orderInfo.workerMobile = data.workerMobile
+                      this.orderInfo.orderWorkers.unshift({ ...data, isMaster: true })
+                      if (data.slaveWorkerId) {
+                        var data2 = this.workerList.find(item => item.value == data.slaveWorkerId).data
+                        this.orderInfo.orderWorkers.push({ ...data2, isMaster: false })
+                        this.orderInfo.workerId_fz = ''
+                      }
+                      if (this.orderInfo.orderWorkers.length > 1) {
+                        this.orderInfo.orderWorkers.map((item, index) => {
+                          if (index > 0) {
+                            item.isMaster = false
+                          }
+                        })
+                      }
+                    } else {
+                      this.orderInfo.workerName = ''
+                      this.orderInfo.workerIdcard = ''
+                      this.orderInfo.workerMobile = ''
                     }
-                  } else {
-                    this.orderInfo.workerName = ""
-                    this.orderInfo.workerIdcard = ""
-                    this.orderInfo.workerMobile = ""
                   }
                 }
               }
-            }]
+            ]
           }
           return []
         })(),
         ...(() => {
           if (this.formOptions.orderWorkers.isEdit) {
-            return [{
-              isShow: this.formOptions.orderWorkers.isEdit,
-              name: 'el-select',
-              options: this.workerList.filter(item => !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)),
-              md: 8,
-              attributes: {
-                disabled: !this.formOptions.orderWorkers.isEdit,
-                placeholder: '请选择',
-                clearable: true,
-                filterable: true
-              },
-              formItemAttributes: {
-                label: '辅助工程师',
-                prop: 'workerId_fz',
-              },
-              events: {
-                change: (val) => {
-                  if (val) {
-                    var data = this.workerList.find(item => item.value == val).data
-                    this.orderInfo.orderWorkers.push({ ...data, isMaster: false })
-                    this.orderInfo.workerId_fz = ""
+            return [
+              {
+                isShow: this.formOptions.orderWorkers.isEdit,
+                name: 'el-select',
+                options: this.workerList.filter(
+                  item => !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)
+                ),
+                md: 8,
+                attributes: {
+                  disabled: !this.formOptions.orderWorkers.isEdit,
+                  placeholder: '请选择',
+                  clearable: true,
+                  filterable: true
+                },
+                formItemAttributes: {
+                  label: '辅助工程师',
+                  prop: 'workerId_fz'
+                },
+                events: {
+                  change: val => {
+                    if (val) {
+                      var data = this.workerList.find(item => item.value == val).data
+                      this.orderInfo.orderWorkers.push({ ...data, isMaster: false })
+                      this.orderInfo.workerId_fz = ''
+                    }
                   }
                 }
               }
-            }]
+            ]
           }
           return []
         })(),
@@ -221,7 +232,7 @@ export default {
           formItemAttributes: {
             label: '已选工程师',
             prop: 'orderWorkers',
-            rules: this.formOptions.orderWorkers.isRules,
+            rules: this.formOptions.orderWorkers.isRules
           },
           render: (h, { props }) => {
             var { formData } = props
@@ -241,8 +252,8 @@ export default {
   },
   created() {
     // 普通工单选择网点数据
-    if (!!~[1,2,3].indexOf(this?.workOrderType) || this.isAllWebsit) {
-      getWebsit({ type: "C", status: true, isAll: this.isAllWebsit || this.id ? true : false }).then(res => {
+    if (!!~[1, 2, 3].indexOf(this?.workOrderType) || this.isAllWebsit) {
+      getWebsit({ type: 'C', status: true, isAll: this.isAllWebsit || this.id ? true : false }).then(res => {
         this.websitList = res.data.map(item => ({
           label: item.name,
           value: item.websitId,
@@ -254,7 +265,14 @@ export default {
   methods: {
     getWorkers() {
       if (this.orderInfo.websitId) {
-        memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.orderInfo.websitId }] }).then(res => {
+        memberListPageV2({
+          pageNum: 1,
+          pageSize: -1,
+          params: [
+            { param: 'b.examine_status', compare: '=', value: 'OK' },
+            { param: 'b.websit_id', compare: '=', value: this.orderInfo.websitId }
+          ]
+        }).then(res => {
           this.workerList = res.data.records.map(item => {
             var { id, userId, ...data } = item
             return {
@@ -272,5 +290,5 @@ export default {
         })
       }
     }
-  },
+  }
 }

+ 316 - 200
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/wb_productColumns.js

@@ -1,7 +1,12 @@
 import { getClassifyList } from '@/api/goods'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { orderBaseProductList, orderBaseProductAdd, orderBaseProductUpdate, orderBaseProductDelete } from "@/api/workOrderPool.js"
+import {
+  orderBaseProductList,
+  orderBaseProductAdd,
+  orderBaseProductUpdate,
+  orderBaseProductDelete
+} from '@/api/workOrderPool.js'
 export default {
   data() {
     return {
@@ -18,25 +23,39 @@ export default {
             prop: 'brandId'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    if (val) {
-                      var data = this.huoquweiyi('brandId', 'brandName').find(item => item.value == val)
-                      row.brandName = data.label
-                    } else {
-                      row.brandName = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {this.huoquweiyi('brandId', 'brandName').map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.brandName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
+                  rules={required}
+                >
+                  <el-select
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      if (val) {
+                        var data = this.huoquweiyi('brandId', 'brandName').find(item => item.value == val)
+                        row.brandName = data.label
+                      } else {
+                        row.brandName = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.huoquweiyi('brandId', 'brandName').map((item, index_) => (
+                      <el-option key={index_} label={item.label} value={item.value}></el-option>
+                    ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.brandName}</div>
+            )
           }
         },
         {
@@ -45,33 +64,53 @@ export default {
             prop: 'mainId'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    row.smallId = ""
-                    row.smallName = ""
-                    if (val) {
-                      var data = this.huoquweiyi('mainId', 'mainName').filter(item => {
-                        return !!this.productList_wb.filter(v => v.mainId == item.value).find(v2 => v2.brandId == row.brandId)
-                      }).find(item => item.value == val)
-                      row.mainName = data.label
-                    } else {
-                      row.mainName = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {
-                    this.huoquweiyi('mainId', 'mainName').filter(item => {
-                      return !!this.productList_wb.filter(v => v.mainId == item.value).find(v2 => v2.brandId == row.brandId)
-                    }).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)
-                  }
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.mainName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
+                  rules={required}
+                >
+                  <el-select
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      row.smallId = ''
+                      row.smallName = ''
+                      if (val) {
+                        var data = this.huoquweiyi('mainId', 'mainName')
+                          .filter(item => {
+                            return !!this.productList_wb
+                              .filter(v => v.mainId == item.value)
+                              .find(v2 => v2.brandId == row.brandId)
+                          })
+                          .find(item => item.value == val)
+                        row.mainName = data.label
+                      } else {
+                        row.mainName = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.huoquweiyi('mainId', 'mainName')
+                      .filter(item => {
+                        return !!this.productList_wb
+                          .filter(v => v.mainId == item.value)
+                          .find(v2 => v2.brandId == row.brandId)
+                      })
+                      .map((item, index_) => (
+                        <el-option key={index_} label={item.label} value={item.value}></el-option>
+                      ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.mainName}</div>
+            )
           }
         },
         {
@@ -80,33 +119,53 @@ export default {
             prop: 'smallId'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    if (val) {
-                      var data = this.huoquweiyi('smallId', 'smallName', "smallImg").filter(item => {
-                        return !!this.productList_wb.filter(v => v.smallId == item.value).find(v2 => v2.brandId == row.brandId && v2.mainId == row.mainId)
-                      }).find(item => item.value == val)
-                      row.smallName = data.label
-                      row.imgUrl = data.smallImg
-                    } else {
-                      row.smallName = ""
-                      row.imgUrl = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {
-                    this.huoquweiyi('smallId', 'smallName', "smallImg").filter(item => {
-                      return !!this.productList_wb.filter(v => v.smallId == item.value).find(v2 => v2.brandId == row.brandId && v2.mainId == row.mainId)
-                    }).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)
-                  }
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.smallName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
+                  rules={required}
+                >
+                  <el-select
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      if (val) {
+                        var data = this.huoquweiyi('smallId', 'smallName', 'smallImg')
+                          .filter(item => {
+                            return !!this.productList_wb
+                              .filter(v => v.smallId == item.value)
+                              .find(v2 => v2.brandId == row.brandId && v2.mainId == row.mainId)
+                          })
+                          .find(item => item.value == val)
+                        row.smallName = data.label
+                        row.imgUrl = data.smallImg
+                      } else {
+                        row.smallName = ''
+                        row.imgUrl = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.huoquweiyi('smallId', 'smallName', 'smallImg')
+                      .filter(item => {
+                        return !!this.productList_wb
+                          .filter(v => v.smallId == item.value)
+                          .find(v2 => v2.brandId == row.brandId && v2.mainId == row.mainId)
+                      })
+                      .map((item, index_) => (
+                        <el-option key={index_} label={item.label} value={item.value}></el-option>
+                      ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.smallName}</div>
+            )
           }
         },
         {
@@ -115,17 +174,26 @@ export default {
             prop: 'productName'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`}>
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
                 >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
         },
         {
@@ -134,17 +202,22 @@ export default {
             prop: 'insideCode'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px">
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
-                >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item label="" label-width="0px">
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
         },
         {
@@ -153,17 +226,27 @@ export default {
             prop: 'num'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
+                  rules={required}
                 >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
         },
         {
@@ -172,17 +255,22 @@ export default {
             prop: 'remark'
           },
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px">
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
-                >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item label="" label-width="0px">
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
         },
         ...(() => {
@@ -190,22 +278,43 @@ export default {
             return [
               {
                 columnAttributes: {
-                  label: '操作',
+                  label: '操作'
                 },
                 render: (h, { row, column, index }) => {
-                  return <div style="padding-left:10px">
-                    <el-button type="text" onClick={() => {
-                      this.delProduct_wb(row, index)
-                    }}>删除</el-button>
-                    {this.isEditIndex == index && <el-button type="text" onClick={() => {
-                      this.eidtProduct_wb(row, index)
-                    }}>确定</el-button>}
-                    {this.isEditIndex == -1 && <el-button type="text" onClick={() => {
-                      this.isEditIndex = index
-                    }}>编辑</el-button>}
-                  </div>
+                  return (
+                    <div style="padding-left:10px">
+                      <el-button
+                        type="text"
+                        onClick={() => {
+                          this.delProduct_wb(row, index)
+                        }}
+                      >
+                        删除
+                      </el-button>
+                      {this.isEditIndex == index && (
+                        <el-button
+                          type="text"
+                          onClick={() => {
+                            this.eidtProduct_wb(row, index)
+                          }}
+                        >
+                          确定
+                        </el-button>
+                      )}
+                      {this.isEditIndex == -1 && (
+                        <el-button
+                          type="text"
+                          onClick={() => {
+                            this.isEditIndex = index
+                          }}
+                        >
+                          编辑
+                        </el-button>
+                      )}
+                    </div>
+                  )
                 }
-              },
+              }
             ]
           }
           return []
@@ -213,70 +322,78 @@ export default {
       ]
     },
     product_wb() {
-      return [{
-        isShow: this.formOptions.orderProducts.isShow,
-        name: 'slot-component',
-        md: 24,
-        formItemAttributes: {
-          label: '',
-          'label-width': '0px',
-          prop: 'orderProducts',
-          errLabel: '产品信息',
-          rules: this.formOptions.orderProducts.isRules
-        },
-        render: (h, { props }) => {
-          return (
-            <div>
-              {this.formOptions.orderProducts.isEdit ? <div>
-                <el-button size="mini" type="primary" onClick={() => {
-                  this.appointVerify(this.getVfyKey_wb(this.isEditIndex, false), (v) => {
-                    if (v) {
-                      try {
-                        this.orderInfo.orderProducts.map((item, index_) => {
-                          var row = this.orderInfo.orderProducts[index_ + 1]
-                          if (row) {
-                            if (
-                              `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` == `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}`
-                            ) {
-                              throw new Error('');
+      return [
+        {
+          isShow: this.formOptions.orderProducts.isShow,
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            label: '',
+            'label-width': '0px',
+            prop: 'orderProducts',
+            errLabel: '产品信息',
+            rules: this.formOptions.orderProducts.isRules
+          },
+          render: (h, { props }) => {
+            return (
+              <div>
+                {this.formOptions.orderProducts.isEdit ? (
+                  <div>
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      onClick={() => {
+                        this.appointVerify(this.getVfyKey_wb(this.isEditIndex, false), v => {
+                          if (v) {
+                            try {
+                              this.orderInfo.orderProducts.map((item, index_) => {
+                                var row = this.orderInfo.orderProducts[index_ + 1]
+                                if (row) {
+                                  if (
+                                    `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` ==
+                                    `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}`
+                                  ) {
+                                    throw new Error('')
+                                  }
+                                }
+                              })
+                            } catch (error) {
+                              this.$message.warning('产品机型重复')
+                              return
                             }
+                            this.isEditIndex = 0
+                            this.orderInfo.orderProducts.unshift({
+                              brandId: '',
+                              brandName: '',
+                              createBy: '',
+                              createTime: '',
+                              mainId: '',
+                              mainName: '',
+                              num: '',
+                              insideCode: '',
+                              orderBaseId: this.id || '',
+                              productId: '',
+                              productName: '',
+                              remark: '',
+                              smallId: '',
+                              smallName: '',
+                              imgUrl: ''
+                            })
                           }
                         })
-                      } catch (error) {
-                        this.$message.warning('产品机型重复')
-                        return
-                      }
-                      this.isEditIndex = 0
-                      this.orderInfo.orderProducts.unshift({
-                        "brandId": "",
-                        "brandName": "",
-                        "createBy": "",
-                        "createTime": "",
-                        "mainId": "",
-                        "mainName": "",
-                        "num": "",
-                        "insideCode": "",
-                        "orderBaseId": this.id || '',
-                        "productId": "",
-                        "productName": "",
-                        "remark": "",
-                        "smallId": "",
-                        "smallName": "",
-                        "imgUrl": ""
-                      })
-                    }
-                  })
-                }}>新增</el-button>
-              </div> : null}
-              <zj-table
-                columns={this.productColumns_wb}
-                table-data={this.orderInfo.orderProducts}
-              />
-            </div>
-          )
+                      }}
+                    >
+                      新增
+                    </el-button>
+                  </div>
+                ) : null}
+                <zj-table columns={this.productColumns_wb} table-data={this.orderInfo.orderProducts} />
+              </div>
+            )
+          }
         }
-      }]
-    },
+      ]
+    }
   },
   methods: {
     huoquweiyi(value, label, ...keys) {
@@ -300,9 +417,7 @@ export default {
       return [
         ...(() => {
           if (bool) {
-            return [
-              `orderProducts`,
-            ]
+            return [`orderProducts`]
           }
           return []
         })(),
@@ -314,7 +429,7 @@ export default {
               `orderProducts.${index}.smallId`,
               `orderProducts.${index}.productName`,
               `orderProducts.${index}.num`,
-              `orderProducts.${index}.remark`,
+              `orderProducts.${index}.remark`
             ]
           }
           return []
@@ -326,7 +441,7 @@ export default {
       if (this.id) {
         orderBaseProductList({
           orderBaseId: this.id
-        }).then((res) => {
+        }).then(res => {
           this.orderInfo.orderProducts = res.data || []
         })
       }
@@ -335,20 +450,21 @@ export default {
       try {
         this.orderInfo.orderProducts.map((item, index_) => {
           if (
-            `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` == `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}` &&
+            `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` ==
+              `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}` &&
             index_ != index
           ) {
-            throw new Error('');
+            throw new Error('')
           }
         })
       } catch (error) {
         this.$message.warning('产品机型重复')
         return
       }
-      this.appointVerify(this.getVfyKey_wb(this.isEditIndex), (v) => {
+      this.appointVerify(this.getVfyKey_wb(this.isEditIndex), v => {
         if (v) {
           if (this.id) {
-            [orderBaseProductAdd, orderBaseProductUpdate][row.id ? 1 : 0](row).then(res => {
+            ;[orderBaseProductAdd, orderBaseProductUpdate][row.id ? 1 : 0](row).then(res => {
               this.isEditIndex = -1
               this.getOrderBaseProduct_wb()
               this.getOrderBaseLogList()
@@ -360,7 +476,7 @@ export default {
       })
     },
     delProduct_wb(row, index) {
-      this.appointVerify(this.getVfyKey_wb(this.isEditIndex), (v) => {
+      this.appointVerify(this.getVfyKey_wb(this.isEditIndex), v => {
         if (v && this.id && row.id) {
           orderBaseProductDelete({
             orderProductId: row.id
@@ -373,5 +489,5 @@ export default {
         }
       })
     }
-  },
+  }
 }

+ 70 - 70
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -1,56 +1,56 @@
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { orderBaseDetail, orderBaseProductList } from "@/api/workOrderPool.js"
+import { orderBaseDetail, orderBaseProductList } from '@/api/workOrderPool.js'
 var initdata_ = {
   // 基础信息--------------------
   // 维保项目
-  rpProjectRepairId: "",
+  rpProjectRepairId: '',
   // 工程编号
-  projectNo: "",
+  projectNo: '',
   // 工程名称
-  projectName: "",
+  projectName: '',
   // 客户名称
-  userName: "",
+  userName: '',
   // 联系人
-  linkName: "",
+  linkName: '',
   // 客户电话
-  userMobile: "",
+  userMobile: '',
   // 客户电话2
-  userMobile2: "",
+  userMobile2: '',
   // 省
-  provinceId: "",
+  provinceId: '',
   // 市
-  cityId: "",
+  cityId: '',
   // 区
-  areaId: "",
+  areaId: '',
   // 街道
-  streetId: "",
+  streetId: '',
   // gps地址
-  gpsAddress: "",
+  gpsAddress: '',
   // 详细地址
-  address: "",
+  address: '',
   // 服务信息--------------------------------
   // 工单类型
-  orderSmallType: "",
+  orderSmallType: '',
   // 工单来源
-  orderChannelId: "",
+  orderChannelId: '',
   // 预约上门日期
-  appointmentTime: "",
+  appointmentTime: '',
   // 销售单位
-  saleCompany: "",
-  source: "",
-  saleType: "",
+  saleCompany: '',
+  source: '',
+  saleType: '',
   // 产品信息------------------------
   orderProducts: [],
   // 其它信息------------------------
   // 备注
-  remark: "",
+  remark: '',
   // 派单信息-----------------------------
   // 服务商网点
-  websitId: "",
+  websitId: '',
   // 是否抢单
   isQd: false,
   // 主要工程师id
-  workerId: "",
+  workerId: '',
   // 工程师列表
   orderWorkers: [],
   orderWorkers_cp: [],
@@ -62,26 +62,26 @@ export default {
   props: {
     id: {
       type: [String, Number],
-      default: null,
+      default: null
     },
     workOrderType: {
       type: Number,
-      default: 1, // 1普通工单, 4维保工单
+      default: 1 // 1普通工单, 4维保工单
     },
     cloneWorkOrder: {
       type: Object,
-      default: null,
-    },
+      default: null
+    }
   },
   data() {
     return {
-      orderInfo: null,
+      orderInfo: null
     }
   },
   watch: {
     id: {
       handler(newVal, oldVal) {
-        this.getorderDetail((data) => {
+        this.getorderDetail(data => {
           if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
             this.$nextTick(() => {
               // 获取地址信息
@@ -99,8 +99,8 @@ export default {
         this.getOrderBaseLogList()
       },
       deep: true,
-      immediate: true,
-    },
+      immediate: true
+    }
   },
   computed: {
     // 用户信息
@@ -110,7 +110,6 @@ export default {
     // 判断工单状态
     orderType() {
       if (this.orderInfo) {
-
       }
       return -1
     },
@@ -119,39 +118,40 @@ export default {
       // 1,保存 2,过程反馈 3,设为异常 4,加急 5,不加急 6,取消工单 7,回访 8,新建工单 9,工单驳回 10,激活工单
       var btns = []
       if (this.orderInfo) {
-        btns = ({
-          // 待预约
-          DYY: [],
-          // 待商户派工
-          DSHPG: [1, 2, 4, 5, 6],
-          // 待网点派工
-          DWDPG: [1, 2, 4, 5, 6],
-          // 待接单
-          DJD: [1, 2, 4, 5, 6],
-          // 服务中
-          FWZ: [1, 2, 3, 4, 5, 6],
-          // 异常单
-          YCD: [1, 2, 6],
-          // 已完工待结算
-          YWG: [7, 8, 9],
-          // 已结算
-          YJS: [],
-          // 已取消
-          YQX: [10],
-          // 待抢单
-          DQD:[1, 2, 4, 5, 6],
-        }[this.orderInfo.orderStatus]) || []
+        btns =
+          {
+            // 待预约
+            DYY: [],
+            // 待商户派工
+            DSHPG: [1, 2, 4, 5, 6],
+            // 待网点派工
+            DWDPG: [1, 2, 4, 5, 6],
+            // 待接单
+            DJD: [1, 2, 4, 5, 6],
+            // 服务中
+            FWZ: [1, 2, 3, 4, 5, 6],
+            // 异常单
+            YCD: [1, 2, 6],
+            // 已完工待结算
+            YWG: [7, 8, 9],
+            // 已结算
+            YJS: [],
+            // 已取消
+            YQX: [10],
+            // 待抢单
+            DQD: [1, 2, 4, 5, 6]
+          }[this.orderInfo.orderStatus] || []
       }
 
       // 已经加急
-      if ((this.orderInfo.orderFlags||[]).find(item => item.tag == 'JIA_JI')) {
+      if ((this.orderInfo.orderFlags || []).find(item => item.tag == 'JIA_JI')) {
         btns = btns.filter(item => !new Set([4]).has(item))
       } else {
         btns = btns.filter(item => !new Set([5]).has(item))
       }
 
       // 已经异常
-      if ((this.orderInfo.orderFlags||[]).find(item => item.tag == 'YI_CHANGE')) {
+      if ((this.orderInfo.orderFlags || []).find(item => item.tag == 'YI_CHANGE')) {
         btns = btns.filter(item => !new Set([3]).has(item))
       }
 
@@ -282,7 +282,7 @@ export default {
           isEdit: !finish,
           isShow: true,
           isRules: this.userInfo.type != 1 && !this.orderInfo.isQd ? [...required] : []
-        },
+        }
       }
     },
     // 表单校验规则
@@ -302,28 +302,28 @@ export default {
           orderBaseProductList({
             orderBaseId: this.id
           })
-        ])
-          .then(([res, res1]) => {
-            this.orderInfo = {
-              ...res.data,
-              orderWorkers_cp: [...(res.data.orderWorkers || []).map(item => ({ ...item }))],
-              orderProducts: res1.data || [],
-              workerId_fz: "",
-            }
-            cb && cb(this.orderInfo)
-          })
-      } if(this.cloneWorkOrder){
+        ]).then(([res, res1]) => {
+          this.orderInfo = {
+            ...res.data,
+            orderWorkers_cp: [...(res.data.orderWorkers || []).map(item => ({ ...item }))],
+            orderProducts: res1.data || [],
+            workerId_fz: ''
+          }
+          cb && cb(this.orderInfo)
+        })
+      }
+      if (this.cloneWorkOrder) {
         // 创建工单
         this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(this.cloneWorkOrder)), {
           saleType: this?.workOrderType,
-          workerId_fz: ""
+          workerId_fz: ''
         })
         cb && cb(this.orderInfo)
       } else {
         // 创建工单
         this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(initdata_)), {
           saleType: this?.workOrderType,
-          workerId_fz: ""
+          workerId_fz: ''
         })
         cb && cb(this.orderInfo)
       }

+ 9 - 0
src/views/workOrder/workOrderPool/index.vue

@@ -480,6 +480,9 @@ export default {
     operation() {
       return this.operationBtn({
         edit: {
+          conditions: ({ row, index, column }) => {
+            return true
+          },
           click: ({ row, index, column }) => {
             this.id = row.id
             this.workOrderType = Number(
@@ -489,6 +492,12 @@ export default {
               this.detailFormBool = true
             })
           }
+        },
+        view: {
+          conditions: ({ row, index, column }) => {
+            return true
+          },
+          click: ({ row, index, column }) => {}
         }
       })
     },