Kaynağa Gözat

代码上传

zhangqiOMG 3 yıl önce
ebeveyn
işleme
bc3a842fc8

+ 3 - 2
public/index.html

@@ -15,7 +15,8 @@
     <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>
- 
-
+  <head>
+    <meta http-equiv="pragma" content="no-cache">
+  </head>
 </html>
  

+ 0 - 78
src/App copy.vue

@@ -1,78 +0,0 @@
-<template>
-  <div id="app">
-    <router-view/>
-  </div>
-</template>
-<script>
-  import {mapGetters} from 'vuex'
-  export default{
-    data () {
-      return {
-      }
-    },
-    computed:{
-    ...mapGetters({
-      searchValue:'searchValue',
-    })
-  },
-    methods:{
-    },
-    created () {
-    },
-    watch: {
-      $route(val) {
-        try {
-          if (!val.meta.modules) {
-            let at_modules = JSON.parse(sessionStorage.getItem('active_modules'))
-            val.meta.modules?'':val.meta.modules = at_modules
-          } else {
-            let app = val.meta.modules.apps.filter(e=>{
-              if (e.name === val.name) {
-                console.log(e,'ename')
-                return e
-              } else {
-                let app = JSON.parse(sessionStorage.getItem('activeApp'))
-                console.log(app,'app')
-                return app
-              }
-            })
-            sessionStorage.setItem('active_modules',JSON.stringify(val.meta.modules))
-            
-            this.$store.dispatch('setActiveApp',{app:app[0],val:this.searchValue})
-
-            let system = JSON.parse(sessionStorage.getItem('module_info'))
-            
-            let at_system = system.filter(e=>{
-              if (e.systemid === val.meta.modules.systemid)
-              return e
-            })
-            this.$store.dispatch('getModules',{mod:at_system[0].modules})
-          }          
-        } catch (error) {
-          console.log(error)
-        }
-      }
-    }
-  }
-</script>
-<style>
-body{
-  font:16px/1.5 Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif;
-  font-family: "阿里巴巴普惠体 2.0 35 Thin";
-  min-width: 1200px;
-}
-.rightBar{
-  width:60px;
-  height:100vh;
-  background: rgba(255,255,255,.5);
-  box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
-}
-.el-drawer__header{
-  padding: 10px !important;
-  margin-bottom: 0 !important;
-  font-size: 16px  !important;
-  font-family: PingFang SC-Bold, PingFang SC;
-  font-weight: bold  !important;
-  color: #333333  !important;
-}
-</style>

+ 2 - 2
src/HDrpManagement/orderManage/details/index.vue

@@ -16,8 +16,8 @@
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
         <div slot="customOperation" class="inline-16">
-          <el-button :disabled="mainData.status !== '交期待确认'" class="inline-16"  type="primary" size="mini" @click="confirmdate">确认交期</el-button>
-          <confirmDate class="inline-16" :data="mainData" @onSuccess="queryMainData"></confirmDate>
+          <el-button v-if="tool.checkAuth($route.name,'confirmDate')" :disabled="mainData.status !== '交期待确认'" class="inline-16"  type="primary" size="mini" @click="confirmdate">确认交期</el-button>
+          <confirmDate v-if="tool.checkAuth($route.name,'replyDate')" class="inline-16" :data="mainData" @onSuccess="queryMainData"></confirmDate>
           <el-popover
             placement="top"
             v-model="visible">

+ 2 - 0
src/HDrpManagement/orderManage/modules/add.vue

@@ -178,6 +178,7 @@ export default {
       this.specordermx()
     },
     submitForm() {
+      console.log(this.form)
       this.$refs['form'].validate(async valid => {
         if (!valid) return
         const res = await this.$api.requested({
@@ -222,6 +223,7 @@ export default {
     },
     contractClick (row) {
       this.form.sa_contractid = row.sa_contractid
+      this.form.sa_projectid = row.sa_projectid
       this.form.contractname = row.title === ''?'未知':row.title
       this.visible = false
     },

+ 3 - 10
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -1,15 +1,8 @@
 <template>
   <div>
-    <div v-if="flag === 0 && tool.checkAuth($route.name,'putSubmit')" >
-      <el-button  size="mini" :type="!disabled || rowData.status === '已失败' ?'':'primary'" slot="reference" @click="onSubmit" :disabled="!disabled || rowData.status === '已失败'">提交报备</el-button>
-    </div>
-    <div v-else-if="flag === 1 && tool.checkAuth($route.name,'putCheck')" >
-      <el-button size="mini" type="primary" slot="reference" @click="onCheck" >报备审核</el-button>
-    </div>
-    <div v-if="flag !== 0 && tool.checkAuth($route.name,'putBack') " >
-      <el-button size="mini" type="primary" slot="reference"  @click="onUnCheck" >报备驳回(退回)</el-button>
-    </div>
-
+    <el-button v-if="flag === 0 && tool.checkAuth($route.name,'putSubmit')" size="mini" :type="!disabled || rowData.status === '已失败' ?'':'primary'" slot="reference" @click="onSubmit" :disabled="!disabled || rowData.status === '已失败'">提交报备</el-button>
+    <el-button v-if="flag === 1 && tool.checkAuth($route.name,'putCheck')" size="mini" type="primary" slot="reference" @click="onCheck" >报备审核</el-button>
+    <el-button v-if="flag !== 0 && tool.checkAuth($route.name,'putBack') " size="mini" type="primary" slot="reference"  @click="onUnCheck" >报备驳回(退回)</el-button>
   </div>
 </template>
 

+ 5 - 13
src/HDrpManagement/projectChange/modules/detail.vue

@@ -16,18 +16,10 @@
 <!--    <tagPanl slot="tags" :data="tagObj" ownertable="sa_project" :id="mainData.sa_projectid" @onSuccess="queryMainData"/>-->
     <div slot="customOperation">
       <!-- 此区域提供了自定义操作按钮 -->
-      <div class="inline-16" >
-        <putPeople @putSuccess="putSuccess" v-if="flagTag !== ''" :rowData="mainData" :flagTag="flagTag" :disabled="mainData.disabled" style="width:100%;"/>
-      </div>
-      <div class="inline-16" v-if="tool.checkAuth($route.name,'finish')  && mainData.status === '跟进中'">
-        <finish v-if="tool.checkAuth($route.name,'finish')  && mainData.status === '跟进中'" :disabled="mainData.disabled" @onFinish="onSuccess"></finish>
-      </div>
-      <div class="inline-16">
-        <Del :id="mainData.sa_projectid" :nameId="20221020144302" :rowData="mainData" nameKey="sa_projectids" v-if="tool.checkAuth($route.name,'toVoid') " :disabled="mainData.disabled" @deleteSuccess="deleteSuccess"/>
-      </div>
-      <div class="inline-16">
-        <recovery v-if="tool.checkAuth($route.name,'recovery')  && mainData.status === '已失败'" :rowData="mainData" :disabled="mainData.disabled" @onRecovery="onSuccess"></recovery>
-      </div>
+      <putPeople class="inline-16" @putSuccess="putSuccess" v-if="flagTag !== ''" :rowData="mainData" :flagTag="flagTag" :disabled="mainData.disabled"/>
+      <recovery class="inline-16" v-if="tool.checkAuth($route.name,'recovery')  && mainData.status === '已失败'" :rowData="mainData" :disabled="mainData.disabled" @onRecovery="onSuccess"></recovery>
+      <finish class="inline-16" v-if="tool.checkAuth($route.name,'finish')  && mainData.status === '跟进中'" :disabled="mainData.disabled" @onFinish="onSuccess"></finish>
+      <Del class="inline-16" :id="mainData.sa_projectid" :nameId="20221020144302" :rowData="mainData" nameKey="sa_projectids" v-if="tool.checkAuth($route.name,'toVoid') " :disabled="mainData.disabled" @deleteSuccess="deleteSuccess"/>
 
     </div>
     <template #customBefore>
@@ -84,7 +76,7 @@ import product_set from './modules/productSet/index'
 import Rival from './modules/rival/index'
 import BaseInfo from './modules/baseInfo/baseInfo'
 import StageTask from './modules/stageTask/index'
-import putPeople from '../components/putPeople'
+import putPeople from '../components/putPeople.vue'
 import Check from '../components/check'
 import Locked from '../components/Locked'
 import Del from '../components/del'

+ 54 - 23
src/HDrpManagement/rebatesettlement/details/index.vue

@@ -2,22 +2,25 @@
   <div>
     <basicDetails
         ref="details"
-        :titleText="`${mainData.accountno}-${mainData.name}`"
+        :titleText="`单号:${mainData.billno}`"
         :oldFormPath="{edit:'HDrpManagement/rebatesettlement/modules'}"
         :editData="mainData"
         :mainAreaData="mainAreaData"
         turnPageId="20230104194002"
-        idname="userid"
-        ownertable="sys_users"
+        idname="sa_rebatesettlementid"
+        ownertable="sa_rebatesettlement"
+        delApiId="20230104193402"
         tags=""
-        :tabs="['员工信息','角色信息']"
+        :tabs="['明细信息']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
       </div>
       <div slot="customOperation" >
+        <el-button v-if="tool.checkAuth($route.name,'check')" class="inline-16" size="mini" type="primary" :disabled="mainData.status !== '新建'" @click="checkBill">审 核</el-button>
       </div>
       <div slot="slot0" >
+        <rebatemx></rebatemx>
       </div>
       <div slot="slot1" >
       </div>
@@ -26,6 +29,7 @@
 </template>
 
 <script>
+import rebatemx from './tabs/rebatesettlementmx.vue'
 export default {
   name: "detail",
   data() {
@@ -35,51 +39,56 @@ export default {
     }
   },
   components:{
+    rebatemx
   },
   methods:{
     async queryMainData(id) {
       const res = await this.$api.requested({
-        "classname": "webmanage.users.users",
-        "method": "query_userMain",
+        "id": "20230104200802",
         "content": {
-          "userid": this.$route.query.id
-        }
+          "sa_rebatesettlementid": this.$route.query.id
+        },
       })
       this.mainData = res.data
+      this.changeDataStructure()
     },
     changeDataStructure() {
       this.mainAreaData = [
         {
-          label:'账号类型',
-          value:this.mainData.usertypename
+          label:'结算企业',
+          value:this.mainData.enterprisename
         },
         {
           label:'状态',
-          value:this.minaInfo.status === 'ACTIVE'?'启用':this.minaInfo.status === 'INACTIVE'?'停用':'其他'
+          value:this.mainData.status
         },
         {
-          label:'联系方式',
-          value:this.mainData.phonenumber
+          label:'单据日期',
+          value:this.mainData.billdate
         },
         {
-          label:'上级企业',
-          value:this.mainData.superiorenterprisename
+          label:'合同编号',
+          value:this.mainData.billno_contract
         },
         {
-          label:'成交状态',
-          value:this.mainData.tradingstatus
+          label:'关联订单',
+          value:this.mainData.sonum
         },
         {
-          label:'负责人',
-          value:this.mainData.leader[0]?this.mainData.leader[0].name:""
+          label:'订单金额',
+          value:this.mainData.amount
         },
         {
-          label:'最近跟近时间',
-          value:''
+          label:'订单金额比例',
+          value:this.mainData.calculatemodel
         },
         {
-          label:'所属公海',
-          value:this.mainData.poolname
+          label:'产品折扣',
+          value:this.mainData.productdiscount
+        },
+        {
+          label:'居间费',
+          value:this.mainData.rebate
         }
       ]
     },
@@ -94,6 +103,28 @@ export default {
       this.visible = false
       this.queryMainData(this.$route.query.id)
       this.$emit('onSuccess')
+    },
+    checkBill () {
+      this.$confirm('确定审核该单据吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": "20230104191602",
+          "content": {
+            "sa_rebatesettlementid": this.$route.query.id
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.queryMainData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });          
+      });
     }
   },
   mounted () {

+ 120 - 0
src/HDrpManagement/rebatesettlement/details/tabs/rebatesettlementmx.vue

@@ -0,0 +1,120 @@
+<template>
+  <div>
+    <el-table
+      :data="tableData"
+      border
+      size="small"
+      style="width: 100%">
+      <el-table-column
+        prop="itemname"
+        label="产品"
+        width="itemname">
+      </el-table-column>
+      <el-table-column
+        prop="qty"
+        label="数量"
+        width="90">
+      </el-table-column>
+      <el-table-column
+        prop="marketprice"
+        label="牌价"
+        width="90">
+      </el-table-column>
+      <el-table-column
+        prop="discountrate"
+        label="折扣"
+        width="90">
+      </el-table-column>
+      <el-table-column
+        prop="price"
+        label="单价"
+        width="90">
+      </el-table-column>
+      <el-table-column
+        prop="amount"
+        label="金额"
+        width="100">
+      </el-table-column>
+      <el-table-column
+        prop="rebate_discountrate"
+        label="居间产品折扣"
+        width="150">
+      </el-table-column>
+      <el-table-column
+        prop="rebate_price"
+        label="居间产品单价"
+        width="150">
+      </el-table-column>
+      <el-table-column
+        prop="rebate_unit_price"
+        label="居间单价"
+        width="120">
+      </el-table-column>
+      <el-table-column
+        prop="rebate"
+        label="居间费"
+        width="120">
+      </el-table-column>
+    </el-table>
+    <div class="container normal-panel" style="text-align:right">
+      <el-pagination
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[20, 50, 100, 200]"
+        layout="total,sizes, prev, pager, next, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      rebHeadData:{},
+      tableData:[],
+      param:{
+        "pageNumber": 1,
+        "pageSize": 20,
+      },
+      total:0,
+      currentPage:0
+    }
+  },
+  methods:{
+    async listData () {
+      const res = await this.$api.requested({
+        "id": "20230105092302",
+        "content": {
+          "sa_rebatesettlementid": this.$route.query.id,
+          "pageNumber": this.param.pageNumber,
+          "pageSize": this.param.pageSize,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      this.param.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      this.param.pageNumber = val
+      this.listData()
+    },
+  },
+  mounted () {
+    this.listData()
+  }
+}
+
+</script>
+<style>
+</style>

+ 1 - 1
src/HDrpManagement/rebatesettlement/index.vue

@@ -11,7 +11,7 @@
       :apiId="{query:20230104194002,del:20230104193402}"
       :options="options"
       :detailPath="{
-        path:'/account_details'
+        path:'/rebatesettlement_detail'
       }">
       <div slot="custom"></div>
       <template v-slot:tbList="scope">

+ 153 - 8
src/HDrpManagement/rebatesettlement/modules/add.vue

@@ -1,14 +1,159 @@
 <template>
-  <div>
-    <el-button type="primary" size="small">新 建</el-button>
-  </div>
+<div>
+  <el-button type="primary" size="small" @click="drawer = true">新 建</el-button>
+  <el-drawer
+    title="新建"
+    :visible.sync="drawer"
+    direction="rtl"
+    append-to-body
+    size="900px">
+    <div class="drawer__panel">
+      <el-row :gutter="20">
+        <el-form ref="form" :model="form" :rules="rules" :status-icon="false" label-width="80px" size="small">
+          <el-col :span="8">
+            <el-form-item label="结算企业" prop="sys_enterpriseid">
+              <enterpriseTemp ref="ent" @rowClick="rowClick"></enterpriseTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="居间合同" prop="sa_contractid">
+              <contractTemp ref="con" :id="form.sys_enterpriseid" @rowContractClick="rowContractClick"></contractTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="订单信息" prop="ownerid">
+              <orderTemp ref="order" :id="form.sa_contractid" @orderRowClick="orderRowClick"></orderTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单据日期">
+              <el-date-picker
+                style="width:100%"
+                v-model="form.billdate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="结算方式" prop="settlementmode">
+              <el-select style="width:100%" v-model="form.settlementmode" placeholder="请选择结算方式">
+                <el-option label="线上" value="线上"></el-option>
+                <el-option label="线下" value="线下"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input type="textarea" :autosize="{minRows:4}" placeholder="请输入备注"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+    <div class="fixed__btn__panel">
+      <el-button class="normal-btn-width" type="primary" size="small" @click="submitForm">创 建</el-button>
+      <el-button class="normal-btn-width" size="small" @click="resetForm">重 置</el-button>
+    </div>
+  </el-drawer>
+</div>
 </template>
 
 <script>
-export default {
+import enterpriseTemp from '@/template/enterprise/index.vue'
+import contractTemp from '@/template/rebateCanUseContract/index.vue'
+import orderTemp from '@/template/rebateCanUseOrder/index.vue'
 
+export default {
+  
+  data() {
+    var checkSacontractid = (rule, value, callback) => {
+      if (!this.form.sys_enterpriseid) {
+        return callback(new Error('请先选择结算企业'));
+      }
+      if (!value) {
+        return callback(new Error('请选择居间合同'));
+      }
+      callback();
+    };
+    var checkSaorderid = (rule, value, callback) => {
+      if (!this.form.sa_contractid) {
+        return callback(new Error('请先选择居间合同'));
+      }
+      console.log(value)
+      if (!value) {
+        return callback(new Error('请选择订单'));
+      }
+      callback();
+    };
+    return {
+      form: {
+        "sa_rebatesettlementid": 0,
+        "sys_enterpriseid": "", //结算企业档案ID
+        "ownertable": "sa_order", //数据表
+        "ownerid": "", //数据id
+        "billdate": (new Date()).toISOString().split('T')[0], //结算日期
+        "remarks": "",
+        "sa_contractid": "", //居间合同ID
+        "settlementmode": "线上" //结算方式,线下、在线(在线时生成收入凭证)
+      },
+      rules:{
+        sys_enterpriseid: [
+          { required: true, message: '请选择结算企业', trigger: 'change' },
+        ],
+        sa_contractid:[
+          { validator: checkSacontractid, trigger: 'blur' }
+        ],
+        ownerid:[
+          { validator: checkSaorderid, trigger: 'blur' }
+        ],
+        settlementmode:[
+          { required: true, message: '请选择结算方式', trigger: 'blur' },
+        ]
+      },
+      drawer:false
+    }
+  },
+  components:{
+    enterpriseTemp,
+    contractTemp,
+    orderTemp
+  },
+  methods: {
+    async submitForm() {
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+      const res = await this.$api.requested({"id": "20230104180102","content":this.form})
+      this.tool.showMessage(res,()=>{
+        this.drawer = false
+        this.$emit('onSuccess')
+      })
+    },
+    rowClick (row) {
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+      this.$refs.con.form.title = this.$refs.order.form.sonum = ''
+      this.form.sa_contractid = this.form.ownerid = ''
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    rowContractClick (row) {
+      this.form.sa_contractid = row.sa_contractid
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    orderRowClick (row) {
+      this.form.ownerid = row.sa_orderid
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    resetForm () {
+      this.$refs.ent.form = this.$refs.con.form = this.$refs.order.form = {}
+    }
+  }
 }
-
-</script>
-<style>
-</style>
+</script>

+ 163 - 6
src/HDrpManagement/rebatesettlement/modules/edit.vue

@@ -1,12 +1,169 @@
 <template>
-  <div></div>
+<div>
+  <el-button :disabled="data.status !== '新建'" type="primary" size="mini" @click="onShow()">编 辑</el-button>
+  <el-drawer
+    title="编辑"
+    :visible.sync="drawer"
+    direction="rtl"
+    append-to-body
+    size="900px">
+    <div class="drawer__panel">
+      <el-row :gutter="20">
+        <el-form ref="form" :model="form" :rules="rules" :status-icon="false" label-width="80px" size="small">
+          <el-col :span="8">
+            <el-form-item label="结算企业" prop="sys_enterpriseid">
+              <enterpriseTemp ref="ent" @rowClick="rowClick"></enterpriseTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="居间合同" prop="sa_contractid">
+              <contractTemp ref="con" :id="form.sys_enterpriseid" @rowContractClick="rowContractClick"></contractTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="订单信息" prop="ownerid">
+              <orderTemp ref="order" :id="form.sa_contractid" @orderRowClick="orderRowClick"></orderTemp>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单据日期">
+              <el-date-picker
+                style="width:100%"
+                v-model="form.billdate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="结算方式" prop="settlementmode">
+              <el-select style="width:100%" v-model="form.settlementmode" placeholder="请选择结算方式">
+                <el-option label="线上" value="线上"></el-option>
+                <el-option label="线下" value="线下"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input type="textarea" :autosize="{minRows:4}" placeholder="请输入备注"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+    <div class="fixed__btn__panel">
+      <el-button class="normal-btn-width" type="primary" size="small" @click="submitForm">创 建</el-button>
+      <el-button class="normal-btn-width" size="small" @click="resetForm">重 置</el-button>
+    </div>
+  </el-drawer>
+</div>
 </template>
 
 <script>
-export default {
+import enterpriseTemp from '@/template/enterprise/index.vue'
+import contractTemp from '@/template/rebateCanUseContract/index.vue'
+import orderTemp from '@/template/rebateCanUseOrder/index.vue'
 
+export default {
+  props:['data'],
+  data() {
+    var checkSacontractid = (rule, value, callback) => {
+      if (!this.form.sys_enterpriseid) {
+        return callback(new Error('请先选择结算企业'));
+      }
+      if (!value) {
+        return callback(new Error('请选择居间合同'));
+      }
+      callback();
+    };
+    var checkSaorderid = (rule, value, callback) => {
+      if (!this.form.sa_contractid) {
+        return callback(new Error('请先选择居间合同'));
+      }
+      console.log(value)
+      if (!value) {
+        return callback(new Error('请选择订单'));
+      }
+      callback();
+    };
+    return {
+      form: {
+        "sa_rebatesettlementid": 0,
+        "sys_enterpriseid": "", //结算企业档案ID
+        "ownertable": "sa_order", //数据表
+        "ownerid": "", //数据id
+        "billdate": (new Date()).toISOString().split('T')[0], //结算日期
+        "remarks": "",
+        "sa_contractid": "", //居间合同ID
+        "settlementmode": "线上" //结算方式,线下、在线(在线时生成收入凭证)
+      },
+      rules:{
+        sys_enterpriseid: [
+          { required: true, message: '请选择结算企业', trigger: 'change' },
+        ],
+        sa_contractid:[
+          { validator: checkSacontractid, trigger: 'blur' }
+        ],
+        ownerid:[
+          { validator: checkSaorderid, trigger: 'blur' }
+        ],
+        settlementmode:[
+          { required: true, message: '请选择结算方式', trigger: 'blur' },
+        ]
+      },
+      drawer:false
+    }
+  },
+  components:{
+    enterpriseTemp,
+    contractTemp,
+    orderTemp
+  },
+  methods: {
+    onShow () {
+      this.drawer = true
+      this.form = Object.assign({},this.form,this.data)
+      setTimeout(() => {
+        this.$refs.ent.form.enterprisename = this.data.enterprisename
+        this.$refs.con.form.title = this.data.billno_contract
+        this.$refs.order.form.sonum = this.data.sonum
+      }, 500);
+      
+    },
+    async submitForm() {
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+      const res = await this.$api.requested({"id": "20230104180102","content":this.form})
+      this.tool.showMessage(res,()=>{
+        this.drawer = false
+        this.$emit('onSuccess')
+      })
+    },
+    rowClick (row) {
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+      this.$refs.con.form.title = this.$refs.order.form.sonum = ''
+      this.form.sa_contractid = this.form.ownerid = ''
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    rowContractClick (row) {
+      this.form.sa_contractid = row.sa_contractid
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    orderRowClick (row) {
+      this.form.ownerid = row.sa_orderid
+      this.$refs['form'].validate((valid) => {
+        if (!valid) return false;
+      });
+    },
+    resetForm () {
+      this.$refs.ent.form = this.$refs.con.form = this.$refs.order.form = {}
+    }
+  }
 }
-
-</script>
-<style>
-</style>
+</script>

+ 47 - 0
src/HDrpManagement/stock/index.vue

@@ -0,0 +1,47 @@
+
+<template>
+  <div>
+    <basicLayout 
+      ref="basicLayout" 
+      :oldFormPath="{
+        add:'HDrpManagement/stock/modules'
+      }"
+      tableName="stockTable" 
+      idName="stockids" 
+      :apiId="{query:20230104094604,del:20230104095004}"
+      :detailPath="null">
+      <div slot="custom"></div>
+      <template v-slot:tbList="scope">
+        <div>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+/**
+ * @basicLayout 提供this.$ref['basicLayout'].listData()方法查询列表信息
+ * @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
+ * @param {string} tableName 开发端配置的表格名称
+ * @param {String} idName 数据主id名称
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id} 
+ * @param {Array} options:{label:描述,value:值} 
+ */
+export default {
+  data () {
+    return {
+      options:[]
+      
+    }
+  },
+  methods:{
+  }
+}
+
+</script>
+<style>
+</style>

+ 50 - 0
src/HDrpManagement/stock/modules/add.vue

@@ -0,0 +1,50 @@
+<template>
+<div>
+  <el-button type="primary" size="small" @click="drawer = true">新 建</el-button>
+  <el-drawer
+    title="新建"
+    :visible.sync="drawer"
+    direction="rtl"
+    append-to-body>
+    <div class="drawer__panel">
+      <el-form ref="form" :model="form" label-width="80px" size="small">
+        <el-form-item label="仓库名称" prop="name">
+          <el-input v-model="form.name"></el-input>
+        </el-form-item>
+        <el-form-item label="仓库地址" prop="address">
+          <el-input v-model="form.address"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="submitForm">新增</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+  </el-drawer>
+</div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      form: {
+        name: '',
+        address: ''
+      },
+      drawer:false
+    }
+  },
+  methods: {
+    submitForm() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          // 提交表单
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    }
+  }
+}
+</script>

+ 0 - 0
src/HDrpManagement/toolBorrowing/detail/index.vue


+ 0 - 0
src/HDrpManagement/toolBorrowing/index.vue


+ 1 - 0
src/SDrpManagement/agentOrder/modules/add.vue

@@ -191,6 +191,7 @@ export default {
     },
     contractClick (row) {
       this.form.sa_contractid = row.sa_contractid
+      this.form.sa_projectid = row.sa_projectid
       this.form.contractname = row.title === ''?'未知':row.title
       this.visible = false
     },

+ 1 - 0
src/SDrpManagement/salerOrder/modules/add.vue

@@ -200,6 +200,7 @@ export default {
     },
     contractClick (row) {
       this.form.sa_contractid = row.sa_contractid
+      this.form.sa_projectid = row.sa_projectid
       this.form.contractname = row.title === ''?'未知':row.title
       this.visible = false
     },

+ 1 - 1
src/components/normal-basic-layout/details/index.vue

@@ -29,7 +29,7 @@
       </div>
     </div>
     <div style="box-sizing: border-box;padding:10px">
-      <el-row class="flex-align-stretch no-wrap" :gutter="collapse?10:0">
+      <el-row class="flex-align-stretch no-wrap" :gutter="activeApp.isdatateam?10:activeApp.isdatafollowup?10:0">
         <el-col style="flex:1 0 auto;" :span="activeApp.isdatateam?18:activeApp.isdatafollowup?18:24">
           <slot name="customBefore"></slot>
           <tabTemp :tabs="tabs" :editData="editData" :idname="idname" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)" @onTabClick="onTabClick">

+ 32 - 1
src/router/HDrpManagement.js

@@ -93,7 +93,15 @@ const HDrpManagement = [
       },
     ]
   },
-  
+  {
+    path: '/stock',
+    name: 'stock',
+    meta: {
+      title: '仓库管理',
+      ast_nav: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/stock/index'),
+  },
   {
     path: '/brandmag',
     name: 'brandmag',
@@ -670,6 +678,29 @@ const HDrpManagement = [
       },
     ]
   },
+  {
+    path: '/toolBorrowing',
+    name:'toolBorrowing',
+    meta: {
+      title: '工具借用单',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/toolBorrowing/index'),
+    children: [
+      {
+        path: '/toolBorrowingDetail',
+        name:'toolBorrowing',
+        meta: {
+          title: '工具借用单',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/toolBorrowing/detail')
+      },
+    ]
+  },
+  
   
   
 ];

+ 110 - 0
src/template/rebateCanUseContract/index.vue

@@ -0,0 +1,110 @@
+<template>
+  <div>
+     <el-popover
+      placement="bottom"
+      width="100%"
+      :disabled="!id"
+      v-model="visible">
+      <div>
+        <div class="flex-align-center flex-between" style="margin-bottom:10px">
+          <el-input style="width:200px" suffix-icon="el-icon-search" size="small" v-model="param.content.where.condition" placeholder="输入合同" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+        </div>
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          size="mini"
+          border>
+          <el-table-column
+            prop="billno"
+            label="合同编号"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="title"
+            label="合同标题"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="enterprisename"
+            label="企业信息"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            label="操作">
+            <template slot-scope="scope">
+              <el-button type="text" @click="rowClick(scope.row)">选 择</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="margin-top:16px;text-align:right">
+          <el-pagination
+            background
+            small
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="param.content.pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="total">
+          </el-pagination>
+        </div>
+      </div>
+      <el-input readonly :validate-event="false" slot="reference" v-model="form.title" @focus="listData" :disabled="!id" placeholder="合同信息" clearable></el-input>
+     </el-popover>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['id'],
+  data () {
+    return {
+      visible:false,
+      param:{
+        "id": 20230116132402,
+        "content": {
+          "sys_enterpriseid": 0,
+          "pageSize": 20,
+          "pageNumber":1,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      form:{title:''},
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  methods:{
+    async listData () {
+      this.param.content.sys_enterpriseid = this.id
+      const res = await this.$api.requested(this.param)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    rowClick (row) {
+      this.form.title = row.title
+      this.visible = false
+      this.$emit('rowContractClick',row)
+    }
+  },
+  mounted () {
+  }
+}
+
+</script>
+<style>
+</style>

+ 112 - 0
src/template/rebateCanUseOrder/index.vue

@@ -0,0 +1,112 @@
+<template>
+  <div>
+     <el-popover
+      placement="bottom"
+      width="100%"
+      :disabled="!id"
+      v-model="visible">
+      <div>
+        <div class="flex-align-center flex-between" style="margin-bottom:10px">
+          <el-input style="width:200px" suffix-icon="el-icon-search" size="small" v-model="param.content.where.condition" placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+        </div>
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          size="mini"
+          border>
+          <el-table-column
+            prop="sonum"
+            label="订单编号"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="type"
+            label="订单类型"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="tradefield"
+            label="领域"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            label="操作">
+            <template slot-scope="scope">
+              <el-button type="text" @click="rowClick(scope.row)">选 择</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="margin-top:16px;text-align:right">
+          <el-pagination
+            background
+            small
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="param.content.pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="total">
+          </el-pagination>
+        </div>
+      </div>
+      <el-input readonly :validate-event="false" slot="reference" v-model="form.sonum" @focus="listData" :disabled="!id" placeholder="订单信息" clearable></el-input>
+     </el-popover>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['id'],
+  data () {
+    return {
+      visible:false,
+      param:{
+        "id": 20230116134402,
+        "content": {
+          "sa_contractid": 0,
+          "pageSize": 20,
+          "pageNumber":1,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      
+      form:{sonum:''},
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  methods:{
+    async listData () {
+      console.log(this.id)
+      this.param.content.sa_contractid = this.id
+      const res = await this.$api.requested(this.param)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    rowClick (row) {
+      this.form.sonum = row.sonum
+      this.visible = false
+      this.$emit('orderRowClick',row)
+    }
+  },
+  mounted () {
+  }
+}
+
+</script>
+<style>
+</style>