|
@@ -19,17 +19,23 @@
|
|
|
{{ index+1 }}
|
|
|
</template>
|
|
|
<template v-slot:positionNo="text,record,index">
|
|
|
- <a-input v-if="record.isChild === 1" style="width: 150px" v-model="record.positionNo" />
|
|
|
- <div v-else style="width:300px">
|
|
|
- <a-input
|
|
|
- disabled
|
|
|
- style="width: 50%"
|
|
|
- v-model="record.positionNo"/>
|
|
|
- <a-button type="primary" @click="handleSbNoSelect(index)">选择</a-button>
|
|
|
+ <div v-if="changeType===1">
|
|
|
+ {{ text }}
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <a-input v-if="record.isChild === 1" style="width: 150px" v-model="record.positionNo" />
|
|
|
+ <div v-else style="width:300px">
|
|
|
+ <a-input
|
|
|
+ disabled
|
|
|
+ style="width: 50%"
|
|
|
+ v-model="record.positionNo"/>
|
|
|
+ <a-button type="primary" @click="handleSbNoSelect(index)">选择</a-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-slot:positionName="text,record">
|
|
|
<a-tree-select
|
|
|
+ v-if="changeType===1"
|
|
|
style="width: 150px"
|
|
|
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
:treeData="treeData"
|
|
@@ -39,6 +45,7 @@
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
</a-tree-select>
|
|
|
+ <span v-else> {{ text }}</span>
|
|
|
</template>
|
|
|
<span slot="status" slot-scope="text">
|
|
|
<badge
|
|
@@ -55,7 +62,7 @@
|
|
|
<script>
|
|
|
import { getSbPositionTree } from '@/api/sb/position'
|
|
|
import SbPositionNoModal from '@/views/sb/info/modules/SbPositionNoModal'
|
|
|
-import { importMeasure } from '@/api/sb/info'
|
|
|
+import { batchChanges } from '@/api/sb/info'
|
|
|
|
|
|
export default {
|
|
|
name: 'BaseFillGatherTask',
|
|
@@ -70,6 +77,7 @@ export default {
|
|
|
treeData: [],
|
|
|
sbParentOPt: '',
|
|
|
statusMap: {},
|
|
|
+ changeType: 0,
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
@@ -129,13 +137,27 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- base (record) {
|
|
|
+ base (record, type) {
|
|
|
this.visible = true
|
|
|
+ this.changeType = type
|
|
|
this.modal = record
|
|
|
console.log(this.modal)
|
|
|
+ console.log(this.changeType)
|
|
|
},
|
|
|
save () {
|
|
|
-
|
|
|
+ const params = this.modal.map(item => {
|
|
|
+ const param = {
|
|
|
+ sbId: item.id,
|
|
|
+ changeType: this.changeType,
|
|
|
+ sbNoId: item.positionNo,
|
|
|
+ positionId: item.positionId
|
|
|
+ }
|
|
|
+ return param
|
|
|
+ })
|
|
|
+ batchChanges({ sbChangeRecordDTOList: params }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ console.log(params)
|
|
|
},
|
|
|
handleSbNoSelect (i) {
|
|
|
this.sbParentOPt = i
|