Commit 0686fa40 by qiaoyanqi

凭证中心接口方式修改

parent 8083c367
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
style="width: 250px" style="width: 250px"
/> />
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button> <Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
draftModal: false, draftModal: false,
value: "", value: "",
billDefineName: null, billDefineName: null,
loading:false
}; };
}, },
mounted() {}, mounted() {},
...@@ -37,6 +38,7 @@ export default { ...@@ -37,6 +38,7 @@ export default {
this.$Message.info('请输入草稿名称'); this.$Message.info('请输入草稿名称');
return return
} }
this.loading = true;
//掉接口保存当前json 和value //掉接口保存当前json 和value
let obj = { let obj = {
billDefineName: this.billDefineName, billDefineName: this.billDefineName,
...@@ -51,6 +53,7 @@ export default { ...@@ -51,6 +53,7 @@ export default {
}) })
.then( .then(
function (data, textStatus, response) { function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){ if(data.code == 0){
this.$Message.info("保存成功"); this.$Message.info("保存成功");
this.draftModal = false; this.draftModal = false;
...@@ -60,6 +63,7 @@ export default { ...@@ -60,6 +63,7 @@ export default {
}.bind(this) }.bind(this)
) )
.catch((XMLHttpRequest, textStatus, errorThrown) => { .catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
}); });
}, },
}, },
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
style="width: 250px" style="width: 250px"
/> />
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button> <Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
templateName: "", templateName: "",
queryData: [], queryData: [],
currentId: null, currentId: null,
loading:false,
columns: [ columns: [
{ {
title: "草稿名称", title: "草稿名称",
...@@ -146,6 +147,7 @@ export default { ...@@ -146,6 +147,7 @@ export default {
title: this.value, title: this.value,
id: this.currentId, id: this.currentId,
}; };
this.loading = true;
GAMS.Util.invokeServer({ GAMS.Util.invokeServer({
path: "rbcfunc/billdraft/update", path: "rbcfunc/billdraft/update",
type: "POST", type: "POST",
...@@ -154,6 +156,7 @@ export default { ...@@ -154,6 +156,7 @@ export default {
}) })
.then( .then(
function (data, textStatus, response) { function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){ if(data.code == 0){
this.getList(); this.getList();
this.draftModal = false; this.draftModal = false;
...@@ -162,7 +165,9 @@ export default { ...@@ -162,7 +165,9 @@ export default {
} }
}.bind(this) }.bind(this)
) )
.catch((XMLHttpRequest, textStatus, errorThrown) => {}); .catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
});
}, },
showData(row) { showData(row) {
let billObj = this.bill.getBuillData(); let billObj = this.bill.getBuillData();
......
/* /*
* @Description:通用/单张生成 * @Description:通用/单张生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
let subTable = param.subTable||'BXMXZB'; let subTable = param.subTable||'BXMXZB';
...@@ -53,15 +52,10 @@ export default { ...@@ -53,15 +52,10 @@ export default {
}) })
}, },
generateVoucher(list,context){ generateVoucher(list,context){
axios({ GMS.$http.post('/mechanismVchr/singleCreateVchr',{
          method: 'POST',
          url:'/mechanismVchr/singleCreateVchr',//单张生成接口
          headers: {
              Authorization:GMS.token,
          },
data:list data:list
        }).then(res => {     }).then(res => {
          if (res.status === 200) {            if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
...@@ -75,8 +69,8 @@ export default { ...@@ -75,8 +69,8 @@ export default {
onOk: () => {}, onOk: () => {},
}); });
} }
          }            }
        })         })
}, },
searchBillObj(billDefine, billId, index) { searchBillObj(billDefine, billId, index) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
/* /*
* @Description:通用/汇总生成 * @Description:通用/汇总生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
let subTable = param.subTable||'BXMXZB'; let subTable = param.subTable||'BXMXZB';
...@@ -53,15 +52,10 @@ export default { ...@@ -53,15 +52,10 @@ export default {
}) })
}, },
generateVoucher(list,context){ generateVoucher(list,context){
axios({ GMS.$http.post('/mechanismVchr/combineCreateVchr',{
          method: 'POST',
url:'/mechanismVchr/combineCreateVchr',//汇总生成
          headers: {
              Authorization:GMS.token,
          },
data:list data:list
        }).then(res => {     }).then(res => {
          if (res.status === 200) {           if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
...@@ -75,8 +69,8 @@ export default { ...@@ -75,8 +69,8 @@ export default {
onOk: () => {}, onOk: () => {},
}); });
} }
          }           }
        })         })
}, },
searchBillObj(billDefine, billId ,index) { searchBillObj(billDefine, billId ,index) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
/* /*
* @Description:通用/撤销生成 * @Description:通用/撤销生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
...@@ -25,15 +24,10 @@ export default { ...@@ -25,15 +24,10 @@ export default {
that.deleteVchrAsync(arr,context); that.deleteVchrAsync(arr,context);
}, },
deleteVchrAsync(list,context){ deleteVchrAsync(list,context){
axios({ GMS.$http.post('/mechanismVchr/deleteVchr',{
          method: 'POST',
          url:'/mechanismVchr/deleteVchr',//撤销凭证
          headers: {
              Authorization:GMS.token,
          },
data:list data:list
        }).then(res => {     }).then(res => {
          if (res.status === 200) {         if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
...@@ -48,6 +42,6 @@ export default { ...@@ -48,6 +42,6 @@ export default {
}); });
} }
          }           }
        })         })
} }
} }
\ No newline at end of file
/* /*
* @Description:通用/联查凭证 * @Description:通用/联查凭证
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
...@@ -31,15 +30,10 @@ export default { ...@@ -31,15 +30,10 @@ export default {
that.showVchrAsync(obj,context); that.showVchrAsync(obj,context);
}, },
showVchrAsync(obj,context){ showVchrAsync(obj,context){
axios({ GMS.$http.post('/mechanismVchr/showVchr',{
          method: 'POST',
          url:'/mechanismVchr/showVchr',//查看凭证
          headers: {
              Authorization:GMS.token,
          },
data:obj data:obj
        }).then(res => {     }).then(res => {
          if (res.status === 200) {         if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
let resObj = res.data.data; let resObj = res.data.data;
resObj.previewState = 'readonly'; resObj.previewState = 'readonly';
...@@ -51,7 +45,7 @@ export default { ...@@ -51,7 +45,7 @@ export default {
onOk: () => {}, onOk: () => {},
}); });
} }
          }         }
        })     })
} }
} }
\ No newline at end of file
...@@ -7,7 +7,8 @@ const service = axios.create({ ...@@ -7,7 +7,8 @@ const service = axios.create({
}) })
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
config.headers.Authorization = nros.SDK.utils.getToken() let token = window.nros.SDK.utils.getToken();
config.headers.Authorization = token;
return config return config
}) })
......
...@@ -51,16 +51,21 @@ export default { ...@@ -51,16 +51,21 @@ export default {
window.GMS.vbus.$emit('tab-count-refresh'); window.GMS.vbus.$emit('tab-count-refresh');
}, },
async getCerSerName(){ async getCerSerName(){
try {
const res = await getCertifyServiceName(); const res = await getCertifyServiceName();
if (res.data.content){ if (res.data.content){
this.certifyServiceName = res.data.content; this.certifyServiceName = res.data.content;
this.getNvwaCertifyData(this.certifyServiceName); this.getNvwaCertifyData(this.certifyServiceName);
} }
} catch (e) {
console.log(e)
}
}, },
/** /**
* 获取认证服务url和token信息 * 获取认证服务url和token信息
*/ */
async getNvwaCertifyData (certifyServiceId) { async getNvwaCertifyData (certifyServiceId) {
try {
let url = null; let url = null;
const getCurrentUrl = await getCertifyServiceUrl(); const getCurrentUrl = await getCertifyServiceUrl();
const res = await getIdUrl(certifyServiceId); const res = await getIdUrl(certifyServiceId);
...@@ -89,6 +94,9 @@ export default { ...@@ -89,6 +94,9 @@ export default {
} }
} }
} }
} catch (e) {
console.log(e)
}
}, },
handleTag(name) { handleTag(name) {
this.queryName = null; this.queryName = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment