| @@ -100,31 +100,34 @@ | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| <field-select | |||
| v-model="form.status" | |||
| label="资产状态" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| v-model="assetStatus" | |||
| @click="showAssetStatus = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :border="false" | |||
| :rules="[{ required: true }]" | |||
| /> | |||
| <van-popup v-model="showAssetStatus" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="assetStatusOptions" | |||
| @confirm="onConfirmAssetStatus" | |||
| @cancel="showAssetStatus = false" | |||
| /> | |||
| </van-popup> | |||
| requiredx | |||
| remote-url="/open/zdzh/list/sys_normal_disable" | |||
| :on-remote-response="'data'"/> | |||
| <field-select | |||
| v-model="form.utilizationStatus" | |||
| label="利用现状" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| requiredx | |||
| remote-url="/open/zdzh/list/utilization_status" | |||
| :on-remote-response="'data'"/> | |||
| <van-field v-model="form.useBy" label="使用人" placeholder="使用人" input-align="right" :border="false" /> | |||
| <van-field v-model="form.checkSituation" label="核查情况" placeholder="核查情况" input-align="right" :border="false" /> | |||
| <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
| </div> | |||
| <!-- <div class="list_main">--> | |||
| @@ -252,7 +255,7 @@ | |||
| addType:'1', | |||
| buildTime:this.format(new Date(),'yyyy-MM-dd'), | |||
| useType:'1', | |||
| assetStatus:'1', | |||
| status:'0', | |||
| isMin:'Y', | |||
| isFormAsset:'N', | |||
| quantity:1.00, | |||
| @@ -268,7 +271,10 @@ | |||
| netSalvage:0.00, | |||
| fixedValue:null, | |||
| perYearDepreciationValue:null, | |||
| depreciationValue:0 | |||
| depreciationValue:0, | |||
| utilizationStatus: "1", | |||
| useBy: null, | |||
| checkSituation: null, | |||
| }, | |||
| //资产类别 | |||
| assetType:'房屋及建筑物', | |||
| @@ -288,6 +294,9 @@ | |||
| //资产状态 | |||
| assetStatusOptions:[], | |||
| showAssetStatus:false, | |||
| utilizationStatusOptions: [], | |||
| showUtilizationStatus:false, | |||
| utilizationStatus: '已利用', | |||
| assetStatus:'正常', | |||
| //资产状态 | |||
| depreciationTypeOptions:[], | |||
| @@ -311,21 +320,21 @@ | |||
| }; | |||
| }, | |||
| created() { | |||
| this.houseGetDicts("resource_sort").then((response) => { | |||
| /*this.houseGetDicts("resource_sort").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.resourceSortOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("operation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("add_type").then((response) => { | |||
| /*this.houseGetDicts("add_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("use_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| @@ -336,10 +345,15 @@ | |||
| this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("depreciation_type").then((response) => { | |||
| /* this.houseGetDicts("depreciation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| });*/ | |||
| this.getDicts("utilization_status").then(response => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.utilizationStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| // this.houseGetDicts("resource_farming_type").then((response) => { | |||
| // for(var i = 0 ; i < response.data.length ; i++){ | |||
| @@ -426,7 +440,11 @@ | |||
| this.form.status = data.value; | |||
| this.showAssetStatus = false; | |||
| }, | |||
| onConfirmUtilizationStatus(data){ | |||
| this.utilizationStatus = data.text; | |||
| this.form.utilizationStatus = data.value; | |||
| this.showUtilizationStatus = false; | |||
| }, | |||
| onSubmit(){ | |||
| addResource(this.form).then(response => { | |||
| if (response.code == 200){ | |||
| @@ -51,28 +51,36 @@ | |||
| remote-url="/open/zdzh/list/operation_type" | |||
| :on-remote-response="'data'"/> | |||
| <van-field | |||
| readonly | |||
| <field-select | |||
| v-model="form.useType" | |||
| label="使用情况" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| v-model="useType" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :border="false" | |||
| /> | |||
| remote-url="/open/zdzh/list/use_type" | |||
| :on-remote-response="'data'"/> | |||
| <van-field | |||
| readonly | |||
| <field-select | |||
| v-model="form.status" | |||
| label="资产状态" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| v-model="assetStatus" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| :border="false" | |||
| /> | |||
| remote-url="/open/zdzh/list/sys_normal_disable" | |||
| :on-remote-response="'data'"/> | |||
| <field-select | |||
| v-model="form.utilizationStatus" | |||
| label="利用现状" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| remote-url="/open/zdzh/list/utilization_status" | |||
| :on-remote-response="'data'"/> | |||
| <van-field v-model="form.useBy" label="使用人" placeholder="使用人" input-align="right" :border="false" /> | |||
| <van-field v-model="form.checkSituation" label="核查情况" placeholder="核查情况" input-align="right" :border="false" /> | |||
| <van-field readonly v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
| @@ -203,7 +211,7 @@ | |||
| addType:'1', | |||
| buildTime:this.format(new Date(),'yyyy-MM-dd'), | |||
| useType:'1', | |||
| assetStatus:'1', | |||
| status:'1', | |||
| isMin:'Y', | |||
| isFormAsset:'N', | |||
| quantity:1.00, | |||
| @@ -219,7 +227,10 @@ | |||
| netSalvage:0.00, | |||
| fixedValue:null, | |||
| perYearDepreciationValue:null, | |||
| depreciationValue:0 | |||
| depreciationValue:0, | |||
| utilizationStatus: null, | |||
| useBy: null, | |||
| checkSituation: null, | |||
| }, | |||
| //资产类别 | |||
| assetType:'房屋及建筑物', | |||
| @@ -245,7 +256,9 @@ | |||
| depreciationTypeOptions:[], | |||
| showDepreciationType:false, | |||
| depreciationType:'不折旧', | |||
| utilizationStatusOptions: [], | |||
| showUtilizationStatus:false, | |||
| utilizationStatus: '已利用', | |||
| showBuildTime:false, | |||
| auditStatus:[], | |||
| loading: false, | |||
| @@ -263,21 +276,26 @@ | |||
| }; | |||
| }, | |||
| created() { | |||
| this.houseGetDicts("resource_sort").then((response) => { | |||
| /* this.houseGetDicts("resource_sort").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.resourceSortOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("operation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("add_type").then((response) => { | |||
| this.getDicts("utilization_status").then(response => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| this.utilizationStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| /*this.houseGetDicts("add_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| });*/ | |||
| this.houseGetDicts("use_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| @@ -288,11 +306,11 @@ | |||
| this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("depreciation_type").then((response) => { | |||
| /*this.houseGetDicts("depreciation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("resource_type").then((response) => { | |||
| this.resourceTypeOptionsSelect = response.data; | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| @@ -394,7 +412,11 @@ | |||
| this.form.status = data.value; | |||
| this.showAssetStatus = false; | |||
| }, | |||
| onConfirmUtilizationStatus(data){ | |||
| this.utilizationStatus = data.text; | |||
| this.form.utilizationStatus = data.value; | |||
| this.showUtilizationStatus = false; | |||
| }, | |||
| onSubmit(){ | |||
| updateResource(this.form).then(response => { | |||
| if (response.code == 200){ | |||
| @@ -77,51 +77,42 @@ | |||
| remote-url="/open/zdzh/list/operation_type" | |||
| :on-remote-response="'data'"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| <field-select | |||
| v-model="form.useType" | |||
| label="使用情况" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| v-model="useType" | |||
| @click="showUseType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :border="false" | |||
| :rules="[{ required: true }]" | |||
| /> | |||
| <van-popup v-model="showUseType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="useTypeOptions" | |||
| @confirm="onConfirmUseType" | |||
| @cancel="showUseType = false" | |||
| /> | |||
| </van-popup> | |||
| :rulesx="[{ required: true }]" | |||
| requiredx | |||
| remote-url="/open/zdzh/list/use_type" | |||
| :on-remote-response="'data'"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| <field-select | |||
| v-model="form.status" | |||
| label="资产状态" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| v-model="assetStatus" | |||
| @click="showAssetStatus = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :border="false" | |||
| :rules="[{ required: true }]" | |||
| /> | |||
| <van-popup v-model="showAssetStatus" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="assetStatusOptions" | |||
| @confirm="onConfirmAssetStatus" | |||
| @cancel="showAssetStatus = false" | |||
| /> | |||
| </van-popup> | |||
| :rulesx="[{ required: true }]" | |||
| requiredx | |||
| remote-url="/open/zdzh/list/sys_normal_disable" | |||
| :on-remote-response="'data'"/> | |||
| <field-select | |||
| v-model="form.utilizationStatus" | |||
| label="利用现状" | |||
| value-key="dictLabel" | |||
| data-key="dictValue" | |||
| placeholder="请选择" | |||
| requiredx | |||
| remote-url="/open/zdzh/list/utilization_status" | |||
| :on-remote-response="'data'"/> | |||
| <van-field v-model="form.useBy" label="使用人" placeholder="使用人" input-align="right" :border="false" /> | |||
| <van-field v-model="form.checkSituation" label="核查情况" placeholder="核查情况" input-align="right" :border="false" /> | |||
| <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
| @@ -247,33 +238,40 @@ | |||
| applicationList:[], | |||
| applicationListSecond:[], | |||
| form:{ | |||
| assetType:'151001', | |||
| assetType: null, | |||
| operationType: null, | |||
| addType:'1', | |||
| buildTime:this.format(new Date(),'yyyy-MM-dd'), | |||
| useType:'1', | |||
| assetStatus:'1', | |||
| isMin:'Y', | |||
| isFormAsset:'N', | |||
| quantity:1.00, | |||
| depreciationSubject:"152:累计折旧", | |||
| fixedSubject:"153:固定资产清理", | |||
| depreciationFeeSubject:"541005:管理费用-折旧及修理费", | |||
| depreciationType:'3', | |||
| expectedYears:1, | |||
| depreciationYears:0, | |||
| netValue:0.00, | |||
| originalValue:0.00, | |||
| residualsRate:1, | |||
| netSalvage:0.00, | |||
| fixedValue:null, | |||
| perYearDepreciationValue:null, | |||
| depreciationValue:0 | |||
| addType: null, | |||
| buildTime: null, | |||
| useType: null, | |||
| assetStatus: null, | |||
| isMin: null, | |||
| isFormAsset: null, | |||
| quantity: null, | |||
| depreciationSubject: null, | |||
| fixedSubject: null, | |||
| depreciationFeeSubject:null, | |||
| depreciationType: null, | |||
| expectedYears: null, | |||
| depreciationYears: null, | |||
| netValue: null, | |||
| originalValue: null, | |||
| residualsRate: null, | |||
| netSalvage: null, | |||
| fixedValue: null, | |||
| perYearDepreciationValue: null, | |||
| depreciationValue: null, | |||
| utilizationStatus: null, | |||
| useBy: null, | |||
| checkSituation: null, | |||
| }, | |||
| //资产类别 | |||
| assetType:'房屋及建筑物', | |||
| showAssetType:false, | |||
| resourceSortOptions:[], | |||
| // 利用状况 | |||
| utilizationStatusOptions: [], | |||
| showUtilizationStatus:false, | |||
| utilizationStatus: '已利用', | |||
| //经营属性 | |||
| operationType:'经营性', | |||
| showOperationType:false, | |||
| @@ -312,21 +310,26 @@ | |||
| }; | |||
| }, | |||
| created() { | |||
| this.houseGetDicts("resource_sort").then((response) => { | |||
| /*this.houseGetDicts("resource_sort").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.resourceSortOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("operation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("add_type").then((response) => { | |||
| this.getDicts("utilization_status").then(response => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| this.utilizationStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| /* this.houseGetDicts("add_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| });*/ | |||
| this.houseGetDicts("use_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| @@ -337,11 +340,11 @@ | |||
| this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.houseGetDicts("depreciation_type").then((response) => { | |||
| /*this.houseGetDicts("depreciation_type").then((response) => { | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
| } | |||
| }); | |||
| });*/ | |||
| this.houseGetDicts("resource_type").then((response) => { | |||
| this.resourceTypeOptionsSelect = response.data; | |||
| for(var i = 0 ; i < response.data.length ; i++){ | |||
| @@ -358,22 +361,29 @@ | |||
| this.houseGetDicts("resources_unused_type").then((response) => { | |||
| this.unusedResourceTypeOptionsSelect = response.data; | |||
| }); | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| getResource(this.$route.query.id).then(response => { | |||
| if (response.code == 200) { | |||
| this.form = response.data; | |||
| this.form = response.data; | |||
| this.resourceType = this.selectDictLabel(this.resourceTypeOptionsSelect, response.data.resourceType); | |||
| if(response.data.resourceType == 1){ | |||
| this.resourceSort = this.selectDictLabel(this.farmingResourceTypeOptionsSelect, response.data.resourceSort); | |||
| } | |||
| if(response.data.resourceType == 2){ | |||
| this.resourceSort = this.selectDictLabel(this.buildResourceTypeOptionsSelect, response.data.resourceSort); | |||
| } | |||
| if(response.data.resourceType == 3){ | |||
| this.resourceSort = this.selectDictLabel(this.unusedResourceTypeOptionsSelect, response.data.resourceSort); | |||
| this.resourceType = this.selectDictLabel(this.resourceTypeOptionsSelect, response.data.resourceType); | |||
| if (response.data.resourceType == 1) { | |||
| this.resourceSort = this.selectDictLabel(this.farmingResourceTypeOptionsSelect, response.data.resourceSort); | |||
| } | |||
| if (response.data.resourceType == 2) { | |||
| this.resourceSort = this.selectDictLabel(this.buildResourceTypeOptionsSelect, response.data.resourceSort); | |||
| } | |||
| if (response.data.resourceType == 3) { | |||
| this.resourceSort = this.selectDictLabel(this.unusedResourceTypeOptionsSelect, response.data.resourceSort); | |||
| } | |||
| //this.operationType = this.selectDictLabel(this.operationTypeOptions, response.data.operationType); | |||
| //this.useType = this.selectDictLabel(this.useTypeOptions, response.data.useType); | |||
| //this.assetStatus = this.selectDictLabel(this.assetStatusOptions, response.data.status); | |||
| //this.utilizationStatus = this.selectDictLabel(this.utilizationStatusOptions, response.data.utilizationStatus); | |||
| } | |||
| }); | |||
| @@ -425,8 +435,6 @@ | |||
| }); | |||
| } | |||
| }, | |||
| onConfirmResourceSort(data){ | |||
| this.resourceSort = data.text; | |||
| @@ -443,7 +451,11 @@ | |||
| this.form.status = data.value; | |||
| this.showAssetStatus = false; | |||
| }, | |||
| onConfirmUtilizationStatus(data){ | |||
| this.utilizationStatus = data.text; | |||
| this.form.utilizationStatus = data.value; | |||
| this.showUtilizationStatus = false; | |||
| }, | |||
| onSubmit(){ | |||
| updateResource(this.form).then(response => { | |||
| if (response.code == 200){ | |||