소스 검색

配件导入

pengyh 1 년 전
부모
커밋
ccb48297ae

+ 1 - 1
src/api/auxiliaryFittings/attachmentProfile.js

@@ -73,5 +73,5 @@ export function getCategoryList(params) {
 }
 
 export function listImport(data) {
-	return handleImport('/dictCompany/importExcel', data.formdata, data.id || '')
+	return handleImport('/websit/goods/p/import2', data.formdata, data.id || '')
 }

+ 28 - 26
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -24,7 +24,7 @@ import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
-import { getBrand } from '@/api/goods'
+import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage, ImageUpload },
   mixins: [import_mixin],
@@ -60,22 +60,22 @@ export default {
 				}
 			]
 		],
-		// [
-  //         [
-  //           {
-  //             name: '下载导入模板',
-  //             click: this.handleDownload
-  //           }
-  //         ],
-  //         [
-  //           {
-  //             name: '导入模板',
-  //             render: () => {
-  //               return this.importButton(listImport, '导入模板')
-  //             }
-  //           }
-  //         ],
-  //       ],
+		[
+          [
+            {
+              name: '下载导入模板',
+              click: this.handleDownload
+            }
+          ],
+          [
+            {
+              name: '导入模板',
+              render: () => {
+                return this.importButton(listImport, '导入模板')
+              }
+            }
+          ],
+        ],
 	  ],
       // 表格属性
       tableAttributes: {
@@ -233,8 +233,8 @@ export default {
         md: 24,
         isShow: this.formData.normType == 'M'?true:false,
         name: 'el-checkbox-add',
-		labelKey: 'brandName',
-		valueKey: 'brandName',
+		labelKey: 'dictValue',
+		valueKey: 'dictCode',
         attributes: {},
 		options: this.brandList,
         formItemAttributes: {
@@ -512,11 +512,6 @@ export default {
 		   this[type] = res.data.records
 		})
 	},
-	getBrand(){
-		getBrand().then(res => {
-			this.brandList = res.data
-		})
-	},
 	getCategoryList(){
 		getCategoryList({"type":2}).then(res => {
 		   this.categoryList = res.data
@@ -581,8 +576,7 @@ export default {
     },
     openForm() {
 	  this.getTypeList('PARTS_UNIT','partsUnitList')
-	  // this.getTypeList('BRAND','brandList')
-	  this.getBrand()
+	  this.getTypeList('BRAND','brandList')
 	  this.getCategoryList()
       this.formDialog = true;
     },
@@ -627,6 +621,14 @@ export default {
     },
 	// 下载导入模版
 	handleDownload() {
+		commonTemplateDownload({ name: '配件模板(服务收费).xlsx' }, `${this.$route.meta.title}`).then(res => {
+		    this.$message({
+		        message: '下载成功',
+		        type: 'success'
+		    })
+		}).catch(err => {
+		    this.$message.error('下载失败')
+		})
 	  // downloadFiles('charging/standard/download');
 	},
   }

+ 6 - 1
src/views/workOrder/settleAccountsManagement/summaryBill/detailList.vue

@@ -113,7 +113,12 @@
 			<el-table-column prop="categoryName" align="center" label="产品小类"></el-table-column>
 			<el-table-column prop="goodsName" align="center" label="机型名称"></el-table-column>
 			<el-table-column prop="orderNum" align="center" label="数量"></el-table-column>
-			<el-table-column prop="settleOrderType" align="center" label="结算单类型" width="110"></el-table-column>
+			<el-table-column prop="settleOrderType" align="center" label="结算单类型" width="110">
+				<template slot-scope="scope">
+					{{scope.row.settleOrderType == 'INSTALL'?'安装':scope.row.settleOrderType == 'REPAIR'?'维修':scope.row.settleOrderType == 'OTHER'?'其他':scope.row.settleOrderType == 'EXAMINE'?'奖罚单':''}}
+				</template>
+				[{id: 'INSTALL',name:'安装'},{id: 'REPAIR',name:'维修'},{id: 'OTHER',name:'其他'},{id: 'EXAMINE',name:'奖罚单'}]
+			</el-table-column>
 			<el-table-column prop="installLabel" align="center" label="安装功率"></el-table-column>
 			<el-table-column prop="installNormAmount" align="center" label="安装结算标准" width="110"></el-table-column>
 			<el-table-column prop="repairLabel" align="center" label="质保类型"></el-table-column>