mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
供应链供应商
This commit is contained in:
parent
a29e30f57c
commit
929a204ca5
@ -1,65 +1,105 @@
|
||||
<div id = "addChainSupplierModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span><vc:i18n name="添加供应商" namespace="addChainSupplier"></vc:i18n></span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='供应商名称' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.name" type="text" :placeholder="vc.i18n('必填,请填写供应商名称','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='接口应用ID' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.appId" type="text" :placeholder="vc.i18n('必填,请填写接口应用ID','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='接口秘钥' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.appSecure" type="text" :placeholder="vc.i18n('必填,请填写接口秘钥','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='商户ID' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.mchId" type="text" :placeholder="vc.i18n('必填,请填写商户ID','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='秘钥' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.mchKey" type="text" :placeholder="vc.i18n('必填,请填写秘钥','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='接口地址' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.url" type="text" :placeholder="vc.i18n('必填,请填写接口地址','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='备注' namespace='addChainSupplier'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea :placeholder="vc.i18n('必填,请填写备注','addChainSupplier')" class="form-control" v-model="addChainSupplierInfo.remark"></textarea> </div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveChainSupplierInfo()" ><i class="fa fa-check"></i>
|
||||
<span><vc:i18n name="保存"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
|
||||
<span><vc:i18n name="取消"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="addChainSupplierModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span>
|
||||
<vc:i18n name="添加供应商" namespace="addChainSupplier"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='供应商名称' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.name" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写供应商名称','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='接口应用ID' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.appId" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写接口应用ID','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='接口秘钥' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.appSecure" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写接口秘钥','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='商户ID' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.mchId" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写商户ID','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='秘钥' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.mchKey" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写秘钥','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='接口地址' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.url" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写接口地址','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='适配器名称' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addChainSupplierInfo.beanName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写适配器名称','addChainSupplier')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='备注' namespace='addChainSupplier'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea :placeholder="vc.i18n('必填,请填写备注','addChainSupplier')" class="form-control"
|
||||
v-model="addChainSupplierInfo.remark"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveChainSupplierInfo()"><i
|
||||
class="fa fa-check"></i>
|
||||
<span>
|
||||
<vc:i18n name="保存"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">
|
||||
<span>
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,179 +1,179 @@
|
||||
(function(vc){
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener:vc.propTypes.string, //父组件名称
|
||||
callBackFunction:vc.propTypes.string //父组件监听方法
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data:{
|
||||
addChainSupplierInfo:{
|
||||
csId:'',
|
||||
name:'',
|
||||
appId:'',
|
||||
appSecure:'',
|
||||
mchId:'',
|
||||
mchKey:'',
|
||||
url:'',
|
||||
remark:'',
|
||||
data: {
|
||||
addChainSupplierInfo: {
|
||||
csId: '',
|
||||
name: '',
|
||||
appId: '',
|
||||
appSecure: '',
|
||||
mchId: '',
|
||||
mchKey: '',
|
||||
url: '',
|
||||
remark: '',
|
||||
beanName:'',
|
||||
statusCd: '0'
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('addChainSupplier','openAddChainSupplierModal',function(){
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addChainSupplier', 'openAddChainSupplierModal', function () {
|
||||
$('#addChainSupplierModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
addChainSupplierValidate(){
|
||||
methods: {
|
||||
addChainSupplierValidate() {
|
||||
return vc.validate.validate({
|
||||
addChainSupplierInfo:vc.component.addChainSupplierInfo
|
||||
},{
|
||||
'addChainSupplierInfo.name':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"供应商名称不能为空"
|
||||
addChainSupplierInfo: vc.component.addChainSupplierInfo
|
||||
}, {
|
||||
'addChainSupplierInfo.name': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "供应商名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"30",
|
||||
errInfo:"供应商名称不能超过30"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "供应商名称不能超过30"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.appId':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"接口应用ID不能为空"
|
||||
'addChainSupplierInfo.appId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "接口应用ID不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"32",
|
||||
errInfo:"接口应用ID不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "32",
|
||||
errInfo: "接口应用ID不能为空"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.appSecure':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"接口秘钥不能为空"
|
||||
'addChainSupplierInfo.appSecure': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "接口秘钥不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"128",
|
||||
errInfo:"接口秘钥不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "接口秘钥不能为空"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.mchId':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"商户ID不能为空"
|
||||
'addChainSupplierInfo.mchId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "商户ID不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"32",
|
||||
errInfo:"商户ID不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "32",
|
||||
errInfo: "商户ID不能为空"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.mchKey':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"秘钥不能为空"
|
||||
'addChainSupplierInfo.mchKey': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "秘钥不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"128",
|
||||
errInfo:"秘钥不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "秘钥不能为空"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.url':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"接口地址不能为空"
|
||||
'addChainSupplierInfo.url': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "接口地址不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"128",
|
||||
errInfo:"接口地址不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "接口地址不能为空"
|
||||
},
|
||||
],
|
||||
'addChainSupplierInfo.remark':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"备注不能为空"
|
||||
'addChainSupplierInfo.beanName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "适配器名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"200",
|
||||
errInfo:"描述不能为空"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "50",
|
||||
errInfo: "适配器名称不能为空"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveChainSupplierInfo:function(){
|
||||
if(!vc.component.addChainSupplierValidate()){
|
||||
saveChainSupplierInfo: function () {
|
||||
if (!vc.component.addChainSupplierValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addChainSupplierInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if(vc.notNull($props.callBackListener)){
|
||||
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addChainSupplierInfo);
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addChainSupplierInfo);
|
||||
$('#addChainSupplierModel').modal('hide');
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'chainSupplier.saveChainSupplier',
|
||||
JSON.stringify(vc.component.addChainSupplierInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addChainSupplierModel').modal('hide');
|
||||
vc.component.clearAddChainSupplierInfo();
|
||||
vc.emit('chainSupplierManage','listChainSupplier',{});
|
||||
vc.emit('chainSupplierManage', 'listChainSupplier', {});
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function(errInfo,error){
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
clearAddChainSupplierInfo:function(){
|
||||
clearAddChainSupplierInfo: function () {
|
||||
vc.component.addChainSupplierInfo = {
|
||||
name:'',
|
||||
appId:'',
|
||||
appSecure:'',
|
||||
mchId:'',
|
||||
mchKey:'',
|
||||
url:'',
|
||||
remark:'',
|
||||
name: '',
|
||||
appId: '',
|
||||
appSecure: '',
|
||||
mchId: '',
|
||||
mchKey: '',
|
||||
url: '',
|
||||
beanName:'',
|
||||
remark: '',
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user