| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="backToList">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button class="el-button--small-yh" type="primary" :loading="saveLoading" size="small" @click="calculateInterest()">利息计算
- </el-button>
- </div>
- </div>
- <div class="customer-main">
- <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
- <containerTitle title="基础资料"></containerTitle>
- <basic-container :showBtn="true">
- <el-row>
- <el-col v-for="(item, index) in basicData.column" :key="index" :span="item.span ? item.span : 8"
- :class="{ isShow: item.display }">
- <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
- <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"
- :disabled="detailData.seeDisabled || browse" />
- <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"
- :disabled="detailData.seeDisabled || browse" />
- <crop-select v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" @getCorpData="getCorpRow"
- corpType="KH" :disabled="detailData.seeDisabled || browse || !form.belongToCorpId" style="width: 100%"
- ref="KHSelect" :belongtocompany="form.belongToCorpId"></crop-select>
- <crop-select v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]"
- @getCorpData="returnBack" corpType="GS" :disabled="detailData.seeDisabled || browse"></crop-select>
- <crop-select v-else-if="item.prop === 'productionPlant'" v-model="form[item.prop]"
- @getCorpData="getPlantRow" corpType="GYS" :disabled="detailData.seeDisabled || browse"
- style="width: 100%"></crop-select>
- <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable
- filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
- <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue"
- :value="item.dictValue"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'packageRemarks'" v-model="form[item.prop]" placeholder="请选择"
- clearable filterable allow-create default-first-option style="width: 100%" size="small"
- :disabled="detailData.seeDisabled || browse">
- <el-option v-for="(item, index) in packageOptions" :key="index" :label="item.dictValue"
- :value="item.dictValue"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'arrivalAddress'" v-model="form[item.prop]" placeholder="请选择"
- clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse"
- allow-create default-first-option>
- <el-option v-for="(item, index) in arrivalOptions" :key="index" :label="item.label"
- :value="item.label"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'shippingAddress'" v-model="form[item.prop]" placeholder="请选择"
- clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse"
- allow-create default-first-option>
- <el-option v-for="(item, index) in shippingOptions" :key="index" :label="item.label"
- :value="item.label"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择仓库" clearable
- filterable style="width: 100%" size="small" default-first-option
- :disabled="detailData.seeDisabled || item.disabled || browse">
- <el-option v-for="(item, index) in storageIdOption" :key="index" :label="item.cname"
- :value="item.id"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'banks'" v-model="form[item.prop]" placeholder="请选择" clearable
- filterable allow-create default-first-option size="small" style="width: 100%;"
- :disabled="detailData.seeDisabled || browse">
- <el-option v-for="(item, index) in bankList" :key="index" :label="item.accountNo"
- :value="item.accountNo"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'corpAttn'" v-model="form[item.prop]" placeholder="请选择" clearable
- filterable allow-create default-first-option size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
- <el-option v-for="(item, index) in khInfoList" :key="index" :label="item.cname"
- :value="item.id"></el-option>
- </el-select>
- <el-input v-else-if="item.type == 'number'" placeholder="请输入" v-input-limit="2" size="small"
- :disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" />
- <span v-else-if="item.type == 'radio'">
- <el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse"
- v-model.trim="form[item.prop]" :label="1">是</el-radio>
- <el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse"
- v-model.trim="form[item.prop]" :label="0">否</el-radio>
- </span>
- <el-select v-else-if="item.prop === 'chargeMember'" v-model="form[item.prop]" placeholder="请选择"
- filterable size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
- <el-option v-for="(item, index) in userList" :key="index" :label="item.cname"
- :value="item.cname"></el-option>
- </el-select>
- <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
- size="small" autocomplete="off"
- :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
- <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off"
- :disabled="item.disabled || detailData.seeDisabled || browse" clearable></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </basic-container>
- <containerTitle title="利息信息"/>
- <basic-container>
- <el-row>
- <el-col span="8">
- <el-form-item label="资方" prop="investor">
- <crop-select v-model="form.investor" @getCorpData="getInvestor" corpType="GYS" style="width: 100%"></crop-select>
- </el-form-item>
- </el-col>
- <el-col span="6">
- <el-form-item label="利率" prop="interestRate">
- <el-input type="age" v-model.trim="form.interestRate" size="small" autocomplete="off" placeholder="请输入年利率" v-input-limit="2">
- <template slot="append">%</template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="4">
- <el-form-item label="天数" prop="days">
- <el-input type="number" v-model.trim="form.days" size="small" autocomplete="off" placeholder="请输入天数" v-input-limit="2">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="6">
- <el-form-item label="配资比例" prop="fundingRatio">
- <el-input type="age" v-model.trim="form.fundingRatio" size="small" autocomplete="off" placeholder="请输入多多配资比例" v-input-limit="2">
- <template slot="append">%</template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="4">
- <el-form-item label="税率" prop="fundingRatio">
- <el-input type="age" v-model.trim="form.taxRate" size="small" autocomplete="off" placeholder="请输入税率" v-input-limit="2">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="6">
- <el-form-item label="利息金额" prop="fundingRatio">
- <el-input type="age" v-model.trim="form.interestAmount" size="small" autocomplete="off" disabled placeholder="请输入多多配资比例" v-input-limit="2">
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </basic-container>
- <containerTitle title="发货信息"></containerTitle>
- <basic-container :showBtn="true" :block="true" ref="shipmentRef">
- <el-row>
- <el-col v-for="(item, index) in contactInformation.column" :key="index" :span="item.span ? item.span : 8"
- :class="{ isShow: item.display == false }">
- <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
- <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"
- :disabled="item.disabled || detailData.seeDisabled || browse" />
- <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"
- :disabled="detailData.seeDisabled || browse" />
- <el-input v-else-if="(item.prop === 'advancePayment') || (item.prop === 'orderAmount') ||
- (item.prop === 'settlmentAmount') || (item.prop === 'caseOverPayment') || (item.prop === 'thisUsedProfit') ||
- (item.prop === 'createProfit')" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="detailData.seeDisabled || item.disabled || browse"
- v-input-limit="2"></el-input>
- <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable
- filterable style="width: 100%" size="small"
- :disabled="detailData.seeDisabled || item.disabled || browse">
- <el-option v-for="(item, index) in statusOption" :key="index" :label="item.dictValue"
- :value="item.dictValue"></el-option>
- </el-select>
- <el-input type="age" v-else-if="item.prop === 'grossProfitRate'" v-model.trim="form[item.prop]"
- size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled || browse"
- v-input-limit="2">
- <template slot="append">%</template>
- </el-input>
- <el-input type="age" v-else-if="item.prop === 'specialOfferOf'" v-model.trim="form[item.prop]"
- size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled || browse"
- v-input-limit="2">
- <template slot="append">%</template>
- </el-input>
- <el-input type="age" v-else-if="item.prop === 'largeScale'" v-model.trim="form[item.prop]" size="small"
- autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled || browse" v-input-limit="2">
- <template slot="append">%</template>
- </el-input>
- <el-input v-else-if="item.type == 'number'" placeholder="请输入" v-input-limit="2" size="small"
- :disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" />
- <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
- size="small" autocomplete="off"
- :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
- <el-input v-else type="age" v-model.trim="form[item.prop]" size="small" autocomplete="off"
- :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </basic-container>
- <containerTitle title="商品信息"></containerTitle>
- <basic-container style="margin-bottom: 10px">
- <avue-crud :option="customerContact" v-model="contactsForm" :data="goodsShowData" ref="crudContact"
- @saveColumn="saveColumn('goods')" @resetColumn="resetColumn" :summary-method="summaryMethod"
- :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
- <template slot="headerSerial">
- <span class="order_number">序号</span>
- <el-button class="number_button" type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
- @click="$refs.crudContact.rowCellAdd()"></el-button>
- </template>
- <template slot="cntrVolumn" slot-scope="{row}">
- <span>{{ row.cntrVolumn ? parseFloat(row.cntrVolumn) : row.cntrVolumn }}</span>
- </template>
- <template slot="storageId" slot-scope="{ row }">
- <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
- <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable default-first-option>
- <el-option v-for="(item, index) in row.storageQuantityList" :key="index"
- :label="item.storageName + '-' + item.corpName" :value="item.storageId"></el-option>
- </el-select>
- <span v-else>{{ row.storageName }}</span>
- </template>
- <template slot="storageQuantity" slot-scope="{ row }">
- <span>{{ row.storageQuantity | decimalFormat }}</span>
- </template>
- <template slot="purchaseRebatePrice" slot-scope="{ row }">
- <el-input v-if="false" v-model="row.purchaseRebatePrice" allow-create
- filterable v-input-limit="2" default-first-option>
- <el-option v-for="(item, index) in purchasePriceOption" :key="index" :label="item.purchaseRebatePrice"
- :value="item.purchaseRebatePrice"></el-option>
- </el-input>
- <span v-else>{{ row.purchaseRebatePrice }}</span>
- </template>
- <template slot="purchaseAmount" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" allow-create
- filterable v-input-limit="2" default-first-option>
- <el-option v-for="(item, index) in purchasePriceOption" :key="index" :label="item.purchasePrice"
- :value="item.purchasePrice"></el-option>
- </el-input>
- <span v-else>{{ row.purchaseAmount }}</span>
- </template>
- <template slot="price" slot-scope="{ row }">
- <el-select v-if="false" v-model="row.price" @focus="getMarketPrice(row)"
- allow-create filterable v-input-limit="2" default-first-option>
- <el-option v-for="(item, index) in salesPriceOtion" :key="index" :label="item.salePrice"
- :value="item.salePrice"></el-option>
- </el-select>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="amount" slot-scope="{ row }">
- <span>{{ row.amount | decimalFormat }}</span>
- </template>
- <template slot="actualQuantity" slot-scope="{ row }">
- <span>{{ row.actualQuantity | IntegerFormat }}</span>
- </template>
- <template slot="orderQuantity" slot-scope="{ row }">
- <span>{{ row.orderQuantity | IntegerFormat }}</span>
- </template>
- <template slot="shopQuality" slot-scope="{ row }">
- <el-switch v-model="row.shopQuality" :disabled="!row.$cellEdit || shopQualityDisable" :active-value="1"
- :inactive-value="0"></el-switch>
- </template>
- <template slot="menuLeft" slot-scope="{size}">
- <el-tabs v-model="goodsActives" @tab-click="handleClick" :before-leave="beforeLeave">
- <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled">
- </el-tab-pane>
- <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled">
- </el-tab-pane>
- </el-tabs>
- <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()" v-show="goodsActives == 'goods'">报表打印</el-button>
- </template>
- </avue-crud>
- </basic-container>
- <fee-info ref="feeInfo" :orderFeesList="advantageProjectData"
- :disabled="true" feeUrl="/blade-purchase-sales/orderfees/update"
- optionType="GN" itemType="销售" @beforeFinance="beforeFinance" :corpId="form.corpId" :financeDisabled="false"
- :tabShow="2" />
- <containerTitle title="上传附件"></containerTitle>
- <c-upload :data="bankOfDepositData" deleteUrl="/api/blade-client/corpsbank/update" :disabled="true" :enumerationValue="77" display />
- </el-form>
- </div>
- <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="配资" @onClose="onClose()" />
- </div>
- </template>
- <script>
- import {
- detail,
- getlistBankBy,
- getProfit,
- calculateInterestAmount
- } from "@/api/basicData/configuration"
- import { getCorpDetail } from "@/api/maintenance/overpayment"
- import { integralDetail } from "@/api/maintenance/integral"
- import customerContact from "./configuration/customerContact.json"
- import optionPolicy from "./configuration/optionPolicy.json"
- import BuyFree from "./configuration/BuyFree.json"
- import {
- customerList as feeList,
- getDeptLazyTree,
- getDeptLazyTreeTwo,
- policyColumn
- } from "@/api/basicData/basicFeesDesc";
- import _ from "lodash";
- import reportDialog from "@/components/report-dialog/main";
- import { getToken } from "@/util/auth";
- import feeInfo from "@/components/fee-info/main";
- import { customerList as getKHList, detail as khDetail } from "@/api/basicData/customerInformation";
- import { IntegerFormat } from "@/util/validate";
- import { getCharge } from "@/api/basicData/customerInquiry";
- import { mapGetters } from "vuex";
- import { customerList as storageType } from "@/api/basicData/basicStorageType"
- export default {
- name: "detailsPage",
- props: {
- isProcurements: {
- type: Boolean
- },
- detailData: {
- type: Object
- }
- },
- components: {
- reportDialog,
- feeInfo
- },
- data() {
- return {
- policyList: [],
- selectionDList: [],
- searchDL: {},
- policyType: null,
- dataDL: [],
- optionThree: {
- header: false,
- menu: true,
- editBtn: false,
- delBtn: false,
- menuWidth: '80',
- searchSpan: 12,
- column: [
- {
- label: '商品名称',
- prop: 'cname',
- search: true,
- overHidden: true
- }, {
- label: '编码',
- prop: 'code',
- search: true,
- overHidden: true
- }, {
- label: '规格型号',
- prop: 'typeno',
- overHidden: true
- }, {
- label: '花纹',
- prop: 'brandItem',
- overHidden: true
- }, {
- label: '订货数量',
- prop: 'orderQuantity',
- overHidden: true
- }, {
- label: '供应商',
- prop: 'corpName',
- overHidden: true
- }
- ]
- },
- optionFour: {
- header: false,
- menu: false,
- editBtn: false,
- delBtn: false,
- menuWidth: '80',
- column: [
- {
- label: '商品名称',
- prop: 'cname',
- overHidden: true
- }, {
- label: '编码',
- prop: 'code',
- overHidden: true
- }, {
- label: '规格型号',
- prop: 'typeno',
- overHidden: true
- }, {
- label: '花纹',
- prop: 'brandItem',
- overHidden: true
- }, {
- label: '订货数量',
- prop: 'orderQuantity',
- overHidden: true
- }, {
- label: '供应商',
- prop: 'corpName',
- overHidden: true
- }
- ]
- },
- optionDL: {
- header: false,
- menu: false,
- selection: true,
- tip: false,
- column: [
- {
- label: '订单号',
- prop: 'orgOrderNo',
- overHidden: true
- }, {
- label: '订单日期',
- prop: 'businesDate',
- overHidden: true
- }, {
- label: '收货地址',
- prop: 'arrivalAddress',
- overHidden: true
- }, {
- label: '品牌',
- prop: 'brand',
- overHidden: true
- }
- ]
- },
- storageNameList: [],
- surplusRouteQuantityOption: [],
- saveLoading: false,
- userInfo: null,
- disabled: false,
- form: {
- corpId: null,
- },
- billType: "收费", //账单类型
- billData: {}, //账单需要数据
- applySettlementDialog: false,//生成账单组件
- financialAccountDialog: false,
- configuration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- goodsConfiguration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- plantConfiguration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- companyConfiguration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- data: [],
- policyForm: {},
- dataPolicy: [],
- contactsDataBuyFree: [],
- loadingCost: false,
- customerDivide: '',
- choiceData: false,
- commodityData: false,
- dataCost: [],
- treeDataDL: [],
- treeDataPolicy: [],
- treeDataGoods: [],
- choiceIndex: '',
- dialogCost: false,
- treeDeptId: '',
- treeDeptIdCost: '',
- treePolicyId: '',
- pageCost: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- pageSizes: [10, 50, 100, 300, 500]
- },
- pageList: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- pagePolicy: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- loading: false,
- loadingPolicy: false,
- contactsForm: {},
- optionPolicy: optionPolicy,
- customerBuyFree: BuyFree,
- nowDate: new Date().toLocaleString('chinese', { hour12: false }).replaceAll('/', '-'),
- policyOption: {
- nodeKey: 'id',
- lazy: true,
- treeLoad: (node, resolve) => {
- const parentId = (node.level === 0) ? 0 : node.data.id;
- const newTime = new Date().toLocaleString('chinese', { hour12: false }).replaceAll('/', '-')
- policyColumn({ newTime: newTime, parentId: parentId, corps: this.form.corpId }).then(res => {
- resolve(res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
- },
- addBtn: false,
- menu: false,
- size: 'small',
- props: {
- labelText: '标题',
- label: 'title',
- value: 'value',
- children: 'children'
- }
- },
- treeOptionCost: {
- nodeKey: 'id',
- lazy: true,
- treeLoad: function (node, resolve) {
- const parentId = (node.level === 0) ? 0 : node.data.id;
- getDeptLazyTree(parentId).then(res => {
- resolve(res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
- },
- addBtn: false,
- menu: false,
- size: 'small',
- props: {
- labelText: '标题',
- label: 'title',
- value: 'value',
- children: 'children'
- }
- },
- treeOption: {
- nodeKey: 'id',
- lazy: true,
- treeLoad: function (node, resolve) {
- const parentId = (node.level === 0) ? 0 : node.data.id;
- getDeptLazyTreeTwo(parentId).then(res => {
- resolve(res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
- },
- addBtn: false,
- menu: false,
- size: 'small',
- props: {
- labelText: '标题',
- label: 'title',
- value: 'value',
- children: 'children'
- }
- },
- dialogVisible: false,
- policyDialog: false,
- advantageProjectForm: {},
- selection: [],
- bankOfDepositForm: {},
- contactsData: [],
- advantageProjectData: [],
- bankOfDepositData: [],
- tableDataCost: [],
- dic: [],
- storageId: [],
- tableData: [],
- policyData: [],
- policyDataTwo: [],
- customerContact: {},
- advantageProject: {},
- contactInformation: {
- column: [
- {
- label: '销售金额',
- prop: 'orderAmount',
- type: 'number',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '其他费用',
- prop: 'otherAmount',
- type: 'number',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '总溢付款',
- prop: 'overPayment',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '返利余额',
- prop: 'profit',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '产生返利',
- prop: 'createProfit',
- disabled: false,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '本次使用返利',
- prop: 'thisUsedProfit',
- disabled: false,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '应收账款',
- prop: 'debitAmount',
- type: 'number',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '已收款',
- prop: 'settlmentAmount',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '应收未收款',
- prop: 'balanceAmount',//无
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: '保证金',
- prop: 'deposit',
- type: 'number',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '逾期账款',
- prop: 'overDueAccounts',
- type: 'number',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '实际发货日期',
- prop: 'actualDeliveryDate',
- type: 'datetime',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '合同日期',
- prop: 'businesDate',
- type: 'date',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '到货日期',
- prop: 'arrivalDate',
- type: 'datetime',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '毛利率',
- prop: 'grossProfitRate',
- display: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '毛利额',
- prop: 'grossProfit',
- type: 'number',
- display: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '历史运费(元/条)',
- prop: 'freightAmountHistory',
- type: 'number',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '预收款日期',
- type: 'datetime',
- prop: 'advanceCollectionDate',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '特价占比',
- prop: 'specialOfferOf',
- disabled: false,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '大尺寸占比',
- prop: 'largeScale',
- disabled: false,
- }, {
- label: '单据状态',
- prop: 'orderStatus',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '积分余额',
- prop: 'pointMutiple',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '赠送积分',
- prop: 'presenterIntegral',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '兑换积分',
- prop: 'convertIntegral',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '重量合计',
- prop: 'cartonWeight',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '体积合计',
- prop: 'cntrVolumn',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '制单人',
- prop: 'createUserName',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '制单日期',
- prop: 'createTime',
- type: 'datetime',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '特别提醒',
- prop: 'specialRemarks',
- type: 'textarea',
- span: 24,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }
- ]
- },
- basicData: {
- column: [
- {
- label: '所属公司',
- prop: 'belongToCorpId',
- span: 8,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '付款方式',
- prop: 'paymentType',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '包装要求',
- prop: 'packageRemarks',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- },
- {
- label: '银行帐号',
- prop: 'banks',
- type: 'select',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '公司户头',
- prop: 'banksAccountName',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '开户银行',
- prop: 'accountBank',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: '客户全称',
- prop: 'corpId',
- span: 8,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '到货地址',
- prop: 'arrivalAddress',
- span: 16,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '生产工厂',
- prop: 'productionPlant',
- span: 8,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- },
- {
- label: '发货地址',
- prop: 'shippingAddress',
- disabled: false,
- span: 16,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- },
- {
- label: '销售订单号',
- prop: 'orderNo',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '主订单号',
- prop: 'morderNo',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: '是否收取标签费',
- prop: 'isLabel',
- type: 'radio',
- },
- {
- label: '是否包运费',
- prop: 'isFreight',
- type: 'radio',
- },
- {
- label: '预估运费',
- prop: 'predictOceanFreight',
- type: 'number',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: '要求发货日期',
- prop: 'requiredDeliveryDate',
- type: 'date',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '要求到货日期',
- prop: 'requiredArrivalDate',
- type: 'date',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '业务员',
- prop: 'chargeMember',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '联系人',
- prop: 'corpAttn',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '联系电话',
- prop: 'corpTel',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'change'
- }
- ]
- }, {
- label: '仓库',
- prop: 'storageId',
- dicData: [],
- overHidden: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: "订单备注",
- type: 'textarea',
- span: 24,
- prop: "orderRemark",
- mock: {
- type: 'county'
- }
- }
- ]
- },
- // 银行账号下拉
- bankList: [],
- paymentOption: [],
- statusOption: [],
- // 费用信息排序的最大值
- maxFeeNum: 0,
- maxGoodsNum: 0,
- oldForm: {
- orderStatus: "录入"
- },
- oldGoodsList: [],
- oldGiftList: [],
- oldFeesList: [],
- oldUploadList: [],
- // 采购价格
- purchasePriceOption: [],
- // 销售价格
- salesPriceOtion: [],
- // 弹窗高度
- rowHeight: '',
- // 查询时loading页面
- pageLoading: false,
- switchDialog: false,
- // 商品信息表格loading
- goodsLoading: false,
- dialogVisibleDL: false,
- // 上传时带的参数
- uploadPolicy: {
- policyName: '',
- salesType: 1
- },
- baseURL: '/api/blade-purchase-sales/orderitems/importPrice', // 商品明细上传路径
- headers: { "Blade-Auth": 'Bearer ' + getToken() },
- activeName: 'searchList',
- // 商品列表数据合计
- goodsListShow: [],
- DLListShow: [],
- dataTwo: [],
- dataThree: [],
- // 商品列表暂存
- goodsListSave: [],
- DLListSave: [],
- goodsListPolicy: [],
- buyAndGiveList: [],
- goodsListTotal: 0,
- goodsListSaveTotal: 0,
- goodsActives: 'goods',
- saveActives: '',
- goodsDisabled: false,
- // 赠品信息数据
- giftData: [],
- // 商品信息展示数据
- goodsShowData: [],
- arrivalOptions: [],
- shippingOptions: [],
- storageOptions: [],
- applicationDialog: false,
- itemType: '销售',
- packageOptions: [],
- // 请核状态禁用
- browse: false,
- roleName: '',
- userList: [],
- storageIdOption: [],
- feesOption: [],
- checkDisabled: false,
- checkData: {},
- checkDialog: false,
- checkScheduleDialog: false,
- checkId: '',
- batchNo: '',
- applyPaymentList: [],
- khInfoList: [],
- messageVisble: false, //消息弹窗开关
- changeApproveVis: false, // 更换审批人弹窗
- arrearsCheck: false, // 是否欠款发货审批
- shopQualityDisable: false, //质量胎切换禁用
- index: 0,
- policyIndex: 0,
- routerTag: '',
- handId: null,
- mockData: []
- }
- },
- mounted() {
- this.$nextTick(() => {
- // 监听浏览器高度变化,改变表格高度
- window.onresize = () => {
- this.rowHeight = (window.innerHeight - 130) + 'px'
- }
- this.routerTag = window.location.hash.slice(1);
- })
- this.userInfo = localStorage.getItem('saber-userInfo') && JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('admin');
- },
- filters: {
- IntegerFormat(num) {
- return IntegerFormat(num);
- },
- decimalFormat(num) {
- return num ? Number(num).toFixed(2) : "0.00";
- }
- },
- //初始化查询
- async created() {
- this.rowHeight = (window.innerHeight - 130) + 'px'
- this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
- this.getWorkDicts("payment_term").then(res => {
- this.paymentOption = res.data.data
- })
- storageType().then(res => {
- this.storageIdOption = res.data.data.records
- this.form.storageId = res.data.data.records[0].id
- this.form.storageName = res.data.data.records[0].cname
- })
- this.getWorkDicts("order_status").then(res => {
- this.statusOption = res.data.data
- })
- this.getWorkDicts("packageRemarks").then(res => {
- this.packageOptions = res.data.data;
- });
- // this.getDefault()
- if (this.detailData.id) {
- // 详情进入
- this.queryData(this.detailData.id)
- }
- feeList().then(res => {
- this.feesOption = res.data.data.records
- })
- this.oldForm = Object.assign({}, this.form);
- this.customerBuyFree.height = (window.innerHeight - 330) / 2;
- this.optionPolicy.height = (window.innerHeight - 330) / 2;
- this.customerContact.height = window.innerHeight - 240;
- this.index++;
- this.$refs.shipmentRef.show = false
- },
- updated() {
- this.$nextTick(() => {
- this.$refs.crudContact.doLayout();
- })
- },
- methods: {
- getInvestor(data){
- console.info('data-------', data);
- if (!data) {
- this.form.investor = ''
- this.form.investorName = ''
- return false
- }
- this.form.investor = data.id
- this.form.investorName = data.cname
- },
- calculateInterest(){
- if (!this.form.investor) {
- this.$message.error('请选择资方')
- return false
- }
- if (!this.form.interestRate) {
- this.$message.error('请输入利率')
- return false
- }
- if (!this.form.days) {
- this.$message.error('请输入天数')
- return false
- }
- calculateInterestAmount(this.form).then(res => {
- this.$message.success(res.data.msg)
- this.queryData(this.form.id)
- })
- },
- queryData(id) {
- this.pageLoading = true
- this.saveLoading = true
- detail(id).then(async res => {
- this.form = res.data.data;
- this.browse = this.form.status > 0 ? true : false;
- this.arrearsCheck = this.form.specialCheckStatus == 3 ? true : false;
- await getProfit({ Id: this.form.corpId }).then(res => {
- this.$set(this.form, 'profit', res.data.data.surplusProfit ? res.data.data.surplusProfit : '0.00')
- })
- this.contactsData = this.form.orderItemsList.filter(item => {
- return item.goodType == 0
- })
- for (let item of this.contactsData) {
- item.storageId = item.storageId + '-' + item.corpId
- }
- console.log(this.contactsData, 1598)
- this.giftData = this.form.orderItemsList.filter(item => {
- return item.goodType == 1
- })
- for (let item of this.giftData) {
- item.storageId = item.storageId + '-' + item.corpId
- }
- this.goodsShowData = this.giftData;
- this.saveActives = 'gift'
- this.goodsActives = 'goods';
- this.handleClick({ name: this.goodsActives })
- this.advantageProjectData = this.form.orderFeesList
- this.bankOfDepositData = this.form.orderFilesList
- this.configuration.dicData = this.form.corpName
- let feesData = []
- this.form.orderFeesList.forEach(item => {
- let a = {
- cname: item.corpName,
- id: item.corpId
- }
- feesData.push(a)
- })
- this.configuration.dicData = this.configuration.dicData.concat(feesData)
- // 去重
- this.removeRepeat()
- let goodsData = []
- this.form.orderItemsList.forEach(item => {
- let a = {
- cname: item.cname,
- }
- goodsData.push(a)
- })
- this.goodsConfiguration.dicData = [].concat(goodsData)
- this.removeGoodsRepeat()
- delete this.form.orderItemsList
- delete this.form.orderFeesList
- delete this.form.orderFilesList
- // 获取最大值
- let numList = this.advantageProjectData.map(item => item.sort)
- this.maxFeeNum = numList.length === 0 ? 0 : Math.max.apply(null, numList);
- let goodsNum = []
- let purchaseAmount = 0
- this.contactsData.forEach(item => {
- goodsNum.push(item.sort)
- purchaseAmount += Number(item.purchaseAmount)
- })
- if (goodsNum.length == 0) {
- this.maxGoodsNum = 0;
- } else {
- this.maxGoodsNum = goodsNum.reduce((a, b) => {
- return b > a ? b : a;
- })
- }
- this.oldForm = Object.assign({}, this.form)
- this.oldGoodsList = []
- this.oldGiftList = []
- this.oldFeesList = []
- this.oldUploadList = []
- this.storageNameList = []
- this.oldGoodsList = this.deepClone(this.contactsData)
- this.oldGiftList = this.deepClone(this.giftData)
- this.oldFeesList = this.deepClone(this.advantageProjectData)
- this.oldUploadList = this.deepClone(this.bankOfDepositData)
- }).finally(() => {
- this.saveLoading = false
- this.pageLoading = false
- });
- },
- getDefault() {
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- let nowDate = year + "-" + month + "-" + day + ' 00:00:00';
- this.$set(this.form, 'businesDate', nowDate)
- this.$set(this.form, 'orderStatus', '录入')
- this.$set(this.form, 'caseOverPayment', 0)
- this.$set(this.form, 'overPayment', 0)
- this.$set(this.form, 'orderAmount', 0)
- this.$set(this.form, 'predictOceanFreight', 0)
- this.$set(this.form, 'presenterIntegral', 0)
- this.$set(this.form, 'convertIntegral', 0)
- this.$set(this.form, 'profit', 0)
- this.$set(this.form, 'paymentType', '预付')
- this.$set(this.form, 'thisUsedProfit', 0)
- this.$set(this.form, 'createProfit', 0)
- this.$set(this.form, 'isFreight', 0)
- this.$set(this.form, 'isLabel', 0)
- },
- // 报表
- openReport() {
- this.switchDialog = !this.switchDialog;
- },
- // 导出
- exportHandle() {
- this.$confirm('是否导出产品信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- window.open(
- `/api/blade-client/goodsdesc/export-out-info?${this.website.tokenHeader
- }=${getToken()}`
- );
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- })
- },
- onClose(val) {
- this.switchDialog = val;
- },
- // 去重
- removeRepeat() {
- let obj = []
- this.configuration.dicData = this.configuration.dicData.reduce((current, next) => {
- obj[next.id] ? '' : obj[next.id] = true && current.push(next)
- return current
- }, [])
- },
- removeGoodsRepeat() {
- let obj = []
- this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current, next) => {
- obj[next.cname] ? '' : obj[next.cname] = true && current.push(next)
- return current
- }, [])
- },
- async getCorpRow(data) {
- getCharge('KH', data.id).then(res => {
- this.userList = res.data.data;
- })
- khDetail(data.id).then(res => {
- this.$set(this.form, 'packageRemarks', res.data.data.packageRemarks ? res.data.data.packageRemarks : '透明包装')
- if (res.data.data.adminProfiles) {
- res.data.data.adminProfiles = res.data.data.adminProfiles.split(",");
- let arr = [];
- res.data.data.adminProfiles.forEach(e => {
- arr.push(this.userList.find(item => item.id == e).cname)
- })
- this.$set(this.form, 'chargeMember', arr[0])
- }
- if (res.data.data.corpsAttnList.length > 0) {
- this.khInfoList = res.data.data.corpsAttnList;
- this.$set(this.form, 'corpAttn', res.data.data.corpsAttnList[0].cname);
- this.$set(this.form, 'corpTel', res.data.data.corpsAttnList[0].tel);
- } else {
- this.khInfoList = [];
- this.$set(this.form, 'corpAttn', null);
- this.$set(this.form, 'corpTel', null);
- }
- })
- getCorpDetail({ corpId: data.id }).then(res => {
- this.form.overPayment = res.data.data ? res.data.data.balanceOverpaymen : 0
- })
- integralDetail({ corpId: data.id }).then(res => {
- this.form.pointMutiple = res.data.data ? res.data.data.balancePoints : 0
- })
- getProfit({ Id: data.id }).then(res => {
- this.form.profit = res.data.data.surplusProfit ? res.data.data.surplusProfit : '0.00'
- })
- this.arrivalOptions = [];
- this.arrivalOptions = await this.corpAddr(data.id)
- this.$set(this.form, 'paymentType', data.paymentType ? data.paymentType : '预付')
- if (this.arrivalOptions.length > 0) {
- this.$set(this.form, 'arrivalAddress', this.arrivalOptions[0].label)
- } else {
- this.$set(this.form, 'arrivalAddress', null)
- }
- },
- async getPlantRow(data) {
- this.shippingOptions = [];
- this.shippingOptions = await this.corpAddr(data.id)
- if (this.shippingOptions.length > 0) {
- this.$set(this.form, 'shippingAddress', this.shippingOptions[0].label)
- } else {
- this.$set(this.form, 'shippingAddress', null)
- }
- },
- //返回列表
- backToList() {
- this.$emit("goBack");
- this.leaveDetailsKey(this.$route.name)
- },
- // 保存列设置
- async saveColumn(name) {
- if (name == 'goods') {
- const inSave = await this.saveColumnData(
- this.getColumnName(15),
- this.customerContact
- );
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
- this.$nextTick(() => {
- this.$refs.crudContact.doLayout()
- })
- }
- } else if (name === 'fees') {
- const inSave = await this.saveColumnData(
- this.getColumnName(16),
- this.advantageProject
- );
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
- }
- }
- },
- async resetColumn() {
- this.customerContact = customerContact
- const inSave = await this.delColumnData(
- this.getColumnName(15),
- customerContact
- );
- if (inSave) {
- this.$nextTick(() => {
- this.$refs.crudContact.doLayout()
- })
- this.$message.success("重置成功");
- //关闭窗口
- this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
- }
- },
- returnBack(row) {
- console.log(row)
- this.$refs.KHSelect[0].updateData(row.id)
- getKHList({ corpType: 'KH', belongtocompany: row.id }).then(res => {
- })
- getKHList({ corpType: 'GYS', belongtocompany: row.id }).then(res => {
- this.form.productionPlant = res.data.data.records.length > 0 ? res.data.data.records[0].id : null;
- if (this.form.productionPlant) {
- this.getPlantRow({ id: this.form.productionPlant })
- }
- })
- this.form.belongCompany = row.cname
- getlistBankBy(row.id).then(res => {
- this.$set(this.form, 'banks', null)
- this.$set(this.form, 'banksAccountName', null)
- this.$set(this.form, 'accountBank', null)
- this.bankList = res.data
- if (this.bankList.length > 0) {
- this.form.banks = this.bankList[0].accountNo
- this.form.banksAccountName = this.bankList[0].accountName
- this.form.accountBank = this.bankList[0].accountBank
- }
- })
- },
- // 商品表格加色
- goodsRowClassName({ row, column, rowIndex, columnIndex }) {
- if (Number(row.orderQuantity) > Number(row.storageQuantity) && column.property == 'storageQuantity') {
- return "color: #fff;background:#a4cf57"
- }
- return '';
- },
- // 合计计算
- summaryMethod({ columns, data }) {
- const sums = [];
- if (columns.length > 0) {
- columns.forEach((item, index) => {
- sums[0] = '合计'
- if (
- item.property == "amount" ||
- item.property == "orderQuantity" ||
- item.property == "actualQuantity" ||
- item.property == "integral" ||
- item.property == "cartonWeight" ||
- item.property == "cntrVolumn"
- ) {
- let amountSum = 0;
- let orderQuantitySum = 0;
- let actualQuantitySum = 0;
- let integralSum = 0;
- let cartonWeight = 0;
- let cntrVolumn = 0;
- if (this.selection.length > 0) {
- this.selection.forEach(e => {
- amountSum = _.add(amountSum, Number(e.amount));
- orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
- actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
- integralSum = _.add(integralSum, Number(e.integral));
- cartonWeight = _.add(cartonWeight, Number(e.cartonWeight));
- cntrVolumn = _.add(cntrVolumn, Number(e.cntrVolumn));
- })
- } else {
- {
- this.goodsShowData.forEach(e => {
- amountSum = _.add(amountSum, Number(e.amount));
- orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
- actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
- integralSum = _.add(integralSum, Number(e.integral));
- cartonWeight = _.add(cartonWeight, Number(e.cartonWeight));
- cntrVolumn = _.add(cntrVolumn, Number(e.cntrVolumn));
- })
- }
- }
- // 订货数量合计
- if (item.property == "orderQuantity") {
- sums[index] = orderQuantitySum ? orderQuantitySum.toFixed(0) : "0";
- }
- // 发货数量合计
- if (item.property == "actualQuantity") {
- sums[index] = actualQuantitySum ? actualQuantitySum.toFixed(0) : "0";
- }
- // 金额合计
- if (item.property == "amount") {
- sums[index] = amountSum ? amountSum.toFixed(2) : "0.00";
- }
- // 积分合计
- if (item.property == "integral") {
- sums[index] = integralSum ? integralSum.toFixed(2) : "0.00";
- }
- // 重量合计
- if (item.property == "cartonWeight") {
- sums[index] = cartonWeight ? cartonWeight.toFixed(2) : "0.00";
- }
- // 体积合计
- if (item.property == "cntrVolumn") {
- sums[index] = cntrVolumn ? cntrVolumn.toFixed(5) : "0.00000";
- }
- }
- })
- }
- return sums;
- },
- // 标签页切换
- tabHandle(data) {
- if (data.name == 'searchList') {
- this.goodsListShow = this.data;
- this.page.total = this.pageList.total
- } else if (data.name == 'importStaging') {
- this.goodsListShow = this.goodsListSave;
- this.page.total = 0
- }
- },
- // 商品信息标签页切换
- handleClick(data) {
- console.info('datata---', data);
- console.info('this.saveActives---', this.saveActives);
- if (this.saveActives == data.name) return
- this.saveActives = data.name
- this.goodsDisabled = true
- if (data.name == 'goods') {
- this.giftData = this.goodsShowData.filter(item => item.goodType == 1)
- // 显示
- this.customerContact.column.forEach(item => {
- if (item.prop == 'integralMultiples') item.label = '积分倍数'
- if (item.prop == 'integral') item.label = '赠送积分'
- if (item.prop == 'orderQuantity') item.label = '订货数量'
- if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
- || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
- || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
- || item.prop == 'shopQuality'
- ) {
- item.hide = false;
- item.showColumn = true;
- if (!this.permission.show_purPrice) {
- if (item.prop == 'purchaseAmount') {
- item.hide = true;
- item.showColumn = false;
- }
- }
- }
- })
- // contactsData它是商品的数组 giftData它是赠品的数组 goodsShowData它是展示页面的数组一共三个
- this.goodsShowData = this.deepClone(this.contactsData);
- setTimeout(() => {
- this.goodsDisabled = false
- }, 500)
- } else {
- // 隐藏字段
- this.contactsData = this.goodsShowData.filter(item => item.goodType == 0)
- this.customerContact.column.forEach(item => {
- if (item.prop == 'deliveryAmount') item.label = '积分'
- if (item.prop == 'actualQuantity') item.label = '数量'
- if (item.prop == 'integralMultiples') item.label = '积分'
- if (item.prop == 'integral') item.label = '兑换积分'
- if (item.prop == 'orderQuantity') item.label = '数量'
- if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
- || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
- || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
- || item.prop == 'shopQuality'
- ) {
- item.hide = true;
- item.showColumn = false;
- }
- })
- // this.giftData=this.goodsShowData.filter(e=>e.typegood==1)
- this.goodsShowData = this.deepClone(this.giftData);
- setTimeout(() => {
- this.goodsDisabled = false
- }, 500)
- }
- },
- // 切换之前
- beforeLeave(activeName, oldActiveName) {
- },
- //费用明细回调
- beforeFinance(feesData, callback) {
- this.advantageProjectData = feesData;
- let params = {}
- //暂时默认通过 之后优化
- params.valid = true
- params.parentId = this.form.id
- params.srcOrderno = this.form.orderNo
- callback(params)
- }
- },
- computed: {
- ...mapGetters(["userInfo", "permission"])
- },
- watch: {
- customerContact(oldVal, newVal) {
- if (!this.permission.show_purPrice) {
- oldVal.column.forEach(item => {
- if (item.prop == 'purchaseAmount') {
- item.hide = true;
- item.showColumn = false;
- }
- })
- }
- if (this.roleName.includes('业务员')) {
- oldVal.column.forEach(item => {
- if (item.prop == 'purchaseAmount') {
- item.hide = true;
- item.showColumn = false;
- }
- })
- } else {
- oldVal.column.forEach(item => {
- if (item.prop == 'purchaseAmount') {
- item.hide = false;
- item.showColumn = true;
- }
- })
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .back-icon {
- line-height: 64px;
- font-size: 20px;
- margin-right: 8px;
- }
- ::v-deep .el-form-item {
- margin-bottom: 0;
- }
- .el-dialogDeep {
- ::v-deep .el-dialog {
- margin: 1vh auto 0 !important;
- padding-bottom: 10px !important;
- .el-dialog__body,
- .el-dialog__footer {
- padding-bottom: 0 !important;
- padding-top: 0 !important;
- }
- }
- }
- .print-div {
- color: #000;
- }
- .print_table {
- table {
- border-right: 1px solid #000;
- border-bottom: 1px solid #000;
- font-size: 12px;
- margin-bottom: 5px;
- }
- table td {
- border-left: 1px solid #000;
- border-top: 1px solid #000;
- vertical-align: middle;
- padding: 2px;
- text-align: center;
- }
- }
- .table {
- border-collapse: collapse;
- border-spacing: 0;
- background-color: transparent;
- display: table;
- width: 99%;
- max-width: 100%;
- margin: 0 auto;
- }
- .table td {
- text-align: left;
- vertical-align: middle;
- font-size: 14px;
- color: #000000;
- padding: 10.5px 0 10.5px 30px;
- //border: 1px solid #000;
- }
- ::v-deep .el-form-item {
- margin-bottom: 0;
- }
- ::v-deep .el-form-item__content {
- line-height: 32px;
- }
- .isShow {
- display: none;
- }
- .order_number:hover {
- display: none;
- }
- .number_button {
- display: none;
- }
- .order_number:hover+.number_button {
- display: block;
- }
- </style>
|