Przeglądaj źródła

轮胎商城统计销售 2024-3-13

caojunjie 1 rok temu
rodzic
commit
c6456b5540

+ 8 - 0
src/api/iosBasicData/paymentSummary.js

@@ -59,3 +59,11 @@ export const financeStatisticsFinanceProfit = (current, size, params) => {
     }
   })
 }
+// 财务利润合计详情
+export const financeStatisticsFinanceProfitSum = (params) => {
+  return request({
+    url: '/api/blade-los/financeStatistics/financeProfitSum',
+    method: 'get',
+    params: params
+  })
+}

+ 137 - 0
src/views/iosBasicData/OceanFreightImport/bills/assembly/EntrustmentLnformation.vue

@@ -515,6 +515,73 @@
                 </el-col>
             </el-row>
 
+            <el-row>
+                <el-col :span="12">
+                    <el-col :span="12">
+                        <el-form-item label="场站" prop="cyCnName" >
+                            <span slot="label">
+                                <span style="color: #4c9e44;cursor: pointer;text-decoration: underline" @click="emailJump('cy')">场站</span>
+                            </span>
+                            <search-query :datalist="cyData"
+                                          :selectValue="assemblyForm.cyCnName"
+                                          :filterable="true"
+                                          :clearable="true"
+                                          :remote="true"
+                                          :disabled="detailData.seeDisabled || generateBillsfalse"
+                                          :buttonIf="false"
+                                          :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                          placeholder="请选择场站"
+                                          @remoteMethod="remoteMethod($event,'cy')"
+                                          @corpChange="corpChange($event,'cy')"
+                                          @corpFocus="remoteMethod($event, 'cy')" >
+                            </search-query>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="联系人" prop="cyContacts" >
+                            <span slot="label">
+                                <span style="color: #1e9fff">联系人</span>
+                            </span>
+                            <!--<el-input type="age" style="width: 100%;" v-model="assemblyForm.cyContacts"-->
+                            <!--          size="small" autocomplete="off"-->
+                            <!--          :disabled="detailData.seeDisabled || generateBillsfalse"-->
+                            <!--          clearable placeholder="请输入联系人" ></el-input>-->
+                            <search-query :datalist="cyContactsData"
+                                          :selectValue="assemblyForm.cyContacts"
+                                          :filterable="true"
+                                          :clearable="true"
+                                          :allowCreate="true"
+                                          :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"
+                                          :buttonIf="false"
+                                          :forParameter="{key:'id',label:'cname',value:'cname'}"
+                                          placeholder="联系人"
+                                          @corpChange="corpChange($event,'cyContacts')"
+                                          @corpFocus="remoteMethod($event, 'cyContacts')" >
+                            </search-query>
+                        </el-form-item>
+                    </el-col>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item label="地址" prop="cyAddress" >
+                        <span slot="label">
+                             <span style="color: #1e9fff">地址</span>
+                        </span>
+                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.cyAddress"
+                                  size="small" autocomplete="off"
+                                  :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"
+                                  clearable placeholder="地址" ></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-form-item label="场站备注" prop="cyRemarks" >
+                <span slot="label">
+                     <span style="color: #1e9fff">场站备注</span>
+                </span>
+                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.cyRemarks"
+                          size="small" autocomplete="off"
+                          :disabled="detailData.seeDisabled || generateBillsfalse" rows="3"
+                          clearable placeholder="请输入场站备注" ></el-input>
+            </el-form-item>
         </el-form>
 
 
@@ -702,6 +769,7 @@ import emailhash from '@/views/iosBasicData/OceanFreightImport/bills/assembly/Js
 import bcorps from "@/views/iosBasicData/bcorps/index.vue";
 import {NdayDate} from "@/util/date";
 import {regularFloating, regularInteger} from "@/util/regularJudgment";
+import {getBcorpsattnList} from "@/api/iosBasicData/bcorpsattn";
 
     export default {
         props:{
@@ -730,6 +798,9 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
                     }
                 },
                 emailhash:emailhash, // 邮箱跳转地址
+                // 场站
+                cyData:[],
+                cyContactsData:[], // 场站联系人
                 // 多选的数据
                 tabsMultipleChoice:[],
                 // 发货人数据
@@ -825,6 +896,14 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
                 else if (portArr.indexOf(name) != -1) {
                     this[name + 'BportsListfun'](value)
                 }
+                // 场站
+                else if (name == 'cy') {
+                    this.cyBcorpslistByType(value)
+                }
+                // 场站联系人
+                else if (name == 'cyContacts') {
+                    this.cyBcorpsattnListfun()
+                }
                 // 包装
                 else if (name == 'packingUnit') {
                     this.packingUnitBpackagesListfun(value)
@@ -990,6 +1069,51 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
                         this.DangerousGoodsAdd()
                     }
                 }
+                else if (name == 'cy') {
+                    if (!value) {
+                        this.$set(this.assemblyForm,'cyId','')
+                        this.$set(this.assemblyForm,'cyCode','')
+                        this.$set(this.assemblyForm,'cyCnName','')
+                        this.$set(this.assemblyForm,'cyEnName','')
+                        this.$set(this.assemblyForm,'cyRemarks','')
+                        // 联系人
+                        this.$set(this.assemblyForm,'cyTel','')
+                        this.$set(this.assemblyForm,'cyAddress','')
+                        this.$set(this.assemblyForm,'cyContacts','')
+                    }
+                    for(let item of this.cyData) {
+                        if (item.cnName == value) {
+                            this.$set(this.assemblyForm,'cyId',item.id)
+                            this.$set(this.assemblyForm,'cyCode',item.code)
+                            this.$set(this.assemblyForm,'cyCnName',item.cnName)
+                            this.$set(this.assemblyForm,'cyEnName',item.enName)
+                            this.$set(this.assemblyForm,'cyRemarks',item.details) // 客户里的详情信息
+                            // 查询场站联系人
+                            getBcorpsattnList(1,20,{pid:this.assemblyForm.cyId}).then(res=>{
+                                if (res.data.data.records.length > 0) {
+                                    this.$set(this.assemblyForm,'cyTel',res.data.data.records[0].tel)
+                                    this.$set(this.assemblyForm,'cyAddress',res.data.data.records[0].addr)
+                                    this.$set(this.assemblyForm,'cyContacts',res.data.data.records[0].cname)
+                                }
+                            })
+                        }
+                    }
+                }
+                // 场站联系人
+                else if (name == 'cyContacts') {
+                    if (!value) {
+                        this.$set(this.assemblyForm,'cyTel','')
+                        this.$set(this.assemblyForm,'cyAddress','')
+                        this.$set(this.assemblyForm,'cyContacts','')
+                    }
+                    for(let item of this.cyContactsData) {
+                        if (item.cname == value) {
+                            this.$set(this.assemblyForm,'cyTel',item.tel)
+                            this.$set(this.assemblyForm,'cyAddress',item.addr)
+                            this.$set(this.assemblyForm,'cyContacts',item.cname)
+                        }
+                    }
+                }
                 else {
                     this.$set(this.assemblyForm,name,value?value:'')
                 }
@@ -1147,6 +1271,19 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
             },
 
             // 接口数据请求🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
+            // 获取场站数据
+            cyBcorpslistByType(cnName){
+                let corpTypeName = '场站'
+                getBcorpslistByType(1,10,{cnName,status: 0,corpTypeName}).then(res=>{
+                    this.cyData = res.data.data.records
+                })
+            },
+            // 获取场站下的联系人数据
+            cyBcorpsattnListfun(){
+                getBcorpsattnList(1,20,{pid:this.assemblyForm.cyId}).then(res=>{
+                    this.cyContactsData = res.data.data.records
+                })
+            },
             // 获取发货人数据 (往来单位 前四个代理)
             hshipperBcorpsListfun(cnName){
                 let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'

+ 66 - 66
src/views/iosBasicData/OceanFreightImport/bills/assembly/formbottom.vue

@@ -1,72 +1,72 @@
 <template>
     <div>
         <el-form :model="assemblyForm" ref="form" label-width="90px">
-            <el-row>
-                <el-col :span="12">
-                    <el-col :span="12">
-                        <el-form-item label="场站" prop="cyCnName" >
-                            <span slot="label">
-                                <span style="color: #4c9e44;cursor: pointer;text-decoration: underline" @click="emailJump()">场站</span>
-                            </span>
-                            <search-query :datalist="cyData"
-                                          :selectValue="assemblyForm.cyCnName"
-                                          :filterable="true"
-                                          :clearable="true"
-                                          :remote="true"
-                                          :disabled="detailData.seeDisabled || generateBillsfalse"
-                                          :buttonIf="false"
-                                          :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                          placeholder="请选择场站"
-                                          @remoteMethod="remoteMethod($event,'cy')"
-                                          @corpChange="corpChange($event,'cy')"
-                                          @corpFocus="remoteMethod($event, 'cy')" >
-                            </search-query>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="12">
-                        <el-form-item label="联系人" prop="cyContacts" >
-                            <span slot="label">
-                                <span style="color: #1e9fff">联系人</span>
-                            </span>
-                            <!--<el-input type="age" style="width: 100%;" v-model="assemblyForm.cyContacts"-->
-                            <!--          size="small" autocomplete="off"-->
-                            <!--          :disabled="detailData.seeDisabled || generateBillsfalse"-->
-                            <!--          clearable placeholder="请输入联系人" ></el-input>-->
-                            <search-query :datalist="cyContactsData"
-                                          :selectValue="assemblyForm.cyContacts"
-                                          :filterable="true"
-                                          :clearable="true"
-                                          :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"
-                                          :buttonIf="false"
-                                          :forParameter="{key:'id',label:'cname',value:'cname'}"
-                                          placeholder="联系人"
-                                          @corpChange="corpChange($event,'cyContacts')"
-                                          @corpFocus="remoteMethod($event, 'cyContacts')" >
-                            </search-query>
-                        </el-form-item>
-                    </el-col>
-                </el-col>
-                <el-col :span="12">
-                    <el-form-item label="地址" prop="cyAddress" >
-                        <span slot="label">
-                             <span style="color: #1e9fff">地址</span>
-                        </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.cyAddress"
-                                  size="small" autocomplete="off"
-                                  :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"
-                                  clearable placeholder="地址" ></el-input>
-                    </el-form-item>
-                </el-col>
-            </el-row>
-            <el-form-item label="场站备注" prop="cyRemarks" >
-                <span slot="label">
-                     <span style="color: #1e9fff">场站备注</span>
-                </span>
-                <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.cyRemarks"
-                          size="small" autocomplete="off"
-                          :disabled="detailData.seeDisabled || generateBillsfalse" rows="3"
-                          clearable placeholder="请输入场站备注" ></el-input>
-            </el-form-item>
+            <!--<el-row>-->
+            <!--    <el-col :span="12">-->
+            <!--        <el-col :span="12">-->
+            <!--            <el-form-item label="场站" prop="cyCnName" >-->
+            <!--                <span slot="label">-->
+            <!--                    <span style="color: #4c9e44;cursor: pointer;text-decoration: underline" @click="emailJump()">场站</span>-->
+            <!--                </span>-->
+            <!--                <search-query :datalist="cyData"-->
+            <!--                              :selectValue="assemblyForm.cyCnName"-->
+            <!--                              :filterable="true"-->
+            <!--                              :clearable="true"-->
+            <!--                              :remote="true"-->
+            <!--                              :disabled="detailData.seeDisabled || generateBillsfalse"-->
+            <!--                              :buttonIf="false"-->
+            <!--                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
+            <!--                              placeholder="请选择场站"-->
+            <!--                              @remoteMethod="remoteMethod($event,'cy')"-->
+            <!--                              @corpChange="corpChange($event,'cy')"-->
+            <!--                              @corpFocus="remoteMethod($event, 'cy')" >-->
+            <!--                </search-query>-->
+            <!--            </el-form-item>-->
+            <!--        </el-col>-->
+            <!--        <el-col :span="12">-->
+            <!--            <el-form-item label="联系人" prop="cyContacts" >-->
+            <!--                <span slot="label">-->
+            <!--                    <span style="color: #1e9fff">联系人</span>-->
+            <!--                </span>-->
+            <!--                &lt;!&ndash;<el-input type="age" style="width: 100%;" v-model="assemblyForm.cyContacts"&ndash;&gt;-->
+            <!--                &lt;!&ndash;          size="small" autocomplete="off"&ndash;&gt;-->
+            <!--                &lt;!&ndash;          :disabled="detailData.seeDisabled || generateBillsfalse"&ndash;&gt;-->
+            <!--                &lt;!&ndash;          clearable placeholder="请输入联系人" ></el-input>&ndash;&gt;-->
+            <!--                <search-query :datalist="cyContactsData"-->
+            <!--                              :selectValue="assemblyForm.cyContacts"-->
+            <!--                              :filterable="true"-->
+            <!--                              :clearable="true"-->
+            <!--                              :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"-->
+            <!--                              :buttonIf="false"-->
+            <!--                              :forParameter="{key:'id',label:'cname',value:'cname'}"-->
+            <!--                              placeholder="联系人"-->
+            <!--                              @corpChange="corpChange($event,'cyContacts')"-->
+            <!--                              @corpFocus="remoteMethod($event, 'cyContacts')" >-->
+            <!--                </search-query>-->
+            <!--            </el-form-item>-->
+            <!--        </el-col>-->
+            <!--    </el-col>-->
+            <!--    <el-col :span="12">-->
+            <!--        <el-form-item label="地址" prop="cyAddress" >-->
+            <!--            <span slot="label">-->
+            <!--                 <span style="color: #1e9fff">地址</span>-->
+            <!--            </span>-->
+            <!--            <el-input type="age" style="width: 100%;" v-model="assemblyForm.cyAddress"-->
+            <!--                      size="small" autocomplete="off"-->
+            <!--                      :disabled="detailData.seeDisabled || generateBillsfalse || !assemblyForm.cyCnName"-->
+            <!--                      clearable placeholder="地址" ></el-input>-->
+            <!--        </el-form-item>-->
+            <!--    </el-col>-->
+            <!--</el-row>-->
+            <!--<el-form-item label="场站备注" prop="cyRemarks" >-->
+            <!--    <span slot="label">-->
+            <!--         <span style="color: #1e9fff">场站备注</span>-->
+            <!--    </span>-->
+            <!--    <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.cyRemarks"-->
+            <!--              size="small" autocomplete="off"-->
+            <!--              :disabled="detailData.seeDisabled || generateBillsfalse" rows="3"-->
+            <!--              clearable placeholder="请输入场站备注" ></el-input>-->
+            <!--</el-form-item>-->
 
             <el-row >
                 <el-col :span="6">

+ 13 - 11
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -331,26 +331,27 @@
                                 <span slot="label">
                                     <span style="color: #1e9fff">HS CODE</span>
                                 </span>
-                                    <el-col :span="16">
+                                    <el-col :span="12">
                                         <search-query :datalist="commodityData"
-                                                      :selectValue="assemblyForm.commodityCnName"
+                                                      :selectValue="assemblyForm.hscode"
                                                       :filterable="true"
                                                       :clearable="true"
                                                       :remote="true"
                                                       :disabled="detailData.seeDisabled"
                                                       :buttonIf="false"
+                                                      :allowCreate="true"
                                                       placeholder="请选择HS CODE"
-                                                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                                      :forParameter="{key:'id',label:'hsCode',value:'hsCode'}"
                                                       @remoteMethod="remoteMethod($event,'commodity')"
                                                       @corpChange="corpChange($event,'commodity')"
                                                       @corpFocus="remoteMethod($event,'commodity')">
                                         </search-query>
                                     </el-col>
-                                    <el-col :span="7">
+                                    <el-col :span="11">
                                         <span style="padding-left: 20px"></span>
-                                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.hscode"
+                                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.commodityCnName"
                                                   size="small" autocomplete="off"
-                                                  :disabled="detailData.seeDisabled || !assemblyForm.commodityCnName"
+                                                  :disabled="detailData.seeDisabled"
                                                   clearable placeholder="商品 HS-CODE" ></el-input>
                                     </el-col>
                                 </el-form-item>
@@ -1217,7 +1218,7 @@ import {getBcorpsattnList} from "@/api/iosBasicData/bcorpsattn";
                         this.$set(this.assemblyForm,'commodityEnName','')
                     }
                     for(let item of this[name + 'Data']) {
-                        if (item.cnName == value) {
+                        if (item.hsCode == value) {
                             this.$set(this.assemblyForm,'hscode',item.hsCode)
                             this.$set(this.assemblyForm,'commodityShName',item.cnName)
                             this.$set(this.assemblyForm,'commodityCnName',item.cnName)
@@ -1347,10 +1348,11 @@ import {getBcorpsattnList} from "@/api/iosBasicData/bcorpsattn";
                             this.$set(this.assemblyForm,'cyRemarks',item.details) // 客户里的详情信息
                             // 查询场站联系人
                             getBcorpsattnList(1,20,{pid:this.assemblyForm.cyId}).then(res=>{
-                                console.log(res,590)
-                                this.$set(this.assemblyForm,'cyTel',res.data.data.records[0].tel)
-                                this.$set(this.assemblyForm,'cyAddress',res.data.data.records[0].addr)
-                                this.$set(this.assemblyForm,'cyContacts',res.data.data.records[0].cname)
+                                if (res.data.data.records.length > 0) {
+                                    this.$set(this.assemblyForm,'cyTel',res.data.data.records[0].tel)
+                                    this.$set(this.assemblyForm,'cyAddress',res.data.data.records[0].addr)
+                                    this.$set(this.assemblyForm,'cyContacts',res.data.data.records[0].cname)
+                                }
                             })
                         }
                     }

+ 0 - 2
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -212,9 +212,7 @@
                                                           clearable :placeholder="item.text || ''" ></el-input>
                                             </el-form-item>
                                         </div>
-
                                     </el-col>
-
                                 </el-row>
                             </basic-container>
                         </el-form>

+ 11 - 5
src/views/iosBasicData/bcorps/detailsPage.vue

@@ -409,6 +409,12 @@
                       </el-form-item>
                   </el-col>
                   <el-col :span="8">
+                      <el-form-item label="INTRRA CODE" prop="inttraCode">
+                          <el-input v-model="formData.inttraCode" size="small" placeholder="请输入INTRRA CODE" clearable :style="{ width: '100%' }">
+                          </el-input>
+                      </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
                       <el-form-item label="INTRRA ICUA 联系人" prop="inttraIcuaAttn" label-width="140px">
                           <el-input v-model="formData.inttraIcuaAttn" size="small" placeholder="请输入INTRRA ICUA 联系人" clearable :style="{ width: '100%' }">
                           </el-input>
@@ -1183,11 +1189,11 @@ export default {
         //   message: ' ',
         //   trigger: 'change'
         // }],
-        // uscc: [{
-        //   required: true,
-        //   message: ' ',
-        //   trigger: 'change'
-        // }],
+        uscc: [{
+          required: true,
+          message: ' ',
+          trigger: 'change'
+        }],
         sourceType: [{
             required: true,
             message: ' ',

+ 92 - 1
src/views/iosBasicData/financeProfit/index.vue

@@ -17,6 +17,20 @@
                    @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 336)"
                    @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 336)"
                    @on-load="onLoad" >
+            <template slot="header">
+                <el-table
+                    :data="commodityData"
+                    border
+                    size="small"
+                    @header-click="cellClick"
+                    style="width: 100%">
+                    <el-table-column
+                        v-for="(item,index) in commodityLabel" :key="index"
+                        :prop="item.prop"
+                        show-overflow-tooltip
+                        :label="item.label" />
+                </el-table>
+            </template>
             <template slot-scope="{disabled,size}" slot="billTypeSearch">
                 <avue-input-tree :check-strictly="true"
                                  :tags="true"
@@ -140,7 +154,7 @@
 
 <script>
     import {defaultDate3} from "@/util/date";
-    import {financeStatisticsFinanceProfit} from "@/api/iosBasicData/paymentSummary";
+    import {financeStatisticsFinanceProfit, financeStatisticsFinanceProfitSum} from "@/api/iosBasicData/paymentSummary";
     import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
     import {getBcorpsList, getBcorpslistByType} from "@/api/iosBasicData/bcorps";
     import {getBvesselsList} from "@/api/iosBasicData/bvessels";
@@ -183,6 +197,8 @@
                     viewBtn:false,
                     delBtn:false,
                     editBtn:false,
+                    searchIcon:true,
+                    searchIndex:3,
 
                     showSummary: true,
                     summaryText: "合计",
@@ -485,6 +501,75 @@
                 srcforParameter:{key:'id', label:'cnName', value:'id'},
                 accDeptData:[], // 部门数据
                 lineData:[], // 航线数据
+                commodityData:[], // 合计数据
+                // 合计的配置项
+                commodityLabel:[
+                    {
+                        id:1,
+                        label:'应付人民币',
+                        prop:'amountCr'
+                    },
+                    {
+                        id:2,
+                        label:'应付美元',
+                        prop:'amountCrUsd'
+                    },
+                    {
+                        id:3,
+                        label:'合计应付',
+                        prop:'amountCrLoc'
+                    },
+                    {
+                        id:4,
+                        label:'应收人民币',
+                        prop:'amountDr'
+                    },
+                    {
+                        id:5,
+                        label:'应收美元',
+                        prop:'amountDrUsd'
+                    },
+                    {
+                        id:6,
+                        label:'合计应收',
+                        prop:'amountDrLoc'
+                    },
+                    {
+                        id:7,
+                        label:'实付人民币',
+                        prop:'realAmountCr'
+                    },
+                    {
+                        id:8,
+                        label:'实付美元',
+                        prop:'realAmountCrUsd'
+                    },
+                    {
+                        id:9,
+                        label:'实付合计',
+                        prop:'realAmountCrLoc'
+                    },
+                    {
+                        id:7,
+                        label:'实付人民币',
+                        prop:'realAmountDr'
+                    },
+                    {
+                        id:8,
+                        label:'实付美元',
+                        prop:'realAmountDrUsd'
+                    },
+                    {
+                        id:9,
+                        label:'实付合计',
+                        prop:'realAmountCrLoc'
+                    },
+                    {
+                        id:9,
+                        label:'实际单票利润',
+                        prop:'realAmountProfitLoc'
+                    },
+                ],
             }
         },
         async created() {
@@ -651,6 +736,9 @@
                     this.page.total = data.total;
                     this.data = data.records;
                     this.loading = false;
+                    financeStatisticsFinanceProfitSum(Object.assign(params, this.query)).then(re=>{
+                        this.commodityData = [re.data.data]
+                    })
                     this.selectionClear();
                 });
             },
@@ -706,4 +794,7 @@
     background: #ecf5ff !important;
     text-align: center;
 }
+/deep/ .el-col-md-8 {
+    width: 24.33333%;
+}
 </style>

+ 14 - 10
src/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue

@@ -669,17 +669,21 @@ export default {
         },
         // 费用详细确认
         feestemplatecompanyConfirm(){
-            if (this.feestemplateIndex != null) {
-                this.form.feesTemplateItemsList.splice(this.feestemplateIndex,1,this.feestemplateForm)
-            }else {
-                if (!this.form.feesTemplateItemsList) {
-                    this.form.feesTemplateItemsList = []
+            this.$refs.feestemplateForm.validate((valid)=>{
+                if (valid) {
+                    if (this.feestemplateIndex != null) {
+                        this.form.feesTemplateItemsList.splice(this.feestemplateIndex,1,this.feestemplateForm)
+                    }else {
+                        if (!this.form.feesTemplateItemsList) {
+                            this.form.feesTemplateItemsList = []
+                        }
+                        this.form.feesTemplateItemsList.push(this.feestemplateForm)
+                    }
+                    this.feestemplateForm = {}
+                    this.feestemplateIndex = null
+                    this.feestemplateVisible = false
                 }
-                this.form.feesTemplateItemsList.push(this.feestemplateForm)
-            }
-            this.feestemplateForm = {}
-            this.feestemplateIndex = null
-            this.feestemplateVisible = false
+            })
         },
         // 费用详细关闭
         feestemplateClose(done){

+ 149 - 51
src/views/tirePartsMall/financialManagement/saleDetail/index.vue

@@ -5,14 +5,18 @@
             ref="crud"
             :option="option"
             :data="data"
-            :search.sync="search"
+            :search.sync="query"
             @on-load="onLoad"
             @search-reset="query={}"
             :page.sync="page"
+            :cell-style="cellStyle"
+            @search-change="searchChange"
             @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 337)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 337)" >
+            <template slot="menuLeft">
+                <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
+            </template>
             <template slot="header">
-                {{commodityLabel[0]}}
                 <el-table
                     :data="commodityData"
                     border
@@ -22,14 +26,13 @@
                     <el-table-column
                         v-for="(item,index) in commodityLabel" :key="index"
                         :prop="item.prop"
-                        width="200"
                         show-overflow-tooltip
                         :label="item.label" />
                 </el-table>
             </template>
             <template slot="customerNameSearch">
                 <search-query :datalist="customerData"
-                              :selectValue="search.customerName"
+                              :selectValue="query.customerName"
                               :filterable="true"
                               :clearable="true"
                               :remote="true"
@@ -43,7 +46,7 @@
             </template>
             <template slot="goodsNameSearch">
                 <search-query :datalist="goodsData"
-                              :selectValue="search.goodsName"
+                              :selectValue="query.goodsName"
                               :filterable="true"
                               :clearable="true"
                               :remote="true"
@@ -57,7 +60,7 @@
             </template>
             <template slot="salerNameSearch">
                 <search-query :datalist="salerData"
-                              :selectValue="search.salerName"
+                              :selectValue="query.salerName"
                               :filterable="true"
                               :clearable="true"
                               :remote="true"
@@ -71,7 +74,7 @@
             </template>
             <template slot="actualPaymentStatusSearch">
                 <search-query :datalist="actualPaymentStatusData"
-                              :selectValue="search.actualPaymentStatus"
+                              :selectValue="query.actualPaymentStatus"
                               :clearable="true"
                               :buttonIf="false"
                               :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
@@ -80,6 +83,22 @@
                               @corpChange="corpChange($event,'actualPaymentStatus')">
                 </search-query>
             </template>
+            <template slot="statusSearch">
+                <search-query :datalist="statusData"
+                              :selectValue="query.status"
+                              :buttonIf="false"
+                              :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
+                              placeholder="请选择单据状态"
+                              @corpFocus="statusWorkDictsfun"
+                              @corpChange="corpChange($event,'status')">
+                </search-query>
+            </template>
+            <template slot="isContainSearch">
+                <el-checkbox v-model="query.isContain" :true-label="1" :false-label="0" ></el-checkbox>
+            </template>
+            <template slot="status" slot-scope="{ row }" >
+                <span>{{row.status}}</span>
+            </template>
         </avue-crud>
     </basic-container>
 </template>
@@ -93,19 +112,20 @@ import {getList as SPgetList} from '@/api/tirePartsMall/basicData/commodityInfor
 import {getList as YWYgetList} from "@/api/system/user"
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import {getWorkDicts} from "@/api/system/dictbiz";
+import { getToken } from "@/util/auth";
 
 export default {
     components: {SearchQuery},
         data(){
             return {
                 key: 0,
-                search: {
+                data: [],
+                total: [],
+                query: {
                     businesDateStart:defaultDate3()[0],
                     businesDateEnd:defaultDate3()[1],
+                    isContain:1,
                 },
-                data: [],
-                total: [],
-                query: {},
                 page: {
                     pageSize: 10,
                     currentPage: 1,
@@ -123,15 +143,37 @@ export default {
                     // searchIcon: true,
                     // searchIndex: 2,
                     // highlightCurrentRow: true,
+                    searchMenuSpan:18,
                     addBtn: false,
                     showSummary: true,
                     summaryText: "合计",
                     sumColumnList: [
                         {
-                            name: 'sliceNumber',
+                            name: 'goodsNum',
+                            type: 'sum',
+                            decimals: 0
+                        },
+                        {
+                            name: 'price',
+                            type: 'sum',
+                            decimals: 2
+                        },
+                        {
+                            name: 'subTotalMoney',
                             type: 'sum',
                             decimals: 2
-                        }],
+                        },
+                        {
+                            name: 'costprie',
+                            type: 'sum',
+                            decimals: 2
+                        },
+                        {
+                            name: 'profit',
+                            type: 'sum',
+                            decimals: 2
+                        }
+                    ],
                     column: [{
                         label: '客户名称',
                         prop: 'customerName',
@@ -226,57 +268,100 @@ export default {
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd",
-                    },]
+                    },{
+                        label: '单据状态',
+                        prop: 'status',
+                        overHidden: true,
+                        search:true,
+                        searchslot:true,
+                        searchOrder:8
+                    },{
+                        label: '包含未发货',
+                        prop: 'isContain',
+                        overHidden: true,
+                        hide:true,
+                        search:true,
+                        searchslot:true,
+                        searchOrder:9
+                    }]
                 },
                 customerData:[], // 客户数据
                 goodsData:[], // 商品名称
                 salerData:[], // 业务员
                 actualPaymentStatusData:[], // 结算状态
+                statusData:[], // 单据状态
                 commodityData:[], // 合计数据
                 // 合计的配置项
                 commodityLabel:[{
+                    id:1,
                     label:'销售数量',
                     prop:'goodsSum'
+                },{
+                    id:2,
+                    label:'销售金额',
+                    prop:'amount'
+                },{
+                    id:3,
+                    label:'销售成本',
+                    prop:'costprie'
+                },{
+                    id:4,
+                    label:'销售毛利',
+                    prop:'profit'
+                },{
+                    id:5,
+                    label:'已取消数量',
+                    prop:'goodsSumCancellation'
+                },{
+                    id:6,
+                    label:'已取消金额',
+                    prop:'amountCancellation'
+                },{
+                    id:7,
+                    label:'已取消成本',
+                    prop:'costprieCancellation'
+                },{
+                    id:8,
+                    label:'已取消毛利',
+                    prop:'profitCancellation'
                 }],
-                // commodityLabel:[{
-                //     id:1,
-                //     label:'销售数量',
-                //     prop:'goodsSum'
-                // },{
-                //     id:2,
-                //     label:'销售金额',
-                //     prop:'amount'
-                // },{
-                //     id:3,
-                //     label:'销售成本',
-                //     prop:'costprie'
-                // },,{
-                //     id:4,
-                //     label:'销售毛利',
-                //     prop:'profit'
-                // },{
-                //     id:5,
-                //     label:'已取消数量',
-                //     prop:'goodsSumCancellation'
-                // },{
-                //     id:6,
-                //     label:'已取消金额',
-                //     prop:'amountCancellation'
-                // },{
-                //     id:7,
-                //     label:'已取消成本',
-                //     prop:'costprieCancellation'
-                // },{
-                //     id:8,
-                //     label:'已取消毛利',
-                //     prop:'profitCancellation'
-                // }],
             }
         },
         async created() {
             this.option = await this.getColumnData(this.getColumnName(337), this.optionList);
         },
         methods:{
+            cellStyle({row,rowIndex}){
+                if (row.status == '已取消') {
+                    return 'color: red';
+                }
+                return
+            },
+            //导出
+            outExport() {
+                let config = { params: { ...this.query } }
+                if (config.params) {
+                    for (const propName of Object.keys(config.params)) {
+                        const value = config.params[propName];
+                        if (value !== null && typeof (value) !== "undefined") {
+                            if (value instanceof Array) {
+                                for (const key of Object.keys(value)) {
+                                    let params = propName + '[' + key + ']';
+                                    config.params[params] = value[key]
+                                }
+                                delete config.params[propName]
+                            }
+                        }
+                    }
+                }
+                const routeData = this.$router.resolve({
+                    path: '/api/blade-sales-part/statistics/saleDetailExport',   //跳转目标窗口的地址
+                    query: {
+                        ...config.params,    //括号内是要传递给新窗口的参数
+                    }
+                })
+                window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+            },
             // 获取客户数据
             KHgetListfun(cname){
                 KHgetList({current: 1, size: 20, corpType: 'KH', cname:cname?cname:null}).then(res=>{
@@ -301,16 +386,28 @@ export default {
                     this.actualPaymentStatusData = res.data.data
                 })
             },
+            // 单据状态
+            statusWorkDictsfun(){
+                getWorkDicts('document_status').then(res=>{
+                    this.statusData = res.data.data
+                })
+            },
             // 下拉回调
             corpChange(value,name) {
-                this.$set(this.search,name,value)
+                this.$set(this.query,name,value)
+            },
+            //搜索
+            searchChange(params, done) {
+                this.query = params;
+                this.onLoad(this.page, params)
+                done();
             },
             // 获取列表数据
             onLoad(page, params = {}) {
                 let queryParams = {
                     size: page.pageSize,
                     current: page.currentPage,
-                    ...Object.assign(params, this.search)
+                    ...Object.assign(params, this.query)
                 }
                 statisticsSaleDetail(queryParams).then(res => {
                     this.data = res.data.data.records
@@ -319,8 +416,9 @@ export default {
                     // generalLedgerTotal(queryParams).then(res=>{
                     //     this.total = res.data.data
                     // })
-                    statisticsSaleDetailSum({...Object.assign(params, this.search)}).then(re=>{
-                        console.log(re,285)
+                    statisticsSaleDetailSum({...Object.assign(params, this.query)}).then(re=>{
+                        this.commodityData = [re.data.data]
+
                     })
                 })
             },