zhangqiOMG 2 years ago
parent
commit
5d3fbaaa42

+ 5 - 3
src/HDrpManagement/ProductMag/detail/index.vue

@@ -10,25 +10,27 @@
         idname="itemid"
         ownertable="plm_item"
         tags=""
-        :tabs="['详细信息']"
+        :tabs="['详细信息','营销分类']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)"
         >
       <div slot="tags">
       </div>
       <div slot="customOperation" >
-        <saleClass :data="mainData" class="inline-16"></saleClass>
       </div>
       <div slot="slot0" >
         <detail_data :basic="mainData"></detail_data>
       </div>
+      <div slot="slot1">
+        <saleClass :data="mainData"></saleClass>
+      </div>
     </basicDetails>
   </div>
 </template>
 
 <script>
 import detail_data from './modules/detailedData'
-import saleClass from '../modules/saleClass'
+import saleClass from '../modules/saleClass.vue'
 export default {
   name: "index",
   data() {

+ 33 - 9
src/HDrpManagement/ProductMag/detail/modules/detailedData.vue

@@ -1,16 +1,40 @@
 <template>
   <div>
     <div class="normal-margin">
-      <el-descriptions :column="2" labelClassName="my-label" contentClassName="my-content" border>
+      <el-descriptions :column="3" :labelStyle="{width:'120px',flex:'1 0 auto',}" border>
         <div slot="title" class="my-label__title">基本信息</div>
-        <el-descriptions-item  label="产品名称">{{ basic.itemname?basic.itemname:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="产品编号">{{ basic.itemno?basic.itemno:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="型号">{{ basic.model?basic.model:"--"}}</el-descriptions-item>
-        <el-descriptions-item label="规格">{{ basic.spec?basic.spec:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="起订量">{{ basic.orderminqty?basic.orderminqty:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="增量">{{ basic.orderaddqty?basic.orderaddqty:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="计量单位">{{ basic.unitname?basic.unitname:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="状态">{{ basic.status?basic.status:"--" }}</el-descriptions-item>
+        <el-descriptions-item  label="商品编码">{{ basic.itemno}}</el-descriptions-item>
+        <el-descriptions-item  label="商品名称">{{ basic.itemname}}</el-descriptions-item>
+        <el-descriptions-item  label="状态">{{ basic.status}}</el-descriptions-item>
+        <el-descriptions-item  label="上/下架">{{ basic.isonsale}}</el-descriptions-item>
+        <el-descriptions-item  label="型号">{{ basic.model}}</el-descriptions-item>
+        <el-descriptions-item  label="规格尺寸">{{ basic.spec}}</el-descriptions-item>
+        <el-descriptions-item  label="计量单位组">{{ basic.unitname}}</el-descriptions-item>
+        <el-descriptions-item  label="存货类别">{{ basic.isonsale + '111'}}</el-descriptions-item>
+        <el-descriptions-item  label="领域"><span v-for="item in basic.tradefield" :key="item.index">{{ item.tradefield}},</span></el-descriptions-item>
+        <el-descriptions-item  label="品牌">{{ basic.brandname}}</el-descriptions-item>
+
+        <el-descriptions-item  label="材质">{{ basic.material}}</el-descriptions-item>
+        <el-descriptions-item  label="装置">{{ basic.device}}</el-descriptions-item>
+        <el-descriptions-item  label="产线">{{ basic.prodline}}</el-descriptions-item>
+        <el-descriptions-item  label="特殊说明">{{ basic.specalnote}}</el-descriptions-item>
+        <el-descriptions-item  label="产品标准">{{ basic.standards}}</el-descriptions-item>
+        <el-descriptions-item  label="品号">{{ basic.erpitemno}}</el-descriptions-item>
+        <el-descriptions-item  label="品名">{{ basic.erpitemname}}</el-descriptions-item>
+        <el-descriptions-item  label="外形尺寸">长:{{ basic.length}};宽:{{basic.width}};高:{{basic.height}}</el-descriptions-item>
+        <el-descriptions-item  label="重量">毛重:{{ basic.grossweight}};净重:{{basic.weight}}</el-descriptions-item>
+        <el-descriptions-item  label="条形码">{{ basic.barcode}}</el-descriptions-item>
+        <el-descriptions-item  label="序列号管理">{{ basic.isonsale + '11'}}</el-descriptions-item>
+        <el-descriptions-item  label="是否批次管理">{{ basic.batchcontrol}}</el-descriptions-item>
+        <el-descriptions-item  label="建议零售价">{{ basic.price}}</el-descriptions-item>
+        <el-descriptions-item  label="压力等级">{{ basic.pressure}}</el-descriptions-item>
+        <el-descriptions-item  label="蝶板驱动">{{ basic.butterflyplatedrive}}</el-descriptions-item>
+        <el-descriptions-item  label="连接形式">{{ basic.connection}}</el-descriptions-item>
+        <el-descriptions-item  label="阀板材质">{{ basic.valveplatematerial}}</el-descriptions-item>
+        <el-descriptions-item  label="阀体材质">{{ basic.bodymaterial}}</el-descriptions-item>
+        <el-descriptions-item  label="执行器类型">{{ basic.actuatortype}}</el-descriptions-item>
+        <el-descriptions-item  label="执行器品牌">{{ basic.actuatorbrand}}</el-descriptions-item>
+        
       </el-descriptions>
     </div>
 

+ 7 - 14
src/HDrpManagement/ProductMag/modules/saleClass.vue

@@ -2,19 +2,12 @@
   <div>
     <!-- <el-button size="small" type="primary" @click="dialogTableVisible = true">设置营销分类</el-button> -->
 <!--    <el-dropdown-item @click.native="onShow()">设置营销分类</el-dropdown-item>-->
-    <el-button size="mini" @click="onShow()">设置营销分类</el-button>
-    <el-dialog title="设置营销分类" append-to-body   :visible.sync="dialogTableVisible">
-      <ul class="flex-align-center">
-        <li class="brand-item" :class="activeid === item.value?'act':''" v-for="item in classList" :key="item.index" @click="brandClick(item)">{{item.label}}</li>
-      </ul>
-      <div>
-        <tree :data="activeBrandData" node-key="itemclassid" :check-strictly="false"></tree>
-      </div>
-      <div class="dialog-footer">
-        <el-button size="small" @click="dialogTableVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" class="normal-btn-width btn-warning" @click="onSubmit">确 定</el-button>
-      </div>
-    </el-dialog>
+    <ul class="flex-align-center">
+      <li class="brand-item" :class="activeid === item.value?'act':''" v-for="item in classList" :key="item.index" @click="brandClick(item)">{{item.label}}</li>
+    </ul>
+    <div>
+      <tree :data="activeBrandData" node-key="itemclassid" :check-strictly="false"></tree>
+    </div>
   </div>
 </template>
 
@@ -153,7 +146,7 @@ export default {
     }
   },
   mounted () {
-    // this.saleClass()
+    this.onShow()
   }
 }
 

+ 53 - 14
src/HDrpManagement/orderManage/details/index.vue

@@ -12,7 +12,7 @@
         delApiId="20221108152102"
         tags=""
         :statusCheck="[{key:'status',value:'审核'},{key:'status',value:'提交'},{key:'status',value:'关闭'}]"
-        :tabs="['基本信息','订单明细','订单进度']"
+        :tabs="['基本信息','订单明细','订单进度','居间费明细']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
         <div slot="customOperation" class="inline-16">
@@ -30,6 +30,12 @@
       <div slot="slot1" >
         <product-list ref="prod"></product-list>
       </div>
+      <div slot="slot2" >
+        <!-- <product-list ref="prod"></product-list> -->
+      </div>
+      <div slot="slot3" >
+        <rebat></rebat>
+      </div>
     </basicDetails>
     <el-dialog append-to-body title="退回原因" :visible.sync="dialogVisible" width="400px">
       <el-input v-model="backreason" type="textarea" placeholder="请输入退回原因"></el-input>
@@ -42,10 +48,10 @@
 </template>
 
 <script>
-import defaultInfo from '../modules/defaultInfo.vue';
-import productList from '../modules/productlist.vue'
+import defaultInfo from './tabs/defaultInfo.vue';
+import productList from './tabs/productlist.vue'
 import confirmDate from '../modules/confirmDate.vue'
-
+import rebat from './tabs/rebatesettlement.vue'
 export default {
   name: "detail",
   data() {
@@ -59,7 +65,8 @@ export default {
   components:{
     defaultInfo,
     productList,
-    confirmDate
+    confirmDate,
+    rebat
   },
   methods:{
     async queryMainData(id) {
@@ -74,37 +81,69 @@ export default {
     },
     changeDataStructure() {
       this.mainAreaData = [
+        {
+          label:'订单状态',
+          value:this.mainData.status
+        },
         {
           label:'订单类型',
           value:this.mainData.type
         },
         {
-          label:'订单状态',
-          value:this.mainData.status
+          label:'明细分类',
+          value:this.mainData.typemx
         },
         {
           label:'单据日期',
-          value:this.mainData.createdate
+          value:this.mainData.billdate
+        },
+        {
+          label:'企业名称',
+          value:this.mainData.enterprisename
+        },
+        {
+          label:'订单总金额',
+          value:this.mainData.defaultamount
+        },
+        {
+          label:'折后总金额',
+          value:this.mainData.amount
         },
         {
           label:'合计数量',
           value:this.mainData.qty
         },
         {
-          label:'合计金额',
-          value:this.mainData.amount
+          label:'品牌',
+          value:this.mainData.brandname
         },
         {
-          label:'折前金额',
-          value:this.mainData.defaultamount
+          label:'领域',
+          value:this.mainData.tradefield
         },
         {
-          label:'企业名称',
-          value:this.mainData.enterprisename
+          label:'领域明细',
+          value:this.mainData.tradefieldmx
+        },
+        {
+          label:'评审类型',
+          value:this.mainData.reviewtype
+        },
+        {
+          label:'业务员',
+          value:this.mainData.saler_name
+        },
+        {
+          label:'项目信息',
+          value:this.mainData.contract_title
         },
         {
           label:'备注',
           value:this.mainData.remarks
+        },
+        {
+          label:'退回原因',
+          value:this.mainData.backreason
         }
       ]
     },

+ 0 - 0
src/HDrpManagement/orderManage/modules/defaultInfo.vue → src/HDrpManagement/orderManage/details/tabs/defaultInfo.vue


+ 0 - 0
src/HDrpManagement/orderManage/modules/productlist.vue → src/HDrpManagement/orderManage/details/tabs/productlist.vue


+ 142 - 0
src/HDrpManagement/orderManage/details/tabs/rebatesettlement.vue

@@ -0,0 +1,142 @@
+<template>
+  <div>
+    <el-descriptions class="margin-top mt-10" title="居间明细" :column="2" size="small" border>
+      <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额比例">{{rebHeadData.discountrate}}</el-descriptions-item>
+      <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额">{{rebHeadData.amount}}</el-descriptions-item>
+      <el-descriptions-item :labelStyle="{width:'120px'}" label="居间产品折扣">{{rebHeadData.rebate_discountrate}}</el-descriptions-item>
+      <el-descriptions-item :labelStyle="{width:'120px'}" label="居间费">{{rebHeadData.rebate}}</el-descriptions-item>
+      <el-descriptions-item :labelStyle="{width:'120px'}" label="结算经销商">{{rebHeadData.sys_enterpriseid}}</el-descriptions-item>
+    </el-descriptions>
+    <el-table
+      :data="tableData"
+      border
+      size="mini"
+      style="width: 100%">
+      <el-table-column
+        prop="date"
+        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_price"
+        label="居间产品单价"
+        width="150">
+      </el-table-column>
+      <el-table-column
+        prop="rebate_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 headData () {
+      const res = await this.$api.requested({
+        "id": "20230105194402",
+        "content": {
+          "sa_orderid": this.$route.query.id
+        },
+      })
+      this.rebHeadData = res.data
+      this.rebHeadData.sa_rebatesettlementid?this.listData():''
+    },
+    async listData () {
+      const res = await this.$api.requested({
+        "id": "20230105194902",
+        "content": {
+          "sa_rebatesettlementid": this.rebHeadData.sa_rebatesettlementid,
+          "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.headData()
+  }
+}
+
+</script>
+<style>
+</style>

+ 51 - 10
src/HDrpManagement/orderManage/modules/add.vue

@@ -6,7 +6,7 @@
         <el-dropdown-item command="标准订单">标准订单</el-dropdown-item>
         <el-dropdown-item command="特殊订单">特殊订单</el-dropdown-item>
         <el-dropdown-item command="项目订单">项目订单</el-dropdown-item>
-        <el-dropdown-item command="促销订单">促销订单</el-dropdown-item>
+        <!-- <el-dropdown-item command="促销订单">促销订单</el-dropdown-item> -->
       </el-dropdown-menu>
     </el-dropdown>
     <el-drawer
@@ -24,6 +24,30 @@
                 <el-input readonly v-model="form.type" placeholder="订单类型" :maxlength="11" clearable :style="{width: '100%'}"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="企业信息" prop="sys_enterpriseid">
+                <enterprise @rowClick="rowClick"></enterprise>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="form.type === '项目订单'" :span="12">
+              <el-form-item label="项目合同" prop="sa_contractid">
+                <el-popover
+                  placement="bottom"
+                  trigger="click"
+                  v-model="visible">
+                  <orderCanUseContract @rowClick="contractClick"></orderCanUseContract>
+                  <el-input readonly v-model="form.contractname" slot="reference" placeholder="选择合同"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="form.type === '特殊订单'" :span="12">
+              <el-form-item label="子分类" prop="typemx">
+                <el-select v-model="form.typemx" placeholder="请选择选子分类" clearable :style="{width: '100%'}">
+                  <el-option v-for="(item, index) in typemxlist" :key="index" :label="item.value"
+                    :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="12">
               <el-form-item label="选择品牌" prop="sa_brandid">
                 <el-select v-model="form.sa_brandid" placeholder="请选择选择品牌" clearable :style="{width: '100%'}">
@@ -40,11 +64,6 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
-              <el-form-item label="企业信息" prop="sys_enterpriseid">
-                <enterprise @rowClick="rowClick"></enterprise>
-              </el-form-item>
-            </el-col>
           </el-form>
         </el-row>
       </div>
@@ -58,10 +77,13 @@
 
 <script>
 import enterprise from '@/template/enterprise/index.vue'
+import orderCanUseContract from '@/template/orderCanUseContract/index.vue'
+
 export default {
   data () {
     return {
       drawer:false,
+      visible:false,
       form:{
         "sa_orderid": 0,
         "sys_enterpriseid": 0, //订货企业id,可不传,默认取当前账号的
@@ -93,24 +115,37 @@ export default {
           message: '请选择选择领域',
           trigger: 'change'
         }],
+        typemx: [{
+          required: true,
+          message: '请选择选子分类',
+          trigger: 'change'
+        }],
         sys_enterpriseid:[{
           required: true,
           message: '订货企业不能为空',
           trigger: 'blur'
+        }],
+        sa_contractid:[{
+          required: true,
+          message: '项目不能为空',
+          trigger: 'blur'
         }]
       },
       sa_brandidOptions: [],
       tradefieldOptions: [],
+      typemxlist:[]
     }
   },
   components:{
-    enterprise
+    enterprise,
+    orderCanUseContract
   },
   methods:{
     handleCommand (command) {
       this.drawer = true
       this.form.type = command
       this.pageData()
+      this.specordermx()
     },
     submitForm() {
       this.$refs['form'].validate(async valid => {
@@ -126,6 +161,10 @@ export default {
         })
       })
     },
+    async specordermx () {
+      const res = await this.$store.dispatch('optiontypeselect','specordermx')
+      this.typemxlist = res.data
+    },
     resetForm() {
       this.$refs['form'].resetFields()
     },
@@ -148,9 +187,11 @@ export default {
     },
     rowClick (row) {
       this.form.sys_enterpriseid = row.sys_enterpriseid
-      // this.$refs['form'].validate(valid => {
-      //   if (!valid) return
-      // })
+    },
+    contractClick (row) {
+      this.form.sa_contractid = row.sa_contractid
+      this.form.contractname = row.title === ''?'未知':row.title
+      this.visible = false
     }
   }
 }

+ 1 - 1
src/HDrpManagement/orderManage/modules/confirmDate.vue

@@ -21,7 +21,7 @@
 
 <script>
 import previewImage from '@/components/previewImage/index.vue'
-import productList from './productlist.vue'
+import productList from '../details/tabs/productlist.vue'
 export default {
   props:['data'],
   components:{

+ 1 - 1
src/HDrpManagement/orderManage/modules/edit.vue

@@ -213,7 +213,7 @@
 
 <script>
 import previewImage from '@/components/previewImage/index.vue'
-import productList from './productlist.vue'
+import productList from '../details/tabs/productlist.vue'
 import addProduct from '@/template/orderCanUseProduct/index.vue'
 export default {
   props:['data'],

+ 1 - 0
src/SDrpManagement/agentOrder/index.vue

@@ -7,6 +7,7 @@
       idName="sa_orderid" 
       :apiId="{query:20221224180302,del:20221108152102}"
       :options="options"
+      :oldFormPath="{add:'SDrpManagement/agentOrder/modules'}"
       :detailPath="{
         path:'/agent_orderDetails'
       }">

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

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <el-dropdown size="small" split-button type="primary" @command="handleCommand">
+      新 建
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item command="标准订单">标准订单</el-dropdown-item>
+        <el-dropdown-item command="项目订单">项目订单</el-dropdown-item>
+      </el-dropdown-menu>
+    </el-dropdown>
+    <el-drawer
+      title="新建订单"
+      :visible.sync="drawer"
+      direction="rtl"
+      :show-close="false"
+      append-to-body
+      size="800px">
+      <div class="drawer__panel">
+        <el-row :gutter="15">
+          <el-form size="small" ref="form" :model="form" :rules="rules" label-width="100px" :status-icon="false">
+            <el-col :span="24">
+              <el-form-item label="订单类型" prop="type">
+                <el-input readonly v-model="form.type" placeholder="订单类型" :maxlength="11" clearable :style="{width: '100%'}"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="form.type === '项目订单'" :span="12">
+              <el-form-item label="项目合同" prop="sa_contractid">
+                <el-popover
+                  placement="bottom"
+                  trigger="click"
+                  v-model="visible">
+                  <orderCanUseContract @rowClick="contractClick"></orderCanUseContract>
+                  <el-input readonly v-model="form.contractname" slot="reference" placeholder="选择合同"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="选择品牌" prop="sa_brandid">
+                <el-select v-model="form.sa_brandid" placeholder="请选择选择品牌" clearable :style="{width: '100%'}">
+                  <el-option v-for="(item, index) in sa_brandidOptions" :key="index" :label="item.brandname"
+                    :value="item.sa_brandid" :disabled="item.disabled"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="选择领域" prop="tradefield">
+                <el-select v-model="form.tradefield" placeholder="请选择选择领域" clearable :style="{width: '100%'}">
+                  <el-option v-for="(item, index) in tradefieldOptions" :key="index" :label="item.tradefield"
+                    :value="item.tradefield" :disabled="item.disabled"></el-option>
+                </el-select>
+              </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>
+import enterprise from '@/template/enterprise/index.vue'
+import orderCanUseContract from '@/template/orderCanUseContract/index.vue'
+
+export default {
+  data () {
+    return {
+      drawer:false,
+      visible:false,
+      form:{
+        "sa_orderid": 0,
+        "sys_enterpriseid": 0, //订货企业id,可不传,默认取当前账号的
+        "sa_accountclassid": 0, //营销账户类型ID
+        "sa_brandid": "", //品牌ID
+        "sa_contractid": 0, //合同ID,标准订单不传
+        "sa_projectid": 0, //工程项目表ID,标准订单不传
+        "sys_enterprise_financeid": 0, //合作企业财务信息ID(开票信息)
+        "sa_logiscompid": 0, //物流公司档案ID
+        "rec_contactsid": 0, //合作企业联系人表ID(收货信息)
+        "type": "", //订单类型
+        "typemx": "", //明细分类,可选
+        "remarks": "", //可选
+        "saler_hrid":0,//销售人员hrid,业务员hrid
+        "tradefield":"",//必选
+        "pay_enterpriseid": 1, //结算单位
+        "rebate_used":0,//默认0,是否使用返利金
+        "billdate":"",//单据日期,默认创建日期
+        "signbacknum":""
+      },
+      rules: {
+        sa_brandid: [{
+          required: true,
+          message: '请选择选择品牌',
+          trigger: 'change'
+        }],
+        tradefield: [{
+          required: true,
+          message: '请选择选择领域',
+          trigger: 'change'
+        }],
+        typemx: [{
+          required: true,
+          message: '请选择选子分类',
+          trigger: 'change'
+        }],
+        sys_enterpriseid:[{
+          required: true,
+          message: '订货企业不能为空',
+          trigger: 'blur'
+        }],
+        sa_contractid:[{
+          required: true,
+          message: '项目不能为空',
+          trigger: 'blur'
+        }]
+      },
+      sa_brandidOptions: [],
+      tradefieldOptions: [],
+      typemxlist:[]
+    }
+  },
+  components:{
+    enterprise,
+    orderCanUseContract
+  },
+  methods:{
+    handleCommand (command) {
+      this.drawer = true
+      this.form.type = command
+      this.pageData()
+      this.specordermx()
+    },
+    submitForm() {
+      this.$refs['form'].validate(async valid => {
+        if (!valid) return
+        const res = await this.$api.requested({
+          "id": 20221108111402,
+          "content":this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.drawer = false
+          this.$store.dispatch('changeDetailDrawer',true)
+          this.$router.push({path:'/orderdetail',query:{id:res.data.sa_orderid,rowindex:res.data.rowindex}})
+        })
+      })
+    },
+    async specordermx () {
+      const res = await this.$store.dispatch('optiontypeselect','specordermx')
+      this.typemxlist = res.data
+    },
+    resetForm() {
+      this.$refs['form'].resetFields()
+    },
+    async pageData () {
+      const res = await this.$api.requested({
+        "id": 20220924163702,
+        "content": {
+          "pageSize": 999,
+        }
+      })
+      this.sa_brandidOptions = res.data
+
+      const res1 = await this.$api.requested({
+        "id": 20221223141802,
+        "content": {
+          "pageSize": 999,
+        }
+      })
+      this.tradefieldOptions = res1.data
+    },
+    rowClick (row) {
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+    },
+    contractClick (row) {
+      this.form.sa_contractid = row.sa_contractid
+      this.form.contractname = row.title === ''?'未知':row.title
+      this.visible = false
+    }
+  }
+}
+
+</script>
+<style>
+</style>

+ 90 - 2
src/template/orderCanUseContract/index.vue

@@ -1,12 +1,100 @@
 <template>
   <div>
-    
+    <div style="margin-top:16px;text-align:right">
+      <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
+        prop="projectname"
+        label="项目名称"
+        width="180">
+      </el-table-column>
+      <el-table-column
+        prop="type"
+        label="项目类型"
+        width="100">
+      </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>
+      <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>
 </template>
 
 <script>
 export default {
-
+  data () {
+    return {
+      param:{
+        "id": 20230103150802,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  methods:{
+    async listData () {
+      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.$emit('rowClick',row)
+    }
+  },
+  mounted () {
+    this.listData()
+  }
 }
 
 </script>