|
|
@@ -49,9 +49,9 @@
|
|
|
<el-button size="small" class="el-button--text" v-if="permission.sealhandover_delete && userInfo.user_id == row.createUser" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
|
|
|
</template>
|
|
|
|
|
|
- <template slot="receiverNameForm">
|
|
|
+ <!--<template slot="receiverNameForm">
|
|
|
<select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="receiverDisabled" :callback="selectCallback"></select-dialog-user>
|
|
|
- </template>
|
|
|
+ </template>-->
|
|
|
<template slot="handoverPersonNameForm">
|
|
|
<select-dialog-user :name="form.handoverPersonName" :ehr="form.handoverPersonNo" :disabled="true" :callback="handoverSelectCallback"></select-dialog-user>
|
|
|
</template>
|
|
|
@@ -205,6 +205,33 @@
|
|
|
res.data.forEach(item => {item.disabled = item.isSealed == 1;})
|
|
|
return res.data;
|
|
|
},
|
|
|
+ change: ({value, column}) => {
|
|
|
+ if (!value ||!this.form.sealNo || this.type == 'view') return;
|
|
|
+ getByNoAndType(this.form.sealNo, value, this.form.orgNo).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+ let $handoverNo = this.findObject(this.option.column, 'handoverPersonNo');
|
|
|
+ if (Object.keys(data).length == 0){
|
|
|
+ // $handoverNo.disabled = false;
|
|
|
+ this.form.handoverPersonNo = '';
|
|
|
+ delete this.form.handoverPersonName;
|
|
|
+ this.receiverDisabled = false;
|
|
|
+ } else {
|
|
|
+ // $handoverNo.disabled = true;
|
|
|
+ // 編輯時,若記錄為自己,則跳過
|
|
|
+ if (this.form.id == data.id){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (data.isTurnIn == 1){
|
|
|
+ this.$message.warning("此印章已上繳,請重新選擇!");
|
|
|
+ this.receiverDisabled = true;
|
|
|
+ }else{
|
|
|
+ this.receiverDisabled = false;
|
|
|
+ }
|
|
|
+ this.form.handoverPersonNo = data.receiverNo;
|
|
|
+ this.form.handoverPersonName = data.receiverName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "請輸入印章類型",
|
|
|
@@ -218,8 +245,7 @@
|
|
|
searchSpan: 4,
|
|
|
searchslot: true,
|
|
|
change: ({value, column}) => {
|
|
|
- if (!value || this.type == 'view') return;
|
|
|
-
|
|
|
+ if (!value ||!this.form.sealType || this.type == 'view') return;
|
|
|
getByNoAndType(value, this.form.sealType, this.form.orgNo).then(res => {
|
|
|
const data = res.data.data;
|
|
|
let $handoverNo = this.findObject(this.option.column, 'handoverPersonNo');
|
|
|
@@ -317,11 +343,10 @@
|
|
|
{
|
|
|
label: "接收人",
|
|
|
prop: "receiverName",
|
|
|
+ disabled: true,
|
|
|
search: true,
|
|
|
- searchPlaceholder: "保管人",
|
|
|
- searchTip: "保管人",
|
|
|
searchSpan: 4,
|
|
|
- formslot: true,
|
|
|
+ // formslot: true,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "請輸入接收人姓名",
|
|
|
@@ -428,6 +453,8 @@
|
|
|
},
|
|
|
methods: {
|
|
|
turnInChange(value){
|
|
|
+ this.form.receiverNo = value == true ? null : this.userInfo.user_ehr;
|
|
|
+ this.form.receiverName = value == true ? null : this.userInfo.user_name;
|
|
|
this.findObject(this.option.column, "receiverNo").rules[0].required = !value;
|
|
|
this.findObject(this.option.column, "receiverName").rules[0].required = !value;
|
|
|
this.receiverDisabled = !!value;
|
|
|
@@ -545,7 +572,8 @@
|
|
|
beforeOpen(done, type) {
|
|
|
this.type = type;
|
|
|
if (type === 'add'){
|
|
|
- let userInfo = localStorage.getItem("saber-userInfo");
|
|
|
+ this.form.receiverNo = this.userInfo.user_ehr;
|
|
|
+ this.form.receiverName = this.userInfo.user_name;
|
|
|
this.form.number = 1;
|
|
|
this.form.handoverDate = dateFormat(new Date(), "yyyy-MM-dd hh:mm");
|
|
|
getCurrentDept().then(res => {
|