|
@@ -4,42 +4,45 @@
|
|
|
width="35%"
|
|
|
:visible="visible"
|
|
|
:maskClosable="false"
|
|
|
+ destroyOnClose
|
|
|
switchFullscreen
|
|
|
@cancel="handleCancel"
|
|
|
@ok='handleOk'
|
|
|
>
|
|
|
<a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
+ <a-form-model layout="inline" :model="form" :rules="rules" ref="form">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="24" :sm="24">
|
|
|
- <a-form-item label="业务类型">
|
|
|
- <a-select v-model="form.type" style='width:100%' >
|
|
|
+ <a-form-model-item label="业务类型" prop="type">
|
|
|
+ <a-select v-model="form.type" style='width:100%' @change="changeType">
|
|
|
<a-select-option value='家装'>家装</a-select-option>
|
|
|
<a-select-option value='工装'>工装</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" :sm="24">
|
|
|
- <a-form-item label="项目名称">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="项目名称" prop="projectName" >
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.projectName" @search="onSearchProject"></a-input-search>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" :sm="24">
|
|
|
- <a-form-item label="工单号">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="工单号" prop="workNo">
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.workNo" @search="onSearch"></a-input-search>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="24" :sm="24">
|
|
|
- <a-form-item label="存货分类">
|
|
|
- <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="存货分类" prop="inventoryType">
|
|
|
+ <a-input-search placeholder="请输入" v-model="form.inventoryType" @search="onSearchType"></a-input-search>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
- </a-form>
|
|
|
+ </a-form-model>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
+ <projectPopup ref="projectPopup" @okData="okData"></projectPopup>
|
|
|
+ <inventoryTypePopup ref="inventoryTypePopup" @okData="okDataType"></inventoryTypePopup>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -48,10 +51,14 @@
|
|
|
import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
|
|
|
import moment from "moment"
|
|
|
import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
|
|
|
+ import projectPopup from '../../Popup/projectPopup'
|
|
|
+ import inventoryTypePopup from '../../Popup/inventoryTypePopup'
|
|
|
export default {
|
|
|
name: 'operation',
|
|
|
mixins: [JEditableTableModelMixin],
|
|
|
components: {
|
|
|
+ projectPopup,
|
|
|
+ inventoryTypePopup
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -59,6 +66,20 @@
|
|
|
form:{},
|
|
|
form1:{},
|
|
|
loading:false,
|
|
|
+ rules:{
|
|
|
+ type: [
|
|
|
+ { required: true, trigger: 'change' },
|
|
|
+ ],
|
|
|
+ projectName: [
|
|
|
+ { required: false, trigger: 'change' },
|
|
|
+ ],
|
|
|
+ workNo: [
|
|
|
+ { required: false, trigger: 'change' },
|
|
|
+ ],
|
|
|
+ inventoryType: [
|
|
|
+ { required: false, trigger: 'change' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
// ipagination:{},
|
|
|
selectedRowKeys:[],
|
|
|
selectedRows:[],
|
|
@@ -76,11 +97,41 @@
|
|
|
this.form1={}
|
|
|
},
|
|
|
handleOk(){
|
|
|
+ this.$refs.form.validate(success => {
|
|
|
+ if (success) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onSearch(){
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+ onSearchProject(){
|
|
|
+ this.$refs.projectPopup.visible = true
|
|
|
+ this.$refs.projectPopup.getData()
|
|
|
+ },
|
|
|
+ onSearchType(){
|
|
|
+ this.$refs.inventoryTypePopup.visible = true
|
|
|
+ this.$refs.inventoryTypePopup.getData()
|
|
|
+ },
|
|
|
+ okData(data){
|
|
|
+ this.$set(this.form,'projectName',data.Name)
|
|
|
+ this.$set(this.form,'project',data.ID)
|
|
|
+ },
|
|
|
+ okDataType(data){
|
|
|
+ this.$set(this.form,'inventoryType',data.Name)
|
|
|
+ },
|
|
|
+ changeType(prop){
|
|
|
+ if(prop=='家装'){
|
|
|
+ this.rules.inventoryType[0].required = true
|
|
|
+ this.rules.projectName[0].required = false
|
|
|
+ this.rules.workNo[0].required = false
|
|
|
+ }else{
|
|
|
+ this.rules.projectName[0].required = true
|
|
|
+ this.rules.workNo[0].required = true
|
|
|
+ this.rules.inventoryType[0].required = false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -144,4 +195,8 @@
|
|
|
/deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
|
|
|
padding: 0px 8px !important;
|
|
|
}
|
|
|
+ // 表单校验隐藏提示文字
|
|
|
+ /deep/.ant-form-explain{
|
|
|
+ display:none
|
|
|
+ }
|
|
|
</style>
|