ソースを参照

大中型我的订单应收款逻辑修改涉及到认领实收款到产品。不支持认领到订单上。

wucl 10 ヶ月 前
コミット
b34659dc6a

+ 13 - 0
src/components/MoreSearchBar/index.vue

@@ -74,6 +74,14 @@
                             <el-option v-for="(d,id) in trunDep" :key="id" :label="d.name" :value="d.id"></el-option> 
                         </el-select>
                     </el-col>
+                    <el-col :xs="24" :sm="12" :lg="3" :span="6">
+                        <el-select v-if="productionType"  clearable v-model="listQuery.production" placeholder="产品类型">
+                            <el-option value="STATEMENT" label="意见书">意见书</el-option>
+                            <el-option value="REPORT" label="报告">报告</el-option>
+                            <el-option value="LETTER" label="复评函">复评函</el-option>
+                            <el-option value="ORDER" label="订单">订单</el-option>
+                        </el-select>
+                    </el-col>
                  
                 </el-row>
             </div>
@@ -227,6 +235,11 @@ export default {
             require:false,
             default:true
         },
+        productionType:{
+            type: Boolean,
+            require:false,
+            default:false
+        },
     },
 
     computed: {

+ 6 - 6
src/views/administration/major/checkList.vue

@@ -29,12 +29,12 @@
             <span>{{ row.majorSimple.orderId }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="项目名称" width="150" align="center"  >
+        <el-table-column label="项目名称" width="300" align="center" show-overflow-tooltip >
           <template slot-scope="{row}">
             <span>{{ row.majorSimple.name?row.majorSimple.name:row.majorSimple.orderName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="报告号"  width="200" align="center"   >
+        <el-table-column label="报告号"  width="250" align="center"   >
           <template slot-scope="{row}">
             <span>{{ row.majorSimple.reportNo?row.majorSimple.reportNo:'--' }}</span>
           </template>
@@ -54,12 +54,12 @@
             <span>{{ row.userType }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="提成类型" width="150" align="center">
+        <el-table-column label="提成类型" width="120" align="center">
           <template slot-scope="{row}">
             <span>{{ row.businessCate}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="提成比例" width="150" align="center">
+        <el-table-column label="提成比例" width="100" align="center">
           <template slot-scope="{row}">
             <span>{{ row.ratio}}%</span>
           </template>
@@ -69,12 +69,12 @@
             <span style="font-weight: bold;">{{ row.prodId?'产品':'订单'}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="申报时间" align="center" width="160" >
+        <el-table-column label="申报时间" align="center" width="170" >
           <template slot-scope="{row}">
             <span>{{ row.created}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="当前节点" align="center" >
+        <el-table-column label="当前节点" align="center" width="120">
           <template slot-scope="{row}">
             <span>{{ row.nodeName}}</span>
           </template>

+ 9 - 5
src/views/finance/fundClaim.vue

@@ -186,7 +186,7 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="12" :span="6">
-                <el-form-item label="订单应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
+                <el-form-item label="应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
                   <el-input :value="p.shouldAmount" type="text" class="filter-item" disabled readonly>
                     <template slot="append">元</template>
                   </el-input>
@@ -334,9 +334,9 @@
               <span>{{ row.standardAmount }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="订单应收款(¥)" align="center" width='100'>
+          <el-table-column label="应收款(¥)" align="center" width='100'>
             <template slot-scope="{row}">
-              <span>{{ row.shouldAmount }}</span>
+              <span>{{ row.shouldAmount?row.shouldAmount:row.orderShouldAmount }}</span>
             </template>
           </el-table-column>
           <el-table-column label="实收款(¥)" align="center" width='80'>
@@ -670,7 +670,7 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="12" :span="6">
-                <el-form-item label="订单应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
+                <el-form-item label="应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
                   <el-input :value="p.shouldAmount" type="text" class="filter-item" disabled readonly>
                     <template slot="append">元</template>
                   </el-input>
@@ -782,7 +782,7 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="12" :span="6">
-                <el-form-item label="订单应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
+                <el-form-item label="应收金额:" prop="shouldAmount" label-width="140px" class="postInfo-container-item">
                   <el-input :value="p.shouldAmount" type="text" class="filter-item" disabled readonly>
                     <template slot="append">元</template>
                   </el-input>
@@ -984,11 +984,13 @@ export default {
     },
     getList() {
       this.listQuery.notFinished = true;
+      this.claimOrders = [];
       this.$api.financeRealFund.list(Object.assign({}, this.listQuery)).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
         }
       })
+      console.log(this.claimOrders)
     },
 
     getMyMajorOrder() {
@@ -1193,6 +1195,7 @@ export default {
       }
     },
     claimMajor(row) {
+      this.getMyMajorProd();
       this.myMajorOrderDialog = true;
       this.notClaimAmount = row.notClaimAmount;
       this.financeFundId = row.id;
@@ -1218,6 +1221,7 @@ export default {
       }
     },
     claimAssets(row) {
+      this.getMyAssetsOrderProd();
       this.myAssetsOrderDialog = true;
       this.notClaimAmount = row.notClaimAmount;
       this.financeFundId = row.id;

+ 13 - 1
src/views/finance/fundList.vue

@@ -184,7 +184,7 @@
         <el-button type="primary" @click="saveRealFund()">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog :visible.sync="claimListDialog" width="80%" center  custom-class="doWarehouseClass">
+    <el-dialog :visible.sync="claimListDialog" width="90%" center  custom-class="doWarehouseClass">
       <div style="margin-bottom:20px;font-size:20px;">
         <span>付款方:</span><span style="color:red;font-weight:bold">{{payer}}</span><span style="margin-left:20px">付款金额:</span><span style="color:red;font-weight:bold">{{amount}}¥</span><span style="margin-left:20px">的认领记录:</span>
       </div>
@@ -209,15 +209,27 @@
           label="订单号"
           width="250">
         </el-table-column>
+        <el-table-column show-overflow-tooltip
+        align = "center"
+          prop="productionNo"
+          label="产品号"
+          width="250">
+        </el-table-column>
         <el-table-column
         align = "center"
           prop="shouldAmount"
           label="应收金额(元)">
+          <template slot-scope="{row}">
+            <span>{{ row.productionShouldAmount?row.productionShouldAmount:row.shouldAmount}}</span>
+          </template>
         </el-table-column>
         <el-table-column
         align = "center"
           prop="claimAmount"
           label="认领金额(元)">
+          <template slot-scope="{row}">
+            <span style="color: red;">{{ row.claimAmount}}</span>
+          </template>
         </el-table-column>
         <el-table-column
         align = "center"

+ 95 - 90
src/views/finance/fundWarning.vue

@@ -87,17 +87,22 @@
                 <span>{{ row.evaluateAmount / 10000 }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="订单应收款(元)" align="center">
+            <el-table-column label="应收款(元)" align="center">
               <template slot-scope="{row}">
                 <span>{{ row.shouldAmount }}</span>
               </template>
             </el-table-column>
+            <el-table-column label="实收款(元)" align="center">
+              <template slot-scope="{row}">
+                <span style="color:red;font-weight: bold;">0</span>
+              </template>
+            </el-table-column>
             <el-table-column label="标准收费(元)" align="center">
               <template slot-scope="{row}">
                 <span>{{ row.standardAmount }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="出库时间" width="160" align="center">
+            <el-table-column label="出库时间" width="110" align="center">
               <template slot-scope="{row}">
                 <span>{{ row.repertoryOutTime }}</span>
               </template>
@@ -106,32 +111,26 @@
           </el-table>
         </y-page-list-layout>
       </el-tab-pane>
-      <el-tab-pane label="资产预警" name="assets">
-        <y-page-list-layout :get-page-list="getOverdueAssets" :page-list="overdueAssets" :page-para="listQuery2">
+      <el-tab-pane label="个贷预警" name="personal">
+        <y-page-list-layout :get-page-list="getOverduePersonal" :page-list="overduePersonal" :page-para="listQuery3">
           <template slot="left">
-            <el-input v-model="listQuery2.overdueMin" placeholder="最小超期天数" clearable style="width: 150px;float: left;">
+            <el-input v-model="listQuery3.overdueMin" placeholder="最小超期天数" clearable style="width: 150px;float: left;">
             </el-input>
-            <el-input v-model="listQuery2.overdueMax" placeholder="最大超期天数" clearable
+            <el-input v-model="listQuery3.overdueMax" placeholder="最大超期天数" clearable
               style="margin-left: 20px;width: 150px;float: left;">
             </el-input>
-            <el-input v-model="listQuery2.orderId" placeholder="项目编号" clearable
-              style="margin-left: 20px;width: 200px;float: left;">
-            </el-input>
-            <el-input v-model="listQuery2.productionNo" placeholder="产品号" clearable
-              style="margin-left: 20px;width: 200px;float: left;">
-            </el-input>
-            <el-input v-model="listQuery2.principal" placeholder="负责人" clearable
+            <el-input v-model="listQuery3.orderId" placeholder="项目编号" clearable
               style="margin-left: 20px;width: 200px;float: left;">
             </el-input>
-            <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList2()"
+            <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList3()"
               round>搜索
             </el-button>
-            <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch2()">重置
+            <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch3()">重置
             </el-button>
-            <el-button class="filter-item" style="float: left;" round type="info" @click="exportOverdueAssets()">导出
+            <el-button class="filter-item" style="float: left;" round type="info" @click="exportOverduePersonal()">导出
             </el-button>
           </template>
-          <el-table size="medium" slot="table" row-key="id" :data="overdueAssets.records" fit highlight-current-row
+          <el-table size="medium" slot="table" row-key="id" :data="overduePersonal.records" fit highlight-current-row
             :header-row-style="{ color: '#333333' }"
             style="border-left: 1px solid #EBECED;border-right: 1px solid #EBECED;color: #333333;">
             <el-table-column label="超期天数" align="center">
@@ -139,29 +138,29 @@
                 <span style="color:red;font-weight: bold;">{{ row.overdueDay }}天</span>
               </template>
             </el-table-column>
-            <el-table-column label="分单类型" align="center">
+            <el-table-column label="项目编号" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.allotType }}</span>
+                <span>{{ row.orderId }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="项目编号" width="150" align="center">
+            <el-table-column label="坐落" width="200" align="center" show-overflow-tooltip>
               <template slot-scope="{row}">
-                <span>{{ row.orderId }}</span>
+                <span>{{ row.location }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="产品号" width="200" align="center">
+            <el-table-column label="面积" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.productionNo }}</span>
+                <span>{{ row.acreage }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="产品类型" align="center">
+            <el-table-column label="单价" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.productionType }}</span>
+                <span>{{ row.price }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="项目名称" width="200" align="center" show-overflow-tooltip>
+            <el-table-column label="总价"  align="center" >
               <template slot-scope="{row}">
-                <span>{{ row.projectName }}</span>
+                <span>{{ row.amount }}</span>
               </template>
             </el-table-column>
             <el-table-column label="客户名称" align="center">
@@ -174,60 +173,80 @@
                 <span>{{ row.clientSubName }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="客户经理" align="center">
+            <el-table-column label="中介" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.clientManager }}</span>
+                <span>{{ row.agent }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="负责人" align="center">
+            <el-table-column label="联系人" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.principal }}</span>
+                <span>{{ row.contactName }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="评估价值(万元)" align="center">
+            <el-table-column label="联系电话" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.evaluateAmount }}</span>
+                <span>{{ row.contactTel }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="订单应收款(元)" align="center">
+            <el-table-column label="委托人" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.shouldAmount }}</span>
+                <span>{{ row.bailorA }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="标准收费(元)" align="center">
+            <el-table-column label="客户经理" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.standardAmount }}</span>
+                <span>{{ row.clientManager }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="勘察人" align="center">
+              <template slot-scope="{row}">
+                <span>{{ row.outwardStaffName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="产品内业" align="center">
+              <template slot-scope="{row}">
+                <span>{{ row.inwardStaffName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="定价内业" align="center">
+              <template slot-scope="{row}">
+                <span>{{ row.pricingStaffName }}</span>
               </template>
             </el-table-column>
             <el-table-column label="出库时间" width="160" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.repertoryOutTime }}</span>
+                <span>{{ row.rot }}</span>
               </template>
             </el-table-column>
-
           </el-table>
         </y-page-list-layout>
       </el-tab-pane>
-      <el-tab-pane label="个贷预警" name="personal">
-        <y-page-list-layout :get-page-list="getOverduePersonal" :page-list="overduePersonal" :page-para="listQuery3">
+      <el-tab-pane label="资产预警" name="assets">
+        <y-page-list-layout :get-page-list="getOverdueAssets" :page-list="overdueAssets" :page-para="listQuery2">
           <template slot="left">
-            <el-input v-model="listQuery3.overdueMin" placeholder="最小超期天数" clearable style="width: 150px;float: left;">
+            <el-input v-model="listQuery2.overdueMin" placeholder="最小超期天数" clearable style="width: 150px;float: left;">
             </el-input>
-            <el-input v-model="listQuery3.overdueMax" placeholder="最大超期天数" clearable
+            <el-input v-model="listQuery2.overdueMax" placeholder="最大超期天数" clearable
               style="margin-left: 20px;width: 150px;float: left;">
             </el-input>
-            <el-input v-model="listQuery3.orderId" placeholder="项目编号" clearable
+            <el-input v-model="listQuery2.orderId" placeholder="项目编号" clearable
               style="margin-left: 20px;width: 200px;float: left;">
             </el-input>
-            <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList3()"
+            <el-input v-model="listQuery2.productionNo" placeholder="产品号" clearable
+              style="margin-left: 20px;width: 200px;float: left;">
+            </el-input>
+            <el-input v-model="listQuery2.principal" placeholder="负责人" clearable
+              style="margin-left: 20px;width: 200px;float: left;">
+            </el-input>
+            <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList2()"
               round>搜索
             </el-button>
-            <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch3()">重置
+            <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch2()">重置
             </el-button>
-            <el-button class="filter-item" style="float: left;" round type="info" @click="exportOverduePersonal()">导出
+            <el-button class="filter-item" style="float: left;" round type="info" @click="exportOverdueAssets()">导出
             </el-button>
           </template>
-          <el-table size="medium" slot="table" row-key="id" :data="overduePersonal.records" fit highlight-current-row
+          <el-table size="medium" slot="table" row-key="id" :data="overdueAssets.records" fit highlight-current-row
             :header-row-style="{ color: '#333333' }"
             style="border-left: 1px solid #EBECED;border-right: 1px solid #EBECED;color: #333333;">
             <el-table-column label="超期天数" align="center">
@@ -235,29 +254,29 @@
                 <span style="color:red;font-weight: bold;">{{ row.overdueDay }}天</span>
               </template>
             </el-table-column>
-            <el-table-column label="项目编号" align="center">
+            <el-table-column label="分单类型" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.orderId }}</span>
+                <span>{{ row.allotType }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="坐落" width="200" align="center" show-overflow-tooltip>
+            <el-table-column label="项目编号" width="150" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.location }}</span>
+                <span>{{ row.orderId }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="面积" align="center">
+            <el-table-column label="产品号" width="200" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.acreage }}</span>
+                <span>{{ row.productionNo }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="单价" align="center">
+            <el-table-column label="产品类型" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.price }}</span>
+                <span>{{ row.productionType }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="总价"  align="center" >
+            <el-table-column label="项目名称" width="200" align="center" show-overflow-tooltip>
               <template slot-scope="{row}">
-                <span>{{ row.amount }}</span>
+                <span>{{ row.projectName }}</span>
               </template>
             </el-table-column>
             <el-table-column label="客户名称" align="center">
@@ -270,51 +289,37 @@
                 <span>{{ row.clientSubName }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="中介" align="center">
-              <template slot-scope="{row}">
-                <span>{{ row.agent }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="联系人" align="center">
-              <template slot-scope="{row}">
-                <span>{{ row.contactName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="联系电话" align="center">
-              <template slot-scope="{row}">
-                <span>{{ row.contactTel }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="委托人" align="center">
+            <el-table-column label="客户经理" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.bailorA }}</span>
+                <span>{{ row.clientManager }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="客户经理" align="center">
+            <el-table-column label="负责人" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.clientManager }}</span>
+                <span>{{ row.principal }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="勘察人" align="center">
+            <el-table-column label="评估价值(万元)" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.outwardStaffName }}</span>
+                <span>{{ row.evaluateAmount }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="产品内业" align="center">
+            <el-table-column label="订单应收款(元)" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.inwardStaffName }}</span>
+                <span>{{ row.shouldAmount }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="定价内业" align="center">
+            <el-table-column label="标准收费(元)" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.pricingStaffName }}</span>
+                <span>{{ row.standardAmount }}</span>
               </template>
             </el-table-column>
             <el-table-column label="出库时间" width="160" align="center">
               <template slot-scope="{row}">
-                <span>{{ row.rot }}</span>
+                <span>{{ row.repertoryOutTime }}</span>
               </template>
             </el-table-column>
+
           </el-table>
         </y-page-list-layout>
       </el-tab-pane>
@@ -339,19 +344,19 @@ export default {
         page: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       },
       listQuery2: {
         page: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       },
       listQuery3: {
         page: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       },
       overdueMajor: {
         records: []
@@ -388,7 +393,7 @@ export default {
         current: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       }
       this.getOverdueMajor()
     },
@@ -419,7 +424,7 @@ export default {
         current: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       }
       this.getOverdueAssets();
     },
@@ -435,7 +440,7 @@ export default {
         current: 1,
         size: 10,
         descs: 'id',
-        overdueMin: 90
+        overdueMin: 0
       }
       this.getOverdueAssets();
     },

+ 1 - 1
src/views/major/detail.vue

@@ -3429,7 +3429,7 @@ a:hover{
 
 .button-area {
   position: absolute;
-  top: 20px;
+  top: 18px;
   right: 50px;
 }
 </style>

+ 111 - 43
src/views/major/myOrder.vue

@@ -7,7 +7,7 @@
       <template slot="left">
         <MoreSearchBar business="MAJOR_BUSINESS" @fliterSearch="fliterSearch" @resetParams="resetParams"
           :listQuery="listQuery" :nodeCode="false" :financial="false" :clientManager="false" :businessObjectType="false"
-          :department="false" :orderId="true" :productionNo="true">
+          :department="false" :orderId="true" :productionNo="true" :productionType="true">
           <template v-slot:otherButton>
             <PermissionButton menu-code="_views_major_order" class-name="filter-item" type="danger"
               icon="el-icon-circle-plus-outline" :page-jump="true" round 
@@ -21,14 +21,19 @@
             <span>{{ row.orderName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="订单号" align="center" width='200'>
+        <el-table-column label="订单号" align="center" width='150'>
           <template slot-scope="{row}">
             <span>{{ row.orderId }}</span>
           </template>
         </el-table-column>
         <el-table-column label="产品号" align="center" width='200'>
           <template slot-scope="{row}">
-            <span>{{ row.productionNo }}</span>
+            <span>{{ row.productionNo?row.productionNo:'--' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="产品类型" align="center" width='120'>
+          <template slot-scope="{row}">
+            <span>{{ row.production?(row.production==='REPORT'?'报告':(row.production==='STATEMENT'?'意见书':'复评函' )):'订单'}}</span>
           </template>
         </el-table-column>
         <el-table-column label="当前节点" align="center" width='200'>
@@ -46,6 +51,16 @@
             <span>{{ row.clientManager }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="实收款(元)" align="center" width='120'>
+          <template slot-scope="{row}">
+            <span style="color:red;font-weight:bold">{{ row.realAmount?row.realAmount:'--' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="应收款(元)" align="center" width='120'>
+          <template slot-scope="{row}">
+            <span>{{ row.shouldAmount?row.shouldAmount:(row.orderShouldAmount?row.orderShouldAmount:'--') }}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="客户名称" align="center" width='120' show-overflow-tooltip>
           <template slot-scope="{row}">
             <span>{{ row.clienteleName }}</span>
@@ -71,16 +86,7 @@
             <span>{{ row.owner }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="实收款(元)" align="center" width='120'>
-          <template slot-scope="{row}">
-            <span style="color:red;font-weight:bold">{{ row.realAmount }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="应收款(元)" align="center" width='120'>
-          <template slot-scope="{row}">
-            <span>{{ row.shouldAmount }}</span>
-          </template>
-        </el-table-column>
+       
         <el-table-column label="应收款备注" align="center" width='120' show-overflow-tooltip>
           <template slot-scope="{row}">
             <span>{{ row.remark }}</span>
@@ -91,17 +97,17 @@
             <span>{{ row.created }}</span>
           </template>
         </el-table-column>
-        <el-table-column fixed="right" label="操作" width="200" align="center">
+        <el-table-column fixed="right" label="操作" width="150" align="center">
           <template slot-scope="{row}">
             <div>
               <PermissionButton menu-code="_views_myOrder_detail" class-name="filter-item" type="text" :page-jump="true"
                 size="mini"
-                :page-query="{ 'couldEdit': false, 'id': row.businessId, 'back': '/major/my/order', 'recall': true, 'couldBack': true }" />
-              <el-button type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
+                :page-query="{ 'couldEdit': true, 'id': row.businessId, 'back': '/major/my/order', 'recall': true, 'couldBack': true }" />
+              <el-button :disabled="!row.id" type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
               <!-- <el-button type="text" size="small" @click="openAllotProductionDialog(row)">实收款分配</el-button> -->
             </div>
             <div>
-              <el-button type="text" size="small" @click="openFinanceInvoiceDialog(row.orderFundId,row.realAmount,row.clienteleName,row.clienteleSubName)">申请开票</el-button>
+              <el-button :disabled="!row.id" type="text" size="small" @click="openFinanceInvoiceDialog(row.orderFundId,row.realAmount,row.clienteleName,row.clienteleSubName,row.productionFundId)">申请开票</el-button>
               <el-button type="text" size="small" @click="productionList(row.businessId)">产品包</el-button>
             </div>
           </template>
@@ -115,7 +121,7 @@
           <el-col :xs="24" :sm="12" :lg="24" :span="12">
             <el-form-item label="应收款金额(元):" prop="shouldAmount" label-width="160px" class="postInfo-container-item"
               :rules="{ required: true, message: '应收款金额不能为空', trigger: 'blur' }">
-              <el-input-number :precision="2" :min="null" :value-on-clear="0" v-model.number="fund.shouldAmount"
+              <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="fund.shouldAmount"
                 type="number" style="width:300px" class="filter-item" />
             </el-form-item>
           </el-col>
@@ -454,6 +460,9 @@
               <!-- <span style="font-size:16px;font-weight:bold;">{{aliasProductionType(r.production)}}</span> -->
               <span style="margin-left:30px;font-size:16px;font-weight:bold; color:red">实收款金额:{{ r.realAmount != null ?
                 r.realAmount : 0 }}¥</span>
+              <span style="margin-left:30px;font-size:16px;">应收款金额:{{ r.shouldAmount != null ?
+                r.shouldAmount : 0   }}¥</span>
+              <el-button style="margin-left:30px;" type="text" size="small" @click="openShouldAmountDialog(r)">填写应收款</el-button>
               <el-button
                 v-if="(r.productionNo === reportNo && r.production != 'STATEMENT' && r.repertoryState != null && !r.repertoryState)"
                 style="float: right; padding: 3px 0;margin-left:10px" type="text"
@@ -672,8 +681,10 @@ export default {
         businessType: null,
         businessId: null,
         businessSubId: null,
+        orderFundId:null,
         productionFundId: null,
-        evaluateAmount: null
+        evaluateAmount: null,
+        orderShouldAmount:null,
       },
       invoiceData: [],
       invoice: {
@@ -810,7 +821,7 @@ export default {
     },
     openShouldAmountDialog(row) {
       this.shouldAmountDialog = true;
-      this.fund.id = row.orderFundId;
+      this.fund.id = row.id;
       this.fund.businessType = 'MAJOR_BUSINESS';
       this.fund.businessId = row.businessId;
       this.fund.orderFundId = row.orderFundId;
@@ -818,32 +829,64 @@ export default {
       this.fund.remark = row.remark;
       this.fund.orderId = row.orderId;
       this.fund.orderName = row.orderName;
+      this.fund.productionFundId = row.productionFundId;
+      this.fund.productionNo = row.productionNo;
+      this.fund.productionType = row.production;
+      this.fund.evaluateAmount = row.evaluateAmount;
     },
     saveShouldAmount() {
       this.$refs.fund.validate(valid => {
         if (valid) {
-          if (this.fund.orderFundId) {
-            this.$api.orderFund.edit(this.fund).then(res => {
-              if (res.code === 200 && res.data) {
-                this.$notify({
-                  title: '成功',
-                  message: '订单应收款已完善',
-                  type: 'success',
-                  duration: 1000
-                });
-                this.getList();
-                this.shouldAmountDialog = false;
-              } else {
-                this.$notify({
-                  title: '失败',
-                  message: '订单应收款保存错误',
-                  type: 'error',
-                  duration: 1000
-                });
+          //设置订单应收款
+          if (!this.fund.id){
+            this.fund.id = this.fund.orderFundId;
+            if (this.fund.id) {
+              this.$api.orderFund.edit(this.fund).then(res => {
+                if (res.code === 200 && res.data) {
+                  this.$notify({
+                    title: '成功',
+                    message: '订单应收款已完善',
+                    type: 'success',
+                    duration: 1000
+                  });
+                  this.getList();
+                  this.shouldAmountDialog = false;
+                } else {
+                  this.$notify({
+                    title: '失败',
+                    message: '订单应收款保存错误',
+                    type: 'error',
+                    duration: 1000
+                  });
+                }
+              })
+            } else {
+              this.$api.orderFund.add(this.fund).then(res => {
+                if (res.code === 200 && res.data) {
+                  this.$notify({
+                    title: '成功',
+                    message: '订单应收款已完善',
+                    type: 'success',
+                    duration: 1000
+                  });
+                  this.getList();
+                  this.shouldAmountDialog = false;
+                } else {
+                  this.$notify({
+                    title: '失败',
+                    message: '订单应收款保存错误',
+                    type: 'error',
+                    duration: 1000
+                  });
+                }
+              })
               }
-            })
-          } else {
-            this.$api.orderFund.add(this.fund).then(res => {
+          }else{
+            //设置产品应收款
+            this.fund.productionShouldAmount = this.fund.shouldAmount;
+            this.fund.id = this.fund.productionFundId;
+            if (this.fund.id){
+              this.$api.productionFund.edit(this.fund).then(res => {
               if (res.code === 200 && res.data) {
                 this.$notify({
                   title: '成功',
@@ -862,6 +905,29 @@ export default {
                 });
               }
             })
+            }else{
+              this.$api.productionFund.add(this.fund).then(res => {
+                if (res.code === 200 && res.data) {
+                  this.$notify({
+                    title: '成功',
+                    message: '订单应收款已完善',
+                    type: 'success',
+                    duration: 1000
+                  });
+                  this.getList();
+
+                  this.shouldAmountDialog = false;
+                  this.productionList(this.todoBusinessId, this.reportNo == null ? this.statementNo : this.reportNo)
+                } else {
+                  this.$notify({
+                    title: '失败',
+                    message: '订单应收款保存错误',
+                    type: 'error',
+                    duration: 1000
+                  });
+                }
+              })
+            }
           }
         }
       })
@@ -886,7 +952,7 @@ export default {
         }
       })
     },
-    openFinanceInvoiceDialog(orderFundId,realAmount,clientName,clientSubName) {
+    openFinanceInvoiceDialog(orderFundId,realAmount,clientName,clientSubName,productionFundId) {
       if (!orderFundId) {
         this.$notify({
           title: '提示',
@@ -900,6 +966,7 @@ export default {
       if (orderFundId) {
         this.invoice.orderFundId = orderFundId;
         this.invoice.realPayAmount = realAmount;
+        this.invoice.productionFundId = productionFundId;
         this.invoice.title = clientName+clientSubName;
         this.getFinanceInvoiceList();
       }
@@ -1025,7 +1092,8 @@ export default {
             })
         },
     openApplyOutWarehouseList(row) {
-      if (row.orderShouldAmount) {
+      console.log(row)
+      if (row.shouldAmount) {
         this.getListByBizTypeProductionId('MAJOR_BUSINESS', row.id);
         this.outWarehouseListDialog = true;
         this.outWarehouse.productionFundId = row.productionFundId;

+ 3 - 3
src/views/major/myOrderDetail.vue

@@ -51,7 +51,7 @@
                         label-width="120px"
                         class="postInfo-container-item"
                       >
-                      <el-select v-model="major.allotType" placeholder="请选择" >
+                      <el-select v-model="major.allotType" placeholder="请选择"  readonly disabled>
                               <el-option label="部门轮单" value="轮单"></el-option> 
                               <el-option label="部门指派" value="指派"></el-option>
                             </el-select>
@@ -64,7 +64,7 @@
                         label-width="120px"
                         class="postInfo-container-item"
                       >
-                      <el-select v-model="major.departmentId" placeholder="请选择">
+                      <el-select v-model="major.departmentId" placeholder="请选择" readonly disabled>
                               <el-option v-for="(d,id) in allotDepartment" :label="d.name" :value="d.id" ></el-option> 
                         </el-select>
                       </el-form-item>
@@ -124,7 +124,7 @@
                         label-width="120px"
                         class="postInfo-container-item"
                       >
-                      <el-select v-model="major.businessObjectType" placeholder="请选择" @change="changeType">
+                      <el-select v-model="major.businessObjectType" placeholder="请选择" @change="changeType" readonly disabled>
                         <el-option label="土地" value="土地"></el-option>
                         <el-option label="房地产" value="房地产"></el-option> 
                       </el-select>