欧骞 3 weeks ago
parent
commit
386d40d5f6
11 changed files with 174 additions and 44 deletions
  1. +3
    -3
      src/components/Template/CustomTable.vue
  2. +3
    -3
      src/components/Template/HandleFormItem.vue
  3. +101
    -0
      src/components/Template/StepComponents/JcbComp.vue
  4. +2
    -2
      src/components/Template/StepComponents/jcb/qb.vue
  5. +6
    -1
      src/components/Template/StepFormPackage.vue
  6. +4
    -1
      src/components/Template/mixins/stepMixins.js
  7. +2
    -0
      src/views/business/comps/select/SelectStudy.vue
  8. +49
    -32
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  9. +1
    -0
      src/views/business/resource/gyzj/comps/gyzj/SelectList.vue
  10. +1
    -0
      src/views/business/study/comp/ytbd/Bj.vue
  11. +2
    -2
      src/views/business/study/comp/ytbd/Sh.vue

+ 3
- 3
src/components/Template/CustomTable.vue View File

@ -527,9 +527,9 @@ export default {
},
//
handleClickable(col, rowIndex, colIndex, row) {
if (this.templateFillType !== 'actFill') {
return
}
// if (this.templateFillType !== 'actFill') {
// return
// }
this.$emit("clickable", col, rowIndex, row)
},
onBeforeReagentSubmit(data, callback, col, row) {

+ 3
- 3
src/components/Template/HandleFormItem.vue View File

@ -1378,9 +1378,9 @@ export default {
return commonInfo;
},
handleClickable(item, event) {
if (this.templateFillType !== 'actFill') {
return
}
// if (this.templateFillType !== 'actFill') {
// return
// }
this.$emit("clickable", item)
},
//

+ 101
- 0
src/components/Template/StepComponents/JcbComp.vue View File

@ -0,0 +1,101 @@
<template>
<div class="jcb-table-container">
<CustomTable :ref="`tableRef`" :columns="jcbColumns" :formData="formData" :prefixKey="prefixKey"
class="jcb-table"
operationWidth = "120px"
@clickable="handleClickable"
@clickButton = "handleClickButton"
fieldItemLabel="template.common.operationSteps" :showOperation="templateFillType === 'preFill'">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaionDelete>
</template>
</CustomTable>
</div>
</template>
<script>
import CustomTable from '../CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
inject: ['templateFillType'],
components: {
CustomTable,
TableOpertaionDelete,
},
name: 'JcbComp',
props: {
formData: {
type: Object,
default: () => { },
},
prefixKey: {
type: String,
default: '',
},
},
computed: {
jcbColumns() {
return [
{
label: '处理批',
prop: 'clp',
width: '200px',
bodyType:"clickable",
bodyKey:"clpClick",
bodyFillType:"preFill",
},
{
label: '时间',
prop: 'time',
width: '200px',
bodyType:"input",
bodyDisabled:true,
bodyFillType:"preFill",
bodySubType:"button",
bodySubButtonName:"取出",
bodySubKey:"timeClick",
bodySubFillType:"preFill",
},
]
},
},
methods: {
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
//
handleClickable(col, rowIndex, row) {
console.log(col, rowIndex, row,"rowIndex")
if (col.bodyKey === 'clpClick') {
console.log(col, rowIndex, row,"rowIndex")
// this.$refs['tableRef'].updateDataSourceByRowIndex(rowIndex, { clp: row.clp + '1' })
}
},
//
handleClickButton(col, rowIndex, row) {
console.log(col, rowIndex, row,"rowIndex")
if (col.bodySubKey === 'timeClick') {
console.log(col, rowIndex, row,"rowIndex")
// this.$refs['tableRef'].updateDataSourceByRowIndex(rowIndex, { time: row.time + '1' })
}
},
}
}
</script>
<style lang="scss">
.jcb-table-container{
width: 600px;
}
.jcb-table{
.custom-table-wrapper{
margin-top: 0;
}
}
</style>

+ 2
- 2
src/components/Template/StepComponents/jcb/qb.vue View File

@ -22,9 +22,9 @@ export default {
formConfig() {
let config = [{
config: {
text1: {
qb: {
label: "待处理。。。。",
type: "text",
type: "qb",
},
}
}]

+ 6
- 1
src/components/Template/StepFormPackage.vue View File

@ -53,6 +53,9 @@
@onSubPackageSubmit="onSubPackageSubmit(key) "
:stepIndex="stepIndex" :prefixKey="prefixKey+'_'+index" @update="(data)=>onSubPackageUpdate(data,key)" :subData = "formFields[key]" :ref="'zlSubPackageRef_'+key" />
</template>
<template v-else-if="sItem.type === 'qb'">
<JcbComp ref="jcbCompRef" :stepIndex="stepIndex" :prefixKey="prefixKey+'_'+index" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title">{{sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}</div>
@ -70,6 +73,7 @@
<script>
import HandleFormItem from '@/components/Template/HandleFormItem.vue'
import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js'
import JcbComp from '@/components/Template/StepComponents/JcbComp.vue'
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus";
@ -79,7 +83,8 @@ export default {
inject: ['templateFillType','templateData'],
components: {
HandleFormItem,
ZLSubPackage
ZLSubPackage,
JcbComp,
},
mixins: [formPackageMixins],
props: {

+ 4
- 1
src/components/Template/mixins/stepMixins.js View File

@ -2,7 +2,10 @@ import { getuuid, justUpdateFilledFormData } from '@/utils/index.js'
import { EventBus } from '@/utils/eventBus'
import { getLatestSn, getLatestSnArr } from '@/api/template'
export default {
inject: ['templateFillType', 'getMybh'],
inject: {
templateFillType: { default: 'preFill' },
getMybh: { default: () => null }
},
dicts: [
'business_tjdw',
'business_czhj',

+ 2
- 0
src/views/business/comps/select/SelectStudy.vue View File

@ -53,6 +53,8 @@ export default {
showStudy() {
if (!this.disabled) {
this.$refs.selectStudyDialog.show({ needPre: this.needPre })
this.$emit('change', _.merge({}, { key: this.selectkey }))
this.$emit('input',null)
}
},
handleChange(obj) {

+ 49
- 32
src/views/business/resource/gyzj/comps/gyzj/Ff.vue View File

@ -3,8 +3,10 @@
<!-- 发放弹窗 -->
<el-dialog :title="$t('page.business.resource.gyzj.fafang')" :visible.sync="open" width="1200px" append-to-body
:close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN'?'120px':'170px'" v-if="open">
<div class="sbzdtcma"> <input type="text"> <input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password> </div>
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'"
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 :style="isBatch ? 'display:block' : 'display:none'">
<el-row style="margin:10px 0px;">
<el-col :span="24">
@ -83,7 +85,7 @@
<el-col :span="12">
<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
}}</template>
}}</template>
</el-input>
</el-form-item>
</el-col>
@ -104,7 +106,7 @@
<el-col :span="12">
<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
}}</template>
}}</template>
</el-input>
</el-form-item>
</el-col>
@ -122,7 +124,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" />
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" />
</el-form-item>
</el-col>
</el-row>
@ -140,26 +142,26 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr1')" prop="lqr1Id">
<SelectDeptUser v-model="form.lqr1Id" key="lqr1Id" />
<SelectDeptUser v-model="form.lqr1Id" key="lqr1Id" @change="validateForm" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr1') + $t('form.password')" prop="lqr1mm">
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.lqr1mm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.lqr1mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2')" prop="lqr2Id">
<SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" />
<SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" @change="validateForm" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2') + $t('form.password')" prop="lqr2mm">
<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')" />
<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')" />
</el-form-item>
</el-col>
</el-row>
@ -172,21 +174,21 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr1') + $t('form.password')" prop="ffr1mm">
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.ffr1mm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.ffr1mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2')" prop="ffr2Id">
<SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" />
<SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" @change="validateForm" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2') + $t('form.password')" prop="ffr2mm">
<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')" />
<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')" />
</el-form-item>
</el-col>
</el-row>
@ -200,7 +202,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="save" :disabled="isBatch && selectList.length == 0">{{ $t('form.confirm') }}</el-button>
<el-button type="primary" @click="save" :disabled="isBatch && selectList.length == 0">{{ $t('form.confirm')
}}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
@ -218,7 +221,7 @@ import SelectBalanceValue from '@/views/business/comps/select/SelectBalanceValue
export default {
name: "Ff",
components: { SelectList, SelectDeptUser, SelectStudy, BusinessSelect,SelectBalanceValue },
components: { SelectList, SelectDeptUser, SelectStudy, BusinessSelect, SelectBalanceValue },
data() {
return {
isBatch: false,
@ -298,17 +301,27 @@ export default {
created() {
},
methods: {
validateForm() {
setTimeout(() => {
this.$refs["form"].validate(valid => {
if (valid) { }
})
}, 200)
},
selectStudyChange(val) {
this.form.mdMcs = val.name
this.form.mdOther = val.mdOther
},
selectStudyChangeBatch(val) {
let that = this
if (val && val.id && val.id !== '') {
const _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
const _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
if (val && val.id && val.id !== '') {
that.selectList[_index].mdMcs = val.name
that.selectList[_index].mdOther = val.mdOther
} else {
that.selectList[_index].mdMcs = null
that.selectList[_index].mdOther = null
}
}
},
@ -340,7 +353,7 @@ export default {
sxrq: item.sxrq,
ccwz: item.ccwz,
zytj: null,
ckmz:null,
ckmz: null,
mdIds: null,
ckmz: null,
mdMcs: null,
@ -375,8 +388,8 @@ export default {
ffr1mm: null,
ffr2Id: null,
ffr2Mc: null,
ckmz:null,
ckl:null,
ckmz: null,
ckl: null,
ffr2mm: null,
qmyy: this.$t('page.business.resource.gyzj.lqff'),
qmrmm: null,
@ -412,23 +425,27 @@ export default {
if (this.selectList.length <= 0) {
this.$modal.msgError("请选择要操作的给药制剂")
} else {
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 == '') {
this.$modal.msgError(params.list[i].mc + "转移条件不能为空")
return
}
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( "转移条件不能为空")
return
}
if (!params.list[i].mdMcs || params.list[i].mdMcs == '') {
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( "目的不能为空")
}
return
}
if (!params.list[i].ckmz || params.list[i].ckmz == '') {
// this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "出库毛重不能为空")
return
}
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( "备注不能为空")
return
}
}

+ 1
- 0
src/views/business/resource/gyzj/comps/gyzj/SelectList.vue View File

@ -6,6 +6,7 @@
<el-table-column :label="$t('page.business.resource.gyzj.zjzt')" align="center">
<template slot-scope="scope">
<span v-if="scope.row.zjzt == 1">{{ $t('page.business.resource.resource.zjzt.rk') }}</span>
<span v-if="scope.row.zjzt == 2">{{ $t('page.business.resource.resource.zjzt.wrk') }}</span>
<span v-if="scope.row.zjzt == 3">{{ $t('page.business.resource.resource.zjzt.yff') }}</span>
<span v-if="scope.row.zjzt == 5">{{ $t('page.business.resource.resource.zjzt.ysd') }}</span>
<span v-if="scope.row.zjzt == 7">{{ $t('page.business.resource.resource.zjzt.dgd') }}</span>

+ 1
- 0
src/views/business/study/comp/ytbd/Bj.vue View File

@ -342,6 +342,7 @@ export default {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.form.bdnr = JSON.stringify(content)
this.form.qmyy = this.$t('page.business.study.studyFormPre.zztjyzbd')
this.openSubmit = true
}
},

+ 2
- 2
src/views/business/study/comp/ytbd/Sh.vue View File

@ -187,7 +187,7 @@ export default {
resetApprove() {
this.formApprove = {
id: null,
qmyy: null,
qmyy: this.$t('page.business.study.studyFormPre.shtg'),
remark: null,
qmrmm: null
}
@ -196,7 +196,7 @@ export default {
resetReject() {
this.formReject = {
id: null,
qmyy: null,
qmyy: this.$t('page.business.study.studyFormPre.shjj'),
remark: null,
qmrmm: null
}

Loading…
Cancel
Save