|  | @ -36,17 +36,19 @@ | 
		
	
		
			
				|  |  |               @input="treeSelectInput" |  |  |               @input="treeSelectInput" | 
		
	
		
			
				|  |  |             /> |  |  |             /> | 
		
	
		
			
				|  |  |           </el-form-item> |  |  |           </el-form-item> | 
		
	
		
			
				|  |  |           <!-- @change="selectChange" --> |  |  |  | 
		
	
		
			
				|  |  |           <el-form-item label="选择年度" prop="years" class="down-select" style="margin-right:20px"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-form-item label="选择年度" prop="archiveYears" class="down-select" style="margin-right:20px"> | 
		
	
		
			
				|  |  |             <el-select |  |  |             <el-select | 
		
	
		
			
				|  |  |               v-model="checkForm.years" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               v-model="checkForm.archiveYears" | 
		
	
		
			
				|  |  |               style="width: 200px;height:30px" |  |  |               style="width: 200px;height:30px" | 
		
	
		
			
				|  |  |               multiple |  |  |               multiple | 
		
	
		
			
				|  |  |               filterable |  |  |               filterable | 
		
	
		
			
				|  |  |               clearable |  |  |               clearable | 
		
	
		
			
				|  |  |               placeholder="请选择" |  |  |               placeholder="请选择" | 
		
	
		
			
				|  |  |               :collapse-tags="showTags" |  |  |               :collapse-tags="showTags" | 
		
	
		
			
				|  |  |  |  |  |               @change="changeSelect" | 
		
	
		
			
				|  |  |  |  |  |               @remove-tag="removeTag" | 
		
	
		
			
				|  |  |             > |  |  |             > | 
		
	
		
			
				|  |  |  |  |  |               <el-option label="全选" value="全选" @click.native="selectAll" /> | 
		
	
		
			
				|  |  |               <el-option |  |  |               <el-option | 
		
	
		
			
				|  |  |                 v-for="item in yearsOptions" |  |  |                 v-for="item in yearsOptions" | 
		
	
		
			
				|  |  |                 :key="item.value" |  |  |                 :key="item.value" | 
		
	
	
		
			
				|  | @ -55,9 +57,9 @@ | 
		
	
		
			
				|  |  |               /> |  |  |               /> | 
		
	
		
			
				|  |  |             </el-select> |  |  |             </el-select> | 
		
	
		
			
				|  |  |           </el-form-item> |  |  |           </el-form-item> | 
		
	
		
			
				|  |  |           <el-form-item label="盘点方式" prop="checkType" class="down-select"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-form-item label="盘点方式" prop="arrangeType" class="down-select"> | 
		
	
		
			
				|  |  |             <el-select |  |  |             <el-select | 
		
	
		
			
				|  |  |               v-model="checkForm.checkType" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               v-model="checkForm.arrangeType" | 
		
	
		
			
				|  |  |               style="width: 240px; height:30px" |  |  |               style="width: 240px; height:30px" | 
		
	
		
			
				|  |  |               clearable |  |  |               clearable | 
		
	
		
			
				|  |  |               placeholder="请选择" |  |  |               placeholder="请选择" | 
		
	
	
		
			
				|  | @ -129,7 +131,7 @@ | 
		
	
		
			
				|  |  |             </template> |  |  |             </template> | 
		
	
		
			
				|  |  |           </el-table-column> |  |  |           </el-table-column> | 
		
	
		
			
				|  |  |           <el-table-column prop="depositNum" label="已装" align="center" min-width="56" /> |  |  |           <el-table-column prop="depositNum" label="已装" align="center" min-width="56" /> | 
		
	
		
			
				|  |  |           <el-table-column prop="caseName" label="盒名称" :show-overflow-tooltip="true" align="center" min-width="150" /> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-table-column prop="caseName" label="盒名称" :show-overflow-tooltip="true" align="center" min-width="190" /> | 
		
	
		
			
				|  |  |           <el-table-column prop="tid" label="TID" align="center" min-width="180" /> |  |  |           <el-table-column prop="tid" label="TID" align="center" min-width="180" /> | 
		
	
		
			
				|  |  |           <el-table-column prop="barcode" label="条形码" align="center" min-width="120" /> |  |  |           <el-table-column prop="barcode" label="条形码" align="center" min-width="120" /> | 
		
	
		
			
				|  |  |           <el-table-column label="存放位置" align="center" min-width="300"> |  |  |           <el-table-column label="存放位置" align="center" min-width="300"> | 
		
	
	
		
			
				|  | @ -181,8 +183,8 @@ export default { | 
		
	
		
			
				|  |  |       checkForm: { |  |  |       checkForm: { | 
		
	
		
			
				|  |  |         selectAreaValue: [], |  |  |         selectAreaValue: [], | 
		
	
		
			
				|  |  |         categoryValue: null, |  |  |         categoryValue: null, | 
		
	
		
			
				|  |  |         years: [], |  |  |  | 
		
	
		
			
				|  |  |         checkType: null |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         archiveYears: [], | 
		
	
		
			
				|  |  |  |  |  |         arrangeType: null | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       addFormVisible: false, |  |  |       addFormVisible: false, | 
		
	
		
			
				|  |  |       selectAreaOptions: [], |  |  |       selectAreaOptions: [], | 
		
	
	
		
			
				|  | @ -218,8 +220,8 @@ export default { | 
		
	
		
			
				|  |  |       rules: { |  |  |       rules: { | 
		
	
		
			
				|  |  |         selectAreaValue: [{ required: true, trigger: 'change', message: '请选择区域' }], |  |  |         selectAreaValue: [{ required: true, trigger: 'change', message: '请选择区域' }], | 
		
	
		
			
				|  |  |         categoryValue: [{ required: true, trigger: 'change', message: '请选择门类' }], |  |  |         categoryValue: [{ required: true, trigger: 'change', message: '请选择门类' }], | 
		
	
		
			
				|  |  |         years: [{ required: true, trigger: 'change', message: '请选择年度' }], |  |  |  | 
		
	
		
			
				|  |  |         checkType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }] |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         archiveYears: [{ required: true, trigger: 'change', message: '请选择年度' }], | 
		
	
		
			
				|  |  |  |  |  |         arrangeType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
	
		
			
				|  | @ -285,12 +287,11 @@ export default { | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     treeSelectInput(value) { |  |  |     treeSelectInput(value) { | 
		
	
		
			
				|  |  |       console.log('this.categoryValue', this.checkForm.categoryValue) |  |  |  | 
		
	
		
			
				|  |  |       if (this.checkForm.categoryValue) { |  |  |       if (this.checkForm.categoryValue) { | 
		
	
		
			
				|  |  |         this.getYear() |  |  |         this.getYear() | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         this.yearsOptions = [] |  |  |         this.yearsOptions = [] | 
		
	
		
			
				|  |  |         this.checkForm.years = [] |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears = [] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     getYear() { |  |  |     getYear() { | 
		
	
	
		
			
				|  | @ -301,7 +302,6 @@ export default { | 
		
	
		
			
				|  |  |         'size': 10 |  |  |         'size': 10 | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       FetchInitArchivesView(params).then(data => { |  |  |       FetchInitArchivesView(params).then(data => { | 
		
	
		
			
				|  |  |         console.log(data.yearGroup) |  |  |  | 
		
	
		
			
				|  |  |         if (data) { |  |  |         if (data) { | 
		
	
		
			
				|  |  |           this.yearsOptions = data.yearGroup.map(item => { |  |  |           this.yearsOptions = data.yearGroup.map(item => { | 
		
	
		
			
				|  |  |             const json = {} |  |  |             const json = {} | 
		
	
	
		
			
				|  | @ -312,6 +312,31 @@ export default { | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     selectAll() { | 
		
	
		
			
				|  |  |  |  |  |       if (this.checkForm.archiveYears.length < this.yearsOptions.length) { | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears = [] | 
		
	
		
			
				|  |  |  |  |  |         this.yearsOptions.map((item) => { | 
		
	
		
			
				|  |  |  |  |  |           this.checkForm.archiveYears.push(item.value) | 
		
	
		
			
				|  |  |  |  |  |         }) | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears.unshift('全选') | 
		
	
		
			
				|  |  |  |  |  |       } else { | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears = [] | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     changeSelect(val) { | 
		
	
		
			
				|  |  |  |  |  |       if (!val.includes('全选') && val.length === this.yearsOptions.length) { | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears.unshift('全选') | 
		
	
		
			
				|  |  |  |  |  |       } else if (val.includes('全选') && (val.length - 1) < this.yearsOptions.length) { | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears = this.checkForm.archiveYears.filter((item) => { | 
		
	
		
			
				|  |  |  |  |  |           return item !== '全选' | 
		
	
		
			
				|  |  |  |  |  |         }) | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     removeTag(val) { | 
		
	
		
			
				|  |  |  |  |  |       if (val === '全选') { | 
		
	
		
			
				|  |  |  |  |  |         this.checkForm.archiveYears = [] | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |     // 生成盘点单 |  |  |     // 生成盘点单 | 
		
	
		
			
				|  |  |     handleBuild() { |  |  |     handleBuild() { | 
		
	
		
			
				|  |  |       this.$refs['form'].validate(valid => { |  |  |       this.$refs['form'].validate(valid => { | 
		
	
	
		
			
				|  | @ -320,13 +345,10 @@ export default { | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |         this.loading = true |  |  |         this.loading = true | 
		
	
		
			
				|  |  |         const paramsNo = this.getParams() |  |  |         const paramsNo = this.getParams() | 
		
	
		
			
				|  |  |         if (paramsNo.checkType === 1) { |  |  |  | 
		
	
		
			
				|  |  |           this.isCaseOrFile = 1 |  |  |  | 
		
	
		
			
				|  |  |         } else { |  |  |  | 
		
	
		
			
				|  |  |           this.isCaseOrFile = 2 |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |  | 
		
	
		
			
				|  |  |         this.params.deviceIds = paramsNo.deviceIds |  |  |         this.params.deviceIds = paramsNo.deviceIds | 
		
	
		
			
				|  |  |         this.params.categoryIds = paramsNo.categoryIds |  |  |         this.params.categoryIds = paramsNo.categoryIds | 
		
	
		
			
				|  |  |  |  |  |         this.params.arrangeType = paramsNo.arrangeType | 
		
	
		
			
				|  |  |  |  |  |         this.params.archiveYears = paramsNo.archiveYears | 
		
	
		
			
				|  |  |         this.params.page = this.page.page - 1 |  |  |         this.params.page = this.page.page - 1 | 
		
	
		
			
				|  |  |         this.params.size = this.page.size |  |  |         this.params.size = this.page.size | 
		
	
		
			
				|  |  |         this.doPreArrange(this.params) |  |  |         this.doPreArrange(this.params) | 
		
	
	
		
			
				|  | @ -372,11 +394,29 @@ export default { | 
		
	
		
			
				|  |  |         }) |  |  |         }) | 
		
	
		
			
				|  |  |         region = region.join(',') // 区域str |  |  |         region = region.join(',') // 区域str | 
		
	
		
			
				|  |  |         // const categoryIds = this.checkForm.categoryValue.filter(item => item !== 0) |  |  |         // const categoryIds = this.checkForm.categoryValue.filter(item => item !== 0) | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  |         if (this.checkForm.arrangeType === 1) { | 
		
	
		
			
				|  |  |  |  |  |           this.isCaseOrFile = 1 | 
		
	
		
			
				|  |  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |  |           this.isCaseOrFile = 2 | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  |         let archiveYearsValue | 
		
	
		
			
				|  |  |  |  |  |         if (this.checkForm.archiveYears.includes('全选')) { | 
		
	
		
			
				|  |  |  |  |  |           archiveYearsValue = null | 
		
	
		
			
				|  |  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |  |           archiveYearsValue = this.checkForm.archiveYears.join(',') | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  |         const categoryIds = [] | 
		
	
		
			
				|  |  |  |  |  |         categoryIds.push(this.checkForm.categoryValue) | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |         const params = { |  |  |         const params = { | 
		
	
		
			
				|  |  |           'categoryIds': this.checkForm.categoryValue, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           'categoryIds': categoryIds, | 
		
	
		
			
				|  |  |           'deviceIds': deviceIds, |  |  |           'deviceIds': deviceIds, | 
		
	
		
			
				|  |  |           'region': region, |  |  |           'region': region, | 
		
	
		
			
				|  |  |           'checkType': this.checkForm.checkType |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           'arrangeType': this.checkForm.arrangeType, | 
		
	
		
			
				|  |  |  |  |  |           'archiveYears': archiveYearsValue | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |         return params |  |  |         return params | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
	
		
			
				|  | 
 |