|
|
@@ -81,6 +81,18 @@
|
|
|
@clearUrl="errorUrl = null"
|
|
|
@onSuccess="bindImportOrder"
|
|
|
></importFile>
|
|
|
+ <template v-slot:cooperate="scope">
|
|
|
+ <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productBillManage') && isLeader && mainData.type == '居间'">同步合作协议</el-button>
|
|
|
+ <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
|
|
|
+ <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
|
|
|
+ 是否添加关联的项目或客户合同中的产品明细或类别同步更新到列表
|
|
|
+ </span>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </template>
|
|
|
</productDetailList>
|
|
|
<!--工具清单-->
|
|
|
<toolList :data="mainData" :isLeader="isLeader" ref="toolList" v-if="mainData.type == '工具借用'" @priceChange="queryMainData($route.query.id)">
|
|
|
@@ -94,6 +106,18 @@
|
|
|
<addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.classList.listData()" ref="addProduct" @closeDrawer="closeDrawer"/>
|
|
|
<template v-slot:edit="scope">
|
|
|
</template>
|
|
|
+ <template v-slot:cooperate="scope">
|
|
|
+ <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productBillManage') && isLeader && mainData.type == '居间'">同步合作协议</el-button>
|
|
|
+ <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
|
|
|
+ <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
|
|
|
+ 是否添加关联的项目或客户合同中的产品明细或类别同步更新到列表
|
|
|
+ </span>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </template>
|
|
|
</productClassList>
|
|
|
<!-- 产品类别折扣 -->
|
|
|
<itemClass ref="itemClass" :data="mainData" v-if="mainData.type == '项目'" :isLeader="isLeader" >
|
|
|
@@ -250,7 +274,6 @@ export default {
|
|
|
for (var i=0;i<res.data[0].team.length;i++){
|
|
|
if (res.data[0].team[i].userid === JSON.parse(window.sessionStorage.getItem('active_account')).userid){
|
|
|
if (res.data[0].team[i].editable === 1){
|
|
|
- this.isLeader = true
|
|
|
flag =1
|
|
|
break
|
|
|
}else {
|
|
|
@@ -259,8 +282,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ console.log(agent.data.editable,'agent.data.editable')
|
|
|
flag === 0 ?agent.data.editable === 0?this.isLeader = false:this.isLeader = true:this.isLeader = true
|
|
|
this.$refs.details.$refs.group.editdataleader = agent.data.editdataleader
|
|
|
+ console.log(this.isLeader,'isLeader')
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -1544,35 +1569,67 @@ export default {
|
|
|
|
|
|
/*同步合作协议*/
|
|
|
async onCooperate(){
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20231204153904,
|
|
|
- "content": {
|
|
|
- "sa_contractid": this.$route.query.id,
|
|
|
- "isadd":this.cooperateForm.isadd
|
|
|
- }
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.cooperateVisible = false
|
|
|
- this.$refs.billno.params.content.pageNumber = 1
|
|
|
- this.$refs.billno.listData()
|
|
|
- this.queryMainData()
|
|
|
- })
|
|
|
+ if (this.$route.query.type === '居间'){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":20240518155604,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.$route.query.id
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.cooperateVisible = false
|
|
|
+ this.$refs.productDetailList.params.content.pageNumber = 1
|
|
|
+ this.$refs.productDetailList.listData()
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20231204153904,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.$route.query.id,
|
|
|
+ "isadd":this.cooperateForm.isadd
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.cooperateVisible = false
|
|
|
+ this.$refs.billno.params.content.pageNumber = 1
|
|
|
+ this.$refs.billno.listData()
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
async onCooperateItem(){
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20231208154904,
|
|
|
- "content": {
|
|
|
- "sa_contractid": this.$route.query.id,
|
|
|
- "isadd":this.cooperateForm.isadd
|
|
|
- }
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.cooperateVisible = false
|
|
|
- this.$refs.itemClass.param.content.pageNumber = 1
|
|
|
- this.$refs.itemClass.listData()
|
|
|
- this.queryMainData()
|
|
|
- })
|
|
|
+ if (this.$route.query.type === '居间'){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20240518160504,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.$route.query.id,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.cooperateVisible = false
|
|
|
+ this.$refs.classList.params.content.pageNumber = 1
|
|
|
+ this.$refs.classList.listData()
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20231208154904,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.$route.query.id,
|
|
|
+ "isadd":this.cooperateForm.isadd
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.cooperateVisible = false
|
|
|
+ this.$refs.itemClass.param.content.pageNumber = 1
|
|
|
+ this.$refs.itemClass.listData()
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|