|
@@ -449,9 +449,23 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="业务线" prop="businessLine">
|
|
|
- <el-input :disabled="disable" v-model="basicForm.businessLine">
|
|
|
+ <el-select
|
|
|
+ ref="lines"
|
|
|
+ v-model="basicForm.businessLine"
|
|
|
+ placeholder="业务线"
|
|
|
+ :disabled="disable"
|
|
|
+ @focus="chooseLine"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in lineOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input :disabled="disable" v-model="basicForm.businessLine">
|
|
|
<el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
- </el-input>
|
|
|
+ </el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -773,6 +787,13 @@
|
|
|
:selectData="selectData7"
|
|
|
:single="true"
|
|
|
/>
|
|
|
+
|
|
|
+ <serviceline
|
|
|
+ ref="line"
|
|
|
+ @doSubmit="acceptLine"
|
|
|
+ :selectData="selectData8"
|
|
|
+ :single="true"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -784,13 +805,14 @@ import unit from '@/components/PopDialog/unit.vue'
|
|
|
import place from '@/components/PopDialog/place.vue'
|
|
|
import tax from '@/components/PopDialog/tax.vue'
|
|
|
import staff from '@/components/PopDialog/staff.vue'
|
|
|
+import serviceline from '@/components/PopDialog/serviceline.vue'
|
|
|
import { addReq, getReqDetail, editReq } from '@/api/requisition/basic'
|
|
|
// 调用物料分类详情接口用于数据回显
|
|
|
import { getDetail } from '@/api/classify/basic';
|
|
|
// 生产厂商/代理人调用用于回显
|
|
|
import { getProductFactory } from '@/api/changeApply/basic'
|
|
|
// 计量单位,产地调用用于回显
|
|
|
-import { getUnit, getPlace, getTax, getStaff} from '@/api/requisition/basic'
|
|
|
+import { getUnit, getPlace, getTax, getStaff, getLine} from '@/api/requisition/basic'
|
|
|
|
|
|
export default {
|
|
|
name: 'requisition_add',
|
|
@@ -802,7 +824,8 @@ export default {
|
|
|
unit,
|
|
|
place,
|
|
|
tax,
|
|
|
- staff
|
|
|
+ staff,
|
|
|
+ serviceline
|
|
|
},
|
|
|
props: ['pageStu', 'row', 'disable'],
|
|
|
model: {
|
|
@@ -817,6 +840,7 @@ export default {
|
|
|
placeOptions: [],
|
|
|
taxOptions: [],
|
|
|
staffOptions: [],
|
|
|
+ lineOptions: [],
|
|
|
tabValue: 'first',
|
|
|
basicForm: {
|
|
|
billCode: '',
|
|
@@ -919,7 +943,8 @@ export default {
|
|
|
selectData4: [],
|
|
|
selectData5: [],
|
|
|
selectData6: [],
|
|
|
- selectData7: []
|
|
|
+ selectData7: [],
|
|
|
+ selectData8: []
|
|
|
}
|
|
|
},
|
|
|
// watch: {
|
|
@@ -948,71 +973,77 @@ export default {
|
|
|
// }
|
|
|
// },
|
|
|
mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
// console.log('页面状态',this.pageStu)
|
|
|
- if(this.pageStu == 'check') {
|
|
|
- // alert('详情页面:')
|
|
|
- console.log('页面状态',this.pageStu)
|
|
|
- console.log('数据', this.row)
|
|
|
- this.getDetails(this.row)
|
|
|
- // 获取树形详情
|
|
|
- if (this.row.classifyId) {
|
|
|
- this.getTreeDetails(this.row.classifyId)
|
|
|
- }
|
|
|
- // 生产厂家代理人用于回显
|
|
|
- if (this.row.manufacturerId) {
|
|
|
- this.getFactoryDetails(this.row.manufacturerId)
|
|
|
- }
|
|
|
- // 计量单位回显
|
|
|
- if (this.row.unitId) {
|
|
|
- this.getUnitDetails(this.row.unitId)
|
|
|
- }
|
|
|
- // 产地回显
|
|
|
- if (this.row.originPlace) {
|
|
|
- this.getPlaceDetails(this.row.originPlace)
|
|
|
- }
|
|
|
- // 物料税类回显
|
|
|
- if (this.row.materialRate) {
|
|
|
- this.getTaxDetails(this.row.materialRate)
|
|
|
- }
|
|
|
- // 物料税类回显
|
|
|
- if (this.row.puPersonnelId) {
|
|
|
- this.getStaffDetails(this.row.puPersonnelId)
|
|
|
- }
|
|
|
- } else if (this.pageStu == 'edit') {
|
|
|
- // alert('修改页面')
|
|
|
- console.log('页面状态',this.pageStu)
|
|
|
- console.log('数据', this.row)
|
|
|
- this.getDetails(this.row)
|
|
|
- // 获取树形详情
|
|
|
- if (this.row.classifyId) {
|
|
|
- this.getTreeDetails(this.row.classifyId)
|
|
|
- }
|
|
|
- // 生产厂家代理人用于回显
|
|
|
- if (this.row.manufacturerId) {
|
|
|
- this.getFactoryDetails(this.row.manufacturerId)
|
|
|
- }
|
|
|
- // 计量单位回显
|
|
|
- if (this.row.unitId) {
|
|
|
- this.getUnitDetails(this.row.unitId)
|
|
|
- }
|
|
|
- // 产地回显
|
|
|
- if (this.row.originPlace) {
|
|
|
- this.getPlaceDetails(this.row.originPlace)
|
|
|
- }
|
|
|
- // 物料税类回显
|
|
|
- if (this.row.materialRate) {
|
|
|
- this.getTaxDetails(this.row.materialRate)
|
|
|
- }
|
|
|
- // 物料税类回显
|
|
|
- if (this.row.puPersonnelId) {
|
|
|
- this.getStaffDetails(this.row.puPersonnelId)
|
|
|
- }
|
|
|
- } else if(this.pageStu == 'add') {
|
|
|
- // alert('新增页面')
|
|
|
- console.log('页面状态',this.pageStu)
|
|
|
+ if(this.pageStu == 'check') {
|
|
|
+ // alert('详情页面:')
|
|
|
+ console.log('页面状态',this.pageStu)
|
|
|
+ console.log('数据', this.row)
|
|
|
+ this.getDetails(this.row)
|
|
|
+ // 获取树形详情
|
|
|
+ if (this.row.classifyId) {
|
|
|
+ this.getTreeDetails(this.row.classifyId)
|
|
|
+ }
|
|
|
+ // 生产厂家代理人用于回显
|
|
|
+ if (this.row.manufacturerId) {
|
|
|
+ this.getFactoryDetails(this.row.manufacturerId)
|
|
|
+ }
|
|
|
+ // 计量单位回显
|
|
|
+ if (this.row.unitId) {
|
|
|
+ this.getUnitDetails(this.row.unitId)
|
|
|
+ }
|
|
|
+ // 产地回显
|
|
|
+ if (this.row.originPlace) {
|
|
|
+ this.getPlaceDetails(this.row.originPlace)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.materialRate) {
|
|
|
+ this.getTaxDetails(this.row.materialRate)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.puPersonnelId) {
|
|
|
+ this.getStaffDetails(this.row.puPersonnelId)
|
|
|
+ }
|
|
|
+ // 业务线回显
|
|
|
+ if (this.row.businessLine) {
|
|
|
+ this.getLineDetails(this.row.businessLine)
|
|
|
+ }
|
|
|
+ } else if (this.pageStu == 'edit') {
|
|
|
+ // alert('修改页面')
|
|
|
+ console.log('页面状态',this.pageStu)
|
|
|
+ console.log('数据', this.row)
|
|
|
+ this.getDetails(this.row)
|
|
|
+ // 获取树形详情
|
|
|
+ if (this.row.classifyId) {
|
|
|
+ this.getTreeDetails(this.row.classifyId)
|
|
|
+ }
|
|
|
+ // 生产厂家代理人用于回显
|
|
|
+ if (this.row.manufacturerId) {
|
|
|
+ this.getFactoryDetails(this.row.manufacturerId)
|
|
|
+ }
|
|
|
+ // 计量单位回显
|
|
|
+ if (this.row.unitId) {
|
|
|
+ this.getUnitDetails(this.row.unitId)
|
|
|
}
|
|
|
- })
|
|
|
+ // 产地回显
|
|
|
+ if (this.row.originPlace) {
|
|
|
+ this.getPlaceDetails(this.row.originPlace)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.materialRate) {
|
|
|
+ this.getTaxDetails(this.row.materialRate)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.puPersonnelId) {
|
|
|
+ this.getStaffDetails(this.row.puPersonnelId)
|
|
|
+ }
|
|
|
+ // 业务线回显
|
|
|
+ if (this.row.businessLine) {
|
|
|
+ this.getLineDetails(this.row.businessLine)
|
|
|
+ }
|
|
|
+ } else if(this.pageStu == 'add') {
|
|
|
+ // alert('新增页面')
|
|
|
+ console.log('页面状态',this.pageStu)
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
handleClick(tab, event) {
|
|
@@ -1075,6 +1106,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 业务线回显
|
|
|
+ getLineDetails(id) {
|
|
|
+ getLine({id:id}).then(res => {
|
|
|
+ console.log('业务线', res)
|
|
|
+ if (res.code === 200 ) {
|
|
|
+ this.lineOptions = res.data.tableBody
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 如果是详情进入,则调用详情接口
|
|
|
getDetails(row) {
|
|
|
getReqDetail(row.id).then(res => {
|
|
@@ -1288,6 +1328,17 @@ export default {
|
|
|
this.$refs.staffs.blur()
|
|
|
this.$refs.staff.init()
|
|
|
},
|
|
|
+ // 选择业务线
|
|
|
+ acceptLine (selections) {
|
|
|
+ this.lineOptions = selections
|
|
|
+ this.basicForm.businessLine = selections[0].id
|
|
|
+ this.getLineDetails(selections[0].id)
|
|
|
+ },
|
|
|
+ // 业务线显示列表
|
|
|
+ chooseLine () {
|
|
|
+ this.$refs.lines.blur()
|
|
|
+ this.$refs.line.init()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|