1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920 |
- <template>
- <div style="width: 100%; padding: 0px 15px">
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
- <template #btn>
- <div>
- <el-button type="primary" v-if="
- [30].includes(route.query.processType) || !route.query.processType
- " @click="clickCopy(1)">复制订单</el-button>
- </div>
- </template>
- <template #ofCompanyId>
- <div style="width: 100%">
- <el-form-item label="业务公司" class="margin-b-0 wid100" required>
- <el-row style="width: 100%">
- <el-col :span="12">
- <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
- <el-tree-select v-model="formData.data.ofCompanyId"
- :data="isFormDetail ?useUserStore().allDict['tree_all_company_data']:useUserStore().allDict['tree_company_data']"
- style="width: 100%" placeholder="公司" default-expand-all
- :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }"
- @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
- <el-tree-select v-model="formData.data.deptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
- :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }" />
- <!-- :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" -->
- </el-form-item>
- </el-col>
- </el-row>
- </el-form-item>
- </div>
- </template>
- <template #seller>
- <div style="width: 100%;position:relative">
- <el-form-item prop="sellCorporationId" label="卖方信息" class="wid100">
- <el-select v-model="formData.data.sellCorporationId" placeholder="请选择卖方公司" style="width: 100%" @change="sellCorporationIdChange"
- filterable>
- <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </el-form-item>
- <!-- <div style="position:absolute;top:0px;right:-20px;cursor:pointer" @click="isShowOther =!isShowOther">
- <el-icon v-if="!isShowOther">
- <ArrowDownBold />
- </el-icon>
- <el-icon v-else>
- <ArrowUpBold />
- </el-icon>
- </div> -->
- <div v-show="isShowOther">
- <el-form-item label="地址" class="wid100">
- <el-row style="width:100%">
- <el-col :span="8">
- <el-form-item label="" prop="sellCountryName" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="" prop="sellProvinceName" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="" prop="sellCityName" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form-item>
- <el-form-item label="详细地址" prop="sellAddress" class="wid100">
- <el-input v-model="formData.data.sellAddress" type="textarea">
- </el-input>
- </el-form-item>
- <el-form-item label="联系人" class="wid100">
- <el-row style="width:100%">
- <el-col :span="8">
- <el-form-item label="" prop="sellContactName" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
- </el-form-item>
- </el-col>
- <el-col :span="16">
- <el-form-item label="" prop="sellContactNumber" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form-item>
- </div>
- </div>
- </template>
- <template #buyer>
- <div style="width: 100%;position:relative">
- <el-form-item label="买方信息" prop="buyCorporationId" class="wid100">
- <el-select v-model="formData.data.buyCorporationId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
- :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" style="width: 100%" @change="changeCustomer" v-if="
- [30].includes(route.query.processType) ||
- !route.query.processType
- " :disabled="!isEditList">
- <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- <el-select v-model="formData.data.buyCorporationName" disabled v-else style="width: 100%">
- </el-select>
- </el-form-item>
- <div style="position:absolute;top:0px;right:-20px;cursor:pointer" @click="isShowOther =!isShowOther">
- <el-icon v-if="!isShowOther">
- <ArrowDownBold />
- </el-icon>
- <el-icon v-else>
- <ArrowUpBold />
- </el-icon>
- </div>
- <div v-show="isShowOther">
- <el-form-item label="地址" class="wid100" required>
- <el-row style="width: 100%">
- <el-col :span="6">
- <el-form-item label="" prop="countryId" class="margin-b-0">
- <el-select v-model="formData.data.countryId" placeholder="国家" style="width:100%" filterable
- @change="(val) => getCityData(val, '20', true)" :disabled="!isEditList">
- <el-option v-for="item in countryData" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="" prop="provinceName" class="margin-b-0">
- <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
- v-model="formData.data" :data="provinceData" :disabled="!isEditList">
- </selectCity>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="" prop="cityName" class="margin-b-0">
- <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"
- :disabled="!isEditList">
- </selectCity>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="" prop="buyPostalCode" class="margin-b-0">
- <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" :disabled="!isEditList" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form-item>
- <el-form-item label="详细地址" prop="buyAddress" class="wid100">
- <el-input v-model="formData.data.buyAddress" type="textarea" :disabled="!isEditList">
- </el-input>
- </el-form-item>
- <el-form-item label="联系人" class="wid100" required>
- <el-row style="width: 100%">
- <el-col :span="8">
- <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0 wid100">
- <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" style="width:100%" clearable
- class="inline-input w-50" placeholder="请输入联系人" @select="handlePerson" :disabled="!isEditList">
- </el-autocomplete>
- </el-form-item>
- </el-col>
- <el-col :span="16">
- <el-form-item label="" prop="buyContactNumber" label-width="0px" class="margin-b-0 wid100">
- <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" :disabled="!isEditList" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form-item>
- </div>
- </div>
- </template>
- <template #advanceRatio>
- <el-row style="width: 100%">
- <el-col :span="6" style="padding-right:8px">
- <el-form-item label="定金比例(%)" prop="advanceRatio" class="margin-b-0 wid100">
- <el-input-number v-model="formData.data.advanceRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
- :controls="false" @change="(val)=>changeAdvanceRatio(val,true)" />
- </el-form-item>
- </el-col>
- <el-col :span="6" style="padding:0px 4px">
- <el-form-item label="出货前付款比例" prop="beforeShipmentRatio" class="margin-b-0 wid100">
- <el-input-number v-model="formData.data.beforeShipmentRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
- :controls="false" @change="(val)=>changeAdvanceRatio(val,false)" />
- </el-form-item>
- </el-col>
- <el-col :span="6" style="padding:0px 4px">
- <el-form-item label="出货后付款比例" prop="afterShipmentRatio" class="margin-b-0 wid100">
- <el-input-number v-model="formData.data.afterShipmentRatio" placeholder=" " style="width: 100%" :precision="2" :min="0" :max="100"
- :controls="false" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- </template>
- <template #commodity>
- <div style="width: 100%">
- <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px"
- v-if="!judgeStatus() && isEditList">产品库</el-button>
- <!-- :disabled="!formData.data.companyId" -->
- <!-- default-expand-all -->
- <el-table :data="formData.data.contractProductList" style="width: 100%;" row-key="rowId">
- <el-table-column type="expand" width="50" align="center">
- <template #default="scope">
- <div style="padding-left:50px">
- <div style="margin-bottom:10px;">
- <TitleInfo content='BOM单:'></TitleInfo>
- <div v-if="route.query.flowKey=='contract_update_flow'" style="margin-top:10px">
- <el-button type="primary" @click="openDialog(scope.$index,1)" plain>主材</el-button>
- <el-button type="primary" @click="openDialog(scope.$index,2)" plain>工艺</el-button>
- <el-button type="primary" @click="openDialog(scope.$index,3)" plain>辅材</el-button>
- </div>
- </div>
- <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table" row-key="materialId">
- <el-table-column label="图片" width="80">
- <template #default="{ row }">
- <div v-if="row.fileUrl">
- <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
- </div>
- <div v-else></div>
- </template>
- </el-table-column>
- <el-table-column prop="productCode" label="物料编码" width="190" />
- <el-table-column prop="productName" label="物料名称" width="170" />
- <el-table-column label="规格尺寸 (cm)" width="130">
- <template #default="{ row, $index }">
- <div style="width: 100%" v-if="row.productLength">
- {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="productColor" label="颜色" width="170" />
- <el-table-column prop="standardDosage" label="标准用量" width="100">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
- :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.standardDosage'"
- :rules="rules.standardDosage" :inline-message="true" class="margin-b-0 wid100">
- <el-input-number onmousewheel="return false;" v-model="row.standardDosage" placeholder="请输入" style="width: 100%"
- :precision="0" :controls="false" :min="1" @change="calculationAmount(true)" />
- </el-form-item>
- <span v-else>{{row.standardDosage}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="lossRate" label="损耗率(%)" width="100">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item v-if="route.query.flowKey=='contract_update_flow'"
- :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.lossRate'"
- :rules="rules.lossRate" :inline-message="true" class="margin-b-0 wid100">
- <el-input-number onmousewheel="return false;" v-model="row.lossRate" placeholder="请输入" style="width: 100%" :precision="2"
- :controls="false" :min="0" @change="calculationAmount(true)" />
- </el-form-item>
- <span v-else>{{row.lossRate}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="quantity" label="数量" width="100">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item v-if="isEditList"
- :prop="'contractProductList.' + scope.$index + '.contractProductBomList.' + $index + '.quantity'"
- :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
- <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
- :controls="false" :min="1" disabled />
- </el-form-item>
- <span v-else>{{row.quantity}}</span>
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="allQuantity" label="总量" width="80" /> -->
- <!-- <el-table-column prop="price" label="单价" width="110">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- ¥ {{row.price}}
- </div>
- </template>
- </el-table-column> -->
- <!-- <el-table-column prop="amount" label="小计" width="110">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- ¥ {{row.amount}}
- </div>
- </template>
- </el-table-column> -->
- <!-- <el-table-column prop="remark" label="备注" width="180">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item v-if="isEditList" :inline-message="true" class="margin-b-0 wid100">
- <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" />
- </el-form-item>
- <span v-else>{{row.remark}}</span>
- </div>
- </template>
- </el-table-column> -->
- <el-table-column prop="remark" label="备注" min-width="150" />
- <el-table-column label="附件" min-width="130">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <div class="el-click" v-for="file in row.bomFileList " :key="file.id" @click="openImg(file.fileUrl)"> {{file.fileName}}
- </div>
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus() && isEditList">
- <template #default="{ row,$index }">
- <el-button type="primary" link @click="handleDeleteMaterial(scope.$index,$index)">删除</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="商品图片" width="80">
- <template #default="{ row }">
- <div v-if="row.fileUrl">
- <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
- </div>
- <div v-else></div>
- </template>
- </el-table-column>
- <el-table-column prop="productName" label="商品信息" width="250">
- <template #default="{ row, $index }">
- <div style="width: 100%;line-height:22px">
- <div>
- 分类:{{row.productClassifyName}}
- </div>
- <div>
- 编码:{{row.productCode}}
- </div>
- <div>
- 名称:{{row.productName}}
- </div>
- <div>
- 规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </div>
- <div>
- 颜色:{{row.productColor}}
- </div>
- <div>
- 纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
- </div>
- <div>
- 净重: {{row.productNetWeight}}
- </div>
- <div>
- 单位:{{row.productUnit}}
- </div>
- <!-- <el-row :gutter="5">
- <el-col :span="12">
- 分类:{{row.productClassifyName}}
- </el-col>
- <el-col :span="12">
- 编码名称:{{row.productCode}}({{row.productName}})
- </el-col>
- </el-row>
- <el-row :gutter="5">
- <el-col :span="12">
- 规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </el-col>
- <el-col :span="12">
- 颜色:{{row.productColor}}
- </el-col>
- </el-row>
- <el-row :gutter="5">
- <el-col :span="12">
- 纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
- </el-col>
- <el-col :span="6">
- 净重: {{row.productNetWeight}}
- </el-col>
- <el-col :span="6">
- 单位:{{row.productUnit}}
- </el-col>
- </el-row> -->
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column label="规格尺寸 (cm)" width="130">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="productColor" label="颜色" width="140" />
- <el-table-column prop="ww" label="纹路" width="140" />
- <el-table-column prop="weight" label="净重" width="140" />
- <el-table-column prop="unit" label="单位" width="140" /> -->
- <el-table-column label="生产plt文件" width="180">
- <template #default="{ row, $index }">
- <div style="width:100%">
- <!-- <div style="display:flex">
- <div style="writing-mode: vertical-rl;margin-right:10px;background:rgb(94 120 145);color:#fff;padding:5px 2px;border-radius:3px;line-height:21px;;cursor:pointer"
- @click="handleClickUploadOne($index)" v-if="!judgeStatus()">
- {{row.isShowProductFile?'上 传 p l t':'取 消 上 传'}}
- </div>
- <div>
- <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
- <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
- </div>
- <div v-else>
- <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="1" :list-type="'text'"
- :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
- :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile"
- :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
- <el-button text type="primary">上传</el-button>
- </el-upload>
- </div>
- </div>
- </div> -->
- <div>
- <!-- writing-mode: vertical-rl; 文字垂直排 -->
- <div style="margin-right:10px;background:rgb(94 120 145);color:#fff;padding:5px 2px;border-radius:3px;line-height:21px;;cursor:pointer;width:60px;text-align:center"
- @click="handleClickUploadOne($index)" v-if="!judgeStatus()">
- {{row.isShowProductFile?'上传plt':'取消上传'}}
- </div>
- <div>
- <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
- <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
- </div>
- <div v-else>
- <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="1" :list-type="'text'"
- :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
- :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile"
- :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
- <el-button text type="primary">上传</el-button>
- </el-upload>
- </div>
- </div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="数量" width="110">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
- class="margin-b-0 wid100">
- <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
- :controls="false" :min="0" @change="calculationAmount(true)" v-if="isEditList" />
- <div v-else> {{row.quantity}}</div>
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="单价" width="160">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
- class="margin-b-0 wid100">
- <div style="display:flex;">
- <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
- :controls="false" :min="0" @change="calculationAmount()" v-if="isEditList" />
- <div v-else>¥ {{row.price}}</div>
- <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
- <template #default>
- <div>
- <div>
- <img src="@/assets/images/money1.png" alt="" class="img" /> <span
- style="font-size:14px;font-weight:700;color:#000">销售指导价:</span>
- <div style="padding:5px 0px 0px 20px">
- {{row.currency}} {{moneyFormat(row.salePrice,2)}}
- </div>
- </div>
- <div style="margin-top:15px">
- <img src="@/assets/images/money2.png" alt="" class="img" /> <span
- style="font-size:14px;font-weight:700;color:#000">客户近期购买价格:</span>
- <div style="padding:5px 0px 0px 20px">
- <div v-for="item in row.customerContractProductList">
- <span>{{item.createTime.slice(0,10)}} </span>
- <span style="margin-left:40px">{{item.code}} </span>
- <span style="margin-left:40px"> {{item.currency}} {{moneyFormat(item.price,2)}} </span>
- </div>
- </div>
- </div>
- <div style="margin-top:15px">
- <img src="@/assets/images/money3.png" alt="" class="img" /> <span
- style="font-size:14px;font-weight:700;color:#000">产品近期销售价格:</span>
- <div style="padding:5px 0px 0px 20px">
- <div v-for="item in row.contractProductList">
- <span>{{item.createTime.slice(0,10)}} </span>
- <span style="margin-left:40px">{{item.code}} </span>
- <span style="margin-left:40px">{{item.currency}} {{moneyFormat(item.price,2)}} </span>
- </div>
- </div>
- </div>
- <div :ref="row.productId+$index" style="height:180px">
- </div>
- </div>
- </template>
- <template #reference>
- <!-- <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
- <el-icon :size="20" color="#85c1a6">
- <WarningFilled />
- </el-icon>
- </div> -->
- </template>
- </el-popover>
- </div>
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="业务供货价" prop="factoryPrice" width="100">
- </el-table-column>
- <el-table-column prop="amount" label="小计" width="110">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- ¥ {{row.amount}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="amountTwo" label="业务小计金额" width="110">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- ¥ {{row.amountTwo}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="备注" min-width="200">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProductList.' + $index + '.remark'" :inline-message="true" class="margin-b-0 wid100">
- <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" />
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="80" align="center" fixed="right" v-if="!judgeStatus() && isEditList">
- <template #default="{ $index }">
- <!-- <el-button type="primary" link @click="handleClickSelectMaterial($index)">包材/配件/辅材</el-button> -->
- <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <template #otherCharge>
- <div style="width: 100%">
- <el-button type="primary" @click="clickAdd()" plain style="margin-bottom: 16px" v-if="!judgeStatus()">添加行</el-button>
- <el-table :data="formData.data.contractProjectList" style="width: 100%;">
- <el-table-column label="收费项目" width="220">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true"
- class="margin-b-0 wid100">
- <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
- placeholder="请输入收费项目" />
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column :label="'金额'" width="130">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
- class="margin-b-0 wid100">
- <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
- :controls="false" :min="0" @change="totalAmount()" />
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="备注">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-form-item :prop="'contractProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
- <el-input v-model="row.remark" placeholder="请输入备注" />
- </el-form-item>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
- <template #default="{ $index }">
- <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <template #templateContent>
- <div style="width: 100%">
- <Editor :value="formData.data.templateContent" @updateValue="updateContent" :readOnly="judgeStatus()" ref="remarkEditor" />
- </div>
- </template>
- <template #contractFileList>
- <div style="width: 100%">
- <div v-for="(file, index) in formData.data.contractFileList" :key="index">
- <span class="el-click" @click="openImg(file.fileUrl)">{{ file.fileName }}</span>
- </div>
- </div>
- </template>
- </byForm>
- <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
- <SelectProduct @selectProduct="selectProduct"></SelectProduct>
- <!-- :disablePerm="'1'" -->
- <!-- :isRawMaterial="'1'" -->
- <!-- :companyId="formData.data.companyId" -->
- <template #footer>
- <el-button @click="openProductCompany = false" size="defualt" v-debounce>关 闭</el-button>
- </template>
- </el-dialog>
- <el-dialog :title="'原材料选择'" v-model="openSelectRawMaterial" width="90%" destroy-on-close>
- <SelectMaterial :ancestors="110" @selectMaterial="selectRawMaterial"></SelectMaterial>
- <template #footer>
- <el-button @click="openSelectRawMaterial = false" size="defualt" v-debounce>取 消</el-button>
- </template>
- </el-dialog>
- <el-dialog :title="'工艺选择'" v-model="openSelectTechnology" width="90%" destroy-on-close>
- <SelectTechnology :isSelect="true" @selectTechnology="selectTechnology"></SelectTechnology>
- <template #footer>
- <el-button @click="openSelectTechnology = false" size="defualt" v-debounce>取 消</el-button>
- </template>
- </el-dialog>
- <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
- <SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
- <template #footer>
- <el-button @click="openSelectMaterial = false" size="defualt" v-debounce>关 闭</el-button>
- </template>
- </el-dialog>
- <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '订单选择' : '样品单选择'" width="90%" append-to-body>
- <SelectContract @select="selectContract" v-if="copyType === 1"></SelectContract>
- <SelectSample @select="selectContract" v-if="copyType === 2"></SelectSample>
- </el-dialog> -->
- </div>
- </template>
- <script setup>
- import byForm from "@/components/byForm/index";
- import SelectProduct from "@/components/product/SelectProduct.vue";
- import SelectMaterial from "@/components/product/SelectMaterial.vue";
- import SelectTechnology from "@/views/production/project/technology/index.vue";
- import Editor from "@/components/Editor/index.vue";
- import selectCity from "@/components/selectCity/index.vue";
- import { useRoute } from "vue-router";
- import SelectContract from "@/components/contractCom/selectContract.vue";
- import SelectSample from "@/components/contractCom/selectSample.vue";
- import * as echarts from "echarts";
- import $bus from "@/bus/index.js";
- import { v4 as uuidv4 } from "uuid";
- const route = useRoute();
- const { proxy } = getCurrentInstance();
- // 接收父组件的传值
- const props = defineProps({
- queryData: Object,
- });
- const currencyData = computed(
- () => proxy.useUserStore().allDict["account_currency"]
- );
- const fundsPaymentMethod = computed(
- () => proxy.useUserStore().allDict["funds_payment_method"]
- );
- const shippingMethod = computed(
- () => proxy.useUserStore().allDict["shipping_method"]
- );
- const contractChannel = computed(
- () => proxy.useUserStore().allDict["contract_channel"]
- );
- const taxTransportationWay = computed(
- () => proxy.useUserStore().allDict["tax_transportation_way"]
- );
- const shopName = computed(() => proxy.useUserStore().allDict["shop_name"]);
- const taxPoints = computed(() => proxy.useUserStore().allDict["tax_points"]);
- const settlementWay = computed(
- () => proxy.useUserStore().allDict["settlement_way"]
- );
- const frontLinesData = computed(
- () => proxy.useUserStore().allDict["front_lines"]
- );
- const qualityLevel = computed(
- () => proxy.useUserStore().allDict["quality_level"]
- );
- const accountList = ref([]);
- const customerList = ref([]);
- const templateList = ref([]);
- const sampleData = ref([]);
- const sealUseData = ref([]);
- const userList = ref([]);
- const corporationList = ref([]);
- const customerUserList = ref([]);
- const countryData = ref([]);
- const provinceData = ref([]);
- const cityData = ref([]);
- const treeData = ref([]);
- const deptData = ref([]);
- const openProductCompany = ref(false);
- const copyType = ref(1);
- const copyContract = ref(false);
- const indexValue = ref(-1);
- const openSelectMaterial = ref(false);
- const isShowOther = ref(false);
- const formData = reactive({
- data: {
- contractType: "2",
- rate: 1,
- contractProductList: [],
- companyId: "",
- templateContent: "",
- contractChannel: "",
- paymentMethod: "",
- },
- });
- const uploadData = ref({});
- const formDom = ref(null);
- const remarkEditor = ref(null);
- const judgeStatus = () => {
- if (
- route.query.processType == 20 ||
- route.query.processType == 10 ||
- props.queryData.processType == 20 ||
- props.queryData.processType == 10
- ) {
- return true;
- }
- if (props.queryData.recordList && props.queryData.recordList.length > 0) {
- let data = props.queryData.recordList.filter(
- (item) => item.status === 2 && item.nodeType !== 1
- );
- if (data && data.length > 0) {
- return true;
- }
- }
- return false;
- };
- const formOption = reactive({
- inline: true,
- labelWidth: 120,
- itemWidth: 100,
- disabled: false,
- });
- const formConfig = computed(() => {
- return [
- // {
- // type: "slot",
- // slotName: "btn",
- // label: "",
- // itemWidth: 50,
- // },
- {
- type: "title",
- title: "基本信息",
- },
- {
- type: "input",
- prop: "code",
- label: "订单号",
- disabled: true,
- isShow: formData.data.code ? true : false,
- },
- // {
- // type: "treeSelect",
- // prop: "ofCompanyId",
- // label: "业务公司",
- // data: proxy.useUserStore().allDict["tree_company_data"],
- // propsTreeLabel: "deptName",
- // propsTreeValue: "deptId",
- // itemWidth: 50,
- // },
- {
- type: "slot",
- slotName: "ofCompanyId",
- label: "",
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "contractType",
- label: "订单类型",
- data: [
- {
- dictKey: "3",
- dictValue: "打样订单",
- },
- {
- dictKey: "2",
- dictValue: "内销订单",
- },
- {
- dictKey: "1",
- dictValue: "外贸订单(退税)",
- },
- {
- dictKey: "4",
- dictValue: "外贸订单(不退税)",
- },
- ],
- itemWidth: 50,
- fn: (val) => {
- if (val == "2") {
- formData.data.currency = currencyData.value[0].dictKey;
- formData.data.rate = 1;
- }
- if (formData.data.sellCorporationId) {
- sellCorporationIdChange(formData.data.sellCorporationId);
- }
- if (formData.data.shroffAccountId) {
- changeShroffAccount(formData.data.shroffAccountId);
- }
- },
- },
- {
- type: "select",
- prop: "processingMethod",
- label: "订单处理方式",
- data: [
- {
- dictKey: 10,
- dictValue: "业务自采",
- },
- {
- dictKey: 20,
- dictValue: "生产处理",
- },
- ],
- itemWidth: 50,
- },
- // {
- // type: "treeSelect",
- // prop: "companyId",
- // label: "工厂",
- // data: treeData.value,
- // propsTreeLabel: "deptName",
- // propsTreeValue: "deptId",
- // itemWidth: 50,
- // disabled: !isEditList.value,
- // fn: () => {
- // formData.data.contractProductList = [];
- // },
- // },
- {
- type: "select",
- prop: "belongType",
- label: "订单归属",
- data: [
- {
- dictKey: "1",
- dictValue: "归属工厂",
- },
- {
- dictKey: "2",
- dictValue: "归属业务",
- },
- ],
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "contractChannel",
- label: "订单渠道",
- data: contractChannel.value,
- itemWidth: 50,
- },
- {
- type: "input",
- prop: "channelCode",
- label: "渠道订单编号",
- itemWidth: 50,
- isShow:
- formData.data.contractChannel &&
- formData.data.contractChannel.includes("阿里巴巴")
- ? true
- : false,
- },
- {
- type: "select",
- prop: "salesmanId",
- label: "业务员",
- data: userList.value,
- disabled: true,
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "merchUserId",
- label: "跟单员",
- data: userList.value,
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "placeOrderType",
- label: "是否首单",
- data: [
- {
- dictKey: "10",
- dictValue: "首单",
- },
- {
- dictKey: "20",
- dictValue: "返单",
- },
- ],
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "qualityLv",
- label: "品质等级",
- data: qualityLevel.value,
- itemWidth: 50,
- },
- {
- type: "select",
- prop: "sampleId",
- label: "关联样品单",
- data: sampleData.value,
- itemWidth: 50,
- },
- {
- type: "title",
- title: "贸易信息",
- haveLine: true,
- },
- {
- type: "slot",
- slotName: "seller",
- label: "",
- itemWidth: 50,
- },
- {
- type: "slot",
- slotName: "buyer",
- label: "",
- itemWidth: 50,
- },
- {
- type: "title",
- title: "收款信息",
- haveLine: true,
- },
- // {
- // type: "select",
- // prop: "currency",
- // label: "币种",
- // data: currencyData.value,
- // itemWidth: 25,
- // disabled: formData.data.contractType == "2",
- // },
- // {
- // type: "number",
- // prop: "rate",
- // label: "汇率",
- // precision: 2,
- // min: 0,
- // controls: false,
- // itemWidth: 25,
- // disabled: formData.data.contractType == "2",
- // },
- {
- type: "select",
- prop: "isTax",
- label: "是否含税",
- data: [
- {
- dictKey: "1",
- dictValue: "含税",
- },
- {
- dictKey: "0",
- dictValue: "不含税",
- },
- ],
- itemWidth: 25,
- },
- {
- type: "select",
- prop: "taxPoints",
- label: "税点",
- data: taxPoints.value,
- itemWidth: 25,
- isShow: formData.data.isTax && formData.data.isTax == "1" ? true : false,
- },
- {
- type: "select",
- prop: "isFreight",
- label: "是否含运费",
- data: [
- {
- dictKey: "1",
- dictValue: "含运费",
- },
- {
- dictKey: "0",
- dictValue: "不含运费",
- },
- ],
- itemWidth: 25,
- },
- {
- type: "select",
- prop: "settlementMethod",
- label: "客户结算方式",
- data: settlementWay.value,
- itemWidth: 25,
- },
- {
- type: "select",
- prop: "paymentMethod",
- label: "客户付款方式",
- data: fundsPaymentMethod.value,
- itemWidth: 25,
- fn: (val) => {
- if (val.indexOf("bank") != -1) {
- getaccountList(val);
- }
- },
- },
- // {
- // type: "select",
- // prop: "paymentMethod",
- // label: "付款方式",
- // data: fundsPaymentMethod.value,
- // itemWidth: 25,
- // },
- {
- type: "input",
- prop: "alibabaCode",
- label: "阿里巴巴订单编号",
- itemType: "text",
- itemWidth: 25,
- isShow:
- formData.data.paymentMethod &&
- formData.data.paymentMethod.includes("阿里巴巴")
- ? true
- : false,
- },
- {
- type: "select",
- prop: "alibabaShopName",
- label: "1688店铺名称",
- data: shopName.value,
- itemWidth: 25,
- isShow:
- formData.data.paymentMethod &&
- formData.data.paymentMethod.includes("阿里巴巴")
- ? true
- : false,
- },
- {
- type: "select",
- prop: "shroffAccountId",
- label: "收款账号",
- data: accountList.value,
- itemWidth: 50,
- fn: (val) => {
- changeShroffAccount(val);
- },
- isShow:
- formData.data.paymentMethod == "bank1" ||
- formData.data.paymentMethod == "bank2",
- },
- {
- type: "input",
- prop: "accountName",
- label: "户名",
- placeholder: "请输入户名",
- itemWidth: 50,
- isShow:
- formData.data.paymentMethod &&
- formData.data.paymentMethod.includes("bank")
- ? true
- : false,
- },
- {
- type: "input",
- prop: "openingBank",
- label: "开户行",
- placeholder: "请输入开户行",
- itemWidth: 50,
- isShow:
- formData.data.paymentMethod &&
- formData.data.paymentMethod.includes("bank")
- ? true
- : false,
- },
- {
- type: "input",
- prop: "accountOpening",
- label: "账号",
- placeholder: "请输入账号",
- itemWidth: 50,
- isShow:
- formData.data.paymentMethod &&
- (formData.data.paymentMethod.includes("bank") ||
- ["wxPay", "aliPay"].includes(formData.data.paymentMethod))
- ? true
- : false,
- },
- {
- type: "input",
- prop: "remark",
- label: "其他收款方式备注说明",
- itemType: "textarea",
- itemWidth: 100,
- isShow:
- formData.data.paymentMethod &&
- !["bank", "bank1", "阿里巴巴", "wxPay", "aliPay"].includes(
- formData.data.paymentMethod
- )
- ? true
- : false,
- },
- {
- type: "slot",
- slotName: "advanceRatio",
- prop: "",
- label: "",
- },
- // {
- // type: "number",
- // prop: "advanceRatio",
- // label: "定金比例",
- // precision: 2,
- // min: 0,
- // max: 100,
- // controls: false,
- // itemWidth: 25,
- // fn: (val) => {
- // if (val && formData.data.beforeShipmentRatio) {
- // let total = val + formData.data.beforeShipmentRatio;
- // if (total > 100) {
- // formData.data.advanceRatio = null;
- // formData.data.beforeShipmentRatio = null;
- // }
- // formData.data.afterShipmentRatio = 100 - total;
- // }
- // },
- // },
- // {
- // type: "number",
- // prop: "beforeShipmentRatio",
- // label: "出货前付款⽐例",
- // precision: 2,
- // min: 0,
- // max: 100,
- // controls: false,
- // itemWidth: 25,
- // fn: (val) => {
- // if (val && formData.data.advanceRatio) {
- // let total = val + formData.data.advanceRatio;
- // if (total > 100) {
- // formData.data.advanceRatio = null;
- // formData.data.beforeShipmentRatio = null;
- // }
- // formData.data.afterShipmentRatio = 100 - total;
- // }
- // },
- // },
- // {
- // type: "number",
- // prop: "afterShipmentRatio",
- // label: "出货后尾款⽐例",
- // precision: 2,
- // min: 0,
- // max: 100,
- // controls: false,
- // itemWidth: 25,
- // disabled: true,
- // },
- // {
- // type: "input",
- // prop: "remark",
- // label: "付款条件",
- // itemType: "textarea",
- // itemWidth: 100,
- // },
- // {
- // type: "input",
- // prop: "beneficiaryName",
- // label: " ",
- // placeholder: "请输入Beneficiary Name",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "input",
- // prop: "beneficiaryAccountNumber",
- // label: " ",
- // placeholder: "请输入Beneficiary Account Number",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "input",
- // prop: "beneficiaryBank",
- // label: " ",
- // placeholder: "请输入Beneficiary Bank",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "input",
- // prop: "swiftCode",
- // label: " ",
- // placeholder: "请输入Swift Code",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "input",
- // prop: "beneficiaryBankAddress",
- // label: " ",
- // placeholder: "请输入Beneficiary Bank Address",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "input",
- // prop: "beneficiaryAddress",
- // label: " ",
- // placeholder: "请输入Beneficiary Address",
- // itemWidth: 50,
- // isShow: formData.data.contractType == "1",
- // },
- // {
- // type: "slot",
- // slotName: "payment",
- // label: "",
- // },
- {
- type: "title",
- title: "交付信息",
- haveLine: true,
- },
- {
- type: "date",
- itemType: "date",
- prop: "saleDate",
- label: "销售日期",
- itemWidth: 50,
- },
- {
- type: "date",
- itemType: "date",
- prop: "deliveryTime",
- label: "交货期限",
- itemWidth: 50,
- },
- // {
- // type: "select",
- // prop: "transportMethod",
- // label: "运输方式",
- // data: shippingMethod.value,
- // itemWidth: 50,
- // },
- // {
- // type: "select",
- // prop: "taxTransportationWay",
- // label: "税运方式",
- // data: taxTransportationWay.value,
- // itemWidth: 50,
- // },
- // {
- // type: "input",
- // prop: "transportRemark",
- // label: "运输说明",
- // itemWidth: 50,
- // },
- // {
- // type: "slot",
- // slotName: "delivery",
- // label: "",
- // },
- {
- type: "title",
- title: "商品信息",
- haveLine: true,
- },
- {
- type: "slot",
- slotName: "commodity",
- label: "",
- },
- // {
- // type: "title",
- // title: "其他收费项目",
- // haveLine: true,
- // },
- // {
- // type: "slot",
- // slotName: "otherCharge",
- // label: "",
- // },
- {
- type: "title",
- title: "订单总金额",
- haveLine: true,
- },
- {
- type: "input",
- prop: "amount",
- label: "订单总⾦额",
- itemWidth: 25,
- disabled: true,
- },
- {
- type: "input",
- prop: "factoryAmount",
- label: "业务总⾦额",
- itemWidth: 25,
- disabled: true,
- },
- {
- type: "input",
- prop: "grossProfit",
- label: "合计⽑利",
- itemWidth: 25,
- disabled: true,
- },
- {
- type: "title",
- title: "合同条款",
- haveLine: true,
- },
- {
- type: "select",
- prop: "contractTemplateId",
- label: "合同条款",
- data: templateList.value,
- itemWidth: 50,
- fn: (val) => {
- proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
- formData.data.templateContent = res.templateContent;
- remarkEditor.value.changeHtml(formData.data.templateContent);
- });
- },
- },
- {
- type: "select",
- prop: "sealUseId",
- label: "用印流水号",
- data: sealUseData.value,
- itemWidth: 50,
- fn: (val) => {},
- },
- {
- type: "slot",
- slotName: "templateContent",
- prop: "templateContent",
- label: "模板内容",
- itemWidth: 100,
- disabled: false,
- },
- {
- type: "title",
- title: "合同上传",
- haveLine: true,
- isShow:
- route.query.processType == 20 || props.queryData.processType == 20,
- },
- {
- type: "slot",
- slotName: "contractFileList",
- prop: "contractFileList",
- label: "合同上传",
- isShow:
- route.query.processType == 20 || props.queryData.processType == 20,
- },
- ];
- });
- const rules = ref({
- ofCompanyId: [
- { required: true, message: "请选择业务公司", trigger: "change" },
- ],
- deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
- companyId: [{ required: true, message: "请选择生产公司", trigger: "change" }],
- contractType: [
- { required: true, message: "请选择订单类型", trigger: "change" },
- ],
- processingMethod: [
- { required: true, message: "请选择订单处理方式", trigger: "change" },
- ],
- deliveryTime: [
- { required: true, message: "请选择交货日期", trigger: "change" },
- ],
- belongType: [
- { required: true, message: "请选择订单归属", trigger: "change" },
- ],
- merchUserId: [{ required: true, message: "请选择跟单员", trigger: "change" }],
- salesmanId: [{ required: true, message: "请选择业务员", trigger: "change" }],
- isTax: [{ required: true, message: "请选择是否含税", trigger: "change" }],
- isFreight: [
- { required: true, message: "请选择是否含运费", trigger: "change" },
- ],
- sellCorporationId: [
- { required: true, message: "请选择卖方公司", trigger: "change" },
- ],
- buyCorporationId: [
- { required: true, message: "请选择买方公司", trigger: "change" },
- ],
- countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
- sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
- buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
- buyContactName: [
- { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
- ],
- // buyContactNumber: [
- // { required: true, message: "请输入联系电话", trigger: "blur" },
- // ],
- quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
- price: [{ required: true, message: "请输入单价", trigger: "blur" }],
- payName: [
- { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
- ],
- currency: [{ required: true, message: "请选择币种", trigger: "change" }],
- settlementMethod: [
- { required: true, message: "请选择客户结算方式", trigger: "change" },
- ],
- paymentMethod: [
- { required: true, message: "请选择付款方式", trigger: "change" },
- ],
- advanceRatio: [
- { required: true, message: "请输入预付比例", trigger: "blur" },
- ],
- transportMethod: [
- { required: true, message: "请选择运输方式", trigger: "change" },
- ],
- remark: [
- { required: true, message: "请输入其他收款方式备注说明", trigger: "blur" },
- ],
- rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
- shroffAccountId: [
- { required: true, message: "请选择收款账号", trigger: "change" },
- ],
- // contractTemplateId: [
- // { required: true, message: "请选择模板", trigger: "change" },
- // ],
- templateContent: [
- { required: true, message: "请输入模板内容", trigger: "blur" },
- ],
- contractChannel: [
- { required: true, message: "请选择订单渠道", trigger: "change" },
- ],
- channelCode: [
- { required: true, message: "请输入订单渠道编号", trigger: "blur" },
- ],
- saleDate: [{ required: true, message: "请选择销售日期", trigger: "change" }],
- taxTransportationWay: [
- { required: true, message: "请选择税运方式", trigger: "change" },
- ],
- beforeShipmentRatio: [
- { required: true, message: "请输入出货前付款比例", trigger: "blur" },
- ],
- afterShipmentRatio: [
- { required: true, message: "请输入出货后付款比例", trigger: "blur" },
- ],
- taxPoints: [{ required: true, message: "请选择税点", trigger: "change" }],
- alibabaCode: [
- { required: true, message: "请输入阿里巴巴编号", trigger: "blur" },
- ],
- alibabaShopName: [
- { required: true, message: "请选择1688店铺名称", trigger: "change" },
- ],
- });
- const getaccountList = (val) => {
- proxy
- .post("/accountManagement/page", {
- pageNum: 1,
- pageSize: 999,
- type: val == "bank1" ? "10" : "20",
- })
- .then((res) => {
- accountList.value = res.rows.map((item) => {
- return {
- ...item,
- label: item.alias,
- value: item.id,
- };
- });
- });
- };
- const isFormDetail = ref(false);
- if (
- (route.query && route.query.processType && route.query.processType == 20) ||
- route.query.currentContractId
- ) {
- isFormDetail.value = true;
- }
- const getDict = () => {
- proxy
- .post("/contractTemplate/page", {
- pageNum: 1,
- pageSize: 999,
- templateType: "1",
- })
- .then((res) => {
- templateList.value = res.rows.map((x) => ({
- label: x.templateName,
- value: x.id,
- }));
- });
- proxy
- .post("/contract/page", {
- pageNum: 1,
- pageSize: 9999,
- notLinkSample: "1",
- })
- .then((res) => {
- sampleData.value = res.rows.map((x) => ({
- label: x.code,
- value: x.id,
- }));
- });
- proxy
- .post("/sealUse/page", {
- pageNum: 1,
- pageSize: 999,
- isLinkContract: isFormDetail.value == true ? "" : 0,
- })
- .then((res) => {
- sealUseData.value = res.rows.map((x) => ({
- label: x.code,
- value: x.id,
- }));
- });
- proxy
- .post("/customer/selPage", {
- pageNum: 1,
- pageSize: 50,
- })
- .then((res) => {
- customerList.value = res.rows.map((x) => ({
- ...x,
- label: x.name,
- value: x.id,
- }));
- });
- proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
- corporationList.value = res.rows.map((item) => {
- return {
- ...item,
- label: item.name,
- value: item.id,
- };
- });
- });
- proxy
- .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
- .then((res) => {
- accountList.value = res.rows.map((item) => {
- return {
- ...item,
- label: item.alias,
- value: item.id,
- };
- });
- });
- proxy
- .get("/tenantDept/list", {
- pageNum: 1,
- pageSize: 9999,
- keyword: "",
- tenantId: proxy.useUserStore().user.tenantId,
- type: 0,
- })
- .then((res) => {
- treeData.value = proxy.handleTree(res.data, "deptId");
- });
- proxy
- .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
- pageNum: 1,
- pageSize: 10000,
- tenantId: proxy.useUserStore().user.tenantId,
- })
- .then((res) => {
- userList.value = res.rows.map((item) => {
- return {
- label: item.nickName,
- value: item.userId,
- };
- });
- });
- };
- const getCityData = (id, type, isChange) => {
- proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
- if (type === "20") {
- provinceData.value = res;
- if (isChange) {
- formData.data.provinceId = "";
- formData.data.provinceName = "";
- formData.data.cityId = "";
- formData.data.cityName = "";
- }
- } else if (type === "30") {
- cityData.value = res;
- if (isChange) {
- formData.data.cityId = "";
- formData.data.cityName = "";
- }
- } else {
- countryData.value = res;
- }
- });
- };
- getDict();
- getCityData("0");
- const handleOfCompanyIdChange = (val) => {
- if (val) {
- proxy
- .get("/tenantDept/list", {
- pageNum: 1,
- pageSize: 9999,
- keyword: "",
- ancestors: isFormDetail.value ? "" : val,
- tenantId: proxy.useUserStore().user.tenantId,
- // type: 2,
- })
- .then((res) => {
- deptData.value = proxy.handleTree(res.data, "deptId");
- });
- }
- };
- const sellCorporationIdChange = (val) => {
- if (val) {
- proxy.post("/corporation/detail", { id: val }).then((res) => {
- formData.data.sellCountryName = res.countryName;
- formData.data.sellProvinceName = res.provinceName;
- formData.data.sellCityName = res.cityName;
- formData.data.sellAddress = res.address;
- formData.data.sellContactName = res.contactName;
- formData.data.sellContactNumber = res.contactPhone;
- // if (formData.data.contractType == "2") {
- // formData.data.sellCountryName = res.countryName;
- // formData.data.sellProvinceName = res.provinceName;
- // formData.data.sellCityName = res.cityName;
- // formData.data.sellAddress = res.address;
- // formData.data.sellContactName = res.contactName;
- // formData.data.sellContactNumber = res.contactPhone;
- // } else {
- // formData.data.sellCountryName = res.countryEnStr;
- // formData.data.sellProvinceName = res.provinceEnStr;
- // formData.data.sellCityName = res.cityEnStr;
- // formData.data.sellAddress = res.addressEn;
- // formData.data.sellContactName = res.contactName;
- // formData.data.sellContactNumber = res.contactPhone;
- // }
- });
- }
- };
- const changeCustomer = (val) => {
- // formData.data.contractProductList = [];
- if (val) {
- proxy.post("/customer/detail", { id: val }).then(
- (res) => {
- formData.data.buyCorporationName = res.name;
- formData.data.settlementMethod = res.settlementMode;
- if (res.customerUserList && res.customerUserList.length > 0) {
- formData.data.buyContactName = res.customerUserList[0].name;
- formData.data.buyContactNumber = res.customerUserList[0].phone;
- // if (res.customerUserList[0].contactJson) {
- // let contactJson = JSON.parse(res.customerUserList[0].contactJson);
- // if (contactJson && contactJson.length > 0) {
- // formData.data.buyContactNumber = contactJson[0].contactNo;
- // }
- // }
- customerUserList.value = res.customerUserList.map((item) => {
- return {
- ...item,
- value: item.name,
- };
- });
- }
- // 回填客户的账户信息
- // formData.data.beneficiaryName = res.beneficiaryName;
- // formData.data.beneficiaryBank = res.beneficiaryBank;
- // formData.data.beneficiaryBankAddress = res.beneficiaryBankAddress;
- // formData.data.beneficiaryAccountNumber = res.beneficiaryAccountNumber;
- // formData.data.swiftCode = res.swiftCode;
- // formData.data.beneficiaryAddress = res.beneficiaryAddress;
- formData.data.countryId = res.countryId;
- formData.data.provinceId = res.provinceId;
- formData.data.cityId = res.cityId;
- formData.data.buyPostalCode = res.zipCode;
- formData.data.buyAddress = res.address;
- getCityData(formData.data.countryId, "20");
- if (formData.data.provinceId) {
- getCityData(formData.data.provinceId, "30");
- }
- },
- (err) => {
- formData.data.countryId = "";
- formData.data.provinceId = "";
- formData.data.cityId = "";
- formData.data.buyPostalCode = "";
- formData.data.buyAddress = "";
- }
- );
- } else {
- formData.data.countryId = "";
- formData.data.provinceId = "";
- formData.data.cityId = "";
- formData.data.buyPostalCode = "";
- formData.data.buyAddress = "";
- }
- };
- const changeAdvanceRatio = (val, flag) => {
- if (flag) {
- let total = Number(
- parseFloat(val + Number(formData.data.beforeShipmentRatio)).toFixed(2)
- );
- if (total > 100) {
- formData.data.advanceRatio = null;
- formData.data.beforeShipmentRatio = null;
- formData.data.afterShipmentRatio = null;
- } else {
- formData.data.afterShipmentRatio = Number(
- parseFloat(100 - total).toFixed(2)
- );
- }
- } else {
- let total = Number(
- parseFloat(val + Number(formData.data.advanceRatio)).toFixed(2)
- );
- if (total > 100) {
- formData.data.advanceRatio = null;
- formData.data.beforeShipmentRatio = null;
- formData.data.afterShipmentRatio = null;
- } else {
- formData.data.afterShipmentRatio = Number(
- parseFloat(100 - total).toFixed(2)
- );
- }
- }
- };
- const createFilter = (queryString) => {
- return (restaurant) => {
- return (
- restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
- );
- };
- };
- const querySearchPerson = (queryString, callback) => {
- const results = queryString
- ? customerUserList.value.filter(createFilter(queryString))
- : customerUserList.value;
- callback(results);
- };
- const handlePerson = (item) => {
- if (item.contactJson) {
- let data = JSON.parse(item.contactJson);
- formData.data.buyContactNumber = data[0].contactNo;
- }
- };
- const handleClickSelectMaterial = (index) => {
- indexValue.value = index;
- openSelectMaterial.value = true;
- };
- const contractProductBomList = ref([]);
- const selectProduct = async (goods) => {
- if (goods && goods.id) {
- let rowId = uuidv4();
- let allFile = [];
- let fileUrl = "";
- if (goods.fileList && goods.fileList.length > 0) {
- fileUrl = goods.fileList[0].fileUrl;
- }
- const fileData = await proxy.post("/fileInfo/getList", {
- businessIdList: [goods.id],
- });
- if (fileData[goods.id] && fileData[goods.id].length > 0) {
- allFile = fileData[goods.id];
- } else {
- allFile = [];
- }
- proxy.post("/productBomInfo/detail", { id: goods.id }).then((res) => {
- if (res.productBomDetailList && res.productBomDetailList.length > 0) {
- contractProductBomList.value = res.productBomDetailList.map((x) => ({
- fileUrl: "",
- materialId: x.materialId,
- productName: x.materialName,
- productCode: x.materialCode,
- productLength: x.materialLength,
- productWidth: x.materialWidth,
- productHeight: x.materialHeight,
- productColor: x.materialColor,
- standardDosage: x.standardDosage,
- lossRate: x.lossRate,
- remark: x.remark || "",
- quantity: x.type != 3 ? null : 1,
- allQuantity: "",
- price: x.materialPrice || null,
- amount: "",
- fileList: [],
- type: x.type,
- oldId: x.id,
- }));
- let fileListOne = [];
- if (allFile && allFile.length > 0) {
- fileListOne = allFile.filter((x) => x.businessType == "2");
- }
- formData.data.contractProductList.push({
- fileUrl: fileUrl,
- productId: goods.id,
- productClassifyName: goods.classifyName,
- productName: goods.name,
- productCode: goods.customCode,
- productLength: goods["length"],
- productWidth: goods.width,
- productHeight: goods.height,
- productColor: goods.color,
- productNetWeight: goods.netWeight,
- productUnit: goods.unit,
- productFrontalTexture: goods.frontalTexture,
- prodFilePath: goods.prodFilePath,
- quantity: null,
- price: goods.price || null,
- businessCostPrice: goods.businessCostPrice || null,
- factoryPrice: goods.factoryPrice || null,
- amount: "",
- remark: "",
- fileList: [],
- isShowProductFile: true,
- fileListOne: fileListOne,
- prodFileList: [],
- contractProductBomList: contractProductBomList.value,
- rowId: rowId,
- });
- proxy.msgTip("添加成功", 1);
- changeProductPrice();
- let bomIds = contractProductBomList.value.map((x) => x.materialId);
- let bomIdsOne = contractProductBomList.value.map((x) => x.oldId);
- // 取物料图片
- proxy
- .getFileData({ businessIdList: bomIds, getAll: true })
- .then((res) => {
- for (let i = 0; i < contractProductBomList.value.length; i++) {
- const iele = contractProductBomList.value[i];
- let fileData = res[iele.materialId] || [];
- if (fileData && fileData.length > 0) {
- iele.fileList = fileData
- .filter((x) => x.businessType == "0")
- .map((y) => ({ ...y, name: y.fileName, url: y.fileUrl }));
- if (iele.fileList && iele.fileList.length > 0) {
- iele.fileUrl = iele.fileList[0].fileUrl;
- }
- } else {
- iele.fileList = [];
- }
- }
- });
- // 取bom附件
- proxy
- .getFileData({ businessIdList: bomIdsOne, getAll: true })
- .then((res) => {
- for (let i = 0; i < contractProductBomList.value.length; i++) {
- const iele = contractProductBomList.value[i];
- let fileData = res[iele.oldId] || [];
- if (fileData && fileData.length > 0) {
- iele.bomFileList = fileData
- .filter((x) => x.businessType == "10")
- .map((y) => ({ ...y, name: y.fileName, url: y.fileUrl }));
- } else {
- iele.bomFileList = [];
- }
- }
- });
- } else {
- return proxy.msgTip("该产品未配置BOM", 2);
- }
- });
- } else {
- return proxy.msgTip("选择错误", 2);
- }
- };
- // const selectMaterial = (goods) => {
- // let flag = formData.data.contractProductList[
- // indexValue.value
- // ].contractProductBomList.some((x) => x.materialId == goods.id);
- // if (!flag) {
- // let fileUrl = "";
- // if (goods.fileList && goods.fileList.length > 0) {
- // fileUrl = goods.fileList[0].fileUrl;
- // }
- // formData.data.contractProductList[
- // indexValue.value
- // ].contractProductBomList.push({
- // fileUrl: fileUrl,
- // materialId: goods.id,
- // productName: goods.name,
- // productCode: goods.customCode,
- // productLength: goods["length"],
- // productWidth: goods.width,
- // productHeight: goods.height,
- // quantity: null,
- // price: goods.price || null,
- // amount: "",
- // fileList: [],
- // type: 2,
- // });
- // proxy.msgTip("选择成功");
- // } else {
- // proxy.msgTip("该物料已选择", 2);
- // }
- // };
- const selectMaterial = (goods) => {
- let flag = formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.some((x) => x.materialId == goods.id);
- if (!flag) {
- let fileUrl = "";
- if (goods.fileList && goods.fileList.length > 0) {
- fileUrl = goods.fileList[0].fileUrl;
- }
- formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.push({
- fileUrl: fileUrl,
- materialId: goods.id,
- productName: goods.name,
- productCode: goods.customCode,
- productLength: goods["length"],
- productWidth: goods.width,
- productHeight: goods.height,
- productColor: goods.color,
- quantity: null,
- standardDosage: 1,
- lossRate: null,
- remark: "",
- price: null,
- amount: "",
- fileList: [],
- type: 2,
- });
- proxy.msgTip("选择成功");
- } else {
- proxy.msgTip("该物料已选择", 2);
- }
- };
- const changeProductPrice = () => {
- return;
- let productIds = formData.data.contractProductList.map((x) => x.productId);
- if (productIds && productIds.length > 0) {
- proxy
- .post("/contract/getProductPriceInfo", {
- productIds: productIds,
- customerId: formData.data.buyCorporationId
- ? formData.data.buyCorporationId
- : "",
- })
- .then((res) => {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const iele = formData.data.contractProductList[i];
- for (const key in res) {
- if (key == iele.productId) {
- iele.salePrice = res[key].price;
- iele.currency = res[key].currency;
- iele.saleCostPrice = res[key].costPrice;
- iele.contractProductList = res[key].contractProductList
- .map((x) => ({
- createTime: x.createTime || "",
- price: x.price,
- currency: x.currency,
- }))
- .filter((y, index) => index < 3);
- iele.contractProductListOne = res[key].contractProductList.map(
- (x) => ({
- createTime: x.createTime || "",
- price: x.price,
- currency: x.currency,
- })
- );
- iele.customerContractProductList = res[
- key
- ].customerContractProductList.map((x) => ({
- createTime: x.createTime || "",
- price: x.price,
- currency: x.currency,
- }));
- }
- }
- }
- });
- }
- };
- const updateContent = (val) => {
- formData.data.templateContent = val;
- };
- const onPicture = (path) => {
- window.open(path, "_blank");
- };
- const handleRemove = (index) => {
- formData.data.contractProductList.splice(index, 1);
- totalAmount();
- };
- const handleDeleteMaterial = (index, sonIndex) => {
- formData.data.contractProductList[index].contractProductBomList.splice(
- sonIndex,
- 1
- );
- };
- const calculationAmount = (flag = false) => {
- if (
- formData.data.contractProductList &&
- formData.data.contractProductList.length > 0
- ) {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- formData.data.contractProductList[i].amount = parseFloat(
- Number(formData.data.contractProductList[i].quantity) *
- Number(formData.data.contractProductList[i].price)
- ).toFixed(2);
- formData.data.contractProductList[i].amountTwo = parseFloat(
- Number(formData.data.contractProductList[i].quantity) *
- Number(formData.data.contractProductList[i].factoryPrice)
- ).toFixed(2);
- let row = formData.data.contractProductList[i];
- if (flag && row.quantity) {
- for (let j = 0; j < row.contractProductBomList.length; j++) {
- let jrow = row.contractProductBomList[j];
- if (jrow.standardDosage && jrow.lossRate != null) {
- jrow.quantity = Math.ceil(
- Number(
- parseFloat(
- (row.quantity / jrow.standardDosage) *
- (1 + jrow.lossRate / 100)
- ).toFixed(2)
- )
- );
- }
- }
- }
- }
- }
- totalAmount();
- };
- const totalAmount = () => {
- let money = 0;
- let moneyTwo = 0;
- if (
- formData.data.contractProductList &&
- formData.data.contractProductList.length > 0
- ) {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- if (formData.data.contractProductList[i].amount) {
- money = parseFloat(
- Number(money) + Number(formData.data.contractProductList[i].amount)
- ).toFixed(2);
- }
- if (formData.data.contractProductList[i].amountTwo) {
- moneyTwo = parseFloat(
- Number(moneyTwo) +
- Number(formData.data.contractProductList[i].amountTwo)
- ).toFixed(2);
- }
- }
- }
- if (
- formData.data.contractProjectList &&
- formData.data.contractProjectList.length > 0
- ) {
- for (let i = 0; i < formData.data.contractProjectList.length; i++) {
- if (formData.data.contractProjectList[i].amount) {
- money = parseFloat(
- Number(money) + Number(formData.data.contractProjectList[i].amount)
- ).toFixed(2);
- }
- }
- }
- formData.data.amount = money;
- formData.data.factoryAmount = moneyTwo;
- formData.data.grossProfit = parseFloat(
- Number(formData.data.amount) - Number(formData.data.factoryAmount)
- ).toFixed(2);
- };
- const clickAdd = () => {
- if (
- formData.data.contractProjectList &&
- formData.data.contractProjectList.length > 0
- ) {
- formData.data.contractProjectList.push({
- payName: "",
- amount: null,
- remark: "",
- });
- } else {
- formData.data.contractProjectList = [
- { payName: "", amount: null, remark: "" },
- ];
- }
- };
- const handleDelete = (index) => {
- formData.data.contractProjectList.splice(index, 1);
- totalAmount();
- };
- const querySearch = (queryString, callback) => {
- proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
- if (res.rows && res.rows.length > 0) {
- res.rows = res.rows.map((item) => {
- return {
- ...item,
- value: item.payName,
- };
- });
- callback(res.rows);
- } else {
- callback([]);
- }
- });
- };
- const handleBeforeUpload = async (file, index) => {
- formData.data.contractProductList[index].imgLoading = true;
- const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
- uploadData.value = res.uploadBody;
- formData.data.contractProductList[index].fileList = [
- {
- id: res.id,
- fileName: res.fileName,
- fileUrl: res.fileUrl,
- uploadState: false,
- },
- ];
- formData.data.contractProductList[index].fileData = res;
- return true;
- };
- const handleBeforeUploadOne = async (file, index) => {
- const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
- file.id = res.id;
- file.fileUrl = res.fileUrl;
- uploadData.value = res.uploadBody;
- formData.data.contractProductList[index].fileData = res;
- return true;
- };
- const handleSuccess = (index) => {
- if (
- formData.data.contractProductList[index].fileData &&
- formData.data.contractProductList[index].fileData.fileUrl
- ) {
- formData.data.contractProductList[index].uploadState = true;
- formData.data.contractProductList[index].imageUrl =
- formData.data.contractProductList[index].fileData.fileUrl;
- }
- setTimeout(() => {
- formData.data.contractProductList[index].imgLoading = false;
- }, 400);
- };
- const handleSuccessOne = (index) => {
- if (
- formData.data.contractProductList[index].fileData &&
- formData.data.contractProductList[index].fileData.fileUrl
- ) {
- let file = formData.data.contractProductList[index].fileData;
- formData.data.contractProductList[index].prodFileList.push({
- id: file.id,
- fileName: file.fileName,
- name: file.fileName,
- url: file.fileUrl,
- fileUrl: file.fileUrl,
- });
- formData.data.contractProductList[index].fileData = {};
- }
- };
- const handleRemoveFile = (file, index) => {
- let sonIndex = formData.data.contractProductList[
- index
- ].prodFileList.findIndex((x) => x.id == file.id || x.id == file.raw.id);
- if (sonIndex > -1) {
- formData.data.contractProductList[index].prodFileList.splice(sonIndex, 1);
- }
- };
- const onPreviewFile = (file) => {
- if (file && file.fileUrl) {
- window.open(file.fileUrl, "_blank");
- } else {
- window.open(file.raw.fileUrl, "_blank");
- }
- };
- const loadingSearch = ref(false);
- const remoteMethod = (keyword) => {
- if (keyword && typeof keyword === "string") {
- loadingSearch.value = true;
- proxy.post("/customer/selPage", { keyword }).then((res) => {
- customerList.value = res.rows.map((x) => ({
- ...x,
- label: x.name,
- value: x.id,
- }));
- loadingSearch.value = false;
- });
- }
- return;
- };
- const handleSubmit = async (isStag = false) => {
- if (isStag) {
- return true;
- }
- let flag = await formDom.value.handleSubmit(() => {});
- if (flag) {
- if (
- formData.data.contractProductList &&
- formData.data.contractProductList.length > 0
- ) {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const ele = formData.data.contractProductList[i];
- if (
- ele.isShowProductFile &&
- ele.fileListOne &&
- ele.fileListOne.length > 0
- ) {
- ele.prodFileList = ele.fileListOne;
- }
- }
- formData.data.currency = currencyData.value[0].dictKey;
- return true;
- } else {
- proxy.msgTip("请添加至少一件商品", 2);
- return false;
- }
- } else {
- // setTimeout(() => {
- // const errorDiv = document.getElementsByClassName("is-error");
- // errorDiv[0].scrollIntoView();
- // }, 0);
- isShowOther.value = true;
- }
- return flag;
- };
- const getFormData = () => {
- // 赋值类型
- formData.data.type = route.query.flowKey == "sample_flow" ? "1" : "0";
- return proxy.deepClone(formData.data);
- };
- // 向父组件暴露
- defineExpose({
- getFormData,
- handleSubmit,
- });
- const changeShroffAccount = (val) => {
- if (val) {
- let data = accountList.value.find((item) => item.value == val);
- if (data) {
- formData.data.beneficiaryName = "";
- formData.data.beneficiaryBank = "";
- formData.data.beneficiaryBankAddress = "";
- formData.data.beneficiaryAccountNumber = "";
- formData.data.swiftCode = "";
- formData.data.beneficiaryAddress = "";
- formData.data.accountName = data.name;
- formData.data.openingBank = data.openingBank;
- formData.data.accountOpening = data.accountOpening;
- }
- // if (formData.data.contractType == "2") {
- // if (data) {
- // formData.data.beneficiaryName = "";
- // formData.data.beneficiaryBank = "";
- // formData.data.beneficiaryBankAddress = "";
- // formData.data.beneficiaryAccountNumber = "";
- // formData.data.swiftCode = "";
- // formData.data.beneficiaryAddress = "";
- // formData.data.accountName = data.name;
- // formData.data.openingBank = data.openingBank;
- // formData.data.accountOpening = data.accountOpening;
- // }
- // } else {
- // if (data) {
- // formData.data.accountName = "";
- // formData.data.openingBank = "";
- // formData.data.accountOpening = "";
- // formData.data.beneficiaryName = data.beneficiaryName;
- // formData.data.beneficiaryBank = data.beneficiaryBank;
- // formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
- // formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
- // formData.data.swiftCode = data.swiftCode;
- // formData.data.beneficiaryAddress = data.beneficiaryAddress;
- // }
- // }
- }
- };
- const handleClickUpload = async (att, flag, index) => {
- let res = null;
- let path = "";
- if (flag) {
- proxy.msgTip("请稍后", 2);
- res = await proxy.post("/fileService/createTempFolder");
- if (res && res.path) {
- formData.data.contractProductList[index][att] = res.path;
- path = res.path;
- }
- } else {
- path = formData.data.contractProductList[index][att];
- }
- let a = document.createElement("a");
- a.href = "printer://" + `ftp://${import.meta.env.VITE_APP_IP}/` + path + "/";
- a.style.display = "none";
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- };
- const handleClickUploadOne = (index) => {
- formData.data.contractProductList[index].isShowProductFile =
- !formData.data.contractProductList[index].isShowProductFile;
- if (formData.data.contractProductList[index].isShowProductFile) {
- formData.data.contractProductList[index].prodFileList = [];
- formData.data.contractProductList[index].fileData = {};
- }
- };
- const dialogOpenType = ref(-1);
- const openSelectRawMaterial = ref(false);
- const openSelectTechnology = ref(false);
- const openDialog = (index, type) => {
- indexValue.value = index;
- dialogOpenType.value = type;
- if (type == 1) {
- openSelectRawMaterial.value = true;
- }
- if (type == 2) {
- openSelectTechnology.value = true;
- }
- if (type == 3) {
- handleClickSelectMaterial(index);
- }
- };
- const selectRawMaterial = (row) => {
- if (dialogOpenType.value == 1) {
- let flag = formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.some((x) => x.materialId == row.id);
- if (!flag) {
- formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.unshift({
- materialId: row.id,
- type: 1,
- productName: row.name,
- productCode: row.customCode,
- productLength: row["length"],
- productWidth: row.width,
- productHeight: row.height,
- productColor: row.color,
- quantity: null,
- standardDosage: 1,
- lossRate: null,
- remark: "",
- price: null,
- amount: "",
- fileList: [],
- });
- proxy.msgTip("选择成功");
- } else {
- proxy.msgTip("该物料已选择", 2);
- }
- }
- };
- const selectTechnology = (row) => {
- if (
- dialogOpenType.value == 2 &&
- row.processRouteList &&
- row.processRouteList.length > 0
- ) {
- formData.data.contractProductList[indexValue.value].technologyId = row.id;
- formData.data.contractProductList[indexValue.value].contractProductBomList =
- formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.filter((x) => x.type != 3);
- let index = formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.findIndex((x) => x.type == 2);
- let arr = row.processRouteList.map((x) => ({
- type: 3,
- materialId: x.id,
- productName: x.name,
- productCode: x.code,
- quantity: null,
- standardDosage: 1,
- lossRate: null,
- remark: "",
- }));
- if (index >= 0) {
- formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.splice(index, 0, ...arr);
- } else {
- let arrLength =
- formData.data.contractProductList[indexValue.value]
- .contractProductBomList.length;
- formData.data.contractProductList[
- indexValue.value
- ].contractProductBomList.splice(arrLength ? arrLength : 0, 0, ...arr);
- }
- openSelectTechnology.value = false;
- return proxy.msgTip("选择成功", 1);
- }
- };
- const getAllData = (businessId) => {
- proxy.post("/contract/detail", { id: businessId }).then(async (res) => {
- res.countryId = res.buyCountryId;
- res.provinceId = res.buyProvinceId;
- res.cityId = res.buyCityId;
- if (res.grossProfitInfoList && res.grossProfitInfoList.length > 0) {
- $bus.emit("getGrossData", res.grossProfitInfoList);
- }
- for (const key in res) {
- formData.data[key] = res[key];
- }
- formData.data.belongType = formData.data.belongType + "";
- formData.data.isFreight = formData.data.isFreight + "";
- formData.data.isTax = formData.data.isTax + "";
- remarkEditor.value.changeHtml(formData.data.templateContent);
- // 外层附件回显
- proxy
- .post("/fileInfo/getList", { businessIdList: [businessId] })
- .then((fileObj) => {
- if (fileObj[businessId] && fileObj[businessId].length > 0) {
- formData.data.contractFileList = fileObj[businessId]
- .filter((x) => x.businessType == "10")
- .map((item) => {
- return {
- ...item,
- name: item.fileName,
- url: item.fileUrl,
- };
- });
- } else {
- formData.data.contractFileList = [];
- }
- });
- if (
- formData.data.contractProductList &&
- formData.data.contractProductList.length > 0
- ) {
- getFileData();
- let productIds = formData.data.contractProductList.map(
- (x) => x.productId
- );
- // proxy.getFileData({
- // businessIdList: productIds,
- // data: formData.data.contractProductList,
- // att: "productId",
- // businessType: "0",
- // fileAtt: "productFile",
- // filePathAtt: "fileUrl",
- // });
- const productAllFile = await proxy.getFileData({
- businessIdList: productIds,
- getAll: true,
- });
- let bomIds = [];
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const ele = formData.data.contractProductList[i];
- ele.rowId = uuidv4();
- for (const key in productAllFile) {
- if (
- ele.productId == key &&
- productAllFile[ele.productId] &&
- productAllFile[ele.productId].length > 0
- ) {
- ele.productFile = productAllFile[ele.productId].filter(
- (x) => x.businessType == "0"
- );
- if (ele.productFile && ele.productFile.length > 0) {
- ele.fileUrl = ele.productFile[0].fileUrl;
- }
- break;
- }
- }
- for (let j = 0; j < ele.contractProductBomList.length; j++) {
- const jele = ele.contractProductBomList[j];
- bomIds.push(jele.id);
- }
- }
- // 获取bom文件
- proxy
- .getFileData({ businessIdList: bomIds, getAll: true })
- .then((res) => {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const iele = formData.data.contractProductList[i];
- for (let j = 0; j < iele.contractProductBomList.length; j++) {
- const jele = iele.contractProductBomList[j];
- let fileData = res[jele.id] || [];
- if (fileData && fileData.length > 0) {
- jele.bomFileList = fileData
- .filter((x) => x.businessType == "10")
- .map((y) => ({ ...y, name: y.fileName, url: y.fileUrl }));
- } else {
- jele.bomFileList = [];
- }
- }
- }
- });
- let ids = formData.data.contractProductList.map((x) => x.id);
- proxy
- .getFileData({
- businessIdList: ids,
- getAll: true,
- })
- .then((fileObj) => {
- if (fileObj && Object.keys(fileObj).length > 0) {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const ele = formData.data.contractProductList[i];
- for (const key in fileObj) {
- if (
- ele.id == key &&
- fileObj[ele.id] &&
- fileObj[ele.id].length > 0
- ) {
- let imageUrlList = fileObj[ele.id].filter(
- (x) => x.businessType == "0"
- );
- if (imageUrlList && imageUrlList.length > 0) {
- ele.imageUrl = imageUrlList[0].fileUrl;
- }
- ele.prodFileList = fileObj[ele.id]
- .filter((x) => x.businessType == "1")
- .map((x) => ({ ...x, name: x.fileName, url: x.fileUrl }));
- if (ele.prodFileList && ele.prodFileList.length > 0) {
- ele.isShowProductFile = false;
- } else {
- ele.isShowProductFile = true;
- if (productAllFile[ele.productId]) {
- ele.fileListOne = productAllFile[ele.productId].filter(
- (x) => x.businessType == "2"
- );
- }
- }
- }
- }
- }
- } else {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const ele = formData.data.contractProductList[i];
- ele.isShowProductFile = true;
- for (const key in productAllFile) {
- if (
- ele.productId == key &&
- productAllFile[ele.productId] &&
- productAllFile[ele.productId].length > 0
- ) {
- ele.fileListOne = productAllFile[ele.productId].filter(
- (x) => x.businessType == "2"
- );
- break;
- }
- }
- }
- }
- });
- changeProductPrice();
- }
- calculationAmount(true);
- if (formData.data.countryId) {
- getCityData(formData.data.countryId, "20");
- }
- if (formData.data.provinceId) {
- getCityData(formData.data.provinceId, "30");
- }
- });
- };
- const getFileData = () => {
- let ids = [];
- formData.data.contractProductList.map((x) => {
- // ids.push(x.productId);
- x.contractProductBomList.map((y) => {
- ids.push(y.materialId);
- });
- });
- ids = Array.from(new Set(ids));
- proxy
- .post("/fileInfo/getList", {
- businessIdList: ids,
- })
- .then((fileObj) => {
- formData.data.contractProductList.map((x) => {
- // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
- // x.fileUrl = fileObj[x.productId][0].fileUrl;
- // }
- x.contractProductBomList.map((y) => {
- y.fileList = fileObj[y.materialId] || [];
- if (y.fileList && y.fileList.length > 0) {
- y.fileUrl = y.fileList[0].fileUrl;
- }
- });
- });
- });
- };
- const getPriceSheetData = (id) => {
- proxy.post("/extQuotation/toContractDetail", { id }).then(async (res) => {
- if (formData.data.deptId) {
- res.deptId = formData.data.deptId;
- }
- formData.data = res;
- formData.data = {
- contractType: route.query.contractType,
- salesmanId: proxy.useUserStore().user.userId,
- templateContent: "",
- quotationId: res.id,
- // companyId: res.companyId,
- ofCompanyId: res.ofCompanyId,
- deptId: res.deptId,
- qualityLv: res.qualityLv,
- buyCorporationId: res.buyCorporationId,
- buyAddress: res.buyAddress,
- buyPostalCode: res.buyPostalCode,
- buyContactName: res.buyContactName,
- buyContactNumber: res.buyContactNumber,
- amount: res.amount,
- };
- changeCustomer(res.buyCorporationId);
- // if (res.type == 1) {
- // formData.data.contractType = "2";
- // if (currencyData.value && currencyData.value.length > 0) {
- // formData.data.currency = currencyData.value[0].dictKey;
- // }
- // formData.data.rate = 1;
- // } else {
- // formData.data.contractType = "1";
- // }
- let bomIds = [];
- formData.data.contractProductList = res.quotationProductList.map((x) => ({
- quotationProductId: x.id,
- fileUrl: "",
- productId: x.productId,
- productClassifyName: x.productClassifyName,
- productName: x.productName,
- productCode: x.productCode,
- productColor: x.productColor,
- productFrontalTexture: x.productFrontalTexture,
- productNetWeight: x.productNetWeight,
- productUnit: x.productUnit,
- productLength: x.productLength,
- productWidth: x.productWidth,
- productHeight: x.productHeight,
- prodFilePath: x.productProdImgPath,
- quantity: x.quantity,
- price: x.price,
- amount: x.amount,
- businessCostPrice: x.businessCostPrice,
- factoryPrice: x.prodPrice,
- amountTwo: Number(
- parseFloat(x.quantity * x.businessCostPrice).toFixed(2)
- ),
- fileList: [],
- contractProductBomList: x.quotationProductBomList.map((y) => {
- bomIds.push(y.id);
- y.bomFileList = [];
- y.quotationProductBomId = y.id;
- delete y.id;
- return y;
- }),
- rowId: uuidv4(),
- }));
- // 获取BOM文件
- proxy.getFileData({ businessIdList: bomIds, getAll: true }).then((res) => {
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const iele = formData.data.contractProductList[i];
- for (let j = 0; j < iele.contractProductBomList.length; j++) {
- const jele = iele.contractProductBomList[j];
- let fileData = res[jele.quotationProductBomId] || [];
- if (fileData && fileData.length > 0) {
- jele.bomFileList = fileData
- .filter((x) => x.businessType == "10")
- .map((y) => ({ ...y, name: y.fileName, url: y.fileUrl }));
- } else {
- jele.bomFileList = [];
- }
- }
- }
- });
- changeProductPrice();
- totalAmount();
- getFileData();
- let productIds = formData.data.contractProductList.map((x) => x.productId);
- const productAllFile = await proxy.getFileData({
- businessIdList: productIds,
- getAll: true,
- });
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
- const ele = formData.data.contractProductList[i];
- for (const key in productAllFile) {
- if (
- ele.productId == key &&
- productAllFile[ele.productId] &&
- productAllFile[ele.productId].length > 0
- ) {
- ele.productFile = productAllFile[ele.productId].filter(
- (x) => x.businessType == "0"
- );
- if (ele.productFile && ele.productFile.length > 0) {
- ele.fileUrl = ele.productFile[0].fileUrl;
- }
- ele.fileListOne = productAllFile[ele.productId].filter(
- (x) => x.businessType == "2"
- );
- if (ele.fileListOne && ele.fileListOne.length > 0) {
- ele.isShowProductFile = true;
- } else {
- ele.isShowProductFile = false;
- }
- break;
- }
- }
- }
- formData.data.countryId = res.buyCountryId;
- formData.data.provinceId = res.buyProvinceId;
- formData.data.cityId = res.buyCityId;
- if (formData.data.countryId) {
- getCityData(formData.data.countryId, "20");
- }
- if (formData.data.provinceId) {
- getCityData(formData.data.provinceId, "30");
- }
- });
- };
- // 是否能编辑修改产品列表
- const isEditList = ref(true);
- onMounted(() => {
- formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
- formData.data.salesmanId = proxy.useUserStore().user.userId;
- handleOfCompanyIdChange(formData.data.ofCompanyId);
- if (
- proxy.useUserStore().currentCompany == proxy.useUserStore().user.ofCompanyId
- ) {
- formData.data.deptId = proxy.useUserStore().user.deptId;
- }
- if (currencyData.value && currencyData.value.length > 0) {
- formData.data.currency = currencyData.value[0].dictKey;
- }
- formOption.disabled = judgeStatus();
- // 报价转销售订单
- if (route.query && route.query.priceSheetId) {
- getPriceSheetData(route.query.priceSheetId);
- isEditList.value = false;
- } else if (route.query && route.query.businessId && route.query.processType) {
- let businessId = route.query.businessId;
- getAllData(businessId);
- } else if (
- route.query &&
- route.query.businessId &&
- !route.query.processType
- ) {
- let businessId = route.query.businessId;
- getAllData(businessId);
- }
- });
- watch(
- () => props.queryData,
- (val) => {
- nextTick(() => {
- formOption.disabled = judgeStatus();
- });
- if (val.businessId && val.processType) {
- getAllData(val.businessId);
- }
- },
- {
- deep: true,
- immediate: true,
- }
- );
- const showPriceInfo = () => {
- if (props.queryData.processType) {
- return false;
- }
- if (route.query.processType) {
- return false;
- } else {
- return true;
- }
- };
- const optionTwo = reactive({
- data: {
- tooltip: {
- trigger: "axis",
- },
- // legend: {
- // data: ["价格"],
- // },
- grid: {
- left: "3%",
- right: "4%",
- top: "10%",
- bottom: "3%",
- containLabel: true,
- },
- // toolbox: {
- // feature: {
- // saveAsImage: {},
- // },
- // },
- xAxis: {
- type: "category",
- boundaryGap: false,
- data: [],
- },
- yAxis: {
- type: "value",
- },
- series: [
- {
- name: "价格",
- type: "line",
- data: [],
- },
- ],
- },
- });
- const showEcharts = (row, index) => {
- let myChart = null;
- myChart = echarts.init(proxy.$refs[row.productId + index]);
- window.addEventListener("resize", () => {
- myChart.resize();
- });
- if (row.contractProductListOne && row.contractProductListOne.length > 0) {
- optionTwo.data.xAxis.data = row.contractProductListOne.map((item) => {
- return item.createTime.slice(0, 10);
- });
- optionTwo.data.series[0].data = row.contractProductListOne.map((item) => {
- return item.price;
- });
- } else {
- optionTwo.data.xAxis.data = [];
- optionTwo.data.series[0].data = [];
- }
- myChart.setOption(optionTwo.data);
- myChart.resize();
- };
- const clickCopy = (type) => {
- copyType.value = type;
- copyContract.value = true;
- };
- </script>
- <style lang="scss" scoped>
- .img {
- object-fit: contain;
- width: 16px;
- height: 16px;
- vertical-align: middle;
- }
- .pic {
- object-fit: contain;
- width: 50px;
- height: 50px;
- cursor: pointer;
- vertical-align: middle;
- }
- .el-icon.avatar-uploader-icon {
- font-size: 20px;
- color: #8c939d;
- width: 50px;
- height: 50px;
- text-align: center;
- border: 1px dashed var(--el-border-color);
- }
- .ql-editor {
- padding: 0px;
- }
- :deep(.el-upload-list) {
- margin: 0px !important;
- position: relative;
- top: -8px;
- left: -8px;
- }
- :deep(.el-upload-list--text .el-upload-list__item) {
- min-width: 150px !important;
- }
- :deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
- background: #f4f4f5 !important;
- }
- </style>
|