|
|
@@ -17,6 +17,7 @@
|
|
|
<el-button type="primary" size="mini" v-if="succseButton && formData.Id!=0 && ![1, 2, 3].includes(formData.Status)" @click="onFinish">完结</el-button>
|
|
|
<el-button type="primary" size="mini" v-if="successBoolean" @click="exportExcel">导出</el-button>
|
|
|
<el-button type="primary" size="mini" :loading="addloading" @click="saveEntity">保存</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="updateName">修改二级单位</el-button>
|
|
|
<router-link :to="'/oilcontract/contract-import'">
|
|
|
<el-button type="primary" size="mini" plain style="margin-left: 8px">返回</el-button>
|
|
|
</router-link>
|
|
|
@@ -413,7 +414,7 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>跨年记录</span>
|
|
|
</div>
|
|
|
- <el-form id="rebateSetTable1" label-width="110px" ref="EntityForm" :rules="rules" :model="formData"
|
|
|
+ <el-form id="rebateSetTable1" label-width="110px" :model="formData"
|
|
|
class="fromClass web_fromclass">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
@@ -454,6 +455,37 @@
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ title="修改二级单位"
|
|
|
+ :visible.sync="dialogVisibleContract"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="50%">
|
|
|
+ <el-form :model="formData" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-form-item label="二级单位" prop="SecondUnitName">
|
|
|
+ <el-input v-model="formData.SecondUnitName" placeholder="请输入" style="width: 50%" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-form-item label="新二级单位" prop="SecondUnitName">
|
|
|
+ <el-select filterable ref="issueFromSelect" v-model="NewUnitId" class="select_form"
|
|
|
+ placeholder="请选择二级单位" style="width: 50%;">
|
|
|
+ <el-option v-for="item in orgOptions" :key="item.Id" :label="item.Fullname" :value="item.Id"
|
|
|
+ style="width: 100%;"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div style="display: flex;justify-content: flex-end;margin-top: 16px;">
|
|
|
+ <el-button type="primary" :loading="updateLoading" size="mini" @click="updateUnitName(1)">修改</el-button>
|
|
|
+ <el-button type="primary" :loading="updateLoading1" size="mini" @click="updateUnitName()">批量修改</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<!-- <el-dialog-->
|
|
|
<!-- title="下发工单"-->
|
|
|
@@ -545,6 +577,9 @@ export default {
|
|
|
issueFrom: {
|
|
|
region: ''
|
|
|
},
|
|
|
+ dialogVisibleContract: false,
|
|
|
+ updateLoading: false,
|
|
|
+ updateLoading1: false,
|
|
|
orgOptions: [],
|
|
|
issueVisible: false, // 下发弹窗
|
|
|
issueRules: {
|
|
|
@@ -697,8 +732,11 @@ export default {
|
|
|
activeName: '1',
|
|
|
serviceId: '',
|
|
|
CurrencyOptions: [],
|
|
|
+ NewUnitId: '',
|
|
|
formData: {
|
|
|
Id: '',
|
|
|
+ SecondUnitName: '',
|
|
|
+ SecondUnit: '',
|
|
|
SupplierId: '',
|
|
|
SupplierName: '',
|
|
|
Status: 1,
|
|
|
@@ -945,6 +983,30 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 保存信息
|
|
|
+ updateName () {
|
|
|
+ this.dialogVisibleContract = true
|
|
|
+ },
|
|
|
+ updateUnitName (val) {
|
|
|
+ if (val) {
|
|
|
+ this.updateLoading = true
|
|
|
+ } else {
|
|
|
+ this.updateLoading1 = true
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ UnitId: this.NewUnitId,
|
|
|
+ ContractId: val ? this.formData.Id : ''
|
|
|
+ }
|
|
|
+ api.updateUnitName(this.formData.SecondUnit, params, this.$axios).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.initDatas()
|
|
|
+ this.updateLoading = false
|
|
|
+ this.updateLoading1 = false
|
|
|
+ })
|
|
|
+ },
|
|
|
// 保存信息
|
|
|
saveEntity () {
|
|
|
this.$refs['EntityForm'].validate((valid) => {
|