| 
					
				 | 
			
			
				@@ -1,4 +1,4 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<!--  订单新增或修改 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<!--  任务单新增或修改 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class="my-title">{{ !id ? '新增': display ? '详情' : '修改' }}</div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -212,7 +212,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="productName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="taskType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               min-width="80" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -220,53 +220,52 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="工单类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="productSpecifications" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="taskName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              min-width="120" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              width="120" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :show-tooltip-when-overflow="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="工单名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="cnt" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="ranks" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               min-width="50" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="级别"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="productNumber" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="content" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              min-width="160" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              width="160" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :show-tooltip-when-overflow="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="工单内容"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="price" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="receiver" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               min-width="100" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="任务接收人"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="amount" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="planCompletionTime" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               min-width="80" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="要求完成时间"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>{{ (scope.row.cnt*scope.row.price).toFixed(1) }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              prop="rate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              prop="attachList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               header-align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              min-width="100" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              label="任务单附件"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              label="工单附件"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                {{scope.row.rate}}% 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div v-for="(item, index) in scope.row.attachList" style="display: inline"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span v-if="index > 0">,</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -284,8 +283,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               width="100" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               label="操作"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-button type="text" size="small" @click="updateProductHandle(scope.row)">编辑</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-button style="color: red" type="text" size="small" @click="deleteProductHandle(scope.row.recordId)">删除</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-button type="text" size="small" @click="updateWorkItemHandle(scope.row)">编辑</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-button style="color: red" type="text" size="small" @click="deleteWorkItemHandle(scope.row.recordId)">删除</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-table> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -299,6 +298,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-button v-if="!display" type="primary" @click="dataFormSubmit()">确定</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <add-or-update v-if="productListVisible"  ref="productList" @addItem="addItem" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <worder-add-or-update v-if="worderListVisible" ref="worderList" @submit="addWorkItem"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- 文件预览 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <preview-component v-if="previewVisible" ref="preview"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -309,10 +311,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { dealStepData, dealStepLogs } from '@/api/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import CusComponent from '../common/cus-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import AddOrUpdate from '../product/template-add-or-update' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import WorderAddOrUpdate from '../worder/add-or-update' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import PreviewComponent from '@/views/modules/common/preview-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'order-add-or-update', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    components: {CusComponent, UploadComponent, UserComponent, AddOrUpdate}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    components: {PreviewComponent, WorderAddOrUpdate, CusComponent, UploadComponent, UserComponent, AddOrUpdate}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       orgId: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         get () { return this.$store.state.user.orgId } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -321,6 +325,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         productListVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        worderListVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        previewVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         visible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         display: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         addType: 0, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -341,6 +347,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       onChose () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.productListVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.worderListVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$emit('onChose') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 初始化:addType 新增类型: 0新增,1修改 2技术确认 (目前只有2才会赋值) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -404,6 +412,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addWorkItem (item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.worderListVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!item.recordId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           item.recordId = Math.round(Math.random() * 1000000) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -497,7 +506,28 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 添加任务工单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addWorkItemHandle () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.worderListVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.worderList.init() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 编辑产品项 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      updateWorkItemHandle (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.worderListVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.worderList.init(row.recordId, row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 删除产品项 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      deleteWorkItemHandle (recordId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.workInfoDetails.splice(this.workInfoDetails.findIndex((item) => item.recordId === recordId), 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 预览 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      previewFile (fileName, url) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.previewVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.preview.init(fileName, url) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |