luojie 3 days ago
parent
commit
d607ab220b
5 changed files with 115 additions and 32 deletions
  1. +8
    -4
      src/views/business/comps/select/SelectBalanceValue.vue
  2. +35
    -11
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  3. +18
    -6
      src/views/business/resource/gyzj/comps/gyzj/Gh.vue
  4. +31
    -5
      src/views/business/resource/mjy/comps/mjy/Ff.vue
  5. +23
    -6
      src/views/business/resource/mjy/comps/mjy/Gh.vue

+ 8
- 4
src/views/business/comps/select/SelectBalanceValue.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div style="display: flex;"> <div style="display: flex;">
<el-select v-model="type" :placeholder="$t('form.placeholderSelect')" @change="typeChange">
<el-select v-model="type" :placeholder="$t('form.placeholderSelect')" @change="typeChange" style="width: 100px;">
<el-option :label="$t('page.business.resource.resource.common.tj')" :value="1"></el-option> <el-option :label="$t('page.business.resource.resource.common.tj')" :value="1"></el-option>
<el-option :label="$t('page.business.resource.resource.common.zl')" :value="3"></el-option> <el-option :label="$t('page.business.resource.resource.common.zl')" :value="3"></el-option>
</el-select> </el-select>
@ -42,6 +42,10 @@ export default {
type: [Number, String], type: [Number, String],
default: '' default: ''
}, },
selectkey: {
type: String,
default: ''
},
dw: { dw: {
type: String, type: String,
default: '' default: ''
@ -91,15 +95,15 @@ export default {
this.tpzChange() this.tpzChange()
}, },
tpzChange() { tpzChange() {
this.$emit('change', { tpz: this.tpz, dw: this.tpdw })
this.$emit('change', { tpz: this.tpz, dw: this.tpdw,key:this.selectkey})
this.$emit('input', this.tpz) this.$emit('input', this.tpz)
}, },
inputChange() { inputChange() {
this.$emit('change', { tpz: this.srz, dw: this.dw })
this.$emit('change', { tpz: this.srz, dw: this.dw,key:this.selectkey })
this.$emit('input', this.srz) this.$emit('input', this.srz)
}, },
typeChange(){ typeChange(){
this.$emit('change', { tpz: null, dw: null })
this.$emit('change', null)
this.$emit('input', null) this.$emit('input', null)
this.srz=null this.srz=null
this.tpz=null this.tpz=null

+ 35
- 11
src/views/business/resource/gyzj/comps/gyzj/Ff.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 发放弹窗 --> <!-- 发放弹窗 -->
<el-dialog :title="$t('page.business.resource.gyzj.fafang')" :visible.sync="open" width="1200px" append-to-body
<el-dialog :title="$t('page.business.resource.gyzj.fafang')" :visible.sync="open" width="80%" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'" <el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'"
v-if="open"> v-if="open">
@ -44,7 +44,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.gyzj.ckmz')" align="center" width="400px"> <el-table-column :label="$t('page.business.resource.gyzj.ckmz')" align="center" width="400px">
<template slot-scope="scope"> <template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" @change="tpChange"/>
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" :selectkey="scope.row.id + ''"
@change="tpChange" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.remark')" align="center" width="250px"> <el-table-column :label="$t('form.remark')" align="center" width="250px">
@ -124,7 +125,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ckmz')" prop="ckmz"> <el-form-item :label="$t('page.business.resource.gyzj.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" @change="tpChange"/>
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckldw" @change="tpChange2" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -154,12 +155,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2')" prop="lqr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2')" >
<SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" @change="validateForm" /> <SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" @change="validateForm" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2') + $t('form.password')" prop="lqr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.lqr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" /> show-password v-model="form.lqr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -181,12 +182,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2')" prop="ffr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2')" >
<SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" @change="validateForm" /> <SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" @change="validateForm" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2') + $t('form.password')" prop="ffr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.ffr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" /> show-password v-model="form.ffr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -325,6 +326,29 @@ export default {
} }
} }
}, },
tpChange2(val) {
let that = this
if (val) {
that.form.ckmz = val.tpz
that.form.ckmzdw = val.dw
} else {
that.form.ckmz = null
that.form.ckmzdw = null
}
},
tpChange(val) {
let that = this
if (val) {
const _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
that.selectList[_index].ckmz = val.tpz
that.selectList[_index].ckmzdw = val.dw
}
} else {
that.selectList[_index].ckmz = null
that.selectList[_index].ckmzdw = null
}
},
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => { this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
@ -428,24 +452,24 @@ export default {
for (var i = 0; i < params.list.length; i++) { for (var i = 0; i < params.list.length; i++) {
if (!params.list[i].zytj || params.list[i].zytj == '') { if (!params.list[i].zytj || params.list[i].zytj == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "转移条件不能为空")
this.$modal.msgError("转移条件不能为空")
return return
} }
if (!params.list[i].mdMcs || params.list[i].mdMcs == '') { if (!params.list[i].mdMcs || params.list[i].mdMcs == '') {
if (!params.list[i].mdOther || params.list[i].mdOther == '') { if (!params.list[i].mdOther || params.list[i].mdOther == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "目的不能为空")
this.$modal.msgError("目的不能为空")
} }
return return
} }
if (!params.list[i].ckmz || params.list[i].ckmz == '') { if (!params.list[i].ckmz || params.list[i].ckmz == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "出库毛重不能为空")
this.$modal.msgError("出库毛重不能为空")
return return
} }
if (!params.list[i].remark || params.list[i].remark == '') { if (!params.list[i].remark || params.list[i].remark == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "备注不能为空")
this.$modal.msgError("备注不能为空")
return return
} }
} }

+ 18
- 6
src/views/business/resource/gyzj/comps/gyzj/Gh.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 确认归还弹窗 --> <!-- 确认归还弹窗 -->
<el-dialog :title="$t('page.business.resource.gyzj.guihuan')" :visible.sync="open" width="800px" append-to-body
<el-dialog :title="$t('page.business.resource.gyzj.guihuan')" :visible.sync="open" width="1000px" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
<div class="sbzdtcma"> <input type="text"> <input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password> </div> <div class="sbzdtcma"> <input type="text"> <input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password> </div>
@ -94,9 +94,10 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.rkmz')" prop="rkmz"> <el-form-item :label="$t('page.business.resource.gyzj.rkmz')" prop="rkmz">
<el-input type="number" v-model="form.rkmz" maxlength="50" :placeholder="$t('form.placeholderInput')">
<SelectBalanceValue v-model="form.rkmz" :dw="form.ckldw" @change="tpChange" />
<!-- <el-input type="number" v-model="form.rkmz" maxlength="50" :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.ckldw }}</template> <template slot="append">{{ form.ckldw }}</template>
</el-input>
</el-input> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -137,12 +138,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id')" prop="jsr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id')" >
<SelectDeptUser v-model="form.jsr2Id" key="jsr2Id" /> <SelectDeptUser v-model="form.jsr2Id" key="jsr2Id" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id') + $t('form.password')" prop="jsr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.jsr2mm" maxlength="20" <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.jsr2mm" maxlength="20"
:placeholder="$t('form.placeholderInput')" /> :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -169,11 +170,12 @@
import { gh, info } from "@/api/business/gyzj/gyzj" import { gh, info } from "@/api/business/gyzj/gyzj"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectBalanceValue from '@/views/business/comps/select/SelectBalanceValue';
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
export default { export default {
name: "Gh", name: "Gh",
components: { SelectDeptUser,BusinessSelect },
components: { SelectDeptUser,BusinessSelect,SelectBalanceValue },
data() { data() {
return { return {
isBatch: false, isBatch: false,
@ -238,6 +240,16 @@ export default {
created() { created() {
}, },
methods: { methods: {
tpChange(val) {
let that = this
if (val) {
that.form.rkmz = val.tpz
that.form.rkmzdw = val.dw
} else {
that.form.rkmz = null
that.form.rkmzdw = null
}
},
cancel() { cancel() {
this.open = false this.open = false
}, },

+ 31
- 5
src/views/business/resource/mjy/comps/mjy/Ff.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 发放弹窗 --> <!-- 发放弹窗 -->
<el-dialog :title="$t('page.business.resource.mjy.fafang')" :visible.sync="open" width="1200px" append-to-body
<el-dialog :title="$t('page.business.resource.mjy.fafang')" :visible.sync="open" width="80%" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'" <el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'"
v-if="open"> v-if="open">
@ -37,7 +37,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.ckmz')" align="center" width="400px"> <el-table-column :label="$t('page.business.resource.mjy.ckmz')" align="center" width="400px">
<template slot-scope="scope"> <template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.ckmzdw" @change="tpChange"/>
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" :selectkey="scope.row.id + ''"
@change="tpChange"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px"> <el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px">
@ -124,7 +125,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.ckmz')" prop="ckmz"> <el-form-item :label="$t('page.business.resource.mjy.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" @change="tpChange"/>
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckldw" @change="tpChange2"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -318,16 +319,41 @@ export default {
}, },
selectStudyChangeBatch(val) { selectStudyChangeBatch(val) {
if (val && val.id && val.id !== '') { if (val && val.id && val.id !== '') {
const _index = _.findIndex(this.selectList, function (o) { return o.id + '' === val.key })
let _index = _.findIndex(this.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) { if (_index > -1) {
this.selectList[_index].mdMcs = val.name this.selectList[_index].mdMcs = val.name
this.selectList[_index].mdOther = val.mdOther this.selectList[_index].mdOther = val.mdOther
} }
} }
}, },
tpChange2(val) {
let that = this
if (val) {
that.form.ckmz = val.tpz
that.form.ckmzdw = val.dw
} else {
that.form.ckmz = null
that.form.ckmzdw = null
}
},
tpChange(val) {
let that = this
debugger
if (val) {
let _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
debugger
if (_index > -1) {
that.selectList[_index].ckmz = val.tpz
that.selectList[_index].ckmzdw = val.dw
}
} else {
that.selectList[_index].ckmz = null
that.selectList[_index].ckmzdw = null
}
},
handleSc(row) { handleSc(row) {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => { this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(this.selectList, function (o) { return o.id === row.id })
let _index = _.findIndex(this.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
this.selectList.splice(_index, 1) this.selectList.splice(_index, 1)
this.form.ids = this.selectList.map(item => item.id) this.form.ids = this.selectList.map(item => item.id)

+ 23
- 6
src/views/business/resource/mjy/comps/mjy/Gh.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 归还弹窗 --> <!-- 归还弹窗 -->
<el-dialog :title="$t('page.business.resource.mjy.guihuan')" :visible.sync="open" width="800px" append-to-body
<el-dialog :title="$t('page.business.resource.mjy.guihuan')" :visible.sync="open" width="1000px" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div> <div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
@ -95,19 +95,20 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.rkmz')" prop="rkmz"> <el-form-item :label="$t('page.business.resource.mjy.rkmz')" prop="rkmz">
<el-input type="number" v-model="form.rkmz" maxlength="50" @change="rklChange"
<SelectBalanceValue v-model="form.rkmz" :dw="form.kcdw" @change="tpChange" />
<!-- <el-input type="number" v-model="form.rkmz" maxlength="50" @change="rklChange"
:placeholder="$t('form.placeholderInput')"> :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.kcdw }}</template> <template slot="append">{{ form.kcdw }}</template>
</el-input>
</el-input> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.jsl')" prop="jsl"> <el-form-item :label="$t('page.business.resource.mjy.jsl')" prop="jsl">
<el-input type="number" v-model="form.jsl" maxlength="50" disabled
<el-input type="number" v-model="form.jsl" maxlength="50"
:placeholder="$t('form.placeholderInput')"> :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.kcdw }}</template>
<template slot="append">{{ form.ckmzdw }}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -206,10 +207,11 @@ import { gh, info } from "@/api/business/mjy/mjy"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectBalanceValue from '@/views/business/comps/select/SelectBalanceValue';
export default { export default {
name: "Gh", name: "Gh",
components: { SelectDeptUser, BusinessSelect },
components: { SelectDeptUser, BusinessSelect,SelectBalanceValue },
data() { data() {
return { return {
isBatch: false, isBatch: false,
@ -299,6 +301,21 @@ export default {
created() { created() {
}, },
methods: { methods: {
tpChange(val) {
let that = this
if (val) {
that.form.rkmz = val.tpz
that.form.rkmzdw = val.dw
} else {
that.form.rkmz = null
that.form.rkmzdw = null
}
if(that.form.rkmzdw==that.form.ckmzdw){
that.rklChange()
}else{
this.form.jsl = ''
}
},
rkwzChange(val) { rkwzChange(val) {
this.form.rktj = val.wc this.form.rktj = val.wc
}, },

Loading…
Cancel
Save