优化 使用人 改成 申请人

This commit is contained in:
java110 2022-07-04 12:16:23 +08:00
parent df25598467
commit 27c9ec2ba1
2 changed files with 24 additions and 28 deletions

View File

@ -9,22 +9,19 @@
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="使用人" namespace="addPurchaseApplyView"></vc:i18n></span></label> <label class="col-sm-2 col-form-label"><span><vc:i18n name="联系人" namespace="addPurchaseApplyView"></vc:i18n></span></label>
<div class="col-sm-10"> <div class="col-sm-10">
<input :placeholder="vc.i18n('必填,请填写使用人','addPurchaseApplyView')" class="form-control" <input :placeholder="vc.i18n('必填,请填写联系人','addPurchaseApplyView')" class="form-control" v-model="addPurchaseApplyViewInfo.endUserName" /></div>
v-model="addPurchaseApplyViewInfo.endUserName"/></div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="联系电话" namespace="addPurchaseApplyView"></vc:i18n></span></label> <label class="col-sm-2 col-form-label"><span><vc:i18n name="联系电话" namespace="addPurchaseApplyView"></vc:i18n></span></label>
<div class="col-sm-10"> <div class="col-sm-10">
<input :placeholder="vc.i18n('必填,请填写联系电话','addPurchaseApplyView')" class="form-control" <input :placeholder="vc.i18n('必填,请填写联系电话','addPurchaseApplyView')" class="form-control" v-model="addPurchaseApplyViewInfo.endUserTel" /></div>
v-model="addPurchaseApplyViewInfo.endUserTel"/></div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="申请说明" namespace="addPurchaseApplyView"></vc:i18n></span></label> <label class="col-sm-2 col-form-label"><span><vc:i18n name="申请说明" namespace="addPurchaseApplyView"></vc:i18n></span></label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea :placeholder="vc.i18n('必填,请填写申请说明','addPurchaseApplyView')" class="form-control" <textarea :placeholder="vc.i18n('必填,请填写申请说明','addPurchaseApplyView')" class="form-control" v-model="addPurchaseApplyViewInfo.description"></textarea></div>
v-model="addPurchaseApplyViewInfo.description"></textarea></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,4 +1,4 @@
(function (vc) { (function(vc) {
vc.extends({ vc.extends({
propTypes: { propTypes: {
@ -8,40 +8,41 @@
data: { data: {
addPurchaseApplyViewInfo: { addPurchaseApplyViewInfo: {
flowComponent: 'addPurchaseApplyView', flowComponent: 'addPurchaseApplyView',
description:'', description: '',
endUserName:'', endUserName: '',
endUserTel:'', endUserTel: '',
} }
}, },
watch: { watch: {
addPurchaseApplyViewInfo: { addPurchaseApplyViewInfo: {
deep: true, deep: true,
handler: function () { handler: function() {
vc.component.saveAddComplainInfo(); vc.component.saveAddComplainInfo();
} }
} }
}, },
_initMethod: function () { _initMethod: function() {
let userInfo = vc.getData('/nav/getUserInfo');
$that.addPurchaseApplyViewInfo.endUserName = userInfo.name;
$that.addPurchaseApplyViewInfo.endUserTel = userInfo.tel;
}, },
_initEvent: function () { _initEvent: function() {
vc.on('addPurchaseApplyViewInfo', 'setPurchaseApplyInfo', function () { vc.on('addPurchaseApplyViewInfo', 'setPurchaseApplyInfo', function() {
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPurchaseApplyViewInfo); vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPurchaseApplyViewInfo);
}); });
vc.on('addPurchaseApplyViewInfo', 'onIndex', function (_index) { vc.on('addPurchaseApplyViewInfo', 'onIndex', function(_index) {
vc.component.addPurchaseApplyViewInfo.index = _index; vc.component.addPurchaseApplyViewInfo.index = _index;
}); });
}, },
methods: { methods: {
addComplainValidate: function () { addComplainValidate: function() {
return vc.validate.validate({ return vc.validate.validate({
addPurchaseApplyViewInfo: vc.component.addPurchaseApplyViewInfo addPurchaseApplyViewInfo: vc.component.addPurchaseApplyViewInfo
}, { }, {
'addPurchaseApplyViewInfo.description': [ 'addPurchaseApplyViewInfo.description': [{
{
limit: "required", limit: "required",
param: "", param: "",
errInfo: "申请说明不能为空" errInfo: "申请说明不能为空"
@ -52,8 +53,7 @@
errInfo: "申请说明不能超过200位" errInfo: "申请说明不能超过200位"
}, },
], ],
'addPurchaseApplyViewInfo.endUserName': [ 'addPurchaseApplyViewInfo.endUserName': [{
{
limit: "required", limit: "required",
param: "", param: "",
errInfo: "联系人不能为空" errInfo: "联系人不能为空"
@ -64,8 +64,7 @@
errInfo: "联系人不能超过50位" errInfo: "联系人不能超过50位"
}, },
], ],
'addPurchaseApplyViewInfo.endUserTel': [ 'addPurchaseApplyViewInfo.endUserTel': [{
{
limit: "required", limit: "required",
param: "", param: "",
errInfo: "联系电话不能为空" errInfo: "联系电话不能为空"
@ -79,12 +78,12 @@
}); });
}, },
saveAddComplainInfo: function () { saveAddComplainInfo: function() {
if (vc.component.addComplainValidate()) { if (vc.component.addComplainValidate()) {
//侦听回传 //侦听回传
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPurchaseApplyViewInfo); vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPurchaseApplyViewInfo);
return; return;
}else{ } else {
vc.toast(vc.validate.errInfo); vc.toast(vc.validate.errInfo);
vc.emit($props.callBackListener, $props.callBackFunction, null); vc.emit($props.callBackListener, $props.callBackFunction, null);
} }