Browse Source

修复bug,合同修改

qymljy 2 years ago
parent
commit
8f38ddc60c

+ 69 - 9
src/HDrpManagement/contractManage/components/addContract.vue

@@ -164,11 +164,33 @@
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目地址:" prop="">
+                <el-input disabled type="text" size="small" v-model="address"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="业务员:" prop="">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="收货人:" prop="projectname">
+                <el-popover
+                    placement="bottom"
+                    trigger="manual"
+                    v-model="receiptVisible"
+                    width="600">
+                  <seleteReceipt ref="receipt" type="1" @onSelect="receiptChange" @onCanel="receiptVisible=false"></seleteReceipt>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('receiptVisible')" v-model="form.receiptName"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="收货人电话:" prop="">
+                <el-input disabled type="text" size="small" v-model="form.phonenumber"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="合同有效期:" prop="begdate">
                 <input type="text" style="display:none" v-model="form.begdate">
@@ -365,9 +387,10 @@ import seleteProject from './seleteProject'
 import seleteProjectContract from './seleteProjectContract'
 import TimeSelect from './TimeSelect'
 import selectModel from './seleteModel'
+import seleteReceipt from './seleteReceipt'
 export default {
   name: '',
-  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract},
+  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt},
   data () {
     var checkNumber = (rule, value, callback) => {
       if (typeof +value != 'number') {
@@ -396,9 +419,11 @@ export default {
       accountVisible:false,
       modelVisible:false,
       concratVisible:false,
+      receiptVisible:false,
       modelList:[],
       /* 新建居间项目时 所关联的居间商 */
       centerEnterpriseList:[],
+      address:'',
       form: {
         "sa_contractid": 0,
         "sys_enterpriseid": "",
@@ -423,7 +448,11 @@ export default {
         "productdiscount":'',
         "orderratio":'',
         "ascription_title":'',
-        'ascription_contractid':''
+        'ascription_contractid':'',
+        'receiptName':'',
+        "rec_contactsid":'',//收货联系人
+        'phonenumber':''
+
       },
       rules: {
         title: [
@@ -542,7 +571,10 @@ export default {
       "productdiscount":'',
       "orderratio":'',
       "ascription_title":'',
-      'ascription_contractid':''
+      'ascription_contractid':'',
+      'receiptName':'',
+      "rec_contactsid":'',//收货联系人
+      'phonenumber':''
     }
   },
   methods: {
@@ -637,7 +669,10 @@ export default {
         "productdiscount":'',
         "orderratio":'',
         "ascription_title":'',
-        'ascription_contractid':''
+        'ascription_contractid':'',
+        'receiptName':'',
+        "rec_contactsid":'',//收货联系人
+        'phonenumber':''
       }
     },
     showChange (key) {
@@ -647,15 +682,33 @@ export default {
       this.accountVisible = false
       this.modelVisible = false
       this.concratVisible = false
+      this.receiptVisible = false
       console.log(key,"key的值")
-      key ? this[key] = true : ''
+
       if (key === 'projectVisible'){
-        this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.$refs.project.queryEnterpriseArchives()
-        this.$refs.form.validateField("enterprisename")
-        this.$refs.form.validateField("sys_enterpriseid")
+        if (this.form.sys_enterpriseid !== ''){
+          this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
+          this.$refs.project.queryEnterpriseArchives()
+          key ? this[key] = true : ''
+        }else {
+          this.$refs.form.validateField("enterprisename")
+          this.$refs.form.validateField("sys_enterpriseid")
+        }
+
+      }else if (key === 'receiptVisible'){
+        if (this.form.sys_enterpriseid !== ''){
+          this.$refs.receipt.params.content.sys_enterpriseid = this.form.sys_enterpriseid
+          this.$refs.receipt.queryReceipts()
+          key ? this[key] = true : ''
+        }else {
+          this.$refs.form.validateField("enterprisename")
+          this.$refs.form.validateField("sys_enterpriseid")
+        }
+      }else {
+        key ? this[key] = true : ''
       }
 
+
     },
     agentChange (data) {
       this.form.sys_enterpriseid = data[0].sys_enterpriseid
@@ -670,8 +723,15 @@ export default {
     projectChange (data) {
       this.form.projectname = data.projectname
       this.form.sa_projectid = data.sa_projectid
+      this.address = data.province + data.city + data.county + data.address
       this.projectVisible = false
     },
+    receiptChange (data) {
+      this.form.receiptName = data.name
+      this.form.phonenumber = data.phonenumber
+      this.form.rec_contactsid = data.contactsid
+      this.receiptVisible = false
+    },
     accountChange (data) {
       this.form.enterprisename = data[0].enterprisename
       this.form.sys_enterpriseid = data[0].sys_enterpriseid

+ 194 - 102
src/HDrpManagement/contractManage/components/contractClause/contractClause.vue

@@ -1,40 +1,116 @@
 <template>
   <div>
     <div>
-      <div class="flex-align-center" style="margin-bottom:10px">
-        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
-        <slot name="addProduct"/>
+      <div class="flex-align-center" style="margin-bottom:20px">
+<!--        <el-button size="small" slot="reference" class="inline-16" type="warning" :disabled="disabled" >编 辑</el-button>-->
+        <el-button size="small" slot="reference" class="inline-16" type="warning" :disabled="disabled" >保 存</el-button>
         <el-popconfirm title="确定重置当前合同吗?" @confirm="reset()">
-          <el-button size="small" slot="reference" class="inline-16" :disabled="disabled" v-if="tool.checkAuth($route.name,'resetContractClaus')">重 置</el-button>
+          <el-button size="small" slot="reference" class="inline-16" :disabled="disabled" >重 置</el-button>
         </el-popconfirm>
       </div>
-      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :width="false" height="calc(100vh - 550px)" :custom="true" fixedName="operation" >
-        <template v-slot:customcol="scope">
-          <div v-if="scope.column.columnname == 'content'">
-            <el-input v-if="currentEdit.sa_contract_clauseid==scope.column.data.sa_contract_clauseid || scope.column.data.sa_contract_clauseid == 0" type="textarea" v-model="scope.column.data.content" size="small" placeholder="请输入条款"></el-input>
-            <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
-          </div>
-          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
-        </template>
-        <template v-slot:opreation="scope">
-          <el-button v-if="currentEdit.sa_contract_clauseid == scope.data.sa_contract_clauseid || scope.data.sa_contract_clauseid == 0" type="text" size="mini" @click="save(scope.data)" class="inline-16">保 存</el-button>
-          <slot name="edit" :data="scope.data" v-else></slot>
-          <slot name="del" :data="scope.data"></slot>
-        </template>
-      </tableLayout>
     </div>
-    <div style="margin-top:16px;text-align:right">
-      <el-pagination
-          background
-          small
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="params.content.pageNumber"
-          :page-size="params.content.pageSize"
-          layout="total, prev, pager, next, jumper"
-          :total="total">
-      </el-pagination>
+
+    <div style="width: 49%;margin-bottom: 20px">
+      <el-descriptions title="合同条款" :column="1" border labelClassName="my-label" contentClassName="my-content" style="font-size: 15px" >
+        <el-descriptions-item label="压力等级" label-class-name="my-label" content-class-name="my-content">
+          <el-input v-model="form.dataextend.pressure" placeholder="未做特殊备注,请填写压力等级"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="运输费承担方">
+          <el-select v-model="freightpayer" placeholder="请选择" style="width: 100%">
+            <el-option
+                v-for="item in freightpayerList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </el-descriptions-item>
+        <el-descriptions-item label="交货方式">
+          <el-select v-model="form.deliverymode" placeholder="请选择" style="width: 100%">
+            <el-option
+                v-for="item in deliverymodeList"
+                :key="item.rowindex"
+                :label="item.value"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </el-descriptions-item>
+        <el-descriptions-item label="付款方式">
+          <el-select v-model="form.paytype" placeholder="请选择" style="width: 100%">
+            <el-option
+                v-for="item in paytypeList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </el-descriptions-item>
+        <el-descriptions-item label="付款方式(合同条款)">
+          <el-input v-model="clause[0].value" placeholder="请填写" style="margin-bottom: 10px"></el-input>
+          <el-input v-model="clause[1].value" placeholder="请填写" style="margin-bottom: 10px"></el-input>
+          <el-input v-model="clause[2].value" placeholder="请填写" style="margin-bottom: 10px"></el-input>
+          <el-input v-model="clause[3].value" placeholder="请填写" ></el-input>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <div style="width: 100%" class="inline-16">
+      <el-descriptions title="落款信息" :column="1" border labelClassName="my-label" contentClassName="my-content" style="font-size: 15px">
+      </el-descriptions>
+    </div>
+    <div style="width: 49%" class="inline-24">
+      <el-descriptions title="" :column="1" border labelClassName="my-label" contentClassName="my-content" style="font-size: 15px;margin-bottom: 10px">
+        <el-descriptions-item label="乙方(需方)" label-class-name="my-label" content-class-name="my-content">
+          <el-input v-model="input" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="税号">
+          <el-input v-model="form.parta.taxno" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="开户银行">
+          <el-input v-model="form.parta.bank" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="开户账号">
+          <el-input v-model="form.parta.bankcardno" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="地址">
+          <el-input v-model="form.parta.address" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="电话">
+          <el-input v-model="form.parta.phonenumber" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="法人">
+          <el-input v-model="form.parta.contact" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+      </el-descriptions>
     </div>
+
+    <div style="width: 49%;display: inline-block !important;" >
+      <el-descriptions title="" :column="1" border labelClassName="my-label" contentClassName="my-content" style="font-size: 15px;margin-bottom: 10px">
+        <el-descriptions-item label="甲方(供方)" label-class-name="my-label" content-class-name="my-content">
+          <el-input v-model="input" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="税号">
+          <el-input v-model="form.partb.taxno" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="开户银行">
+          <el-input v-model="form.partb.bank" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="开户账号">
+          <el-input v-model="form.partb.bankcardno" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="地址">
+          <el-input v-model="form.partb.address" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="电话">
+          <el-input v-model="form.partb.phonenumber" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+        <el-descriptions-item label="法人">
+          <el-input v-model="form.partb.contact" placeholder="请填写"></el-input>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+
+
+
   </div>
 </template>
 
@@ -45,25 +121,73 @@ export default {
   name: '',
   data() {
     return {
-      list:[],
-      params: {
-        "id": 20221128162302,
-        "content": {
-          "sa_contractid":'',
-          "pageNumber": 1,
-          "pageSize": 20,
-          "where": {
-              "condition": ""
-          }
-        },
-      },
+      input:'',
       form: {
-        discountrate:'',
+        "sa_contractid": 2,
+        "dataextend": {
+          "pressure": "" //压力等级
+        },
+        "deliverymode": "", //交货方式
+        "paytype": "", //付款方式
+        "parta": {
+          "taxno": "1",
+          "bank": "",
+          "bankcardno": "",
+          "address": "",
+          "phonenumber": "",
+          "contact": "",
+          "freightpayer": 0 //运输费承担方
+        },
+        "partb": {
+          "taxno": "2",
+          "bank": "",
+          "bankcardno": "",
+          "address": "",
+          "phonenumber": "",
+          "contact": "",
+          "freightpayer": 1 //运输费承担方
+        }
       },
-      tablecols:[],
-      total:0,
-      currentEdit:'',
-      itemclassid:''
+      freightpayer:'',
+      freightpayerList:[
+        {
+          label:'甲方',
+          value:'甲方',
+        },
+        {
+          label:'乙方',
+          value:'乙方',
+        }
+      ],
+      deliverymodeList:{},
+      paytypeList:[
+        {
+          label:'发货即收款',
+          value:'发货即收款',
+        },
+        {
+          label:'发货15日收款',
+          value:'发货15日收款',
+        },
+        {
+          label:'发货30日收款',
+          value:'发货30日收款',
+        },
+      ],
+      clause:[
+        {
+          value:''
+        },
+        {
+          value:''
+        },
+        {
+          value:''
+        },
+        {
+          value:''
+        }
+      ]
     };
   },
   computed:{
@@ -71,69 +195,37 @@ export default {
   watch:{
   },
   created () {
-    if (this.$route.query.id) this.listData()
-    this.tablecols = this.tool.tabelCol(this.$route.name).clauseListTable.tablecols
+  },
+  mounted() {
+    this.queryDeliverymode()
   },
   methods: {
-    async listData(){
-      this.params.content.sa_contractid = this.$route.query.id
-      const res = await this.$api.requested(this.params)
-      this.list = res.data
-      this.total = res.total
-      console.log(this.list);
-      
-    },
-    handleChange(num) {
-    },
-    async reset () {
-      let res = await this.$api.requested({
-        "id": 20221128161602,
-        "content": {
-            "sa_contractid":this.$route.query.id
+    async queryDeliverymode(){
+      const res = await this.$api.requested({
+        classname: "sysmanage.develop.optiontype.optiontype",
+        method: "optiontypeselect",
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          typename: "deliverymode",
+          parameter: {},
         },
       })
-      this.tool.showMessage(res,() => {
-        this.listData()
-      })
-    },
-    async save (data) {
-      if(!data.content)  {
-        this.$message.error('条款内容不能为空');
-      }else {
-        let res = await this.$api.requested({
-          "id": 20221128144502,
-          "content": {
-            "sa_contractid": this.$route.query.id,
-            "items": [
-              {
-                "sa_contract_clauseid": data.sa_contract_clauseid,
-                "content": data.content
-              },
-            ]
-          },
-        })
-        this.tool.showMessage(res,() => {
-
-          let index = this.list.findIndex(item => item == data)
-          this.list[index] = res.data[0]
-          this.currentEdit = {}
-          console.log(this.list);
-          this.$forceUpdate()
-        })
-      }
-    },
-    handleSizeChange(val) {
-      // console.log(`每页 ${val} 条`);
-      this.params.content.pageSize = val
-    },
-    handleCurrentChange(val) {
-      // console.log(`当前页: ${val}`);
-      this.params.content.pageNumber = val
-    },
+      this.deliverymodeList = res.data
+      this.form.paytype = this.paytypeList[0].value
+    }
   },
 };
 </script>
 
 <style scoped>
-
+/deep/ .el-descriptions__title {
+  font-size: 15px;
+  font-weight: 180;
+}
+/deep/ .my-label {
+  width: 160px !important;
+  font-size: 14px;
+  color: rgb(163, 163, 163) !important;
+}
 </style>

+ 139 - 0
src/HDrpManagement/contractManage/components/contractClause/contractClauseCopy.vue

@@ -0,0 +1,139 @@
+<template>
+  <div>
+    <div>
+      <div class="flex-align-center" style="margin-bottom:10px">
+        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
+        <slot name="addProduct"/>
+        <el-popconfirm title="确定重置当前合同吗?" @confirm="reset()">
+          <el-button size="small" slot="reference" class="inline-16" :disabled="disabled" v-if="tool.checkAuth($route.name,'resetContractClaus')">重 置</el-button>
+        </el-popconfirm>
+      </div>
+      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :width="false" height="calc(100vh - 550px)" :custom="true" fixedName="operation" >
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname == 'content'">
+            <el-input v-if="currentEdit.sa_contract_clauseid==scope.column.data.sa_contract_clauseid || scope.column.data.sa_contract_clauseid == 0" type="textarea" v-model="scope.column.data.content" size="small" placeholder="请输入条款"></el-input>
+            <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+        </template>
+        <template v-slot:opreation="scope">
+          <el-button v-if="currentEdit.sa_contract_clauseid == scope.data.sa_contract_clauseid || scope.data.sa_contract_clauseid == 0" type="text" size="mini" @click="save(scope.data)" class="inline-16">保 存</el-button>
+          <slot name="edit" :data="scope.data" v-else></slot>
+          <slot name="del" :data="scope.data"></slot>
+        </template>
+      </tableLayout>
+    </div>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="params.content.pageNumber"
+          :page-size="params.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['disabled'],
+  components: {},
+  name: '',
+  data() {
+    return {
+      list:[],
+      params: {
+        "id": 20221128162302,
+        "content": {
+          "sa_contractid":'',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+              "condition": ""
+          }
+        },
+      },
+      form: {
+        discountrate:'',
+      },
+      tablecols:[],
+      total:0,
+      currentEdit:'',
+      itemclassid:''
+    };
+  },
+  computed:{
+  },
+  watch:{
+  },
+  created () {
+    if (this.$route.query.id) this.listData()
+    this.tablecols = this.tool.tabelCol(this.$route.name).clauseListTable.tablecols
+  },
+  methods: {
+    async listData(){
+      this.params.content.sa_contractid = this.$route.query.id
+      const res = await this.$api.requested(this.params)
+      this.list = res.data
+      this.total = res.total
+      console.log(this.list);
+      
+    },
+    handleChange(num) {
+    },
+    async reset () {
+      let res = await this.$api.requested({
+        "id": 20221128161602,
+        "content": {
+            "sa_contractid":this.$route.query.id
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.listData()
+      })
+    },
+    async save (data) {
+      if(!data.content)  {
+        this.$message.error('条款内容不能为空');
+      }else {
+        let res = await this.$api.requested({
+          "id": 20221128144502,
+          "content": {
+            "sa_contractid": this.$route.query.id,
+            "items": [
+              {
+                "sa_contract_clauseid": data.sa_contract_clauseid,
+                "content": data.content
+              },
+            ]
+          },
+        })
+        this.tool.showMessage(res,() => {
+
+          let index = this.list.findIndex(item => item == data)
+          this.list[index] = res.data[0]
+          this.currentEdit = {}
+          console.log(this.list);
+          this.$forceUpdate()
+        })
+      }
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+    },
+  },
+};
+</script>
+
+<style scoped>
+
+</style>

+ 62 - 4
src/HDrpManagement/contractManage/components/editContract.vue

@@ -153,7 +153,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="项目名称:" prop="sa_projectid">
+              <el-form-item label="项目:" prop="sa_projectid">
                 <el-popover
                   placement="bottom"
                   trigger="manual"
@@ -164,11 +164,33 @@
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目地址:" prop="">
+                <el-input disabled type="text" size="small" v-model="address"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="业务员:" prop="salername">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="收货人:" prop="projectname">
+                <el-popover
+                    placement="bottom"
+                    trigger="manual"
+                    v-model="receiptVisible"
+                    width="600">
+                  <seleteReceipt ref="receipt" type="1" @onSelect="receiptChange" @onCanel="receiptVisible=false"></seleteReceipt>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('receiptVisible')" v-model="form.name"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="收货人电话:" prop="">
+                <el-input disabled type="text" size="small" v-model="form.phonenumber"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="签约日期:" prop="signdate">
                 <el-date-picker
@@ -364,12 +386,13 @@ import seleteProject from './seleteProject'
 import selectModel from './seleteModel'
 import TimeSelect from './TimeSelect'
 import seleteProjectContract from './seleteProjectContract'
+import seleteReceipt from './seleteReceipt'
 import { log } from '@antv/g2plot/lib/utils'
 
 export default {
   props:['data','disabled'],
   name: '',
-  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract},
+  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt},
   data () {
     var checkNumber = (rule, value, callback) => {
       if (typeof +value != 'number') {
@@ -398,6 +421,7 @@ export default {
       accountVisible:false,
       modelVisible:false,
       concratVisible:false,
+      address:'',
       /* 新建居间项目时 所关联的居间商 */
       form: {
         "sa_contractid": 0,
@@ -423,7 +447,11 @@ export default {
         "calculatemodel":1,
         "productdiscount":'',
         "orderratio":'',
-        "ascription_title":''
+        "ascription_title":'',
+        'ascription_contractid':'',
+        'name':'',
+        "rec_contactsid":'',//收货联系人
+        'phonenumber':''
       },
       rules: {
         title: [
@@ -526,6 +554,7 @@ export default {
   methods: {
     editBtn () {
       this.form = Object.assign({},this.form,this.data)
+      this.address = this.form.province + this.form.city + this.form.county + this.form.address
       this.drawer = true
       this.$nextTick(() => {
         this.$refs.timeSelect.time = [this.form.begdate,this.form.enddate]
@@ -621,12 +650,34 @@ export default {
       this.accountVisible = false
       this.modelVisible = false
       this.concratVisible = false
-      key ? this[key] = true : ''
+     /* key ? this[key] = true : ''
       if (key === 'projectVisible'){
         this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
         this.$refs.project.queryEnterpriseArchives()
         this.$refs.form.validateField("enterprisename")
         this.$refs.form.validateField("sys_enterpriseid")
+      }*/
+      if (key === 'projectVisible'){
+        if (this.form.sys_enterpriseid !== ''){
+          this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
+          this.$refs.project.queryEnterpriseArchives()
+          key ? this[key] = true : ''
+        }else {
+          this.$refs.form.validateField("enterprisename")
+          this.$refs.form.validateField("sys_enterpriseid")
+        }
+
+      }else if (key === 'receiptVisible'){
+        if (this.form.sys_enterpriseid !== ''){
+          this.$refs.receipt.params.content.sys_enterpriseid = this.form.sys_enterpriseid
+          this.$refs.receipt.queryReceipts()
+          key ? this[key] = true : ''
+        }else {
+          this.$refs.form.validateField("enterprisename")
+          this.$refs.form.validateField("sys_enterpriseid")
+        }
+      }else {
+        key ? this[key] = true : ''
       }
     },
     onCancel () {
@@ -652,11 +703,18 @@ export default {
         }).then (() => {
           this.form.projectname = data.projectname
           this.form.sa_projectid = data.sa_projectid
+          this.address = data.province + data.city + data.county + data.address
           this.projectVisible = false
         })
         
       }
     },
+    receiptChange (data) {
+      this.form.name = data.name
+      this.form.phonenumber = data.phonenumber
+      this.form.rec_contactsid = data.contactsid
+      this.receiptVisible = false
+    },
     accountChange (data) {
       this.form.enterprisename = data[0].enterprisename
       this.form.sys_enterpriseid = data[0].sys_enterpriseid

+ 122 - 0
src/HDrpManagement/contractManage/components/seleteReceipt.vue

@@ -0,0 +1,122 @@
+<template>
+  <div>
+    <div>
+      <div class="inline-16" style="margin-bottom:10px">
+        <el-input suffix-icon="el-icon-search" size="small" v-model="params.content.where.condition" placeholder="姓名,手机号" @keyup.enter.native="queryReceipts(params.content.pageNumber = 1)" @clear="queryReceipts(params.content.pageNumber = 1)" clearable></el-input>
+      </div>
+      <el-table
+          :data="ENlist"
+          stripe
+          style="width: 100%"
+          height="300"
+          border>
+        <el-table-column
+            prop="name"
+            label="姓名"
+            width="180">
+        </el-table-column>
+        <el-table-column
+            prop="phonenumber"
+            label="手机号"
+            width="180">
+        </el-table-column>
+        <el-table-column
+            prop="email"
+            label="邮箱">
+        </el-table-column>
+        <el-table-column
+            prop="depname"
+            label="部门">
+        </el-table-column>
+        <el-table-column
+            prop="position"
+            label="职位">
+        </el-table-column>
+        <el-table-column
+            prop="sex"
+            label="性别">
+        </el-table-column>
+        <el-table-column>
+          <template slot-scope="scope">
+            <el-button size="mini" type="text" @click="rowClick(scope.row)">选 择</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="display:flex;justify-content:space-between;margin-top:16px;">
+        <div style="text-align:left">
+          <el-pagination
+              background
+              small
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="params.content.pageNumber"
+              :page-size="params.content.pageSize"
+              layout="total, prev, pager, next"
+              :total="total">
+          </el-pagination>
+        </div>
+        <el-button size="mini" @click="$emit('onCanel')">取消</el-button>
+      </div>
+
+
+    </div>
+    <!-- <el-input :validate-event="false" slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives"  placeholder="输入企业名称" clearable></el-input> -->
+  </div>
+</template>
+
+<script>
+export default {
+  name: "seleteReceipt",
+  data () {
+    return {
+      ENlist:[],
+      total:0,
+      currentPage:0,
+      form:{},
+      params:{
+        "id": 20221022165503,
+        "content": {
+          'sys_enterpriseid':'',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            "workaddress": ""
+          }
+        },
+      },
+      selected:''
+    }
+  },
+  methods:{
+    async queryReceipts () {
+      const res = await this.$api.requested(this.params)
+      this.ENlist = res.data
+      this.total = res.total
+      console.log(this.ENlist);
+
+    },
+    handleSizeChange(val) {
+      this.params.content.pageSize = val
+      this.queryReceipts()
+    },
+    handleCurrentChange(val) {
+      this.params.content.pageNumber = val
+      this.queryReceipts()
+    },
+    rowClick (row) {
+      this.$emit('onSelect',row)
+    },
+    onCancel () {
+      this.$emit('onCancel')
+    }
+  },
+  mounted () {
+    this.queryReceipts()
+  }
+}
+</script>
+
+<style >
+
+</style>

+ 28 - 4
src/HDrpManagement/contractManage/modules/detail.vue

@@ -96,7 +96,7 @@
         </productClassList>
         <!--合同条款-->
         <contractClause :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' || mainData.type == '工具借用'">
-          <el-button 
+<!--          <el-button
             v-if="tool.checkAuth($route.name,'contractClauseManage')"
             size="small" 
             type="primary" 
@@ -104,8 +104,8 @@
             class="inline-16"
             @click="$refs.Claus.list.unshift({content:'',sa_contract_clauseid:0}),$refs.Claus.editIndex=0,$refs.Claus.form.sa_contract_clauseid=0"
             :disabled="mainData.status != '新建' || !isLeader" 
-          >添 加</el-button>
-          <template v-slot:edit="scope">
+          >添 加</el-button>-->
+<!--          <template v-slot:edit="scope">
             <el-button 
               v-if="tool.checkAuth($route.name,'contractClauseManage')"
               class="inline-16" 
@@ -123,7 +123,7 @@
              :id="scope.data.sa_contract_clauseid" @deleteSuccess="$refs.Claus.listData()"
              v-if="scope.data.sa_contract_clauseid !== 0"
             ></delete-btn>
-          </template>
+          </template>-->
         </contractClause>
       </div>
       <div slot="slot2">
@@ -259,6 +259,10 @@ export default {
             label:'项目名称',
             value:this.mainData.projectname
           },
+          {
+            label:'项目地址',
+            value:this.mainData.projectname ? this.mainData.province + this.mainData.city + this.mainData.county + this.mainData.address:'--'
+          },
           {
             label:'合同类型',
             value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
@@ -279,6 +283,14 @@ export default {
             label:'签约金额(元)',
             value:this.mainData.signamount?this.mainData.signamount:0
           },
+          {
+            label:'收货人',
+            value:this.mainData.name
+          },
+          {
+            label:'收货人电话',
+            value:this.mainData.phonenumber
+          },
           {
             label:'创建时间',
             value:this.mainData.createdate
@@ -641,6 +653,10 @@ export default {
                     label:'项目名称',
                     value:this.mainData.projectname
                   },
+                  {
+                    label:'项目地址',
+                    value:this.mainData.projectname ? this.mainData.province + this.mainData.city + this.mainData.county + this.mainData.address:'--'
+                  },
                   {
                     label:'合同类型',
                     value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
@@ -661,6 +677,14 @@ export default {
                     label:'签约金额(元)',
                     value:this.mainData.signamount?this.mainData.signamount:0
                   },
+                  {
+                    label:'收货人',
+                    value:this.mainData.name
+                  },
+                  {
+                    label:'收货人电话',
+                    value:this.mainData.phonenumber
+                  },
                   {
                     label:'状态',
                     value:this.mainData.status,

+ 1097 - 0
src/HDrpManagement/contractManage/modules/detailCopy.vue

@@ -0,0 +1,1097 @@
+<template>
+  <div>
+    <basicDetails
+        ref="details"
+        :titleText="mainData.billno"
+        :editData="mainData"
+        :mainAreaData="mainAreaData"
+        turnPageId="20221121201502"
+        idname="sa_contractid"
+        ownertable="sa_contract"
+        :tabs="mainData.type === '项目' ? ['产品清单','合同条款','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? ['详细信息'] : ['工具清单','合同条款','详细信息']"
+
+        :statusCheck="[{key:'status',value:'已提交'},{key:'status',value:'审核'},{key:'status',value:'已终止'}]"
+        @pageChange="pageChange"
+        @onEditSuccess="queryMainData($route.query.id)">
+      <div slot="tags">
+      </div>
+      <div slot="customOperation" >
+        <editBtn :modelList="modelList" v-if="tool.checkAuth($route.name,'update')" :disabled="mainData.status != '新建' || !isLeader" @onSuccess="queryMainData();$refs.billno && $refs.billno.listData()" :data="mainData" class="inline-16"/>
+        <submit-check :disabled="!isLeader" ref="submit" :data="mainData" @onSuccess="queryMainData" />
+        <reverseCheck @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status != '新建' && mainData.status != '已终止'" />
+        <contractOver v-if="tool.checkAuth($route.name,'contractOver') && mainData.status != '已终止' && mainData.status != '审核' && isLeader" :disabled="!isLeader" :id="mainData.sa_contractid" @onSuccess="queryMainData"/>
+        <Del :idName="20221121202502" :id="mainData.sa_contractid" idKey="sa_contractids" class="inline-16" v-if="tool.checkAuth($route.name,'toVoid') && mainData.status == '新建' && isLeader"/>
+      </div>
+      <div slot="slot0" >
+        <!--产品清单表-->
+        <productBillno ref="billno" @priceChange="queryMainData" v-if="mainData.type == '项目'">
+          <addProduct ref="addProduct" :data="mainData" v-if="tool.checkAuth($route.name,'productBillManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.billno.listData()"/>
+          <template v-slot:edit="scope">
+            <el-button 
+              v-if="tool.checkAuth($route.name,'productBillManage')"
+              class="inline-16" 
+              :disabled="mainData.status != '新建' || !isLeader" 
+              type="text" size="mini" slot="edit" 
+              @click="$refs.billno.editIndex = scope.data.sa_contract_itemsid;$refs.billno.form = Object.assign({},$refs.billno.form,scope.data)"
+            >编 辑</el-button>
+          </template>
+          <template v-slot:del="scope">
+            <delete-btn v-if="tool.checkAuth($route.name,'productBillManage')"  :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.billno.listData()"></delete-btn>
+          </template>
+        </productBillno>
+        <!--产品明细折扣表-->
+        <productDetailList ref="productDetailList" v-if="mainData.type == '框架'" @priceChange="queryMainData">
+          <addProductDetail :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" v-if="tool.checkAuth($route.name,'productDetailManage')" @onSuccess="$refs.productDetailList.listData()"/>
+          <template v-slot:edit="scope">
+            <el-button 
+              v-if="tool.checkAuth($route.name,'productDetailManage')"
+              class="inline-16" 
+              :disabled="mainData.status != '新建' || !isLeader" 
+              type="text" 
+              size="mini" 
+              slot="edit" 
+              @click="$refs.productDetailList.editIndex = scope.data.sa_contract_itemsid;$refs.productDetailList.form = Object.assign({},$refs.productDetailList.form,scope.data)"
+            >编 辑</el-button>
+          </template>
+          <template v-slot:del="scope">
+            <delete-btn v-if="tool.checkAuth($route.name,'productDetailManage')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.productDetailList.listData()"></delete-btn>
+          </template>
+        </productDetailList>
+        <!--工具清单-->
+        <toolList ref="toolList" v-if="mainData.type == '工具借用'" @priceChange="queryMainData">
+          <addTool v-if="tool.checkAuth($route.name,'toolListManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.toolList.listData()"/>
+          <template v-slot:edit="scope">
+            <el-button 
+              v-if="tool.checkAuth($route.name,'toolListManage')"
+              class="inline-16" 
+              :disabled="mainData.status != '新建' || !isLeader" 
+              type="text" 
+              size="mini" 
+              slot="edit" 
+              @click="$refs.toolList.editIndex = scope.data.sa_contract_itemsid;$refs.toolList.form = Object.assign({},$refs.toolList.form,scope.data)"
+            >编 辑</el-button>
+          </template>
+          <template v-slot:del="scope">
+            <delete-btn v-if="tool.checkAuth($route.name,'toolListManage')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.toolList.listData()"></delete-btn>
+          </template>
+        </toolList>
+        <BaseInfo v-if="mainData.type == '居间'" :detailInfo="detailInfo"/>
+      </div>
+      <div slot="slot1" >
+        <!--产品类别折扣表-->
+        <productClassList ref="classList" @priceChange="queryMainData" v-if="mainData.type == '框架'">
+          <addClass v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"/>
+          <template v-slot:edit="scope">
+            <el-button 
+              v-if="tool.checkAuth($route.name,'productClassManage')"
+              class="inline-16" 
+              :disabled="mainData.status != '新建' || !isLeader" 
+              type="text" size="mini" slot="edit" 
+              @click="$refs.classList.currentEdit = scope.data;$refs.classList.form = Object.assign({},$refs.classList.form,scope.data)"
+            >编 辑</el-button>
+          </template>
+          <template v-slot:del="scope">
+            <delete-btn v-if="tool.checkAuth($route.name,'productClassManage')" :nameId="20221124111202" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsaleclassids" :id="scope.data.sa_contract_itemsaleclassid" @deleteSuccess="$refs.classList.listData()"></delete-btn>
+          </template>
+        </productClassList>
+        <!--合同条款-->
+        <contractClause :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' || mainData.type == '工具借用'">
+          <el-button 
+            v-if="tool.checkAuth($route.name,'contractClauseManage')"
+            size="small" 
+            type="primary" 
+            slot="addProduct" 
+            class="inline-16"
+            @click="$refs.Claus.list.unshift({content:'',sa_contract_clauseid:0}),$refs.Claus.editIndex=0,$refs.Claus.form.sa_contract_clauseid=0"
+            :disabled="mainData.status != '新建' || !isLeader" 
+          >添 加</el-button>
+          <template v-slot:edit="scope">
+            <el-button 
+              v-if="tool.checkAuth($route.name,'contractClauseManage')"
+              class="inline-16" 
+              :disabled="mainData.status != '新建' || scope.data.editable != 1 || !isLeader"
+              type="text" size="mini" slot="edit" 
+              @click="$refs.Claus.currentEdit = scope.data;$refs.Claus.form = Object.assign({},$refs.Claus.form,scope.data)"
+            >编 辑</el-button>
+          </template>
+
+          <template v-slot:del="scope">
+            <delete-btn
+             :nameId="20221128160302" 
+             nameKey="sa_contract_clauseids"
+             :message="message"
+             :id="scope.data.sa_contract_clauseid" @deleteSuccess="$refs.Claus.listData()"
+             v-if="scope.data.sa_contract_clauseid !== 0"
+            ></delete-btn>
+          </template>
+        </contractClause>
+      </div>
+      <div slot="slot2">
+        <!--业绩目标-->
+        <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && mainData.type == '框架'" :data="mainData">
+          <template v-slot:addTarget="scope">
+              <add-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="mainData" @onSuccess="successYear"></add-target>
+          </template>
+          <template v-slot:edit="scope">
+            <edit-target class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
+          </template>
+          <template v-slot:delete="scope">
+            <del-target @onSuccess="$refs.taskTarget.queryData()" class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :id="scope.data.sa_salestargetbillid"></del-target>
+          </template>
+        </taskTarget>
+
+        <BaseInfo v-if="mainData.type !== '居间' && mainData.type !== '框架'" :detailInfo="detailInfo"/>
+      </div>
+      <div slot="slot3">
+        <BaseInfo v-if="mainData.type !== '居间'" :detailInfo="detailInfo"/>
+      </div>
+    </basicDetails>
+  </div>
+</template>
+
+<script>
+import Del from '../components/delete'
+import editBtn from '../components/editContract'
+import SubmitCheck from '../components/submitCheck'
+import productBillno from '../components/productList/productBillno'
+import productDetailList from '../components/productDetailList/productDetailList'
+import addProduct from '../components/productList/addProduct'
+import addProductDetail from '../components/productDetailList/addProduct'
+import addTool from '../components/toolList/addTool'
+import toolList from '../components/toolList/toolList'
+import addClass from '../components/productClassList/addProduct'
+import productClassList from '../components/productClassList/productClassList'
+import contractClause from '../components/contractClause/contractClause'
+import editTarget from '../components/taskTarget/editTarget'
+import addTarget from '../components/taskTarget/addTarget'
+import taskTarget from '../components/taskTarget/taskTarget'
+import delTarget from '../components/taskTarget/delTarget'
+import contractOver from '../components/contractOver'
+import reverseCheck from '../components/reverseCheck'
+import BaseInfo from '@/HDrpManagement/projectChange/modules/modules/baseInfo/baseInfo'
+export default {
+  name: "detail",
+  data() {
+    return {
+      mainData:{},
+      mainAreaData:{},
+      modelList:[],
+      isLeader:false,
+      detailInfo:{},
+      message:'确定删除当前条款吗?'
+    }
+  },
+  components:{
+    Del,
+    SubmitCheck,
+    editBtn,
+    productBillno,
+    addProduct,
+    productDetailList,
+    addProductDetail,
+    addTool,
+    toolList,
+    addClass,
+    productClassList,
+    contractClause,
+    editTarget,
+    taskTarget,
+    contractOver,
+    reverseCheck,
+    addTarget,
+    delTarget,
+    BaseInfo
+  },
+  watch: {
+    mainData: {
+      handler (val) {
+        if (Object.keys(JSON.parse(window.sessionStorage.getItem('userInfo'))).length > 0) {
+        this.isLeader = val.leader ? JSON.parse(window.sessionStorage.getItem('active_account')).userid == val.leader[0].userid : false
+        } else {
+          this.isLeader = true
+        }
+      },
+      deep:true,
+      immediate:true
+    }
+  },
+  methods:{
+    async queryMainData(id) {
+      const res = await this.$api.requested({
+        "id":20221121195102,
+        "content": {
+          "sa_contractid": this.$route.query.id
+        }
+      })
+      this.mainData = res.data
+      this.$refs.details.param.content.type = this.$route.query.tabIndex
+      // this.$refs.details.param.content.where.type = this.$route.query.type
+      this.mainData.type == '项目' 
+        ? this.mainData.typemx == '直销' 
+          ? this.$router.replace({path:'/contractDetail',query:{id:this.$route.query.id,rowindex:this.$route.query.rowindex,type:'直销项目',tabIndex:this.$route.query.tabIndex}}) : this.$router.replace({path:'/contractDetail',query:{id:this.$route.query.id,rowindex:this.$route.query.rowindex,type:'经销项目',tabIndex:this.$route.query.tabIndex}})
+          : this.$router.replace({path:'/contractDetail',query:{id:this.$route.query.id,rowindex:this.$route.query.rowindex,type:this.mainData.type,tabIndex:this.$route.query.tabIndex}})
+
+      this.changeDataStructure()
+    },
+    changeDataStructure() {
+      let that = this
+      this.mainData.type == '项目' 
+        ? this.mainData.typemx == '直销' 
+          ? this.mainAreaData = [
+            /* 直销信息 */
+          {
+            label:'合同编号',
+            value:this.mainData.billno
+          },
+          {
+            label:'标题',
+            value:this.mainData.title
+          },
+          {
+            label:'合同模板',
+            value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议模板' : '经销项目协议模板' : ''
+          },
+          {
+            label:'客户',
+            value:this.mainData.enterprisename
+          },
+          {
+            label:'项目名称',
+            value:this.mainData.projectname
+          },
+          {
+            label:'项目地址',
+            value:this.mainData.projectname ? this.mainData.province + this.mainData.city + this.mainData.county + this.mainData.address:'--'
+          },
+          {
+            label:'合同类型',
+            value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
+          },
+          {
+            label:'业务员',
+            value:this.mainData.salername
+          },
+          {
+            label:'合同有效期',
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+          },
+          {
+            label:'签约日期',
+            value:this.mainData.signdate
+          },
+          {
+            label:'签约金额(元)',
+            value:this.mainData.signamount?this.mainData.signamount:0
+          },
+          {
+            label:'收货人',
+            value:this.mainData.name
+          },
+          {
+            label:'收货人电话',
+            value:this.mainData.phonenumber
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'状态',
+            value:this.mainData.status,
+            style:function () {
+            let style = {}
+            switch (that.mainData.status) {
+                case '新建':
+                  style = {color:'#3874f6'}
+                  break;
+                case '已提交':
+                  style = {color:'#52c41a'}
+                  break;
+                case '审核':
+                  style = {color:'#333333'}
+                  break;
+                default:
+                  break;
+              }
+              return style
+            }
+          },
+          {
+            label:'合同描述',
+            value:this.mainData.remarks
+          },
+        ] : this.mainAreaData = [
+          /* 经销信息 */
+          {
+            label:'合同编号',
+            value:this.mainData.billno
+          },
+          {
+            label:'标题',
+            value:this.mainData.title
+          },
+          {
+            label:'合同模板',
+            value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议模板' : '经销项目协议模板' : ''
+          },
+          {
+            label:'经销商',
+            value:this.mainData.enterprisename
+          },
+          {
+            label:'项目名称',
+            value:this.mainData.projectname
+          },
+          {
+            label:'合同类型',
+            value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
+          },
+          {
+            label:'业务员',
+            value:this.mainData.salername
+          },
+          {
+            label:'合同有效期',
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+          },
+          {
+            label:'签约日期',
+            value:this.mainData.signdate
+          },
+          {
+            label:'签约金额(元)',
+            value:this.mainData.signamount?this.mainData.signamount:0
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'状态',
+            value:this.mainData.status,
+            style:function () {
+            let style = {}
+            switch (that.mainData.status) {
+                case '新建':
+                  style = {color:'#3874f6'}
+                  break;
+                case '已提交':
+                  style = {color:'#52c41a'}
+                  break;
+                case '审核':
+                  style = {color:'#333333'}
+                  break;
+                default:
+                  break;
+              }
+              return style
+            }
+          },
+          {
+            label:'合同描述',
+            value:this.mainData.remarks
+          },
+        ] : this.mainData.type == '框架'
+            ? this.mainAreaData = [
+            /* 合作协议 */
+          {
+            label:'合同编号',
+            value:this.mainData.billno
+          },
+          {
+            label:'标题',
+            value:this.mainData.title
+          },
+          {
+            label:'合同模板',
+            value:'经销商合作协议模板'
+          },
+          {
+            label:'经销商',
+            value:this.mainData.enterprisename
+          },
+          {
+            label:'业务员',
+            value:this.mainData.salername
+          },
+          {
+            label:'合同类型',
+            value:'经销商合作协议'
+          },
+          {
+            label:'折扣(%)',
+            value:Math.round((this.mainData.discountrate * 100)*100)/100
+          },
+          {
+            label:'合同有效期',
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+          },
+          {
+            label:'签约日期',
+            value:this.mainData.signdate
+          },
+          {
+            label:'签约金额(元)',
+            value:this.mainData.signamount?this.mainData.signamount:0
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'状态',
+            value:this.mainData.status,
+            style:function () {
+            let style = {}
+            switch (that.mainData.status) {
+                case '新建':
+                  style = {color:'#3874f6'}
+                  break;
+                case '已提交':
+                  style = {color:'#52c41a'}
+                  break;
+                case '审核':
+                  style = {color:'#333333'}
+                  break;
+                default:
+                  break;
+              }
+              return style
+            }
+          },
+          {
+            label:'合同描述',
+            value:this.mainData.remarks
+          },
+        ] : this.mainData.type == '工具借用'
+          ? this.mainAreaData = [
+          /* 工具借用 */
+          {
+            label:'合同编号',
+            value:this.mainData.billno
+          },
+          {
+            label:'标题',
+            value:this.mainData.title
+          },
+          {
+            label:'合同模板',
+            value:'工具借用协议模板'
+          },
+          {
+            label:'客户',
+            value:this.mainData.enterprisename
+          },
+          {
+            label:'合同类型',
+            value:'工具借用协议'
+          },
+          {
+            label:'业务员',
+            value:this.mainData.salername
+          },
+          {
+            label:'合同有效期',
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+          },
+          {
+            label:'签约日期',
+            value:this.mainData.signdate
+          },
+          {
+            label:'单套价格(元)',
+            value:this.mainData.signamount?this.mainData.signamount:0
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'状态',
+            value:this.mainData.status,
+            style:function () {
+            let style = {}
+            switch (that.mainData.status) {
+                case '新建':
+                  style = {color:'#3874f6'}
+                  break;
+                case '已提交':
+                  style = {color:'#52c41a'}
+                  break;
+                case '审核':
+                  style = {color:'#333333'}
+                  break;
+                default:
+                  break;
+              }
+              return style
+            }
+          },
+          {
+            label:'合同描述',
+            value:this.mainData.remarks
+          },
+        ] : this.mainAreaData = [
+          /* 居间协议 */
+          {
+            label:'合同编号',
+            value:this.mainData.billno
+          },
+          {
+            label:'标题',
+            value:this.mainData.title
+          },
+          {
+            label:'合同模板',
+            value:'居间协议模板'
+          },
+          {
+            label:'项目合同',
+            value:this.mainData.ascription_title
+          },
+          {
+            label:'居间服务商',
+            value:this.mainData.enterprisename
+          },
+          {
+            label:'项目名称',
+            value:this.mainData.projectname
+          },
+          {
+            label:'合同类型',
+            value:'居间协议'
+          },
+          {
+            label:'业务员',
+            value:this.mainData.salername
+          },
+          {
+            label:'合同有效期',
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+          },
+          {
+            label:'签约日期',
+            value:this.mainData.signdate
+          },
+          {
+            label:this.mainData.calculatemodel == 1 ? '订单金额比例(%)' : '产品折扣(%)',
+            value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'状态',
+            value:this.mainData.status,
+            style:function () {
+            let style = {}
+            switch (that.mainData.status) {
+                case '新建':
+                  style = {color:'#3874f6'}
+                  break;
+                case '已提交':
+                  style = {color:'#52c41a'}
+                  break;
+                case '审核':
+                  style = {color:'#333333'}
+                  break;
+                default:
+                  break;
+              }
+              return style
+            }
+          },
+          {
+            label:'合同描述',
+            value:this.mainData.remarks
+          },
+        ]
+
+      this.mainData.type == '项目'
+          ? this.mainData.typemx == '直销'
+              ? this.detailInfo = {
+                baseInfo : [
+                  /* 直销信息 */
+                  {
+                    label:'合同编号',
+                    value:this.mainData.billno
+                  },
+                  {
+                    label:'标题',
+                    value:this.mainData.title
+                  },
+                  {
+                    label:'合同模板',
+                    value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议模板' : '经销项目协议模板' : ''
+                  },
+                  {
+                    label:'客户',
+                    value:this.mainData.enterprisename
+                  },
+                  {
+                    label:'项目名称',
+                    value:this.mainData.projectname
+                  },
+                  {
+                    label:'项目地址',
+                    value:this.mainData.projectname ? this.mainData.province + this.mainData.city + this.mainData.county + this.mainData.address:'--'
+                  },
+                  {
+                    label:'合同类型',
+                    value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
+                  },
+                  {
+                    label:'业务员',
+                    value:this.mainData.salername
+                  },
+                  {
+                    label:'合同有效期',
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                  },
+                  {
+                    label:'签约日期',
+                    value:this.mainData.signdate
+                  },
+                  {
+                    label:'签约金额(元)',
+                    value:this.mainData.signamount?this.mainData.signamount:0
+                  },
+                  {
+                    label:'收货人',
+                    value:this.mainData.name
+                  },
+                  {
+                    label:'收货人电话',
+                    value:this.mainData.phonenumber
+                  },
+                  {
+                    label:'状态',
+                    value:this.mainData.status,
+                    style:function () {
+                      let style = {}
+                      switch (that.mainData.status) {
+                        case '新建':
+                          style = {color:'#3874f6'}
+                          break;
+                        case '已提交':
+                          style = {color:'#52c41a'}
+                          break;
+                        case '审核':
+                          style = {color:'#333333'}
+                          break;
+                        default:
+                          break;
+                      }
+                      return style
+                    }
+                  },
+                  {
+                    label:'合同描述',
+                    value:this.mainData.remarks
+                  },
+                ],
+                systemInfo: [
+                  {label:'创建人',value:this.mainData.createby},
+                  {label:'创建时间',value:this.mainData.createdate},
+                  {label:'最近编辑人',value:this.mainData.changeby},
+                  {label:'最近编辑时间',value:this.mainData.changedate},
+                  {label:'提交人',value:this.mainData.submitby},
+                  {label:'提交时间',value:this.mainData.submitdate},
+                  {label:'审核人',value:this.mainData.checkby},
+                  {label:'审核时间',value:this.mainData.checkdate},
+                  {label:'转手次数',value:this.mainData.leader[0].leadernum == 0?'0':this.mainData.leader[0].leadernum}
+                ]
+              }
+             : this.detailInfo = {
+                baseInfo : [
+                  /* 经销信息 */
+                  {
+                    label:'合同编号',
+                    value:this.mainData.billno
+                  },
+                  {
+                    label:'标题',
+                    value:this.mainData.title
+                  },
+                  {
+                    label:'合同模板',
+                    value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议模板' : '经销项目协议模板' : ''
+                  },
+                  {
+                    label:'经销商',
+                    value:this.mainData.enterprisename
+                  },
+                  {
+                    label:'项目名称',
+                    value:this.mainData.projectname
+                  },
+                  {
+                    label:'合同类型',
+                    value:this.mainData.type == '项目' ? this.mainData.typemx == '直销' ? '直销项目协议' : '经销项目协议' : ''
+                  },
+                  {
+                    label:'业务员',
+                    value:this.mainData.salername
+                  },
+                  {
+                    label:'合同有效期',
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                  },
+                  {
+                    label:'签约日期',
+                    value:this.mainData.signdate
+                  },
+                  {
+                    label:'签约金额(元)',
+                    value:this.mainData.signamount?this.mainData.signamount:0
+                  },
+                  {
+                    label:'状态',
+                    value:this.mainData.status,
+                    style:function () {
+                      let style = {}
+                      switch (that.mainData.status) {
+                        case '新建':
+                          style = {color:'#3874f6'}
+                          break;
+                        case '已提交':
+                          style = {color:'#52c41a'}
+                          break;
+                        case '审核':
+                          style = {color:'#333333'}
+                          break;
+                        default:
+                          break;
+                      }
+                      return style
+                    }
+                  },
+                  {
+                    label:'合同描述',
+                    value:this.mainData.remarks
+                  },
+                ],
+                systemInfo: [
+                  {label:'创建人',value:this.mainData.createby},
+                  {label:'创建时间',value:this.mainData.createdate},
+                  {label:'最近编辑人',value:this.mainData.changeby},
+                  {label:'最近编辑时间',value:this.mainData.changedate},
+                  {label:'提交人',value:this.mainData.submitby},
+                  {label:'提交时间',value:this.mainData.submitdate},
+                  {label:'审核人',value:this.mainData.checkby},
+                  {label:'审核时间',value:this.mainData.checkdate},
+                  {label:'转手次数',value:this.mainData.leader[0].leadernum == 0?'0':this.mainData.leader[0].leadernum}
+                ]
+              }
+               : this.mainData.type == '框架'
+              ? this.detailInfo ={
+                baseInfo : [
+                  /* 合作协议 */
+                  {
+                    label:'合同编号',
+                    value:this.mainData.billno
+                  },
+                  {
+                    label:'标题',
+                    value:this.mainData.title
+                  },
+                  {
+                    label:'合同模板',
+                    value:'经销商合作协议模板'
+                  },
+                  {
+                    label:'经销商',
+                    value:this.mainData.enterprisename
+                  },
+                  {
+                    label:'业务员',
+                    value:this.mainData.salername
+                  },
+                  {
+                    label:'合同类型',
+                    value:'经销商合作协议'
+                  },
+                  {
+                    label:'折扣(%)',
+                    value:Math.round((this.mainData.discountrate * 100)*100)/100
+                  },
+                  {
+                    label:'合同有效期',
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                  },
+                  {
+                    label:'签约日期',
+                    value:this.mainData.signdate
+                  },
+                  {
+                    label:'签约金额(元)',
+                    value:this.mainData.signamount?this.mainData.signamount:0
+                  },
+                  {
+                    label:'状态',
+                    value:this.mainData.status,
+                    style:function () {
+                      let style = {}
+                      switch (that.mainData.status) {
+                        case '新建':
+                          style = {color:'#3874f6'}
+                          break;
+                        case '已提交':
+                          style = {color:'#52c41a'}
+                          break;
+                        case '审核':
+                          style = {color:'#333333'}
+                          break;
+                        default:
+                          break;
+                      }
+                      return style
+                    }
+                  },
+                  {
+                    label:'合同描述',
+                    value:this.mainData.remarks
+                  },
+                ],
+                systemInfo: [
+                  {label:'创建人',value:this.mainData.createby},
+                  {label:'创建时间',value:this.mainData.createdate},
+                  {label:'最近编辑人',value:this.mainData.changeby},
+                  {label:'最近编辑时间',value:this.mainData.changedate},
+                  {label:'提交人',value:this.mainData.submitby},
+                  {label:'提交时间',value:this.mainData.submitdate},
+                  {label:'审核人',value:this.mainData.checkby},
+                  {label:'审核时间',value:this.mainData.checkdate},
+                  {label:'转手次数',value:this.mainData.leader[0].leadernum == 0?'0':this.mainData.leader[0].leadernum}
+                ]
+              }
+               : this.mainData.type == '工具借用'
+                  ? this.detailInfo = {
+                    baseInfo : [
+                      /* 工具借用 */
+                      {
+                        label:'合同编号',
+                        value:this.mainData.billno
+                      },
+                      {
+                        label:'标题',
+                        value:this.mainData.title
+                      },
+                      {
+                        label:'合同模板',
+                        value:'工具借用协议模板'
+                      },
+                      {
+                        label:'客户',
+                        value:this.mainData.enterprisename
+                      },
+                      {
+                        label:'合同类型',
+                        value:'工具借用协议'
+                      },
+                      {
+                        label:'业务员',
+                        value:this.mainData.salername
+                      },
+                      {
+                        label:'合同有效期',
+                        value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                      },
+                      {
+                        label:'签约日期',
+                        value:this.mainData.signdate
+                      },
+                      {
+                        label:'单套价格(元)',
+                        value:this.mainData.signamount?this.mainData.signamount:0
+                      },
+                      {
+                        label:'状态',
+                        value:this.mainData.status,
+                        style:function () {
+                          let style = {}
+                          switch (that.mainData.status) {
+                            case '新建':
+                              style = {color:'#3874f6'}
+                              break;
+                            case '已提交':
+                              style = {color:'#52c41a'}
+                              break;
+                            case '审核':
+                              style = {color:'#333333'}
+                              break;
+                            default:
+                              break;
+                          }
+                          return style
+                        }
+                      },
+                      {
+                        label:'合同描述',
+                        value:this.mainData.remarks
+                      },
+                    ],
+                    systemInfo: [
+                      {label:'创建人',value:this.mainData.createby},
+                      {label:'创建时间',value:this.mainData.createdate},
+                      {label:'最近编辑人',value:this.mainData.changeby},
+                      {label:'最近编辑时间',value:this.mainData.changedate},
+                      {label:'提交人',value:this.mainData.submitby},
+                      {label:'提交时间',value:this.mainData.submitdate},
+                      {label:'审核人',value:this.mainData.checkby},
+                      {label:'审核时间',value:this.mainData.checkdate},
+                      {label:'转手次数',value:this.mainData.leader[0].leadernum == 0?'0':this.mainData.leader[0].leadernum}
+                    ]
+                  }
+                   : this.detailInfo = {
+                    baseInfo : [
+                      /* 居间协议 */
+                      {
+                        label:'合同编号',
+                        value:this.mainData.billno
+                      },
+                      {
+                        label:'标题',
+                        value:this.mainData.title
+                      },
+                      {
+                        label:'合同模板',
+                        value:'居间协议模板'
+                      },
+                      {
+                        label:'项目合同',
+                        value:this.mainData.ascription_title
+                      },
+                      {
+                        label:'居间服务商',
+                        value:this.mainData.enterprisename
+                      },
+                      {
+                        label:'项目名称',
+                        value:this.mainData.projectname
+                      },
+                      {
+                        label:'合同类型',
+                        value:'居间协议'
+                      },
+                      {
+                        label:'业务员',
+                        value:this.mainData.salername
+                      },
+                      {
+                        label:'合同有效期',
+                        value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                      },
+                      {
+                        label:'签约日期',
+                        value:this.mainData.signdate
+                      },
+                      {
+                        label:this.mainData.calculatemodel == 1 ? '订单金额比例(%)' : '产品折扣(%)',
+                        value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100
+                      },
+                      {
+                        label:'状态',
+                        value:this.mainData.status,
+                        style:function () {
+                          let style = {}
+                          switch (that.mainData.status) {
+                            case '新建':
+                              style = {color:'#3874f6'}
+                              break;
+                            case '已提交':
+                              style = {color:'#52c41a'}
+                              break;
+                            case '审核':
+                              style = {color:'#333333'}
+                              break;
+                            default:
+                              break;
+                          }
+                          return style
+                        }
+                      },
+                      {
+                        label:'合同描述',
+                        value:this.mainData.remarks
+                      },
+                    ],
+                    systemInfo: [
+                      {label:'创建人',value:this.mainData.createby},
+                      {label:'创建时间',value:this.mainData.createdate},
+                      {label:'最近编辑人',value:this.mainData.changeby},
+                      {label:'最近编辑时间',value:this.mainData.changedate},
+                      {label:'提交人',value:this.mainData.submitby},
+                      {label:'提交时间',value:this.mainData.submitdate},
+                      {label:'审核人',value:this.mainData.checkby},
+                      {label:'审核时间',value:this.mainData.checkdate},
+                      {label:'转手次数',value:this.mainData.leader[0].leadernum == 0?'0':this.mainData.leader[0].leadernum}
+                    ]
+                  }
+
+
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange (id,rowindex,tabIndex) {
+      this.flag = false
+      tabIndex = this.$route.query.tabIndex
+      this.$router.replace({path:'/contractDetail',query:{id:id,rowindex:rowindex,tabIndex:tabIndex}})
+      this.queryMainData(id)
+    },
+    onSuccess(){
+      this.visible = false
+      this.queryMainData(this.$route.query.id)
+      this.$emit('onSuccess')
+    },
+    successYear(year){
+      this.$refs.taskTarget.year = year
+      this.$refs.taskTarget.queryData()
+    }
+    // async getModelList () {
+    //   let res = await this.$api.requested({
+    //     "id": 20221121155801,
+    //     "content": { 
+    //       "pageNumber": 1,
+    //         "pageSize": 999999,
+    //         "where":{
+    //         "condition":""
+    //         }
+    //     }
+    //   })
+    //   this.modelList = res.data
+    //   console.log(this.modelList);
+    // },
+  },
+  mounted () {
+    this.queryMainData(this.$route.query.id)
+    // this.getModelList()
+  },
+  created() {
+  }
+}
+</script>
+
+<style scoped>
+
+</style>