Browse Source

fix:[资源库管理][麻精药,给药制剂]批量操作bug

master
15881625488@163.com 3 days ago
parent
commit
597ff1873c
7 changed files with 67 additions and 53 deletions
  1. +1
    -3
      src/views/business/resource/gsp/comps/gsp/Ff.vue
  2. +1
    -3
      src/views/business/resource/gyzj/comps/gyzj/Czrq.vue
  3. +1
    -3
      src/views/business/resource/gyzj/comps/gyzj/Czyj.vue
  4. +20
    -12
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  5. +1
    -3
      src/views/business/resource/mjy/comps/mjy/Czrq.vue
  6. +1
    -3
      src/views/business/resource/mjy/comps/mjy/Czyj.vue
  7. +42
    -26
      src/views/business/resource/mjy/comps/mjy/Ff.vue

+ 1
- 3
src/views/business/resource/gsp/comps/gsp/Ff.vue View File

@ -315,9 +315,7 @@ export default {
}, },
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)

+ 1
- 3
src/views/business/resource/gyzj/comps/gyzj/Czrq.vue View File

@ -191,9 +191,7 @@ export default {
methods: { methods: {
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)

+ 1
- 3
src/views/business/resource/gyzj/comps/gyzj/Czyj.vue View File

@ -210,9 +210,7 @@ export default {
methods: { methods: {
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)

+ 20
- 12
src/views/business/resource/gyzj/comps/gyzj/Ff.vue View File

@ -78,7 +78,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.nd')"> <el-form-item :label="$t('page.business.resource.gyzj.nd')">
<el-input type="text" v-model="form.nd" maxlength="50" disabled> <template slot="append">{{ form.nddw <el-input type="text" v-model="form.nd" maxlength="50" disabled> <template slot="append">{{ form.nddw
}}</template>
}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -99,7 +99,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ckl')"> <el-form-item :label="$t('page.business.resource.gyzj.ckl')">
<el-input type="text" v-model="form.ckl" maxlength="50" disabled> <template slot="append">{{ form.ckldw <el-input type="text" v-model="form.ckl" maxlength="50" disabled> <template slot="append">{{ form.ckldw
}}</template>
}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -296,9 +296,7 @@ export default {
}, },
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)
@ -312,13 +310,23 @@ export default {
this.form.ids = val.map(item => item.id) this.form.ids = val.map(item => item.id)
let tmp = [] let tmp = []
_.forEach(val, function (item) { _.forEach(val, function (item) {
let a = item
a.zytj = null
a.mdIds = null
a.mdMcs = null
a.mdOther = null
a.remark = null
tmp.push(a)
tmp.push({
id: item.id,
mc: item.mc,
bh: item.bh,
nd: item.nd,
nddw: item.nddw,
kc: item.kc,
kcdw: item.kcdw,
cctj: item.cctj,
sxrq: item.sxrq,
ccwz: item.ccwz,
zytj: null,
mdIds: null,
mdMcs: null,
mdOther: null,
remark: null
})
}) })
this.selectList = tmp this.selectList = tmp
this.open = true this.open = true

+ 1
- 3
src/views/business/resource/mjy/comps/mjy/Czrq.vue View File

@ -191,9 +191,7 @@ export default {
methods: { methods: {
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)

+ 1
- 3
src/views/business/resource/mjy/comps/mjy/Czyj.vue View File

@ -212,9 +212,7 @@ export default {
methods: { methods: {
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id }) const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1) that.selectList.splice(_index, 1)

+ 42
- 26
src/views/business/resource/mjy/comps/mjy/Ff.vue View File

@ -44,8 +44,8 @@
</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">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="text" v-model="scope.row.mdIds" maxlength="50"
:placeholder="$t('form.placeholderInput')" />
<SelectStudy v-model="scope.row.mdIds" :selectkey="scope.row.id + ''"
@change="selectStudyChangeBatch" />
</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">
@ -87,7 +87,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.nd')"> <el-form-item :label="$t('page.business.resource.mjy.nd')">
<el-input type="text" v-model="form.nd" maxlength="50" disabled> <template slot="append">{{ form.nddw <el-input type="text" v-model="form.nd" maxlength="50" disabled> <template slot="append">{{ form.nddw
}}</template>
}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -108,7 +108,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.ckjz')"> <el-form-item :label="$t('page.business.resource.mjy.ckjz')">
<el-input type="text" v-model="form.ckl" maxlength="50" disabled> <template slot="append">{{ form.ckldw <el-input type="text" v-model="form.ckl" maxlength="50" disabled> <template slot="append">{{ form.ckldw
}}</template>
}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -121,7 +121,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.md')" prop="mdIds"> <el-form-item :label="$t('page.business.resource.mjy.md')" prop="mdIds">
<SelectStudy v-model="form.mdIds" @change="selectStudyChange" />
<SelectStudy v-model="form.mdIds" @change="selectStudyChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -221,7 +221,7 @@ import SelectStudy from '@/views/business/comps/select/SelectStudy';
export default { export default {
name: "Ff", name: "Ff",
components: { SelectList, SelectDeptUser,SelectStudy },
components: { SelectList, SelectDeptUser, SelectStudy },
data() { data() {
return { return {
isBatch: false, isBatch: false,
@ -270,7 +270,7 @@ export default {
message: ' ', message: ' ',
trigger: 'blur' trigger: 'blur'
}], }],
ckmzdw: [{ ckmzdw: [{
required: true, required: true,
message: ' ', message: ' ',
@ -309,19 +309,25 @@ export default {
created() { created() {
}, },
methods: { methods: {
selectStudyChange(val){
this.form.mdMcs=val.name
this.form.mdOther=val.other
selectStudyChange(val) {
this.form.mdMcs = val.name
this.form.mdOther = val.other
},
selectStudyChangeBatch(val) {
if (val && val.id && val.id !== '') {
const _index = _.findIndex(this.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
this.selectList[_index].mdMcs = val.name
this.selectList[_index].mdOther = val.mdOther
}
}
}, },
handleSc(row) { handleSc(row) {
const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(function () {
return delDept(row.deptId)
}).then(() => {
const _index = _.findIndex(that.selectList, function (o) { return o.id === row.id })
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(this.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
that.selectList.splice(_index, 1)
that.form.ids = that.selectList.map(item => item.id)
this.selectList.splice(_index, 1)
this.form.ids = this.selectList.map(item => item.id)
} }
}).catch(() => { }) }).catch(() => { })
}, },
@ -331,15 +337,25 @@ export default {
this.form.ids = val.map(item => item.id) this.form.ids = val.map(item => item.id)
let tmp = [] let tmp = []
_.forEach(val, function (item) { _.forEach(val, function (item) {
let a = item
a.ckmzdw = a.kcdw
a.zytj = null
a.ckmz = null
a.mdIds = null
a.mdMcs = null
a.mdOther = null
a.remark = null
tmp.push(a)
tmp.push({
id: item.id,
mc: item.mc,
bh: item.bh,
nd: item.nd,
nddw: item.nddw,
kc: item.kc,
kcdw: item.kcdw,
cctj: item.cctj,
sxrq: item.sxrq,
ccwz: item.ccwz,
ckmzdw:item.kcdw,
zytj: null,
ckmz: null,
mdIds: null,
mdMcs: null,
mdOther: null,
remark: null
})
}) })
this.selectList = tmp this.selectList = tmp
this.open = true this.open = true

Loading…
Cancel
Save