Browse Source

fix:[模板管理]优化

zhangteng
15881625488@163.com 4 days ago
parent
commit
4e207e65e7
7 changed files with 69 additions and 37 deletions
  1. +5
    -5
      src/lang/en.js
  2. +4
    -0
      src/lang/en/business/resource/resource.js
  3. +4
    -4
      src/lang/en/business/study/studyFormFill.js
  4. +4
    -0
      src/lang/zh/business/resource/resource.js
  5. +48
    -24
      src/views/business/comps/select/SelectBalanceValue.vue
  6. +2
    -2
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  7. +2
    -2
      src/views/business/resource/mjy/comps/mjy/Ff.vue

+ 5
- 5
src/lang/en.js View File

@ -127,12 +127,12 @@ export default {
modify: 'Modify',
modifyRecord: 'Change Data',
hqz: 'Get the value',
xztp: '选择天平',
xztp: 'Select balance',
lengthLimit: '长度不能超过',
notEmpty: '不能为空',
operationSuccess: '操作成功',
OperationFailed: '操作失败',
lengthLimit: 'The length cannot exceed',
notEmpty: 'Cannot be empty',
operationSuccess: 'Operation Successful',
OperationFailed: 'Operation Failed',
selectMember: 'Select User'
},

+ 4
- 0
src/lang/en/business/resource/resource.js View File

@ -24,4 +24,8 @@ export default {
cc: 'Storage',
qc: 'Take Out',
},
common:{
tj:'Volume',
zl:'Quality'
}
}

+ 4
- 4
src/lang/en/business/study/studyFormFill.js View File

@ -22,8 +22,8 @@ export default {
next: 'Next',
pre: 'Pre',
save: 'Save',
blxjshtg:'病历学家审核通过',
blxjshjj:'病历学家审核拒绝',
blxjshtg:'Pathologist Approved',
blxjshjj:'Pathologist Rejected',
submit: 'Submit',
bdnr: 'Record Information',
qmxx: 'Signature information',
@ -34,7 +34,7 @@ export default {
jcgj: 'Track Record',
cjjl: 'Create Record',
tjsh:'Submit Audit',
blxjsh:'病理学家审核',
blxjsh:'Pathologist Audit',
sfbl: 'Back Entry',
yes: 'Yes',
no: 'No',
@ -78,5 +78,5 @@ export default {
ysy: 'Reviewed',
bcjl:'Save',
txbbc:'Fill In And Save',
yjcc:'药剂存储'
yjcc:'Medicine Storage'
}

+ 4
- 0
src/lang/zh/business/resource/resource.js View File

@ -24,4 +24,8 @@ export default {
cc: '存储',
qc: '取出',
},
common:{
tj:'体积',
zl:'质量'
}
}

+ 48
- 24
src/views/business/comps/select/SelectBalanceValue.vue View File

@ -1,21 +1,33 @@
<template>
<div>
<div style="display: flex;">
<div>
<el-input v-model="tpName" :placeholder="$t('form.xztp')" readonly
@click.native="showSelectBalance" style="width: 100px;"/>
</div>
<div>
<el-input v-model="tpz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="tpzChange">
<template slot="append">{{ dw }}
<el-select v-model="type" :placeholder="$t('form.placeholderSelect')" @change="typeChange">
<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-select>
<template v-if="type == 1">
<el-input v-model="srz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="inputChange">
<template slot="append">{{ dw||'' }}
</template>
</el-input>
</div>
<div>
<el-button type="primary" @click="getBalanceValue">{{ $t('form.hqz') }}</el-button>
</div>
</template>
<template v-if="type == 3">
<div>
<el-input v-model="tpName" :placeholder="$t('form.xztp')" readonly @click.native="showSelectBalance"
style="width: 100px;" />
</div>
<div>
<el-input v-model="tpz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="tpzChange">
<template slot="append">{{ tpdw||'' }}
</template>
</el-input>
</div>
<div>
<el-button type="primary" @click="getBalanceValue">{{ $t('form.hqz') }}</el-button>
</div>
</template>
</div>
<SelectInstrumentDialog ref="selectInstrumentDialog" @change="selectInstrumentChange"/>
<SelectInstrumentDialog ref="selectInstrumentDialog" @change="selectInstrumentChange" />
</div>
</template>
@ -24,7 +36,7 @@ import SelectInstrumentDialog from '@/views/business/comps/select/SelectInstrume
import { getBalance } from "@/utils/tpph";
export default {
name: "SelectBalanceValue",
components: {SelectInstrumentDialog},
components: { SelectInstrumentDialog },
props: {
value: {
type: [Number, String],
@ -45,10 +57,12 @@ export default {
},
data() {
return {
type: '',
srz: '',
tpName: '',
tpz: '',
yq:{}
tpdw: '',
yq: {}
};
},
mounted() {
@ -57,30 +71,40 @@ export default {
showSelectBalance() {
this.$refs.selectInstrumentDialog.show()
},
selectInstrumentChange(val,row){
this.tpName=row.mc
selectInstrumentChange(val, row) {
this.tpName = row.mc
this.yq = row
},
async getBalanceValue() {
if(!this.yq || !this.yq.bh){
if (!this.yq || !this.yq.bh) {
this.$message.error('请选择仪器')
return
}
this.tpz = ''
let x = await getBalance({yq:this.yq,dw:null})
if(x && x.success){
debugger
let x = await getBalance({ yq: this.yq, dw: null })
if (x && x.success) {
this.tpz = x.value
this.dw = x.unit
}else{
this.tpdw = x.unit
} else {
this.$message.error(x.message || '获取值失败')
}
this.tpzChange()
},
tpzChange() {
this.$emit('change', this.tpz)
this.$emit('change', { tpz: this.tpz, dw: this.tpdw })
this.$emit('input', this.tpz)
},
inputChange() {
this.$emit('change', { tpz: this.srz, dw: this.dw })
this.$emit('input', this.srz)
},
typeChange(){
this.$emit('change', { tpz: null, dw: null })
this.$emit('input', null)
this.srz=null
this.tpz=null
this.tpdw=null
}
}
};
</script>

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

@ -44,7 +44,7 @@
</el-table-column>
<el-table-column :label="$t('page.business.resource.gyzj.ckmz')" align="center" width="400px">
<template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" />
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" @change="tpChange"/>
</template>
</el-table-column>
<el-table-column :label="$t('form.remark')" align="center" width="250px">
@ -124,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" />
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" @change="tpChange"/>
</el-form-item>
</el-col>
</el-row>

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

@ -37,7 +37,7 @@
</el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.ckmz')" align="center" width="400px">
<template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" />
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.ckmzdw" @change="tpChange"/>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px">
@ -124,7 +124,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" />
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" @change="tpChange"/>
</el-form-item>
</el-col>
</el-row>

Loading…
Cancel
Save