|
@@ -14,7 +14,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="计划组织">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearchPlanOrg" readOnly></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
@@ -40,22 +40,22 @@
|
|
|
</a-col> -->
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="项目编码">
|
|
|
- <a-input placeholder="请输入" v-model="form.projectCode"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="form.projectCode" disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="项目">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.project" @search="onSearch"></a-input-search>
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.project" @search="onSearchProject" readOnly></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="计划部门">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.planDept" @search="onSearch"></a-input-search>
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.planDept" @search="onSearchDept" readOnly></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="业务员">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.salesperson" @search="onSearch"></a-input-search>
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.salesperson" @search="onSearchPerson" readOnly></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
@@ -115,19 +115,9 @@
|
|
|
<a-input placeholder="请输入" v-model="record.batch"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="projectCode" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="projectCode" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.projectCode"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="projectName" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="projectName" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.projectName"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
<template slot="inventoryName" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="inventoryName" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.inventoryName"></a-input>
|
|
|
+ <a-input-search placeholder="请输入" v-model="record.inventoryName" @search="onSearchInventory(record)" readOnly></a-input-search>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="inventoryCode" slot-scope="text, record, index">
|
|
@@ -326,6 +316,11 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
+ <projectPopup ref="projectPopup" @okData="okData"></projectPopup>
|
|
|
+ <inventoryPopup ref="inventoryPopup" @okData="okDataInvent"></inventoryPopup>
|
|
|
+ <deparmentPopup ref="deparmentPopup" @okData="okDataDeparment"></deparmentPopup>
|
|
|
+ <OperatorsPopup ref="OperatorsPopup" @okData="okDataOperators"></OperatorsPopup>
|
|
|
+ <organizationPopup ref="organizationPopup" @okData="okDataOrganization"></organizationPopup>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -334,10 +329,20 @@
|
|
|
import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
|
|
|
import moment from "moment"
|
|
|
import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
|
|
|
+ import projectPopup from '../../Popup/projectPopup'
|
|
|
+ import inventoryPopup from '../../Popup/inventoryPopup.vue'
|
|
|
+ import deparmentPopup from '../../Popup/deparmentPopup.vue'
|
|
|
+ import OperatorsPopup from '../../Popup/OperatorsPopup.vue'
|
|
|
+ import organizationPopup from '../../Popup/organizationPopup.vue'
|
|
|
export default {
|
|
|
name: 'materialProcurementAdd',
|
|
|
mixins: [JEditableTableModelMixin],
|
|
|
components: {
|
|
|
+ projectPopup,
|
|
|
+ inventoryPopup,
|
|
|
+ deparmentPopup,
|
|
|
+ OperatorsPopup,
|
|
|
+ organizationPopup
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -373,14 +378,12 @@
|
|
|
align:"center",
|
|
|
dataIndex: 'projectCode',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'projectCode' }
|
|
|
},
|
|
|
{
|
|
|
title: '项目名称',
|
|
|
align:"center",
|
|
|
dataIndex: 'projectName',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'projectName' }
|
|
|
},
|
|
|
{
|
|
|
title: '存货名称',
|
|
@@ -394,15 +397,12 @@
|
|
|
align:"center",
|
|
|
dataIndex: 'inventoryCode',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'inventoryCode' }
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
title: '计量单位',
|
|
|
align:"center",
|
|
|
dataIndex: 'unit',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'unit' }
|
|
|
|
|
|
},
|
|
|
{
|
|
@@ -426,7 +426,6 @@
|
|
|
align:"center",
|
|
|
dataIndex: 'auxiliaryUnit',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'auxiliaryUnit' }
|
|
|
},
|
|
|
{
|
|
|
title: '辅数量',
|
|
@@ -440,7 +439,6 @@
|
|
|
align:"center",
|
|
|
dataIndex: 'specs',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'specs' }
|
|
|
},
|
|
|
{
|
|
|
title: '型号',
|
|
@@ -667,8 +665,9 @@
|
|
|
handleTableChange(){
|
|
|
|
|
|
},
|
|
|
- onSearch(){
|
|
|
-
|
|
|
+ onSearchPlanOrg(){
|
|
|
+ this.$refs.organizationPopup.visible = true
|
|
|
+ this.$refs.organizationPopup.getData()
|
|
|
},
|
|
|
//获取主表信息
|
|
|
getMainData(id){
|
|
@@ -697,7 +696,48 @@
|
|
|
})
|
|
|
},
|
|
|
addList(){
|
|
|
- this.dataSource.unshift({rowNo: this.dataSource.length+1})
|
|
|
+ this.dataSource.unshift({rowNo: this.dataSource.length+1,projectCode:this.form.projectCode,projectName:this.form.project})
|
|
|
+ },
|
|
|
+ onSearchProject(){
|
|
|
+ this.$refs.projectPopup.visible = true
|
|
|
+ this.$refs.projectPopup.getData()
|
|
|
+ },
|
|
|
+ onSearchDept(){
|
|
|
+ this.$refs.deparmentPopup.visible = true
|
|
|
+ this.$refs.deparmentPopup.getData()
|
|
|
+ },
|
|
|
+ onSearchPerson(){
|
|
|
+ this.$refs.OperatorsPopup.visible = true
|
|
|
+ this.$refs.OperatorsPopup.getData()
|
|
|
+ },
|
|
|
+ onSearchInventory(record){
|
|
|
+ this.$refs.inventoryPopup.visible = true
|
|
|
+ this.$refs.inventoryPopup.getData()
|
|
|
+ this.$refs.inventoryPopup.record=record
|
|
|
+ },
|
|
|
+ okData(data){
|
|
|
+ this.$set(this.form,'projectCode',data.Code)
|
|
|
+ this.$set(this.form,'project',data.Name)
|
|
|
+ this.dataSource.map(item=>{
|
|
|
+ item.projectCode = data.Code
|
|
|
+ item.projectName = data.Name
|
|
|
+ })
|
|
|
+ },
|
|
|
+ okDataInvent(data,recoerd){
|
|
|
+ this.$set(recoerd,'inventoryCode',data.Code)
|
|
|
+ this.$set(recoerd,'inventoryName',data.Name)
|
|
|
+ this.$set(recoerd,'specs',data.SPECS)
|
|
|
+ this.$set(recoerd,'unit',data.unit)
|
|
|
+ this.$set(recoerd,'auxiliaryUnit',data.auxiliaryUnit )
|
|
|
+ },
|
|
|
+ okDataDeparment(data){
|
|
|
+ this.$set(this.form,'planDept',data.Name)
|
|
|
+ },
|
|
|
+ okDataOperators(data){
|
|
|
+ this.$set(this.form,'salesperson',data.Name)
|
|
|
+ },
|
|
|
+ okDataOrganization(data){
|
|
|
+ this.$set(this.form,'planOrg',data.Name)
|
|
|
},
|
|
|
delectRow(){
|
|
|
if( this.selectedRowKeys.length==0){
|