|
@@ -17,16 +17,14 @@
|
|
|
</div>
|
|
|
<div slot="customOperation">
|
|
|
<editBtn class="inline-16" :modelList="modelList" v-if="tool.checkAuth($route.name,'update')" :disabled="mainData.status != '新建' || !isLeader" @onSuccess="queryMainData();$refs.billno && $refs.billno.listData()" :data="mainData" />
|
|
|
- <customBtn
|
|
|
- btnName="一键转单"
|
|
|
- message="确认将当前合同转为订单吗?"
|
|
|
- idName="20230322153702"
|
|
|
- keyName="sa_contractid"
|
|
|
- :id="$route.query.id"
|
|
|
- @onSuccess="changeBill"
|
|
|
- class="inline-16"
|
|
|
- />
|
|
|
- <!-- v-if="mainData.status == '审核' && ($route.query.type == '经销项目' || $route.query.type == '直销项目') && (tool.checkAuth($route.name,'changeBillMag') || tool.checkAuth($route.name,'changeBillSaler') || tool.checkAuth($route.name,'changeBillOrder'))" -->
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="changeBill"
|
|
|
+ v-if="mainData.status == '审核' && ($route.query.type == '经销项目' || $route.query.type == '直销项目') && (tool.checkAuth($route.name,'changeBillMag') || tool.checkAuth($route.name,'changeBillSaler') || tool.checkAuth($route.name,'changeBillOrder'))"
|
|
|
+ >一键转单</el-button>
|
|
|
+
|
|
|
<revoke class="inline-16" @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'revoke') && mainData.status === '已提交' && isLeader" ></revoke>
|
|
|
<submit-check class="inline-16" :disabled="!isLeader" ref="submit" :data="mainData" @onSuccess="queryMainData" />
|
|
|
<reverseCheck class="inline-16" @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status === '审核'" />
|
|
@@ -1214,34 +1212,51 @@ export default {
|
|
|
|
|
|
},
|
|
|
changeBill (data) {
|
|
|
- this.oldRoute = {path:this.$route.path,query:this.$route.query}
|
|
|
- this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
- if (this.tool.checkAuth(this.$route.name,'changeBillMag')) {
|
|
|
- console.log('管理',this.tool.checkAuth(this.$route.name,'changeBillMag'));
|
|
|
- this.$router.push({
|
|
|
- path:'/orderdetail',
|
|
|
- query:{
|
|
|
- id:data.sa_orderid,
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.tool.checkAuth(this.$route.name,'changeBillSaler')) {
|
|
|
- console.log('业务');
|
|
|
- this.$router.push({
|
|
|
- path:'/saler_orderDetails',
|
|
|
- query:{
|
|
|
- id:data.sa_orderid,
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.tool.checkAuth(this.$route.name,'changeBillOrder')) {
|
|
|
- console.log('订单');
|
|
|
- this.$router.push({
|
|
|
- path:'/agent_orderDetails',
|
|
|
- query:{
|
|
|
- id:data.sa_orderid,
|
|
|
+ this.$confirm('确定把当前合同转为订单吗?','提示',{
|
|
|
+ confirmButtonText:'确定',
|
|
|
+ cancelButtonText:'取消',
|
|
|
+ type:'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$axios({
|
|
|
+ method:'POST',
|
|
|
+ url:'/yos/rest/index',
|
|
|
+ data: {
|
|
|
+ "accesstoken":JSON.parse(sessionStorage.getItem('active_account')).token,
|
|
|
+ "id":20230322153702,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.$route.query.id
|
|
|
+ }
|
|
|
}
|
|
|
+ }).then((res) => {
|
|
|
+ this.tool.showMessage(res.data,() => {
|
|
|
+ this.oldRoute = {path:this.$route.path,query:this.$route.query}
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+ if (this.tool.checkAuth(this.$route.name,'changeBillMag')) {
|
|
|
+ this.$router.push({
|
|
|
+ path:'/orderdetail',
|
|
|
+ query:{
|
|
|
+ id:res.data.data.sa_orderid,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.tool.checkAuth(this.$route.name,'changeBillSaler')) {
|
|
|
+ this.$router.push({
|
|
|
+ path:'/saler_orderDetails',
|
|
|
+ query:{
|
|
|
+ id:res.data.data.sa_orderid,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.tool.checkAuth(this.$route.name,'changeBillOrder')) {
|
|
|
+ this.$router.push({
|
|
|
+ path:'/agent_orderDetails',
|
|
|
+ query:{
|
|
|
+ id:res.data.data.sa_orderid,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- }
|
|
|
- console.log(data);
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
async bindImportOrder (id) {
|
|
|
const res = await this.$api.requested({
|