AddOrUpdate.vue 136 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818
  1. <template>
  2. <div>
  3. <div style="display: flex; justify-content: space-between">
  4. <div style="display: flex; align-items: center">
  5. <el-breadcrumb separator="/">
  6. <el-breadcrumb-item><span style="font-weight: 700">通关</span></el-breadcrumb-item>
  7. <el-breadcrumb-item><span style="font-weight: 700">通关详情页</span></el-breadcrumb-item>
  8. </el-breadcrumb>
  9. <el-button style="margin-left: 10px" size="mini" icon="el-icon-arrow-left" @click="goBack">返回列表</el-button>
  10. </div>
  11. <div v-if="showApproval == 0">
  12. <el-button type="info" size="small" @click="addOrUpdateHandle(form, 'warehouse_status')"
  13. v-if="form.warehouseStatus > 3">查看接单审批
  14. </el-button>
  15. <el-button type="info" size="small" @click="addOrUpdateHand(form, 'warehouse_status')"
  16. v-if="form.warehouseStatus > 3 && approVal == true">接单审批
  17. </el-button>
  18. <el-button type="info" :disabled="form.warehouseStatus >= 4" size="small" @click="verifyForm"
  19. v-if="form.fBillstatus">接单请核
  20. </el-button>
  21. <el-button type="info" :disabled="browseStatus" size="small" @click="ordersRevoke"
  22. v-if="form.warehouseStatus == 6">撤销接单请核
  23. </el-button>
  24. <el-button type="info" :disabled="browseStatus" size="small" @click="revokeTwo('warehouse_status')"
  25. v-if="form.warehouseStatus == 4">撤销接单审批
  26. </el-button>
  27. </div>
  28. </div>
  29. <br>
  30. <el-form ref="form" :model="form" :rules="rules" label-width="130px">
  31. <el-row>
  32. <el-col :span="8">
  33. <el-form-item label="客户" prop="fCorpid">
  34. <el-select v-model="form.fCorpid" clearable filterable placeholder="请输入关键词" style="width: 80%"
  35. @change="changefStltype" :disabled="detailList.length > 0">
  36. <el-option v-for="(item, index) in fMblnoOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="8">
  42. <el-form-item label="结算方式" prop="fStltypeid" v-if="dataShowcar == '1'">
  43. <el-select v-model="form.fStltypeid" placeholder="请选择结算方式" clearable :disabled="browseStatus"
  44. style="width: 80%">
  45. <el-option v-for="(item, index) in fStltypeOptions" :key="index.dictValue" :label="item.dictLabel"
  46. :value="item.dictValue" />
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item label="作业类型" prop="fBusinessType" v-if="dataShowcar == '0'">
  50. <el-select style="width: 80%" v-model="form.fBusinessType" filterable @change="educationChange" :disabled="
  51. contrOl ||
  52. browseStatus ||
  53. warehouseDrList.length > 0 ||
  54. warehouseCrList.length > 0
  55. ">
  56. <el-option v-for="(item, index) in businessTypeOption" :key="index.dictValue" :label="item.dictLabel"
  57. :value="item.dictValue"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-form-item label="提单号" prop="fMblno">
  63. <el-input v-model="form.fMblno" style="width: 80%" placeholder="请输入提单号"
  64. :disabled="detailList.length != 0" />
  65. </el-form-item>
  66. </el-col>
  67. </el-row>
  68. <el-row>
  69. <el-col :span="8">
  70. <el-form-item label="业务日期" prop="fBsdate">
  71. <el-date-picker v-model="form.fBsdate" style="width: 80%" type="date" :disabled="browseStatus"
  72. value-format="timestamp" placeholder="业务日期" @change="changeDate" format="yyyy-MM-dd">
  73. </el-date-picker>
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="8">
  77. <el-form-item label="业务时间" prop="fBstime">
  78. <el-time-picker style="width: 80%" :disabled="browseStatus" v-model="form.fBstime" :picker-options="{
  79. selectableRange: '00:00:00 - 23:59:59',
  80. }" value-format="timestamp" placeholder="任意时间点">
  81. </el-time-picker>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="8">
  85. <el-form-item label="仓管员" prop="fStorekeeper">
  86. <el-select v-model="form.fStorekeeper" filterable clearable :disabled="browseStatus" style="width: 80%"
  87. placeholder="请输入模糊查找">
  88. <el-option v-for="(item, index) in userOptions" :key="index.userName" :label="item.nickName"
  89. :value="item.userName"></el-option>
  90. </el-select>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-row>
  95. <el-col :span="8">
  96. <el-form-item label="原仓库" prop="fInwarehouseid">
  97. <el-select v-model="form.fInwarehouseid" filterable :disabled="browseStatus || detailList.length > 0"
  98. style="width: 80%" placeholder="请选择" @change="fInwarehouseChange">
  99. <el-option v-for="(item, index) in warehouseOptions" :key="index.fId" :label="item.fName"
  100. :value="item.fId"></el-option>
  101. </el-select>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="8">
  105. <el-form-item label="新仓库" prop="fWarehouseid">
  106. <el-select v-model="form.fWarehouseid" filterable :disabled="browseStatus || detailList.length > 0"
  107. style="width: 80%" placeholder="请选择">
  108. <el-option v-for="(item, index) in warehouseOptions" :key="index.fId" :label="item.fName"
  109. :value="item.fId"></el-option>
  110. </el-select>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="8">
  114. <el-form-item label="单据编号" prop="fBillno">
  115. <el-input v-model="form.fBillno" style="width: 80%" disabled placeholder="单据编号" />
  116. </el-form-item>
  117. </el-col>
  118. </el-row>
  119. <el-row>
  120. <el-col :span="8">
  121. <el-form-item label="计划通关件数" prop="fPlanqty">
  122. <el-input v-model.number="form.fPlanqty" style="width: 80%" maxlength="9" laceholder="计划件数"
  123. :disabled="browseStatus || current !== before" />
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="8">
  127. <el-form-item label="计划通关净重(kg)" prop="fPlannetweight">
  128. <el-input v-model="form.fPlannetweight" style="width: 80%" maxlength="16" v-input-limit="2"
  129. laceholder="计划净重" :disabled="browseStatus || current !== before" @change="tfNetweight">
  130. <template slot="append">{{ tfNetweightnum }}吨</template>
  131. </el-input>
  132. </el-form-item>
  133. </el-col>
  134. <el-col :span="8">
  135. <el-form-item label="计划通关毛重(kg)" prop="fPlangrossweight">
  136. <el-input v-model="form.fPlangrossweight" v-input-limit="2" style="width: 80%" laceholder="计划毛重"
  137. maxlength="16" :disabled="browseStatus || current !== before" @change="tfGrossweight">
  138. <template slot="append">{{ tfGrossweightnum }}吨</template>
  139. </el-input>
  140. </el-form-item>
  141. </el-col>
  142. </el-row>
  143. <el-row v-if="detailsHidden2">
  144. <el-col :span="8">
  145. <el-form-item label="作业类型" prop="fBusinessType" v-if="dataShowcar == '1'">
  146. <el-select style="width: 80%" v-model="form.fBusinessType" filterable @change="educationChange" :disabled="
  147. contrOl ||
  148. browseStatus ||
  149. warehouseDrList.length > 0 ||
  150. warehouseCrList.length > 0
  151. ">
  152. <el-option v-for="(item, index) in businessTypeOption" :key="index.dictValue" :label="item.dictLabel"
  153. :value="item.dictValue"></el-option>
  154. </el-select>
  155. </el-form-item>
  156. <el-form-item label="结算方式" prop="fStltypeid" v-if="dataShowcar == '0'">
  157. <el-select v-model="form.fStltypeid" placeholder="请选择结算方式" clearable :disabled="browseStatus"
  158. style="width: 80%">
  159. <el-option v-for="(item, index) in fStltypeOptions" :key="index.dictValue" :label="item.dictLabel"
  160. :value="item.dictValue" />
  161. </el-select>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="8">
  165. <el-form-item label="劳务公司" prop="fLabour">
  166. <el-select style="width: 80%" v-model="form.fLabour" clearable filterable placeholder="请输入关键词"
  167. :disabled="contrOl || browseStatus">
  168. <el-option v-for="(item, index) in fCompanyOptIons" :key="index.fId" :label="item.fName"
  169. :value="item.fId"></el-option>
  170. </el-select>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="8">
  174. <el-form-item label="车队" prop="fFleet" :rules="{
  175. required: isrequired === 1 ? true : false,
  176. message: '请选择',
  177. trigger: ['blur', 'change'],
  178. }">
  179. <el-select style="width: 80%" v-model="form.fFleet" clearable filterable placeholder="请输入关键词"
  180. :disabled="contrOl || browseStatus">
  181. <el-option v-for="(item, index) in fleetOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  182. </el-option>
  183. </el-select>
  184. </el-form-item>
  185. </el-col>
  186. </el-row>
  187. <el-row v-if="detailsHidden2">
  188. <el-col :span="8">
  189. <el-form-item label="车号" prop="fTruckno" :rules="{
  190. required: isrequired2 === 1 ? true : false,
  191. message: '请选择',
  192. trigger: ['blur', 'change'],
  193. }">
  194. <el-input v-model="form.fTruckno" style="width: 80%" :disabled="browseStatus" placeholder="车号" />
  195. </el-form-item>
  196. </el-col>
  197. <el-col :span="8">
  198. <el-form-item label="司机姓名" prop="fDriverName" :rules="{
  199. required: isrequired2 === 1 ? true : false,
  200. message: '请选择',
  201. trigger: ['blur', 'change'],
  202. }">
  203. <el-input v-model="form.fDriverName" style="width: 80%" :disabled="browseStatus" placeholder="司机姓名" />
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="8">
  207. <el-form-item label="司机电话" prop="fDriverTel" :rules="{
  208. required: isrequired2 === 1 ? true : false,
  209. message: '请选择',
  210. trigger: ['blur', 'change'],
  211. }">
  212. <el-input v-model="form.fDriverTel" style="width: 80%" :disabled="browseStatus" placeholder="司机电话" />
  213. </el-form-item>
  214. </el-col>
  215. </el-row>
  216. <el-row>
  217. <el-col :span="8" v-if="detailsHidden2">
  218. <el-form-item label="司机身份证" prop="fDriverIdCar" :rules="{
  219. required: isrequired2 === 1 ? true : false,
  220. message: '请选择',
  221. trigger: ['blur', 'change'],
  222. }">
  223. <el-input v-model="form.fDriverIdCar" style="width: 80%" :disabled="browseStatus" placeholder="司机身份证" />
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="8">
  227. <el-form-item label="原贸易方式" prop="fTrademodeid">
  228. <el-select v-model="form.fTrademodeid" placeholder="请选择原贸易方式"
  229. :disabled="browseStatus || detailList.length > 0" clearable style="width: 80%">
  230. <el-option v-for="dict in fTrademodeidOptions" :key="dict.dictValue" :label="dict.dictLabel"
  231. :value="dict.dictValue" />
  232. </el-select>
  233. </el-form-item>
  234. </el-col>
  235. <el-col :span="8">
  236. <el-form-item label="新贸易方式" prop="fNewTrademodeid">
  237. <el-select v-model="form.fNewTrademodeid" placeholder="请选择新贸易方式"
  238. :disabled="browseStatus || clearanceDisabled" clearable style="width: 80%">
  239. <el-option v-for="dict in fTrademodeidOptions" :key="dict.dictValue" :label="dict.dictLabel"
  240. :value="dict.dictValue" />
  241. </el-select>
  242. </el-form-item>
  243. </el-col>
  244. </el-row>
  245. <el-row>
  246. <el-col :span="8">
  247. <el-form-item label="备注" prop="remark">
  248. <el-input style="width: 80%" v-model="form.remark" type="textarea" :disabled="browseStatus"
  249. placeholder="请输入内容" />
  250. </el-form-item>
  251. </el-col>
  252. <el-col :span="8">
  253. <el-form-item>
  254. <div style="display: flex; align-items: center">
  255. <el-table :data="CntrTable" style="width: 80%" :header-cell-style="{ lineHeight: '16px' }">
  256. <el-table-column prop="fCntrid " label="箱型" header-align="center" align="center">
  257. <template slot-scope="scope">
  258. <el-select placeholder="请选择箱型" v-model="scope.row.fCntrid" size="mini">
  259. <el-option v-for="(item, index) in cntrList" :key="index.fId" :label="item.fName"
  260. :value="item.fId">
  261. </el-option>
  262. </el-select>
  263. </template>
  264. </el-table-column>
  265. <el-table-column prop="fCntrcount" label="箱量" header-align="center" align="center">
  266. <template slot-scope="scope">
  267. <el-input placeholder="请输入箱量" v-model="scope.row.fCntrcount" size="mini">
  268. </el-input>
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="fCntrcount" label="操作" header-align="center" align="center" width="50">
  272. <template slot-scope="scope">
  273. <el-button size="mini" type="text" @click.native.prevent="deleteRow(scope.$index, CntrTable)"
  274. icon="el-icon-delete"></el-button>
  275. </template>
  276. </el-table-column>
  277. </el-table>
  278. <el-tag class="tag-hover" @click="addRow"><i class="el-icon-plus"></i></el-tag>
  279. </div>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="8">
  283. <el-form-item>
  284. <el-button @click="
  285. detailsHidden2
  286. ? (detailsHidden2 = false)
  287. : (detailsHidden2 = true)
  288. " v-if="dataShowcar == '0'">{{ detailsHidden2 ? "隐藏" : "更多" }}
  289. </el-button>
  290. <el-button @click="
  291. detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
  292. ">{{ detailsHidden ? "隐藏" : "展开" }}
  293. </el-button>
  294. </el-form-item>
  295. </el-col>
  296. </el-row>
  297. <div v-if="detailsHidden">
  298. <el-row style="margin-top: 30px">
  299. <el-col :span="8">
  300. <el-form-item label="仓库联系人" prop="fContacts">
  301. <el-input v-model="form.fContacts" style="width: 80%" :disabled="browseStatus" placeholder="仓库联系人" />
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="8">
  305. <el-form-item label="仓库电话" prop="fTel">
  306. <el-input v-model="form.fTel" :disabled="browseStatus" style="width: 80%" placeholder="请输仓库入电话" />
  307. </el-form-item>
  308. </el-col>
  309. </el-row>
  310. <el-row>
  311. <el-col :span="8">
  312. <el-form-item label="制单人" prop="createBy">
  313. <el-input disabled v-model="form.createBy" style="width: 80%" placeholder="制单人" />
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="8">
  317. <el-form-item label="制单部门" prop="fDeptid">
  318. <el-select v-model="form.fDeptid" filterable disabled style="width: 80%" remote>
  319. <el-option v-for="(item, index) in deptOptions" :key="index.deptId" :label="item.deptName"
  320. :value="item.deptId"></el-option>
  321. </el-select>
  322. </el-form-item>
  323. </el-col>
  324. <el-col :span="8">
  325. <el-form-item disabled label="制单日期" prop="createTime">
  326. <el-date-picker v-model="form.createTime" size="large" type="date" disabled style="width: 80%"
  327. value-format="timestamp" placeholder="制单日期">
  328. </el-date-picker>
  329. </el-form-item>
  330. </el-col>
  331. </el-row>
  332. <el-row>
  333. <el-col :span="8">
  334. <el-form-item label="品名" prop="fProductName">
  335. <el-input v-model="form.fProductName" style="width: 80%" disabled placeholder="品名" />
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="8">
  339. <el-form-item label="品牌">
  340. <el-input v-model="form.fMarks" style="width: 80%" disabled placeholder="品牌" />
  341. </el-form-item>
  342. </el-col>
  343. </el-row>
  344. </div>
  345. </el-form>
  346. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px" v-dialogDrag :close-on-click-modal="false">
  347. <template slot="title">
  348. <div class="avue-crud__dialog__header">
  349. <span class="el-dialog__title">
  350. <span style="
  351. display: inline-block;
  352. width: 3px;
  353. height: 20px;
  354. margin-right: 5px;
  355. float: left;
  356. margin-top: 2px;
  357. "></span>
  358. </span>
  359. </div>
  360. </template>
  361. <div>配置排序列数据(拖动调整顺序)</div>
  362. <div style="margin-left: 17px">
  363. <el-checkbox v-model="allCheck" label="全选" @change="allChecked"></el-checkbox>
  364. </div>
  365. <div style="padding: 4px; display: flex; justify-content: center">
  366. <draggable v-model="setRowList" group="site" animation="300" @start="onStart" @end="onEnd"
  367. handle=".indraggable">
  368. <transition-group>
  369. <div v-for="item in setRowList" :key="item.surface" class="listStyle">
  370. <div style="width: 500px" class="indraggable">
  371. <div class="progress" :style="{ width: item.width + 'px' }">
  372. <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
  373. }}
  374. </el-checkbox>
  375. </div>
  376. </div>
  377. <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
  378. </el-input-number>
  379. </div>
  380. </transition-group>
  381. </draggable>
  382. </div>
  383. <span slot="footer" class="dialog-footer">
  384. <el-button @click="showSetting = false">取 消</el-button>
  385. <el-button @click="delRow" type="danger">重 置</el-button>
  386. <el-button type="primary" @click="save()">确 定</el-button>
  387. </span>
  388. </el-dialog>
  389. <el-collapse v-model="collapselist">
  390. <el-collapse-item name="1">
  391. <template slot="title">
  392. <i class="el-icon-s-home" style="font-size: 16px"></i>
  393. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">通关明细</span>
  394. </template>
  395. <div>
  396. <el-row type="flex" justify="space-between" style="margin-bottom: 10px">
  397. <el-col>
  398. <el-button type="primary" :disabled="browseStatus" size="small" @click="addRelevant">导入库存
  399. </el-button>
  400. <el-button :disabled="browseStatus" type="primary" size="small" @click="saveForm">保 存</el-button>
  401. </el-col>
  402. <el-col style="display: flex; justify-content: flex-end">
  403. <el-button size="small" type="info" :disabled="browseStatus" v-if="entryPrinting == 0" prop="打印"
  404. @click="printZyd">作业单
  405. </el-button>
  406. <el-button size="small" v-if="entryPrinting == 0" :disabled="browseStatus" @click="discharge">叫车进场
  407. </el-button>
  408. <el-button size="small" :disabled="dataListSelection.length <= 0 || browseStatus || deliveryConfirmation"
  409. @click="creditClick">确认通关
  410. </el-button>
  411. <el-button size="small"
  412. :disabled="dataWithdrawList.length <= 0 || browseStatus || form.fBillstatus > 3 || cancelDelivery"
  413. @click.prevent="withdrawClick">撤回通关
  414. </el-button>
  415. <el-dropdown @command="handleCommand" style="margin-left: 10px">
  416. <el-button :disabled="browseStatus" size="small" type="success">
  417. 打印单据<i class="el-icon-arrow-down el-icon--right"></i>
  418. </el-button>
  419. <el-dropdown-menu slot="dropdown">
  420. <el-dropdown-item command="a">收货单</el-dropdown-item>
  421. <el-dropdown-item command="b">入库单</el-dropdown-item>
  422. <el-dropdown-item command="c">移库单</el-dropdown-item>
  423. </el-dropdown-menu>
  424. </el-dropdown>
  425. <div style="margin: 0 10px">
  426. <el-button icon="el-icon-setting" size="mini" circle @click="showSetting = !showSetting"></el-button>
  427. </div>
  428. </el-col>
  429. </el-row>
  430. <el-table :data="detailList" tooltip-effect="dark" stripe :summary-method="getSummaries"
  431. @selection-change="Selectinventory" show-summary>
  432. <el-table-column type="selection" width="55" align="center" fixed />
  433. <el-table-column label="序号" type="index" width="80" fixed />
  434. <el-table-column v-for="(item, index) in getRowList" :key="index" :label="item.name" :width="item.width"
  435. :prop="item.label" align="center" :fixed="item.fixed" sortable show-overflow-tooltip>
  436. <template slot-scope="scope">
  437. <span v-if="item.label == 'fBillstatus'">
  438. <span v-if="scope.row.fBillstatus === 10">计划</span>
  439. <span v-if="scope.row.fBillstatus === 20">待通关</span>
  440. <span v-if="scope.row.fBillstatus === 30">通关中</span>
  441. <span v-if="scope.row.fBillstatus === 40">已通关</span>
  442. </span>
  443. <span v-else-if="item.label == 'fBsdate'">
  444. <el-date-picker v-model="scope.row.fBsdate" style="width: 138px"
  445. :disabled="browseStatus || scope.row.fBillstatus >= 40" type="date" value-format="timestamp"
  446. placeholder="业务日期" format="yyyy-MM-dd">
  447. </el-date-picker>
  448. </span>
  449. <span v-else-if="item.label == 'fGoodsid'">
  450. {{ scope.row.fGoodsid | goodsFormat(goodsOptions) }}
  451. </span>
  452. <span v-else-if="item.label == 'fTransferWarehouselocid'">
  453. <el-input placeholder="请选择" :disabled="
  454. !form.fWarehouseid ||
  455. browseStatus ||
  456. scope.row.fBillstatus >= 40
  457. " v-model="scope.row.fWarehouseInformation" @focus="getTreeselect(scope)">
  458. </el-input>
  459. </span>
  460. <span v-else-if="item.label == 'fBusinessType'">
  461. <el-select v-model="scope.row.fBusinessType" filterable disabled placeholder="请选择商品属性">
  462. <el-option v-for="(item, index) in fStorageTypeOptions" :key="index.dictValue"
  463. :label="item.dictLabel" :value="item.dictValue" />
  464. </el-select>
  465. </span>
  466. <span v-else-if="item.label == 'fQty'">
  467. <el-input @change="qtyChange(scope.row)" v-model="scope.row.fQty"
  468. :disabled="browseStatus || scope.row.fBillstatus == 40" placeholder="出库件数" />
  469. </span>
  470. <span v-else-if="item.label == 'fGrossweight'">
  471. <el-input :disabled="browseStatus || scope.row.fBillstatus == 40" v-model="scope.row.fGrossweight"
  472. @change="changeOutStock(scope.row)" placeholder="出库毛重" />
  473. </span>
  474. <span v-else-if="item.label == 'fNetweight'">
  475. <el-input v-model="scope.row.fNetweight" :disabled="browseStatus || scope.row.fBillstatus == 40"
  476. @change="changeOutStock(scope.row)" placeholder="出库净重" />
  477. </span>
  478. <span v-else-if="item.label == 'fPackagespecs'">
  479. <el-input v-model="scope.row.fPackagespecs" :disabled="browseStatus || scope.row.fBillstatus >= 40"
  480. placeholder="包装规格" />
  481. </span>
  482. <span v-else-if="item.label == 'fCntrtype'">
  483. <el-input v-model="scope.row.fCntrtype" :disabled="browseStatus || scope.row.fBillstatus >= 40"
  484. placeholder="箱型" />
  485. </span>
  486. <span v-else-if="item.label == 'fCntqty'">
  487. <el-input
  488. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  489. v-model="scope.row.fCntqty" placeholder="箱量"
  490. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  491. </span>
  492. <span v-else-if="item.label == 'fGoodsval'">
  493. <el-input v-model="scope.row.fGoodsval" placeholder="货值"
  494. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  495. </span>
  496. <span v-else-if="item.label == 'fTruckno'">
  497. <el-input v-model="scope.row.fTruckno" placeholder="车号"
  498. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  499. </span>
  500. <span v-else-if="item.label == 'fDriverName'">
  501. <el-input v-model="scope.row.fDriverName" placeholder="司机名"
  502. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  503. </span>
  504. <span v-else-if="item.label == 'fDriverTel'">
  505. <el-input v-model="scope.row.fDriverTel" placeholder="司机电话"
  506. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  507. </span>
  508. <span v-else-if="item.label == 'fDriverIdCar'">
  509. <el-input v-model="scope.row.fDriverIdCar" placeholder="司机身份证"
  510. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  511. </span>
  512. <span v-else-if="item.label == 'fIsPass'">
  513. <el-select v-model="scope.row.fIsPass" placeholder="是否放行"
  514. :disabled="browseStatus || scope.row.fBillstatus == 40" style="width: 80%">
  515. <el-option v-for="(item, index) in releaseList" :key="index.dictValue" :label="item.dictLabel"
  516. :value="item.dictValue" />
  517. </el-select>
  518. </span>
  519. <span v-else-if="item.label == 'fFleet'">
  520. <el-select v-model="scope.row.fFleet" placeholder="车队"
  521. :disabled="browseStatus || scope.row.fBillstatus >= 40" style="width: 80%">
  522. <el-option v-for="(item, index) in fleetOptions" :key="index.fId" :label="item.fName"
  523. :value="item.fId"></el-option>
  524. </el-select>
  525. </span>
  526. <span v-else-if="item.label == 'fLntype'">
  527. <el-select v-model="scope.row.fLntype" placeholder="装卸方式"
  528. :disabled="browseStatus || scope.row.fBillstatus >= 40" style="width: 80%">
  529. <el-option v-for="(item, index) in unloadModes" :key="index.dictValue" :label="item.dictLabel"
  530. :value="item.dictValue" />
  531. </el-select>
  532. </span>
  533. <span v-else-if="item.label == 'fForkliftman'">
  534. <el-input v-model="scope.row.fForkliftman" placeholder="叉车工"
  535. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  536. </span>
  537. <span v-else-if="item.label == 'fStevedore'">
  538. <el-input v-model="scope.row.fStevedore" placeholder="装卸工"
  539. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  540. </span>
  541. <span v-else-if="item.label == 'fLocalcntrno'">
  542. <el-input v-model="scope.row.fLocalcntrno" placeholder="库内箱号"
  543. :disabled="browseStatus || scope.row.fBillstatus >= 40" v-Alphabet />
  544. </span>
  545. <span v-else-if="item.label == 'fSealno'">
  546. <el-input v-model="scope.row.fSealno" placeholder="封号"
  547. :disabled="browseStatus || scope.row.fBillstatus >= 40" />
  548. </span>
  549. <span v-else-if="item.label == 'remark'">
  550. <el-input v-model="scope.row.remark" placeholder="备注" :disabled="browseStatus" show-word-limit />
  551. </span>
  552. <span v-else>{{ scope.row[item.label] }}</span>
  553. </template>
  554. </el-table-column>
  555. <el-table-column header-align="center" align="center" label="操作" width="130px" fixed="right">
  556. <template slot-scope="scope">
  557. <el-button :disabled="
  558. browseStatus ||
  559. scope.row.fBillstatus === 20 ||
  560. scope.row.fBillstatus === 30 ||
  561. scope.row.fBillstatus === 40
  562. " type="text" @click.native.prevent="wDeleteRow(scope.$index, detailList)" size="small">移除
  563. </el-button>
  564. </template>
  565. </el-table-column>
  566. </el-table>
  567. </div>
  568. </el-collapse-item>
  569. <el-collapse-item>
  570. <template slot="title">
  571. <i class="el-icon-s-order" style="font-size: 16px"></i>
  572. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">附件明细</span>
  573. </template>
  574. <up-load :relevantAttachments="relevantAttachments" :createBy="form.createBy" :browseStatus="browseStatus">
  575. </up-load>
  576. </el-collapse-item>
  577. <el-collapse-item>
  578. <template slot="title">
  579. <i class="el-icon-circle-plus" style="font-size: 16px"></i>
  580. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">收款信息</span>
  581. </template>
  582. <income-money :browseStatus="browseStatus" @chiSave="saveForm" @chiAdd="addCollection" @feeChangeD="feeChange"
  583. :warehouseDrList="warehouseDrList" :businessTypeOption="businessTypeOption" :fDNameOptions="fDNameOptions"
  584. :fMblnoOptions="fMblnoOptions" :fFeetUnitOptions="fFeetUnitOptions" :fStltypeOptions="fStltypeOptions"
  585. :fGrossweight="fGrossweight" :fQty="fQty" :fNetweight="fNetweight" :fCntqty="fCntqty" :form="form"
  586. :company="company" :CntrTable="CntrTable" :cntrList="cntrList" :goodsOptions="goodsOptions"
  587. :fCompanyName="fCompanyName" :printFeeConfirm="printFeeConfirm" tableName="货物通关收款"></income-money>
  588. </el-collapse-item>
  589. <el-collapse-item>
  590. <template slot="title">
  591. <i class="el-icon-remove" style="font-size: 16px"></i>
  592. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">付款信息</span>
  593. </template>
  594. <pay-money :browseStatus="browseStatus" @chiSave="saveForm" @chiAdd="addpayment" @checkRow="checkRow"
  595. @revokeRow="revokeRow" @feeChangeC="feeChange" :warehouseCrList="warehouseCrList"
  596. :businessTypeOption="businessTypeOption" :fCNameOptions="fCNameOptions" :fMblnoOptions="fMblnoOptions"
  597. :fFeetUnitOptions="fFeetUnitOptions" :fStltypeOptions="fStltypeOptions" :fGrossweight="fGrossweight"
  598. :fQty="fQty" :fNetweight="fNetweight" :fCntqty="fCntqty" :form="form" :goodsOptions="goodsOptions"
  599. :CntrTable="CntrTable" :cntrList="cntrList" tableName="货物通关付款"></pay-money>
  600. </el-collapse-item>
  601. </el-collapse>
  602. <el-dialog title="在库物资" :modal="false" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  603. :visible.sync="whgenlegVisible" width="85%" @close="init2()" v-dialogDrag :close-on-click-modal="false">
  604. <el-dialog title="自定义列显示" :visible.sync="showSetting2" width="700px" v-dialogDrag append-to-body
  605. :close-on-click-modal="false">
  606. <template slot="title">
  607. <div class="avue-crud__dialog__header">
  608. <span class="el-dialog__title">
  609. <span style="
  610. display: inline-block;
  611. width: 3px;
  612. height: 20px;
  613. margin-right: 5px;
  614. float: left;
  615. margin-top: 2px;
  616. "></span>
  617. </span>
  618. </div>
  619. </template>
  620. <div>配置排序列数据(拖动调整顺序)</div>
  621. <div style="margin-left: 17px">
  622. <el-checkbox v-model="allCheck2" label="全选" @change="allChecked2"></el-checkbox>
  623. </div>
  624. <div style="padding: 4px; display: flex; justify-content: center">
  625. <draggable v-model="setRowList2" group="site" animation="300" @start="onStart" @end="onEnd"
  626. handle=".indraggable">
  627. <transition-group>
  628. <div v-for="item in setRowList2" :key="item.surface" class="listStyle">
  629. <div style="width: 500px" class="indraggable">
  630. <div class="progress" :style="{ width: item.width + 'px' }">
  631. <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
  632. }}
  633. </el-checkbox>
  634. </div>
  635. </div>
  636. <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
  637. </el-input-number>
  638. </div>
  639. </transition-group>
  640. </draggable>
  641. </div>
  642. <span slot="footer" class="dialog-footer">
  643. <el-button @click="showSetting2 = false">取 消</el-button>
  644. <el-button @click="delRow2" type="danger">重 置</el-button>
  645. <el-button type="primary" @click="save2()">确 定</el-button>
  646. </span>
  647. </el-dialog>
  648. <el-form ref="whgenlegParams" :model="whgenlegParams">
  649. <el-row>
  650. <el-col :span="5">
  651. <el-form-item label="提单号" prop="fMblno" label-width="70px">
  652. <el-input v-model="whgenlegParams.fMblno" placeholder="请输入提单号" clearable />
  653. </el-form-item>
  654. </el-col>
  655. <el-col :span="5">
  656. <el-form-item label="箱号" prop="fCntrno" label-width="70px">
  657. <el-input v-model="whgenlegParams.fCntrno" placeholder="请输入箱号" clearable />
  658. </el-form-item>
  659. </el-col>
  660. <el-col :span="10">
  661. <el-form-item label="入库日期区间" prop="orgStorageDate" label-width="120px">
  662. <el-date-picker style="width: 80%" v-model="whgenlegParams.orgStorageDate" type="daterange"
  663. start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"
  664. :default-time="['00:00:00', '23:59:59']">
  665. </el-date-picker>
  666. </el-form-item>
  667. </el-col>
  668. <el-col :span="2">
  669. <el-button type="cyan" icon="el-icon-search" @click="getDetailsList()">搜索</el-button>
  670. </el-col>
  671. <el-col :span="2" style="display: flex; justify-content: flex-end">
  672. <el-button icon="el-icon-setting" circle @click="showSetting2 = !showSetting2"></el-button>
  673. </el-col>
  674. </el-row>
  675. </el-form>
  676. <el-table :data="whgenlegList" ref="tableDialog" tooltip-effect="dark" width="100%" stripe
  677. @selection-change="whgenlegSelectionChange" :height="tableHeight">
  678. <el-table-column type="selection" width="50"> </el-table-column>
  679. <el-table-column v-for="(item, index) in getRowList2" :key="index" :label="item.name" :width="item.width"
  680. :prop="item.label" align="center" :fixed="item.fixed" sortable>
  681. <template slot-scope="scope">
  682. <span v-if="item.label == 'fQtyblc2'">
  683. <el-input @change="qtyChange(scope.row)" v-model="scope.row.fQtyblc2" placeholder="件数" />
  684. </span>
  685. <span v-else-if="item.label == 'fGrossweightblc2'">
  686. <el-input v-model="scope.row.fGrossweightblc2" @change="changeOutStock(scope.row)" placeholder="毛重" />
  687. </span>
  688. <span v-else-if="item.label == 'fNetweightblc2'">
  689. <el-input v-model="scope.row.fNetweightblc2" @change="changeOutStock(scope.row)" placeholder="净重" />
  690. </span>
  691. <span v-else>{{ scope.row[item.label] }}</span>
  692. </template>
  693. </el-table-column>
  694. </el-table>
  695. <pagination v-show="whgenlegTotal > 0" :total="whgenlegTotal" :page.sync="whgenlegParams.pageNum"
  696. :limit.sync="whgenlegParams.pageSize" @pagination="getDetailsList" />
  697. <div slot="footer" class="dialog-footer">
  698. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  699. <el-button @click="whgenlegVisible = false">取 消</el-button>
  700. </div>
  701. </el-dialog>
  702. <el-dialog :visible.sync="print_zyd" width="70%" :close-on-click-modal="false" :modal="false">
  703. <div id="print_area1" class="print-div">
  704. <div class="print-title" style="
  705. display: flex;
  706. justify-content: center;
  707. font-size: 24px;
  708. margin-bottom: 5px;
  709. ">
  710. {{ company }}作业单
  711. </div>
  712. <div style="
  713. display: flex;
  714. justify-content: center;
  715. font-size: 18px;
  716. margin-bottom: 5px;
  717. "></div>
  718. <div class="print_table" style="display: flex">
  719. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  720. <tr>
  721. <td>作业类型</td>
  722. <td colspan="2">
  723. {{ form.fBusinessType | fBusinessTypeFormat }}
  724. </td>
  725. <td>入库时间</td>
  726. <td colspan="2"></td>
  727. </tr>
  728. <tr>
  729. <td>车号</td>
  730. <td>物品名称</td>
  731. <td>提单号</td>
  732. <td>品牌/规格/产地</td>
  733. <td>净重(KG)</td>
  734. <td>件数/规格</td>
  735. </tr>
  736. <tr v-for="(item, index) in Printinglist" :key="index">
  737. <td>{{ item.fTruckno }}</td>
  738. <td>{{ item.fGoodsids }}</td>
  739. <td>{{ item.fMblno }}</td>
  740. <td>
  741. {{ item.fBusinessType | fStorageFormat }}/{{ item.fMarks }}
  742. </td>
  743. <td>{{ item.fNetweight }}</td>
  744. <td>{{ item.fQty }}/{{ item.fPackagespecs }}</td>
  745. </tr>
  746. <tr>
  747. <td>备注</td>
  748. <td colspan="5"></td>
  749. </tr>
  750. <tr v-for="(item, index) in Collectionoptionss" :key="index">
  751. <td>收费</td>
  752. <td colspan="2">{{ item.fFeeids }}</td>
  753. <td colspan="3">{{ item.fAmount }} 元</td>
  754. </tr>
  755. <tr>
  756. <td>司机签字</td>
  757. <td></td>
  758. <td>电话</td>
  759. <td>{{ fDriverTel }}</td>
  760. <td colspan="2" rowspan="2">
  761. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  762. </td>
  763. </tr>
  764. <tr>
  765. <td>制表</td>
  766. <td>{{ form.createBy }}</td>
  767. <td>机械/人工</td>
  768. <td></td>
  769. </tr>
  770. <tr>
  771. <td>地址</td>
  772. <td colspan="2">{{ stockaddr }}</td>
  773. <td>电话</td>
  774. <td colspan="2">{{ form.fTel }}</td>
  775. </tr>
  776. </table>
  777. </div>
  778. </div>
  779. <span lot="footer" class="dialog-footer">
  780. <el-button type="primary" size="mini" :disabled="browseStatus" @click="
  781. print_zyd = false;
  782. addprint('zyd');
  783. ">打印
  784. </el-button>
  785. <el-button @click="print_zyd = false" size="mini">取消 </el-button>
  786. </span>
  787. </el-dialog>
  788. <el-dialog :visible.sync="print_rkd" width="70%" :close-on-click-modal="false" :modal="false">
  789. <div id="print_area1" class="print-div">
  790. <div class="print-title" style="
  791. display: flex;
  792. justify-content: center;
  793. font-size: 24px;
  794. margin-bottom: 5px;
  795. ">
  796. {{ company }}进仓单
  797. </div>
  798. <div class="print_table" style="display: flex">
  799. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  800. <tr>
  801. <td>客户</td>
  802. <td>{{ form.fCorpidName }}</td>
  803. <td>仓库</td>
  804. <td>{{ form.fWarehouseids }}</td>
  805. <td>地址</td>
  806. <td colspan="2">{{ stockaddr }}</td>
  807. </tr>
  808. <tr>
  809. <td>保管方</td>
  810. <td width="200">{{ company }}</td>
  811. <td>联系人</td>
  812. <td>{{ form.fContacts }}</td>
  813. <td>电话</td>
  814. <td colspan="2">{{ form.fTel }}</td>
  815. </tr>
  816. <tr>
  817. <td>提单号</td>
  818. <td>品名</td>
  819. <td>箱型</td>
  820. <td>品牌</td>
  821. <td>件数</td>
  822. <td>重量</td>
  823. <td>包装规格</td>
  824. </tr>
  825. <tr>
  826. <td></td>
  827. <td></td>
  828. <td></td>
  829. <td></td>
  830. <td></td>
  831. <td></td>
  832. <td></td>
  833. </tr>
  834. <tr>
  835. <td>序号</td>
  836. <td>入货日期</td>
  837. <td>箱量(20GP)</td>
  838. <td>重量</td>
  839. <td>件数</td>
  840. <td>入库重量</td>
  841. <td>入库件数</td>
  842. </tr>
  843. <tr v-for="(item, index) in Printinglist" :key="index">
  844. <td>{{ index + 1 }}</td>
  845. <td>{{ item.fBsdate }}</td>
  846. <td>{{ item.fCntqty }}</td>
  847. <td v-if="item.fGrossweight">
  848. {{ (item.fGrossweight / 1000).toFixed(2) }}
  849. </td>
  850. <td v-else></td>
  851. <td>{{ item.fPlanqty }}</td>
  852. <td v-if="item.fNetweight">
  853. {{ (item.fNetweight / 1000).toFixed(2) }}
  854. </td>
  855. <td v-else></td>
  856. <td>{{ item.fQty }}</td>
  857. </tr>
  858. <tr>
  859. <td colspan="2">合计</td>
  860. <td>{{ allfCntqty }}</td>
  861. <td>{{ (allfGrossweight / 1000).toFixed(2) }}</td>
  862. <td>{{ allfPlanqty }}</td>
  863. <td>{{ (allfNetweight / 1000).toFixed(2) }}</td>
  864. <td>{{ allfQty }}</td>
  865. </tr>
  866. <tr>
  867. <td>备注</td>
  868. <td colspan="6"></td>
  869. </tr>
  870. <tr>
  871. <td colspan="7">
  872. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  873. </td>
  874. </tr>
  875. </table>
  876. </div>
  877. <div style="display: flex; justify-content: space-between; font-size: 12px">
  878. <div>开单员:</div>
  879. <div style="width: 150px">仓管员:</div>
  880. </div>
  881. <div style="display: flex; justify-content: space-between; font-size: 12px">
  882. <div>开单时间:</div>
  883. <div style="width: 150px">(盖章)</div>
  884. </div>
  885. </div>
  886. <span slot="footer" class="dialog-footer">
  887. <el-button type="primary" :disabled="browseStatus" @click="
  888. print_rkd = false;
  889. addprint();
  890. ">打印
  891. </el-button>
  892. <el-button @click="print_rkd = false">取消 </el-button>
  893. </span>
  894. </el-dialog>
  895. <el-dialog :visible.sync="print_shd" width="70%" :close-on-click-modal="false" :modal="false">
  896. <div id="print_area1" class="print-div">
  897. <div class="print-title" style="
  898. display: flex;
  899. justify-content: center;
  900. font-size: 24px;
  901. margin-bottom: 5px;
  902. ">
  903. {{ company }}收货单
  904. </div>
  905. <div class="print_table" style="display: flex">
  906. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  907. <tr>
  908. <td>车号</td>
  909. <td>{{ fTruckno }}</td>
  910. <td>日期</td>
  911. <td>{{ fBsdate }}</td>
  912. </tr>
  913. <tr v-for="(item, index) in Printinglist" :key="index">
  914. <td>货物品名</td>
  915. <td>{{ item.fGoodsids }}</td>
  916. <td>件数</td>
  917. <td>{{ item.fQty }}件</td>
  918. </tr>
  919. <tr>
  920. <td>备注</td>
  921. <td colspan="3"></td>
  922. </tr>
  923. <tr>
  924. <td>司机签字</td>
  925. <td></td>
  926. <td>司机电话</td>
  927. <td>{{ fDriverTel }}</td>
  928. </tr>
  929. <tr>
  930. <td>制单人</td>
  931. <td>{{ form.createBy }}</td>
  932. <td>收货人</td>
  933. <td>{{ form.fContacts }}</td>
  934. </tr>
  935. <tr>
  936. <td>地址</td>
  937. <td>{{ stockaddr }}</td>
  938. <td>电话</td>
  939. <td>{{ form.fTel }}</td>
  940. </tr>
  941. </table>
  942. </div>
  943. </div>
  944. <span slot="footer" class="dialog-footer">
  945. <el-button type="primary" :disabled="browseStatus" @click="
  946. addprint();
  947. print_shd = false;
  948. ">打印
  949. </el-button>
  950. <el-button @click="print_shd = false">取消 </el-button>
  951. </span>
  952. </el-dialog>
  953. <el-dialog :visible.sync="print_ykd" width="70%" :close-on-click-modal="false" :modal="false">
  954. <div id="print_area1" class="print-div">
  955. <div class="print-title" style="
  956. display: flex;
  957. justify-content: center;
  958. font-size: 24px;
  959. margin-bottom: 5px;
  960. ">
  961. {{ company }}
  962. </div>
  963. <div style="
  964. display: flex;
  965. justify-content: center;
  966. font-size: 18px;
  967. margin-bottom: 5px;
  968. ">
  969. <div>移&nbsp;库&nbsp;单</div>
  970. </div>
  971. <div style="
  972. display: flex;
  973. justify-content: space-between;
  974. margin-bottom: 5px;
  975. " class="print_form">
  976. <div>
  977. <div>业务编号:{{ form.fCustomno }}</div>
  978. <div>通关日期:{{ form.fChargedate }}</div>
  979. </div>
  980. <div>
  981. <div>客户名称:{{ form.fCorpidName }}</div>
  982. <div>提单号:{{ form.fMblno }}</div>
  983. </div>
  984. <div>
  985. <div>存放地址:{{ stockName }}</div>
  986. <div>通关:</div>
  987. </div>
  988. </div>
  989. <div class="print_table" style="display: flex">
  990. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  991. <tr>
  992. <td>箱号</td>
  993. <td>现存库区</td>
  994. <td>件数</td>
  995. <td>毛重</td>
  996. <td>净重</td>
  997. <td>移入库区</td>
  998. </tr>
  999. <tr v-for="(item, index) in Printinglist" :key="index">
  1000. <td>{{ item.fCntrno }}</td>
  1001. <td>{{ item.fOrgwarehouseInformation }}</td>
  1002. <td>{{ item.fQty }}</td>
  1003. <td>{{ item.fGrossweight }}</td>
  1004. <td>{{ item.fNetweight }}</td>
  1005. <td>{{ item.fWarehouseInformation }}</td>
  1006. </tr>
  1007. </table>
  1008. </div>
  1009. <div style="display: flex; justify-content: space-between; font-size: 12px">
  1010. <div>库管:{{ form.fContacts }}</div>
  1011. <div style="width: 100px">叉车:</div>
  1012. </div>
  1013. </div>
  1014. <span slot="footer" class="dialog-footer">
  1015. <el-button type="primary" :disabled="browseStatus" @click="
  1016. addprint();
  1017. print_ykd = false;
  1018. ">打印
  1019. </el-button>
  1020. <el-button @click="print_ykd = false">取消 </el-button>
  1021. </span>
  1022. </el-dialog>
  1023. <!-- 选择作业费协议数据 -->
  1024. <el-dialog v-dialogDrag title="作业费协议" :close-on-click-modal="false" :modal="false"
  1025. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important" :visible.sync="warehousingagreements" width="70%">
  1026. <template slot="作业费协议">
  1027. <div class="avue-crud__dialog__header">
  1028. <span class="el-dialog__title">
  1029. <span style="
  1030. display: inline-block;
  1031. width: 3px;
  1032. height: 20px;
  1033. margin-right: 5px;
  1034. float: left;
  1035. margin-top: 2px;
  1036. "></span>
  1037. </span>
  1038. </div>
  1039. </template>
  1040. <el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal"
  1041. @select="handleSelect">
  1042. <el-menu-item index="1">车队作业费</el-menu-item>
  1043. <el-menu-item index="2">劳务作业费</el-menu-item>
  1044. </el-menu>
  1045. <el-table :data="tasklegList" ref="table" tooltip-effect="dark" width="100%" border stripe
  1046. @selection-change="whgenlegSelectionChange">
  1047. <el-table-column type="selection" width="55"> </el-table-column>
  1048. <el-table-column label="行号" type="index" width="80">
  1049. </el-table-column>
  1050. <el-table-column prop="fCorpname" header-align="center" align="center" label="客户名称" />
  1051. <el-table-column prop="fName" header-align="center" align="center" label="费用名称" />
  1052. <el-table-column prop="fFeeUnitid" header-align="center" align="center" width="180px" label="计价单位">
  1053. <template slot-scope="scope">
  1054. <el-select v-model="scope.row.fFeeUnitid" placeholder="请选择计价单位" @change="changeFeeUnit(scope.row)" disabled
  1055. clearable>
  1056. <el-option v-for="(dict, index) in fFeetUnitOptions" :key="index.dictValue" :label="dict.dictLabel"
  1057. :value="dict.dictValue" />
  1058. </el-select>
  1059. </template>
  1060. </el-table-column>
  1061. <el-table-column prop="fPrice" header-align="center" align="center" label="单价" />
  1062. </el-table>
  1063. <pagination v-show="whgenlegTotal > 0" :total="whgenlegTotal" :page.sync="pageNum" :limit.sync="pageSize"
  1064. @pagination="getWhgenlegList(key_id)" />
  1065. <div slot="footer" class="dialog-footer">
  1066. <el-button type="primary" @click="zhgenlegData" :disabled="browseStatus">导 入</el-button>
  1067. <el-button @click="
  1068. warehousingagreements = false;
  1069. Navigation = false;
  1070. ">取 消</el-button>
  1071. </div>
  1072. </el-dialog>
  1073. <el-dialog title="选择库位" :data="treeselectList" :visible.sync="choiceWarehouse" width="30%"
  1074. :before-close="hanDleclose">
  1075. <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions"
  1076. :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
  1077. <span slot="footer" class="dialog-footer">
  1078. <el-button @click="choiceWarehouse = false">取 消</el-button>
  1079. <el-button type="primary" @click="confirm">确 定</el-button>
  1080. </span>
  1081. </el-dialog>
  1082. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  1083. <!-- 弹窗, 新增 / 修改 -->
  1084. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1085. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1086. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3"
  1087. @click="addOrUpdateHandle(form, 'f_billstatus')">查看审批</el-button>
  1088. <el-button type="primary" v-if="approVal === true" @click="addOrUpdateHand(form, 'f_billstatus')">审批</el-button>
  1089. <el-button :disabled="browseStatus" type="primary" @click="saveForm()">保 存</el-button>
  1090. <el-button :disabled="browseStatus" style="background-color: #008000; color: #fff" @click="submitForm()">请核
  1091. </el-button>
  1092. <el-button type="danger" v-if="form.fBillstatus === 6" @click="revoke" v-hasPermi="['warehouseBusiness:revoke']">
  1093. 撤销请核</el-button>
  1094. <el-button type="danger" v-if="form.fBillstatus === 4 && current == before" :disabled="doNot"
  1095. @click="revokeTwo('f_billstatus')">撤销审批</el-button>
  1096. <el-button @click="cancel">取 消</el-button>
  1097. </div>
  1098. </div>
  1099. </template>
  1100. <script>
  1101. // import print from "print-js";
  1102. // import {
  1103. // backFee,
  1104. // RevocationApproval,
  1105. // addWhgenleg,
  1106. // getStockTransferList,
  1107. // getStockTransfer,
  1108. // delStockTransfer,
  1109. // updateCredit,
  1110. // addJoblist,
  1111. // disChargelist,
  1112. // addStockTransfer,
  1113. // warehouseSubmission,
  1114. // updateStockTransfer,
  1115. // exportStockTransfer,
  1116. // delstockTransfer_s,
  1117. // serialNumber,
  1118. // revoke,
  1119. // submitWarehousingApproval,
  1120. // ordersRevoke,
  1121. // checkCode,
  1122. // feesCheck,
  1123. // revokefeeCheck
  1124. // } from "@/api/warehouseBusiness/stockTransfer";
  1125. // import { operationAgreement } from "@/api/agreement/agreement";
  1126. // import { listCorps, getCorps } from "@/api/basicdata/corps";
  1127. // import { listFees, getFees } from "@/api/basicdata/fees";
  1128. // import {
  1129. // listWarehouse,
  1130. // treeselect,
  1131. // listWarehousesss,
  1132. // } from "@/api/basicdata/warehouse";
  1133. // import { listGoods } from "@/api/basicdata/goods";
  1134. // import { listCntrs } from "@/api/basicdata/cntr";
  1135. // import { listUser, queryUserVal } from "@/api/system/user";
  1136. // import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  1137. // import ApprovalComments from "@/views/startApproval";
  1138. // import AddOrUpdate from "@/views/viewApproval";
  1139. // import Treeselect from "@riophae/vue-treeselect";
  1140. // import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  1141. // import UploadFile from "@/components/Uploadfile";
  1142. import Cookies from "js-cookie";
  1143. // import { addSet, select, resetModule } from "@/api/system/set";
  1144. import draggable from "vuedraggable";
  1145. // import upLoad from "../components/upLoad";
  1146. // import incomeMoney from '../components/incomeMoney'
  1147. // import payMoney from '../components/payMoney'
  1148. export default {
  1149. name: "inStock",
  1150. props: {
  1151. chiId: {
  1152. type: Number,
  1153. required: null,
  1154. },
  1155. copyStatus: {
  1156. type: Number,
  1157. required: null,
  1158. },
  1159. },
  1160. components: {
  1161. // UploadFile,
  1162. // Treeselect,
  1163. // AddOrUpdate,
  1164. // ApprovalComments,
  1165. draggable,
  1166. // upLoad,
  1167. // incomeMoney,
  1168. // payMoney,
  1169. },
  1170. data() {
  1171. return {
  1172. pageNum: 1,
  1173. pageSize: 10,
  1174. dialogWhgenlegList: [],
  1175. tasklegList: [],
  1176. Navigation: false,
  1177. key_id: "",
  1178. warehousingagreements: false,
  1179. mblnoStatus: "",
  1180. selectloading: false,
  1181. fMblnoOptions: [],
  1182. warehouseDrList: [],
  1183. relevantAttachments: [],
  1184. warehouseCrList: [],
  1185. fStltypeOptions: [],
  1186. form: {},
  1187. rules: {
  1188. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  1189. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  1190. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1191. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  1192. fMarks: [{ required: true, message: " ", trigger: "blur" }],
  1193. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  1194. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  1195. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  1196. fBusinessType: [{ required: true, message: " ", trigger: "blur" }],
  1197. fStorekeeper: { required: true, message: " ", trigger: "blur" },
  1198. fInwarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  1199. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  1200. fbillingway: [{ required: true, message: " ", trigger: "blur" }],
  1201. fTocorpid: [{ required: true, message: " ", trigger: "blur" }],
  1202. fFeetUnit: [{ required: true, message: " ", trigger: "blur" }],
  1203. fNewTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  1204. },
  1205. browseStatus: false,
  1206. goodsOptions: [],
  1207. warehouseOptions: [],
  1208. userOptions: [],
  1209. businessTypeOption: [],
  1210. fCompanyOptIons: [],
  1211. fleetOptions: [],
  1212. fFeetUnitOptions: [],
  1213. current: "",
  1214. before: "",
  1215. contrOl: false,
  1216. isrequired: 2,
  1217. isrequired2: 2,
  1218. detailsHidden: false,
  1219. CntrTable: [],
  1220. cntrList: [],
  1221. fTrademodeidOptions: [],
  1222. fIfweighOptions: [],
  1223. fSbuOptions: [],
  1224. collapselist: ["1"],
  1225. fStorageTypeOptions: [],
  1226. weightList: false,
  1227. sumMum: 0,
  1228. detailList: [],
  1229. fWarehouseidOptions: [],
  1230. print_zyd: false,
  1231. print_shd: false,
  1232. print_rkd: false,
  1233. print_ykd: false,
  1234. company: "",
  1235. Printinglist: [],
  1236. //库位
  1237. stockName: "",
  1238. //库位地址
  1239. stockaddr: "",
  1240. Collectionoptionss: [],
  1241. fDriverTel: "",
  1242. fBsdate: "",
  1243. fTruckno: "",
  1244. allfCntqty: 0,
  1245. allfGrossweight: 0,
  1246. allfPlanqty: 0,
  1247. allfNetweight: 0,
  1248. allfQty: 0,
  1249. fixdetaiNum: null,
  1250. dataListSelection: [],
  1251. dataWithdrawList: [],
  1252. title: "",
  1253. fCNameOptions: [],
  1254. fDNameOptions: [],
  1255. whgenlegTotal: 0,
  1256. fGrossweight: 0,
  1257. fQty: 0,
  1258. fNetweight: 0,
  1259. fCntqty: 0,
  1260. activeIndex: "1",
  1261. ifCntrnoStatus: null,
  1262. addOrUpdateVisible: false,
  1263. addOrUpdateVisib: false,
  1264. approVal: false,
  1265. approvalStatus: false,
  1266. doNot: false,
  1267. fCartypeOptions: [],
  1268. fIfdamageOptions: [],
  1269. tableHeight: '600',
  1270. whgenlegList: [],
  1271. releaseList: [
  1272. { dictLabel: "已放行", dictValue: "T" },
  1273. { dictLabel: "未放行", dictValue: "F" },
  1274. ],
  1275. whgenlegVisible: false,
  1276. whgenlegParams: {
  1277. pageNum: 1,
  1278. pageSize: 10,
  1279. fCorpid: null,
  1280. fWarehouseid: null,
  1281. fTruckno: null,
  1282. fCntrno: null,
  1283. fMblno: null,
  1284. orgStorageDate: null,
  1285. },
  1286. choiceWarehouse: false,
  1287. treeselectList: {
  1288. fWarehouselocid: null,
  1289. },
  1290. TreeIndex: "",
  1291. drag: false,
  1292. tableDate: [
  1293. {
  1294. surface: "0",
  1295. label: "fBillstatus",
  1296. name: "状态",
  1297. checked: 0,
  1298. width: 80,
  1299. fixed: "left",
  1300. },
  1301. {
  1302. surface: "1",
  1303. label: "fBsdate",
  1304. name: "通关日期",
  1305. checked: 0,
  1306. width: 200,
  1307. fixed: "left",
  1308. },
  1309. {
  1310. surface: "2",
  1311. label: "fMblno",
  1312. name: "提单号",
  1313. checked: 0,
  1314. width: 100,
  1315. },
  1316. {
  1317. surface: "3",
  1318. label: "fGoodsid",
  1319. name: "品名",
  1320. checked: 0,
  1321. width: 100,
  1322. },
  1323. {
  1324. surface: "4",
  1325. label: "fBusinessType",
  1326. name: "货物属性",
  1327. checked: 0,
  1328. width: 100,
  1329. },
  1330. {
  1331. surface: "5",
  1332. label: "fMarks",
  1333. name: "属性详情",
  1334. checked: 0,
  1335. width: 100,
  1336. },
  1337. {
  1338. surface: "6",
  1339. label: "fOrgwarehouseInformation",
  1340. name: "库位",
  1341. checked: 0,
  1342. width: 150,
  1343. },
  1344. {
  1345. surface: "7",
  1346. label: "fTransferWarehouselocid",
  1347. name: "调入库位",
  1348. checked: 0,
  1349. width: 100,
  1350. },
  1351. {
  1352. surface: "8",
  1353. label: "fPlanqty",
  1354. name: "结余库存",
  1355. checked: 0,
  1356. width: 100,
  1357. },
  1358. {
  1359. surface: "9",
  1360. label: "fPlangrossweight",
  1361. name: "结余毛重(kg)",
  1362. checked: 0,
  1363. width: 120,
  1364. },
  1365. {
  1366. surface: "10",
  1367. label: "fPlannetweight",
  1368. name: "结余净重(kg)",
  1369. checked: 0,
  1370. width: 120,
  1371. },
  1372. {
  1373. surface: "11",
  1374. label: "fQty",
  1375. name: "通关件数",
  1376. checked: 0,
  1377. width: 100,
  1378. },
  1379. {
  1380. surface: "12",
  1381. label: "fGrossweight",
  1382. name: "通关毛重(kg)",
  1383. checked: 0,
  1384. width: 120,
  1385. },
  1386. {
  1387. surface: "13",
  1388. label: "fNetweight",
  1389. name: "通关净重(kg)",
  1390. checked: 0,
  1391. width: 120,
  1392. },
  1393. {
  1394. surface: "14",
  1395. label: "fPackagespecs",
  1396. name: "包装规格",
  1397. checked: 0,
  1398. width: 100,
  1399. },
  1400. {
  1401. surface: "15",
  1402. label: "fFleet",
  1403. name: "车队",
  1404. checked: 0,
  1405. width: 100,
  1406. },
  1407. {
  1408. surface: "16",
  1409. label: "fTruckno",
  1410. name: "车号",
  1411. checked: 0,
  1412. width: 100,
  1413. },
  1414. {
  1415. surface: "17",
  1416. label: "fDriverName",
  1417. name: "司机名称",
  1418. checked: 0,
  1419. width: 100,
  1420. },
  1421. {
  1422. surface: "18",
  1423. label: "fDriverTel",
  1424. name: "司机电话",
  1425. checked: 0,
  1426. width: 100,
  1427. },
  1428. {
  1429. surface: "19",
  1430. label: "fDriverIdCar",
  1431. name: "司机身份证",
  1432. checked: 0,
  1433. width: 150,
  1434. },
  1435. {
  1436. surface: "20",
  1437. label: "fCntrtype",
  1438. name: "箱型",
  1439. checked: 0,
  1440. width: 100,
  1441. },
  1442. {
  1443. surface: "21",
  1444. label: "fCntqty",
  1445. name: "箱量",
  1446. checked: 0,
  1447. width: 100,
  1448. },
  1449. {
  1450. surface: "22",
  1451. label: "fCntrno",
  1452. name: "箱号",
  1453. checked: 0,
  1454. width: 100,
  1455. },
  1456. {
  1457. surface: "23",
  1458. label: "fLntype",
  1459. name: "装卸方式",
  1460. checked: 0,
  1461. width: 100,
  1462. },
  1463. {
  1464. surface: "24",
  1465. label: "fForkliftman",
  1466. name: "叉车工",
  1467. checked: 0,
  1468. width: 100,
  1469. },
  1470. {
  1471. surface: "25",
  1472. label: "fStevedore",
  1473. name: "装卸工",
  1474. checked: 0,
  1475. width: 100,
  1476. },
  1477. {
  1478. surface: "26",
  1479. label: "fLocalcntrno",
  1480. name: "库内箱号",
  1481. checked: 0,
  1482. width: 100,
  1483. },
  1484. {
  1485. surface: "27",
  1486. label: "fSealno",
  1487. name: "封号",
  1488. checked: 0,
  1489. width: 100,
  1490. },
  1491. {
  1492. surface: "28",
  1493. label: "fGoodsval",
  1494. name: "货值",
  1495. checked: 0,
  1496. width: 100,
  1497. },
  1498. {
  1499. surface: "29",
  1500. label: "fSerialNumber",
  1501. name: "流水号",
  1502. checked: 0,
  1503. width: 100,
  1504. },
  1505. {
  1506. surface: "30",
  1507. label: "remark",
  1508. name: "备注",
  1509. checked: 0,
  1510. width: 100,
  1511. },
  1512. ],
  1513. setRowList: [],
  1514. getRowList: [],
  1515. allCheck: false,
  1516. fCompanyName: '',
  1517. printFeeConfirm: {
  1518. fAddr: '',
  1519. fBankname: '',
  1520. fBankno: '',
  1521. fTel: '',
  1522. fTax: '',
  1523. },
  1524. showSetting: false,
  1525. tableDate2: [
  1526. {
  1527. surface: "1",
  1528. label: "fMblno",
  1529. name: "提单号",
  1530. checked: 0,
  1531. width: 150,
  1532. },
  1533. {
  1534. surface: "2",
  1535. label: "fOriginalbilldate",
  1536. name: "入库日期",
  1537. checked: 0,
  1538. width: 100,
  1539. },
  1540. {
  1541. surface: "3",
  1542. label: "fGoodsids",
  1543. name: "品名",
  1544. checked: 0,
  1545. width: 100,
  1546. },
  1547. {
  1548. surface: "4",
  1549. label: "fCntrno",
  1550. name: "箱号",
  1551. checked: 0,
  1552. width: 100,
  1553. },
  1554. {
  1555. surface: "5",
  1556. label: "fQtyblc",
  1557. name: "结余数量",
  1558. checked: 0,
  1559. width: 150,
  1560. },
  1561. {
  1562. surface: "6",
  1563. label: "fGrossweightblc",
  1564. name: "结余毛重(kg)",
  1565. checked: 0,
  1566. width: 150,
  1567. },
  1568. {
  1569. surface: "7",
  1570. label: "fNetweightblc",
  1571. name: "结余净重(kg)",
  1572. checked: 0,
  1573. width: 150,
  1574. },
  1575. {
  1576. surface: "8",
  1577. label: "fWarehouseids",
  1578. name: "库位",
  1579. checked: 0,
  1580. width: 150,
  1581. },
  1582. {
  1583. surface: "9",
  1584. label: "fMarks",
  1585. name: "品牌",
  1586. checked: 0,
  1587. width: 100,
  1588. },
  1589. {
  1590. surface: "10",
  1591. label: "fQtyblc2",
  1592. name: "数量",
  1593. checked: 0,
  1594. width: 100,
  1595. },
  1596. {
  1597. surface: "11",
  1598. label: "fGrossweightblc2",
  1599. name: "毛重(kg)",
  1600. checked: 0,
  1601. width: 100,
  1602. },
  1603. {
  1604. surface: "12",
  1605. label: "fNetweightblc2",
  1606. name: "净重(kg)",
  1607. checked: 0,
  1608. width: 100,
  1609. },
  1610. {
  1611. surface: "13",
  1612. label: "fLocalcntrno",
  1613. name: "库内箱号",
  1614. checked: 0,
  1615. width: 100,
  1616. },
  1617. ],
  1618. setRowList2: [],
  1619. getRowList2: [],
  1620. allCheck2: false,
  1621. showSetting2: false,
  1622. unloadModes: [],
  1623. detailsHidden2: true,
  1624. dataShowcar: null,
  1625. tfNetweightnum: 0,
  1626. tfGrossweightnum: 0,
  1627. showApproval: null,
  1628. entryPrinting: 1,
  1629. cancelDelivery: false, //
  1630. deliveryConfirmation: false, //
  1631. clearanceDisabled: false, //明细是否有通关
  1632. };
  1633. },
  1634. created() {
  1635. // this.setRowList = this.tableDate;
  1636. // this.getRowList = this.tableDate;
  1637. // this.setRowList2 = this.tableDate2;
  1638. // this.getRowList2 = this.tableDate2;
  1639. // this.getDicts("data_stltype_type").then((response) => {
  1640. // this.fStltypeOptions = response.data;
  1641. // });
  1642. // this.getDicts("data_unitfees").then((response) => {
  1643. // this.fFeetUnitOptions = response.data;
  1644. // });
  1645. // this.getDicts("data_trademodes").then((response) => {
  1646. // this.fTrademodeidOptions = response.data;
  1647. // });
  1648. // this.getDicts("data_ifweigh_status").then((response) => {
  1649. // this.fIfweighOptions = response.data;
  1650. // });
  1651. // this.getDicts("sys_car_type").then((response) => {
  1652. // this.fCartypeOptions = response.data;
  1653. // });
  1654. // this.getDicts("unload_mode").then((response) => {
  1655. // this.unloadModes = response.data;
  1656. // });
  1657. // this.getDicts("data_ifdamage_status").then((response) => {
  1658. // this.fIfdamageOptions = response.data;
  1659. // });
  1660. // this.getDicts("st_trans_type").then((response) => {
  1661. // this.businessTypeOption = response.data ? response.data : [];
  1662. // localStorage.setItem("businessTypeList", JSON.stringify(response.data));
  1663. // });
  1664. // this.getDicts("storage_type").then((response) => {
  1665. // this.fStorageTypeOptions = response.data;
  1666. // localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
  1667. // });
  1668. // this.getConfigKey("data_showcar").then((response) => {
  1669. // this.dataShowcar = response.msg;
  1670. // if (this.dataShowcar == "0") {
  1671. // this.detailsHidden2 = false;
  1672. // } else {
  1673. // this.detailsHidden2 = true;
  1674. // }
  1675. // });
  1676. // this.getConfigKey('entry.printing').then((response) => {
  1677. // this.entryPrinting = response.msg
  1678. // })
  1679. // listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
  1680. // this.warehouseOptions = response.rows;
  1681. // });
  1682. // listFees({ fDc: "C" }).then((response) => {
  1683. // this.fCNameOptions = response.rows;
  1684. // });
  1685. // listFees({ fDc: "D" }).then((response) => {
  1686. // this.fDNameOptions = response.rows;
  1687. // });
  1688. // listCorps({ type: 1 }).then((response) => {
  1689. // this.fMblnoOptions = response.rows;
  1690. // });
  1691. // listCorps().then((response) => {
  1692. // this.fSbuOptions = response.rows;
  1693. // });
  1694. // listUser().then((response) => {
  1695. // this.userOptions = response.rows;
  1696. // });
  1697. // listGoods({ fStatus: 0, delFlag: 0 }).then((response) => {
  1698. // this.goodsOptions = response.rows;
  1699. // });
  1700. // listCntrs({ fStatus: "T" }).then((response) => {
  1701. // this.cntrList = response.rows;
  1702. // });
  1703. // listCorps({ fTypeid: 6 }).then((response) => {
  1704. // this.fCompanyOptIons = response.rows;
  1705. // });
  1706. // listCorps({ fTypeid: 2 }).then((response) => {
  1707. // this.fleetOptions = response.rows;
  1708. // });
  1709. // this.getConfigKey("outStock.orders.approvalFlow").then((response) => {
  1710. // this.showApproval = response.msg;
  1711. // });
  1712. // this.company = Cookies.get("companyName")
  1713. // this.queryUser();
  1714. // this.getRow();
  1715. // this.getRow2();
  1716. },
  1717. mounted() {
  1718. this.$nextTick(() => {
  1719. // 监听浏览器高度变化,改变表格高度
  1720. window.onresize = () => {
  1721. this.tableHeight = window.innerHeight - this.$refs.tableDialog.$el.offsetTop
  1722. }
  1723. })
  1724. },
  1725. activated() {
  1726. this.getDicts("st_trans_type").then((response) => {
  1727. this.businessTypeOption = response.data ? response.data : [];
  1728. localStorage.setItem("businessTypeList", JSON.stringify(response.data));
  1729. });
  1730. this.getDicts("storage_type").then((response) => {
  1731. this.fStorageTypeOptions = response.data;
  1732. localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
  1733. });
  1734. },
  1735. filters: {
  1736. fStorageFormat(row) {
  1737. let name;
  1738. for (const item of JSON.parse(localStorage.getItem("fStorageTypeList"))) {
  1739. if (row == item.dictValue) {
  1740. name = item.dictLabel;
  1741. }
  1742. }
  1743. return name;
  1744. },
  1745. fBusinessTypeFormat(row) {
  1746. let name;
  1747. for (const item of JSON.parse(localStorage.getItem("businessTypeList"))) {
  1748. if (row == item.dictValue) {
  1749. name = item.dictLabel;
  1750. }
  1751. }
  1752. return name;
  1753. },
  1754. goodsFormat(row, goodsOptions) {
  1755. let goods;
  1756. goodsOptions.map((e) => {
  1757. if (row == e.fId) {
  1758. goods = e.fName;
  1759. }
  1760. });
  1761. return goods;
  1762. },
  1763. },
  1764. methods: {
  1765. init() {
  1766. this.approVal = false;
  1767. this.resetForm("form");
  1768. this.detailList = [];
  1769. this.relevantAttachments = [];
  1770. this.warehouseCrList = [];
  1771. this.warehouseDrList = [];
  1772. this.CntrTable = [];
  1773. if (this.dataShowcar == "0") {
  1774. this.detailsHidden2 = false;
  1775. } else {
  1776. this.detailsHidden2 = true;
  1777. }
  1778. if (this.$route.query.id) {
  1779. this.approVal = true;
  1780. this.$router.push({ query: {} });
  1781. }
  1782. this.getForm();
  1783. },
  1784. init2() {
  1785. this.whgenlegParams = {
  1786. pageNum: 1,
  1787. pageSize: 10,
  1788. fCorpid: null,
  1789. fWarehouseid: null,
  1790. fTruckno: null,
  1791. fCntrno: null,
  1792. fMblno: null,
  1793. orgStorageDate: null,
  1794. };
  1795. },
  1796. tfNetweight(row) {
  1797. this.tfNetweightnum = (row / 1000).toFixed(4);
  1798. },
  1799. tfGrossweight(row) {
  1800. this.tfGrossweightnum = (row / 1000).toFixed(4);
  1801. },
  1802. //列设置全选
  1803. allChecked() {
  1804. if (this.allCheck == true) {
  1805. this.setRowList.map((e) => {
  1806. return (e.checked = 0);
  1807. });
  1808. } else {
  1809. this.setRowList.map((e) => {
  1810. return (e.checked = 1);
  1811. });
  1812. }
  1813. },
  1814. //查询列数据
  1815. getRow() {
  1816. let that = this;
  1817. this.data = {
  1818. tableName: "通关明细",
  1819. userId: Cookies.get("userName"),
  1820. };
  1821. select(this.data).then((res) => {
  1822. if (res.data.length != 0) {
  1823. this.getRowList = res.data.filter((e) => e.checked == 0);
  1824. this.setRowList = res.data;
  1825. this.setRowList = this.setRowList.reduce((res, item) => {
  1826. res.push({
  1827. surface: item.surface,
  1828. label: item.label,
  1829. name: item.name,
  1830. checked: item.checked,
  1831. width: item.width,
  1832. fixed: item.fixed,
  1833. });
  1834. return res;
  1835. }, []);
  1836. }
  1837. });
  1838. },
  1839. //重置列表
  1840. delRow() {
  1841. this.data = {
  1842. tableName: "通关明细",
  1843. userId: Cookies.get("userName"),
  1844. };
  1845. resetModule(this.data).then((res) => {
  1846. if (res.code == 200) {
  1847. this.showSetting = false;
  1848. this.setRowList = this.$options.data().tableDate;
  1849. this.getRowList = this.$options.data().tableDate;
  1850. }
  1851. });
  1852. },
  1853. //保存列设置
  1854. save() {
  1855. this.showSetting = false;
  1856. this.data = {
  1857. tableName: "通关明细",
  1858. userId: Cookies.get("userName"),
  1859. sysTableSetList: this.setRowList,
  1860. };
  1861. addSet(this.data).then((res) => {
  1862. if (res.code == 200) {
  1863. this.showSetting = false;
  1864. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1865. }
  1866. });
  1867. },
  1868. //列设置全选
  1869. allChecked2() {
  1870. if (this.allCheck2 == true) {
  1871. this.setRowList2.map((e) => {
  1872. return (e.checked = 0);
  1873. });
  1874. } else {
  1875. this.setRowList2.map((e) => {
  1876. return (e.checked = 1);
  1877. });
  1878. }
  1879. },
  1880. //查询列数据
  1881. getRow2() {
  1882. let that = this;
  1883. this.data = {
  1884. tableName: "通关总账",
  1885. userId: Cookies.get("userName"),
  1886. };
  1887. select(this.data).then((res) => {
  1888. if (res.data.length != 0) {
  1889. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  1890. this.setRowList2 = res.data;
  1891. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  1892. res.push({
  1893. surface: item.surface,
  1894. label: item.label,
  1895. name: item.name,
  1896. checked: item.checked,
  1897. width: item.width,
  1898. fixed: item.fixed,
  1899. });
  1900. return res;
  1901. }, []);
  1902. }
  1903. });
  1904. },
  1905. //重置列表
  1906. delRow2() {
  1907. this.data = {
  1908. tableName: "通关总账",
  1909. userId: Cookies.get("userName"),
  1910. };
  1911. resetModule(this.data).then((res) => {
  1912. if (res.code == 200) {
  1913. this.showSetting2 = false;
  1914. this.setRowList2 = this.$options.data().tableDate2;
  1915. this.getRowList2 = this.$options.data().tableDate2;
  1916. }
  1917. });
  1918. },
  1919. //保存列设置
  1920. save2() {
  1921. this.showSetting2 = false;
  1922. this.data = {
  1923. tableName: "通关总账",
  1924. userId: Cookies.get("userName"),
  1925. sysTableSetList: this.setRowList2,
  1926. };
  1927. addSet(this.data).then((res) => {
  1928. if (res.code == 200) {
  1929. this.showSetting2 = false;
  1930. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  1931. }
  1932. });
  1933. },
  1934. //开始拖拽事件
  1935. onStart() {
  1936. this.drag = true;
  1937. },
  1938. //拖拽结束事件
  1939. onEnd() {
  1940. this.drag = false;
  1941. },
  1942. changeStock(row) {
  1943. let fNetweight = 0;
  1944. let fGrossweight = 0;
  1945. if (row.fNetweight) {
  1946. fNetweight = row.fNetweight;
  1947. }
  1948. if (row.fGrossweight) {
  1949. fGrossweight = row.fGrossweight;
  1950. }
  1951. if (row.fPlannetweight < fNetweight) {
  1952. this.$message({ message: "通关净重超出结余净重", type: "warning" });
  1953. return false;
  1954. }
  1955. if (row.fPlangrossweight < fGrossweight) {
  1956. this.$message({ message: "通关毛重超出结余毛重", type: "warning" });
  1957. return false;
  1958. }
  1959. },
  1960. // 付款信息请核
  1961. checkRow(index, rows) {
  1962. if (!rows[index].fQty) {
  1963. this.$message.error('请维护数量')
  1964. return false
  1965. }
  1966. if (!rows[index].fUnitprice) {
  1967. this.$message.error('请维护单价')
  1968. return false
  1969. }
  1970. if (!rows[index].fAmount) {
  1971. this.$message.error('请维护金额')
  1972. return false
  1973. }
  1974. rows[index].fBillstatus = 6
  1975. let formData = new window.FormData()
  1976. formData.append('tWarehouseBills', JSON.stringify(this.form))
  1977. // 库存明细
  1978. formData.append('tWarehousebillsitems', JSON.stringify(this.detailList))
  1979. // 附件数据
  1980. formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
  1981. // 费用明细付款
  1982. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  1983. // 收款
  1984. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  1985. formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
  1986. formData.append('tCntr', JSON.stringify(this.CntrTable))
  1987. addWarehousebills(formData).then(res => {
  1988. this.msgSuccess('请核成功')
  1989. })
  1990. },
  1991. revokeRow(index, rows) {
  1992. rows[index].fBillstatus = 2
  1993. let formData = new window.FormData()
  1994. formData.append('tWarehouseBills', JSON.stringify(this.form))
  1995. // 库存明细
  1996. formData.append('tWarehousebillsitems', JSON.stringify(this.detailList))
  1997. // 附件数据
  1998. formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
  1999. // 费用明细付款
  2000. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2001. // 收款
  2002. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2003. formData.append('mblnoStatus', JSON.stringify(this.mblnoStatus))
  2004. formData.append('tCntr', JSON.stringify(this.CntrTable))
  2005. addWarehousebills(formData).then(res => {
  2006. this.msgSuccess('撤销成功')
  2007. })
  2008. },
  2009. // 出库件数的计算
  2010. qtyChange(row) {
  2011. // if (!row.fQty || row.fQty === "") {
  2012. // this.$set(row, "fNetweight", 0);
  2013. // this.$set(row, "fGrossweight", 0);
  2014. // return false;
  2015. // }
  2016. if (row.fPlanqty < row.fQty) {
  2017. this.$message.error("出库件数超出结余件数!");
  2018. this.$set(row, "fQty", 0);
  2019. this.$set(row, "fNetweight", 0);
  2020. this.$set(row, "fGrossweight", 0);
  2021. return false;
  2022. }
  2023. if (row.fQtyblc2 > row.fQtyblc) {
  2024. this.$message.error("出库件数超出结余件数!");
  2025. this.$set(row, "fQtyblc2", 0);
  2026. this.$set(row, "fGrossweightblc2", 0);
  2027. this.$set(row, "fNetweightblc2", 0);
  2028. return false;
  2029. }
  2030. this.$set(
  2031. row,
  2032. "fNetweight",
  2033. parseFloat(
  2034. (Number(row.fPlannetweight) / Number(row.fPlanqty)) * Number(row.fQty)
  2035. ).toFixed(2)
  2036. );
  2037. this.$set(
  2038. row,
  2039. "fGrossweight",
  2040. parseFloat(
  2041. (Number(row.fPlangrossweight) / Number(row.fPlanqty)) *
  2042. Number(row.fQty)
  2043. ).toFixed(2)
  2044. );
  2045. this.$set(
  2046. row,
  2047. "fNetweightblc2",
  2048. parseFloat(
  2049. (Number(row.fNetweightblc) / Number(row.fQtyblc)) *
  2050. Number(row.fQtyblc2)
  2051. ).toFixed(2)
  2052. );
  2053. this.$set(
  2054. row,
  2055. "fGrossweightblc2",
  2056. parseFloat(
  2057. (Number(row.fGrossweightblc) / Number(row.fQtyblc)) *
  2058. Number(row.fQtyblc2)
  2059. ).toFixed(2)
  2060. );
  2061. },
  2062. whgenlegData() {
  2063. if (this.dialogWhgenlegList.length === 0) {
  2064. this.$message({ message: "未勾选信息", type: "warning" });
  2065. return false;
  2066. }
  2067. let fTruckno = null;
  2068. let fDriverTel = null;
  2069. let fDriverName = null;
  2070. let fDriverIdCar = null;
  2071. if (this.form.fTruckno) {
  2072. fTruckno = this.form.fTruckno;
  2073. }
  2074. if (this.form.fDriverTel) {
  2075. fDriverTel = this.form.fDriverTel;
  2076. }
  2077. if (this.form.fDriverName) {
  2078. fDriverName = this.form.fDriverName;
  2079. }
  2080. if (this.form.fDriverIdCar) {
  2081. fDriverIdCar = this.form.fDriverIdCar;
  2082. }
  2083. this.dialogWhgenlegList.map((e) => {
  2084. this.detailList.push({
  2085. fBsdate: this.form.fBsdate,
  2086. fId: null,
  2087. fCntrtype: null,
  2088. fGrossweight: e.fGrossweightblc2,
  2089. fNetweight: e.fNetweightblc2,
  2090. fQty: e.fQtyblc2,
  2091. fCntqty: 1,
  2092. fIsPass: "F",
  2093. fGoodsval: null,
  2094. fBillstatus: 10,
  2095. fTruckno: this.form.fTruckno ? this.form.fTruckno : null,
  2096. fDriverName: this.form.fDriverName ? this.form.fDriverName : null,
  2097. fDriverTel: this.form.fDriverTel ? this.form.fDriverTel : null,
  2098. fDriverIdCar: this.form.fDriverIdCar ? this.form.fDriverIdCar : null,
  2099. fMblno: e.fMblno,
  2100. fMarks: e.fMarks,
  2101. fCntrno: e.fCntrno,
  2102. fPlanqty: e.fQtyblc,
  2103. fGoodsid: e.fGoodsid,
  2104. fVolumn: e.fVolumn,
  2105. fGoodsids: e.fGoodsids,
  2106. fBillingway: e.fBillingway,
  2107. fChargedate: e.fChargedate,
  2108. fOrgwarehouseInformation: e.fWarehouseids,
  2109. fPackagespecs: e.fPackagespecs,
  2110. fPlannetweight: e.fNetweightblc,
  2111. fOriginalbillno: e.fOriginalbillno,
  2112. fBusinessType: e.fBusinessType + "",
  2113. fPlangrossweight: e.fGrossweightblc,
  2114. fOriginalbilldate: e.fOriginalbilldate,
  2115. fWarehouselocid: e.fWarehouseLocationid,
  2116. fWarehouselocids: e.fWarehouseLocationids,
  2117. fWarehouseLocationids: e.fWarehouseLocationids,
  2118. fTransferWarehouselocid: null,
  2119. remark: null,
  2120. fSrcid: e.fId,
  2121. fSrcBsdate: e.fBsdate,
  2122. });
  2123. });
  2124. this.whgenlegVisible = false;
  2125. },
  2126. //撤销审批
  2127. revokeTwo(status) {
  2128. let data = {
  2129. actId: 140,
  2130. billId: this.form.fId,
  2131. id: this.form.fId,
  2132. fidStatus: status,
  2133. };
  2134. RevocationApproval(data).then((data) => {
  2135. if (data.code === 200) {
  2136. this.browseStatus = false;
  2137. this.msgSuccess("撤销成功");
  2138. }
  2139. });
  2140. },
  2141. // 查看审批流
  2142. getDataList() {
  2143. this.addOrUpdateVisible = false;
  2144. },
  2145. returnData() {
  2146. this.addOrUpdateVisib = false;
  2147. this.$router.push({ path: "/index" });
  2148. },
  2149. addOrUpdateHandle(form, status) {
  2150. this.addOrUpdateVisible = true;
  2151. this.$nextTick(() => {
  2152. this.$refs.addOrUpdate.init(form.fId, 140, status);
  2153. });
  2154. },
  2155. addOrUpdateHand(form, status) {
  2156. this.addOrUpdateVisib = true;
  2157. this.$nextTick(() => {
  2158. this.$refs.ApprovalComments.init(form.fId, status, 140);
  2159. });
  2160. },
  2161. changefStltype(row) {
  2162. this.fMblnoOptions.map((e) => {
  2163. if (row == e.fId) {
  2164. this.$set(
  2165. this.form,
  2166. "fStltypeid",
  2167. e.fStltypeid ? e.fStltypeid.toString() : null
  2168. );
  2169. }
  2170. });
  2171. },
  2172. changeGoods(row) {
  2173. this.goodsOptions.map((e) => {
  2174. if (row == e.fId) {
  2175. if (e.ifCntrno == "1") {
  2176. this.ifCntrnoStatus = 1;
  2177. } else {
  2178. this.ifCntrnoStatus = null;
  2179. }
  2180. }
  2181. });
  2182. },
  2183. //撤销请核
  2184. revoke() {
  2185. revoke(this.form.fId).then((data) => {
  2186. if (data.code === 200) {
  2187. this.browseStatus = false;
  2188. this.msgSuccess("撤销成功");
  2189. }
  2190. });
  2191. },
  2192. ordersRevoke() {
  2193. ordersRevoke(this.form.fId).then((data) => {
  2194. if (data.code === 200) {
  2195. this.$set(this.form, "warehouseStatus", 2);
  2196. this.msgSuccess("撤销成功");
  2197. }
  2198. });
  2199. },
  2200. discharge() {
  2201. if (this.Printinglist.length > 0) {
  2202. for (let item in this.Printinglist) {
  2203. if (this.Printinglist[item].fBillstatus === 10) {
  2204. return this.$message.error("请先打印作业单");
  2205. }
  2206. if (this.Printinglist[item].fBillstatus >= 30) {
  2207. return this.$message.error("请勿重复卸货");
  2208. }
  2209. }
  2210. if (this.CntrTable.length > 0) {
  2211. let arr = [];
  2212. this.CntrTable.map((e) => {
  2213. this.cntrList.map((item) => {
  2214. if (item.fId == e.fCntrid) {
  2215. arr.push(item.fName + "X" + e.fCntrcount);
  2216. }
  2217. });
  2218. });
  2219. arr = [...new Set(arr)];
  2220. this.form.fCntval = arr.join(",");
  2221. } else {
  2222. this.form.fCntval = null;
  2223. }
  2224. if (this.detailList.length > 0) {
  2225. let arr = [];
  2226. this.detailList.map((e) => {
  2227. this.goodsOptions.map((item) => {
  2228. if (e.fGoodsid == item.fId) {
  2229. arr.push(item.fName);
  2230. }
  2231. });
  2232. });
  2233. arr = [...new Set(arr)];
  2234. this.form.fProductName = arr.join(",");
  2235. } else {
  2236. this.form.fProductName = "";
  2237. }
  2238. if (this.detailList.length > 0) {
  2239. let arr = [];
  2240. this.detailList.map((e) => {
  2241. arr.push(e.fMarks);
  2242. });
  2243. arr = [...new Set(arr)];
  2244. this.form.fMarks = arr.join(",");
  2245. } else {
  2246. this.form.fMarks = "";
  2247. }
  2248. if (this.detailList.length == 0) {
  2249. this.form.fNetweight = 0;
  2250. this.form.fPlanvolumn = 0;
  2251. this.form.fGrossweight = 0;
  2252. } else {
  2253. this.form.fNetweight = this.fNetweight;
  2254. this.form.fPlanvolumn = this.fPlanvolumn;
  2255. this.form.fGrossweight = this.fGrossweight;
  2256. }
  2257. let formData = new window.FormData();
  2258. formData.append("type", "2");
  2259. formData.append("warehouseBills", JSON.stringify(this.form));
  2260. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2261. formData.append(
  2262. "warehousebillsitems",
  2263. JSON.stringify(this.Printinglist)
  2264. );
  2265. formData.append(
  2266. "warehousebillsfeesDr",
  2267. JSON.stringify(this.warehouseDrList)
  2268. );
  2269. formData.append(
  2270. "warehousebillsfeesCr",
  2271. JSON.stringify(this.warehouseCrList)
  2272. );
  2273. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2274. disChargelist(formData).then((response) => {
  2275. if ((response.code = 200)) {
  2276. this.detailList.map((e, index) => {
  2277. response.data.warehousebillsitems.map((item) => {
  2278. item.fBsdate = Date.parse(new Date(item.fBsdate));
  2279. if (item.fBusinessType) {
  2280. item.fBusinessType = item.fBusinessType.toString();
  2281. }
  2282. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  2283. if (e.fId == item.fId) {
  2284. e = item;
  2285. this.$set(this.detailList, index, e);
  2286. }
  2287. });
  2288. });
  2289. this.msgSuccess("卸货成功");
  2290. this.$set(this.form, "fItemsStatus", 3);
  2291. }
  2292. });
  2293. } else {
  2294. this.$message.error("请选择需要卸货的明细!");
  2295. }
  2296. },
  2297. creditClick() {
  2298. if (this.form.fNewTrademodeid == this.form.fTrademodeid) {
  2299. return this.$alert('新旧贸易方式相同,请做调拨单处理', '提示', {
  2300. confirmButtonText: '确定'
  2301. })
  2302. }
  2303. for (let item in this.Printinglist) {
  2304. if (!this.Printinglist[item].fId) {
  2305. return this.$message.error("请存在未保存的数据");
  2306. }
  2307. if (this.entryPrinting == 0) {
  2308. if (this.Printinglist[item].fBillstatus == 10) {
  2309. return this.$message.error("请存在未打印的作业单");
  2310. }
  2311. }
  2312. // if (!this.Printinglist[item].fTruckno) {
  2313. // return this.$message.error("车号不能为空");
  2314. // }
  2315. if (!this.Printinglist[item].fTransferWarehouselocid) {
  2316. return this.$message.error("调入库位不能为空");
  2317. }
  2318. }
  2319. if (this.CntrTable.length > 0) {
  2320. let arr = [];
  2321. this.CntrTable.map((e) => {
  2322. this.cntrList.map((item) => {
  2323. if (item.fId == e.fCntrid) {
  2324. arr.push(item.fName + "X" + e.fCntrcount);
  2325. }
  2326. });
  2327. });
  2328. arr = [...new Set(arr)];
  2329. this.form.fCntval = arr.join(",");
  2330. } else {
  2331. this.form.fCntval = null;
  2332. }
  2333. if (this.detailList.length > 0) {
  2334. let arr = [];
  2335. this.detailList.map((e) => {
  2336. this.goodsOptions.map((item) => {
  2337. if (e.fGoodsid == item.fId) {
  2338. arr.push(item.fName);
  2339. }
  2340. });
  2341. });
  2342. arr = [...new Set(arr)];
  2343. this.form.fProductName = arr.join(",");
  2344. } else {
  2345. this.form.fProductName = "";
  2346. }
  2347. if (this.detailList.length > 0) {
  2348. let arr = [];
  2349. this.detailList.map((e) => {
  2350. arr.push(e.fMarks);
  2351. });
  2352. arr = [...new Set(arr)];
  2353. this.form.fMarks = arr.join(",");
  2354. } else {
  2355. this.form.fMarks = "";
  2356. }
  2357. if (this.detailList.length == 0) {
  2358. this.form.fNetweight = 0;
  2359. this.form.fPlanvolumn = 0;
  2360. this.form.fGrossweight = 0;
  2361. } else {
  2362. this.form.fNetweight = this.fNetweight;
  2363. this.form.fPlanvolumn = this.fPlanvolumn;
  2364. this.form.fGrossweight = this.fGrossweight;
  2365. }
  2366. let formData = new window.FormData();
  2367. formData.append("type", "2");
  2368. formData.append("warehouseBills", JSON.stringify(this.form));
  2369. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2370. formData.append(
  2371. "warehousebillsfeesDr",
  2372. JSON.stringify(this.warehouseDrList)
  2373. );
  2374. formData.append(
  2375. "warehousebillsfeesCr",
  2376. JSON.stringify(this.warehouseCrList)
  2377. );
  2378. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2379. formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
  2380. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2381. addWhgenleg(formData).then((response) => {
  2382. if ((response.code = 200)) {
  2383. this.detailList.map((e, index) => {
  2384. response.data.warehouseItem.map((item) => {
  2385. item.fBsdate = Date.parse(new Date(item.fBsdate));
  2386. if (item.fBusinessType) {
  2387. item.fBusinessType = item.fBusinessType.toString();
  2388. }
  2389. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  2390. if (e.fId == item.fId) {
  2391. e = item;
  2392. this.$set(this.detailList, index, e);
  2393. }
  2394. });
  2395. });
  2396. this.msgSuccess("通关成功");
  2397. this.clearanceDisabled = true;
  2398. this.$set(this.form, "fItemsStatus", 4);
  2399. }
  2400. });
  2401. },
  2402. getAlltree(tree) {
  2403. this.information = tree.fWarehouseInformation;
  2404. this.informationId = tree.id;
  2405. },
  2406. //树状库位下拉关闭询问
  2407. hanDleclose(done) {
  2408. this.$confirm("确认关闭?")
  2409. .then((_) => {
  2410. done();
  2411. })
  2412. .catch((_) => { });
  2413. },
  2414. getTreeselect(row) {
  2415. this.treeselectList.fWarehouselocid = null;
  2416. this.TreeIndex = row.$index;
  2417. this.choiceWarehouse = true;
  2418. treeselect(this.form.fWarehouseid).then((response) => {
  2419. this.fWarehouseidOptions = response.data;
  2420. });
  2421. },
  2422. confirm() {
  2423. this.$set(
  2424. this.detailList[this.TreeIndex],
  2425. "fWarehouseInformation",
  2426. this.information
  2427. );
  2428. this.$set(
  2429. this.detailList[this.TreeIndex],
  2430. "fTransferWarehouselocid",
  2431. this.informationId
  2432. );
  2433. this.choiceWarehouse = false;
  2434. this.detailList.fTransferWarehouselocid = this.informationId;
  2435. },
  2436. // 撤回入账
  2437. withdrawClick() {
  2438. for (let item in this.Printinglist) {
  2439. if (!this.Printinglist[item].fId) {
  2440. return this.$message.error("请存在未保存的数据");
  2441. }
  2442. if (this.Printinglist[item].fBillstatus == 10) {
  2443. return this.$message.error("请存在未打印的作业单");
  2444. }
  2445. if (this.Printinglist[item].fBillstatus == 20) {
  2446. return this.$message.error("请存在未卸货的数据");
  2447. }
  2448. if (this.Printinglist[item].fBillstatus == 30) {
  2449. return this.$message.error("请存在未出库的数据");
  2450. }
  2451. }
  2452. if (this.CntrTable.length > 0) {
  2453. let arr = [];
  2454. this.CntrTable.map((e) => {
  2455. this.cntrList.map((item) => {
  2456. if (item.fId == e.fCntrid) {
  2457. arr.push(item.fName + "X" + e.fCntrcount);
  2458. }
  2459. });
  2460. });
  2461. arr = [...new Set(arr)];
  2462. this.form.fCntval = arr.join(",");
  2463. } else {
  2464. this.form.fCntval = null;
  2465. }
  2466. if (this.detailList.length > 0) {
  2467. let arr = [];
  2468. this.detailList.map((e) => {
  2469. this.goodsOptions.map((item) => {
  2470. if (e.fGoodsid == item.fId) {
  2471. arr.push(item.fName);
  2472. }
  2473. });
  2474. });
  2475. arr = [...new Set(arr)];
  2476. this.form.fProductName = arr.join(",");
  2477. } else {
  2478. this.form.fProductName = "";
  2479. }
  2480. if (this.detailList.length > 0) {
  2481. let arr = [];
  2482. this.detailList.map((e) => {
  2483. arr.push(e.fMarks);
  2484. });
  2485. arr = [...new Set(arr)];
  2486. this.form.fMarks = arr.join(",");
  2487. } else {
  2488. this.form.fMarks = "";
  2489. }
  2490. if (this.detailList.length == 0) {
  2491. this.form.fNetweight = 0;
  2492. this.form.fPlanvolumn = 0;
  2493. this.form.fGrossweight = 0;
  2494. } else {
  2495. this.form.fNetweight = this.fNetweight;
  2496. this.form.fPlanvolumn = this.fPlanvolumn;
  2497. this.form.fGrossweight = this.fGrossweight;
  2498. }
  2499. // 撤回入库
  2500. let formData = new window.FormData();
  2501. formData.append("type", "2");
  2502. formData.append("warehouseBills", JSON.stringify(this.form));
  2503. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2504. formData.append(
  2505. "warehousebillsfeesDr",
  2506. JSON.stringify(this.warehouseDrList)
  2507. );
  2508. formData.append(
  2509. "warehousebillsfeesCr",
  2510. JSON.stringify(this.warehouseCrList)
  2511. );
  2512. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2513. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2514. this.clearanceDisabled = false;
  2515. updateCredit(formData).then((response) => {
  2516. this.Printinglist.map((e) => {
  2517. this.detailList.map((item, index) => {
  2518. if (e.fId == item.fId) {
  2519. this.$set(this.detailList[index], "fBillstatus", 10);
  2520. }
  2521. if (item.fBillstatus == 40) this.clearanceDisabled = true;
  2522. });
  2523. });
  2524. this.msgSuccess("撤回成功");
  2525. this.$set(this.form, "fItemsStatus", 1);
  2526. });
  2527. },
  2528. fStorageTypeFormat(row) {
  2529. let fStorageType;
  2530. this.fStorageTypeOptions.map((e) => {
  2531. if (row.fBusinessType == e.dictValue) {
  2532. fStorageType = e.dictLabel;
  2533. }
  2534. });
  2535. return fStorageType;
  2536. },
  2537. fCntrtypeFormat(row) {
  2538. let fCntrtype;
  2539. this.cntrList.map((e) => {
  2540. if (row.fCntrtype == e.fId) {
  2541. fCntrtype = e.fName;
  2542. }
  2543. });
  2544. return fCntrtype;
  2545. },
  2546. fBsdateFormat(row) {
  2547. const dateMat = new Date(row.fBsdate);
  2548. const year = dateMat.getFullYear();
  2549. const month = dateMat.getMonth() + 1;
  2550. const day = dateMat.getDate();
  2551. const timeFormat = year + "-" + month + "-" + day;
  2552. return timeFormat;
  2553. },
  2554. getForm() {
  2555. getStockTransfer(this.chiId).then((response) => {
  2556. this.form = response.data.warehousebills;
  2557. if (this.form.fCompany) this.changePrint()
  2558. if (this.form.fBillstatus > 2) {
  2559. this.approvalStatus = false;
  2560. this.browseStatus = true;
  2561. } else {
  2562. this.approvalStatus = true;
  2563. this.browseStatus = false;
  2564. }
  2565. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2566. this.$set(this.form, "fBstifime", Date.parse(this.form.fBstime));
  2567. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  2568. this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
  2569. this.tfNetweightnum = (this.form.fPlannetweight / 1000).toFixed(4);
  2570. this.tfGrossweightnum = (this.form.fPlangrossweight / 1000).toFixed(4);
  2571. if (this.form.fCartype || this.form.fCartype == 0) {
  2572. this.$set(this.form, "fCartype", this.form.fCartype.toString());
  2573. }
  2574. if (this.form.fStltypeid || this.form.fStltypeid == 0) {
  2575. this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
  2576. }
  2577. if (this.form.fTrademodeid) {
  2578. this.$set(
  2579. this.form,
  2580. "fTrademodeid",
  2581. this.form.fTrademodeid.toString()
  2582. );
  2583. }
  2584. if (this.form.fNewTrademodeid) {
  2585. this.$set(
  2586. this.form,
  2587. "fNewTrademodeid",
  2588. this.form.fNewTrademodeid.toString()
  2589. );
  2590. }
  2591. treeselect(this.form.fWarehouseid).then((response) => {
  2592. this.fWarehouseidOptions = response.data;
  2593. });
  2594. if (!this.copyStatus) {
  2595. if (response.data.warehouseBillsItem) {
  2596. response.data.warehouseBillsItem.map((e) => {
  2597. e.fBsdate = Date.parse(e.fBsdate);
  2598. e.fBusinessType = e.fBusinessType.toString();
  2599. e.fLntype = e.fLntype ? e.fLntype.toString() : null;
  2600. if (e.fBillstatus == 40) {
  2601. this.clearanceDisabled = true;
  2602. };
  2603. });
  2604. this.detailList = response.data.warehouseBillsItem;
  2605. } else {
  2606. this.detailList = [];
  2607. }
  2608. response.data.warehousebillsfeesCr.map((e) => {
  2609. if (e.fFeeunitid) {
  2610. e.fFeeUnitid = e.fFeeunitid.toString();
  2611. }
  2612. if (e.fStltypeid || e.fStltypeid == 0) {
  2613. e.fStltypeid = e.fStltypeid.toString();
  2614. }
  2615. });
  2616. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2617. response.data.warehousebillsfeesDr.map((e) => {
  2618. if (e.fFeeunitid) {
  2619. e.fFeeUnitid = e.fFeeunitid.toString();
  2620. }
  2621. if (e.fStltypeid || e.fStltypeid == 0) {
  2622. e.fStltypeid = e.fStltypeid.toString();
  2623. }
  2624. });
  2625. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2626. if (response.data.tCntrList) {
  2627. this.CntrTable = response.data.tCntrList;
  2628. } else {
  2629. this.CntrTable = [];
  2630. }
  2631. if (response.data.enclosures) {
  2632. this.relevantAttachments = response.data.enclosures;
  2633. }
  2634. } else {
  2635. this.$set(this.form, "fId", null);
  2636. this.$set(this.form, "fMblno", null);
  2637. this.$set(this.form, "fMarks", null);
  2638. this.$set(this.form, "fProductName", null);
  2639. this.$set(this.form, "fNetweight", 0);
  2640. this.$set(this.form, "fPlanvolumn", 0);
  2641. this.$set(this.form, "fGrossweight", 0);
  2642. }
  2643. });
  2644. },
  2645. changePrint() {
  2646. if (this.form.fCompany) {
  2647. getCorps(this.form.fCompany).then(res => {
  2648. this.fCompanyName = res.data.corp.fName
  2649. this.printFeeConfirm.fAddr = res.data.corp.fAddr
  2650. this.printFeeConfirm.fTel = res.data.corp.fTel
  2651. this.printFeeConfirm.fBankname = res.data.corp.fBankname
  2652. this.printFeeConfirm.fBankno = res.data.corp.fBankno
  2653. this.printFeeConfirm.fTax = res.data.corp.fTax
  2654. })
  2655. } else {
  2656. this.fCompanyName = ''
  2657. this.printFeeConfirm = {
  2658. fAddr: '',
  2659. fBankname: '',
  2660. fBankno: '',
  2661. fTel: '',
  2662. fTax: '',
  2663. }
  2664. }
  2665. },
  2666. submitForm() {
  2667. this.$refs["form"].validate((valid) => {
  2668. if (valid) {
  2669. // if (this.detailList.length === 0) {
  2670. // return this.$message.error("请新增库存明细!");
  2671. // }
  2672. this.updateDeduplication();
  2673. for (let item in this.warehouseDrList) {
  2674. if (!this.warehouseDrList[item].fCorpid) {
  2675. if (item === "fBusinessType") {
  2676. } else {
  2677. this.$message.error(
  2678. "请维护收款信息第" + (Number(item) + 1) + "行客户名称"
  2679. );
  2680. return false;
  2681. }
  2682. }
  2683. if (!this.warehouseDrList[item].fFeeid) {
  2684. if (item === "fBusinessType") {
  2685. } else {
  2686. this.$message.error(
  2687. "请维护收款信息第" + (Number(item) + 1) + "行费用名称"
  2688. );
  2689. return false;
  2690. }
  2691. }
  2692. if (!this.warehouseDrList[item].fFeeUnitid) {
  2693. if (item === "fBusinessType") {
  2694. } else {
  2695. this.$message.error(
  2696. "请维护收款信息第" + (Number(item) + 1) + "行计价单位"
  2697. );
  2698. return false;
  2699. }
  2700. }
  2701. }
  2702. for (let item in this.warehouseCrList) {
  2703. if (!this.warehouseCrList[item].fCorpid) {
  2704. if (item === "fBusinessType") {
  2705. } else {
  2706. this.$message.error(
  2707. "请维护付款信息第" + (Number(item) + 1) + "行客户名称"
  2708. );
  2709. return false;
  2710. }
  2711. }
  2712. if (!this.warehouseCrList[item].fFeeid) {
  2713. if (item === "fBusinessType") {
  2714. } else {
  2715. this.$message.error(
  2716. "请维护付款信息第" + (Number(item) + 1) + "行费用名称"
  2717. );
  2718. return false;
  2719. }
  2720. }
  2721. if (!this.warehouseCrList[item].fFeeUnitid) {
  2722. if (item === "fBusinessType") {
  2723. } else {
  2724. this.$message.error(
  2725. "请维护付款信息第" + (Number(item) + 1) + "行计价单位"
  2726. );
  2727. return false;
  2728. }
  2729. }
  2730. }
  2731. // 附件数据
  2732. this.form.fBillingway = this.form.fFeetUnit;
  2733. if (this.detailList.length == 0) {
  2734. this.form.fNetweight = 0;
  2735. this.form.fPlanvolumn = 0;
  2736. this.form.fGrossweight = 0;
  2737. } else {
  2738. this.form.fNetweight = this.fNetweight;
  2739. this.form.fPlanvolumn = this.fPlanvolumn;
  2740. this.form.fGrossweight = this.fGrossweight;
  2741. }
  2742. if (this.CntrTable.length > 0) {
  2743. let arr = [];
  2744. this.CntrTable.map((e) => {
  2745. this.cntrList.map((item) => {
  2746. if (item.fId == e.fCntrid) {
  2747. arr.push(item.fName + "X" + e.fCntrcount);
  2748. }
  2749. });
  2750. });
  2751. arr = [...new Set(arr)];
  2752. this.form.fCntval = arr.join(",");
  2753. } else {
  2754. this.form.fCntval = null;
  2755. }
  2756. if (this.detailList.length > 0) {
  2757. let arr = [];
  2758. this.detailList.map((e) => {
  2759. this.goodsOptions.map((item) => {
  2760. if (e.fGoodsid == item.fId) {
  2761. arr.push(item.fName);
  2762. }
  2763. });
  2764. });
  2765. arr = [...new Set(arr)];
  2766. this.form.fProductName = arr.join(",");
  2767. } else {
  2768. this.form.fProductName = "";
  2769. }
  2770. if (this.detailList.length > 0) {
  2771. let arr = [];
  2772. this.detailList.map((e) => {
  2773. arr.push(e.fMarks);
  2774. });
  2775. arr = [...new Set(arr)];
  2776. this.form.fMarks = arr.join(",");
  2777. } else {
  2778. this.form.fMarks = "";
  2779. }
  2780. let formData = new window.FormData();
  2781. formData.append("type", "2");
  2782. formData.append("warehouseBills", JSON.stringify(this.form));
  2783. // 库存明细
  2784. formData.append(
  2785. "warehousebillsitems",
  2786. JSON.stringify(this.detailList)
  2787. );
  2788. // 附件数据
  2789. formData.append(
  2790. "tEnclosure",
  2791. JSON.stringify(this.relevantAttachments)
  2792. );
  2793. // 费用明细付款
  2794. formData.append(
  2795. "warehousebillsfeesCr",
  2796. JSON.stringify(this.warehouseCrList)
  2797. );
  2798. // 收款
  2799. formData.append(
  2800. "warehousebillsfeesDr",
  2801. JSON.stringify(this.warehouseDrList)
  2802. );
  2803. formData.append("mblnoStatus", JSON.stringify(this.mblnoStatus));
  2804. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2805. warehouseSubmission(formData).then((response) => {
  2806. if (response.code == 200) {
  2807. this.msgSuccess("提交成功");
  2808. setTimeout(() => {
  2809. this.cancel();
  2810. }, 200);
  2811. }
  2812. });
  2813. }
  2814. });
  2815. },
  2816. saveForm(status) {
  2817. this.$refs["form"].validate((valid) => {
  2818. if (valid) {
  2819. if (this.form.fNewTrademodeid == this.form.fTrademodeid) {
  2820. return this.$alert('新旧贸易方式相同,请做调拨单处理', '提示', {
  2821. confirmButtonText: '确定'
  2822. })
  2823. }
  2824. this.updateDeduplication();
  2825. this.form.fBillingway = this.form.fFeetUnit;
  2826. this.form.fFeetunit = this.form.fFeetUnit;
  2827. if (this.detailList.length == 0) {
  2828. this.form.fNetweight = 0;
  2829. this.form.fPlanvolumn = 0;
  2830. this.form.fGrossweight = 0;
  2831. } else {
  2832. this.form.fNetweight = this.fNetweight;
  2833. this.form.fPlanvolumn = this.fPlanvolumn;
  2834. this.form.fGrossweight = this.fGrossweight;
  2835. }
  2836. if (this.form.fTrademodeid == this.form.fNewTrademodeid) {
  2837. return this.$message.error("原贸易方式不能与新贸易方式相同");
  2838. }
  2839. // 附件数据
  2840. this.form.fQty = this.fQty;
  2841. if (this.CntrTable.length > 0) {
  2842. let arr = [];
  2843. this.CntrTable.map((e) => {
  2844. this.cntrList.map((item) => {
  2845. if (item.fId == e.fCntrid) {
  2846. arr.push(item.fName + "X" + e.fCntrcount);
  2847. }
  2848. });
  2849. });
  2850. arr = [...new Set(arr)];
  2851. this.form.fCntval = arr.join(",");
  2852. } else {
  2853. this.form.fCntval = null;
  2854. }
  2855. if (this.detailList.length > 0) {
  2856. let arr = [];
  2857. this.detailList.map((e) => {
  2858. this.goodsOptions.map((item) => {
  2859. if (e.fGoodsid == item.fId) {
  2860. arr.push(item.fName);
  2861. }
  2862. });
  2863. });
  2864. arr = [...new Set(arr)];
  2865. this.form.fProductName = arr.join(",");
  2866. } else {
  2867. this.form.fProductName = "";
  2868. }
  2869. if (this.detailList.length > 0) {
  2870. let arr = [];
  2871. this.detailList.map((e) => {
  2872. arr.push(e.fMarks);
  2873. });
  2874. arr = [...new Set(arr)];
  2875. this.form.fMarks = arr.join(",");
  2876. } else {
  2877. this.form.fMarks = "";
  2878. }
  2879. this.form.fBillstatus = 2;
  2880. for (let item in this.warehouseDrList) {
  2881. if (!this.warehouseDrList[item].fCorpid) {
  2882. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
  2883. } else if (!this.warehouseDrList[item].fFeeid) {
  2884. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
  2885. } else if (!this.warehouseDrList[item].fFeeUnitid) {
  2886. return this.$message.error('收款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
  2887. }
  2888. }
  2889. for (let item in this.warehouseCrList) {
  2890. if (!this.warehouseCrList[item].fCorpid) {
  2891. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '客户名称不能为空');
  2892. } else if (!this.warehouseCrList[item].fFeeid) {
  2893. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '费用名称不能为空');
  2894. } else if (!this.warehouseCrList[item].fFeeUnitid) {
  2895. return this.$message.error('付款信息第' + (Number(item) + 1) + '行' + '计价单位不能为空');
  2896. }
  2897. }
  2898. let formData = new window.FormData();
  2899. formData.append("type", "2");
  2900. formData.append("warehouseBills", JSON.stringify(this.form));
  2901. // 库存明细
  2902. formData.append(
  2903. "warehousebillsitems",
  2904. JSON.stringify(this.detailList)
  2905. );
  2906. // 附件数据
  2907. formData.append(
  2908. "tEnclosure",
  2909. JSON.stringify(this.relevantAttachments)
  2910. );
  2911. // 费用明细付款
  2912. formData.append(
  2913. "warehousebillsfeesCr",
  2914. JSON.stringify(this.warehouseCrList)
  2915. );
  2916. // 收款
  2917. formData.append(
  2918. "warehousebillsfeesDr",
  2919. JSON.stringify(this.warehouseDrList)
  2920. );
  2921. formData.append("mblnoStatus", JSON.stringify(this.mblnoStatus));
  2922. formData.append("tCntr", JSON.stringify(this.CntrTable));
  2923. addStockTransfer(formData).then((response) => {
  2924. if (response.data == false) {
  2925. this.$confirm(response.msg, "提示", {
  2926. confirmButtonText: "确定",
  2927. cancelButtonText: "取消",
  2928. type: "warning",
  2929. })
  2930. .then(() => {
  2931. this.mblnoStatus = true;
  2932. this.saveForm();
  2933. })
  2934. .catch(() => {
  2935. this.$message({
  2936. type: "info",
  2937. message: "已取消",
  2938. });
  2939. });
  2940. } else {
  2941. if ((response.code = 200)) {
  2942. this.mblnoStatus = "";
  2943. this.form = response.data.warehouseBills;
  2944. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2945. this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
  2946. this.$set(
  2947. this.form,
  2948. "createTime",
  2949. Date.parse(this.form.createTime)
  2950. );
  2951. if (this.form.fStltypeid || this.form.fStltypeid == 0) {
  2952. this.$set(
  2953. this.form,
  2954. "fStltypeid",
  2955. this.form.fStltypeid.toString()
  2956. );
  2957. }
  2958. this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
  2959. if (this.form.fCartype || this.form.fCartype == 0) {
  2960. this.$set(
  2961. this.form,
  2962. "fCartype",
  2963. this.form.fCartype.toString()
  2964. );
  2965. }
  2966. if (this.form.fTrademodeid) {
  2967. this.$set(
  2968. this.form,
  2969. "fTrademodeid",
  2970. this.form.fTrademodeid.toString()
  2971. );
  2972. }
  2973. if (this.form.fNewTrademodeid) {
  2974. this.$set(
  2975. this.form,
  2976. "fNewTrademodeid",
  2977. this.form.fNewTrademodeid.toString()
  2978. );
  2979. }
  2980. response.data.warehousebillsitems.map((e) => {
  2981. e.fBsdate = Date.parse(e.fBsdate);
  2982. e.fBusinessType = e.fBusinessType.toString();
  2983. e.fLntype = e.fLntype ? e.fLntype.toString() : null;
  2984. });
  2985. this.detailList = response.data.warehousebillsitems;
  2986. this.msgSuccess("保存成功");
  2987. if (status == "goBack") {
  2988. this.cancel();
  2989. }
  2990. }
  2991. }
  2992. });
  2993. }
  2994. });
  2995. },
  2996. // 库存明细多选
  2997. Selectinventory(selection) {
  2998. this.Printinglist = selection
  2999. //允许撤销入库list
  3000. this.dataWithdrawList = selection
  3001. //允许确认入库list
  3002. this.dataListSelection = selection
  3003. if (this.dataWithdrawList.length === 0) {
  3004. this.cancelDelivery = true
  3005. } else {
  3006. for (let item in this.dataWithdrawList) {
  3007. if (this.dataWithdrawList[item].fBillstatus === 40) {
  3008. this.cancelDelivery = false
  3009. this.deliveryConfirmation = true
  3010. for (let li in this.dataWithdrawList) {
  3011. if (this.entryPrinting != 0 ? this.dataWithdrawList[li].fBillstatus === 10 : this.dataWithdrawList[li].fBillstatus === 30) {
  3012. this.deliveryConfirmation = true
  3013. this.cancelDelivery = true
  3014. return
  3015. }
  3016. }
  3017. } else if (this.entryPrinting != 0 ? this.dataWithdrawList[item].fBillstatus === 10 : this.dataWithdrawList[item].fBillstatus === 30) {
  3018. this.deliveryConfirmation = false
  3019. this.cancelDelivery = true
  3020. for (let li in this.dataWithdrawList) {
  3021. if (this.dataWithdrawList[li].fBillstatus === 40) {
  3022. this.deliveryConfirmation = true
  3023. this.cancelDelivery = true
  3024. return
  3025. }
  3026. }
  3027. }
  3028. }
  3029. }
  3030. },
  3031. // 合计
  3032. getSummaries(param) {
  3033. const { columns, data } = param;
  3034. const sums = [];
  3035. var values = [];
  3036. columns.forEach((column, index) => {
  3037. if (index === 0) {
  3038. sums[index] = "";
  3039. return;
  3040. }
  3041. if (column.property === "fGrossweight") {
  3042. values = data.map((item) => Number(item["fGrossweight"]));
  3043. }
  3044. if (column.property === "fNetweight") {
  3045. values = data.map((item) => Number(item["fNetweight"]));
  3046. }
  3047. if (column.property === "fQty") {
  3048. values = data.map((item) => Number(item["fQty"]));
  3049. }
  3050. if (column.property === "fCntqty") {
  3051. values = data.map((item) => Number(item["fCntqty"]));
  3052. }
  3053. if (
  3054. column.property === "fGrossweight" ||
  3055. column.property === "fNetweight" ||
  3056. column.property === "fQty" ||
  3057. column.property === "fCntqty"
  3058. ) {
  3059. sums[index] = values.reduce((prev, curr) => {
  3060. const value = Number(curr);
  3061. if (!isNaN(value)) {
  3062. if (column.property === "fGrossweight") {
  3063. this.fGrossweight = prev + curr;
  3064. }
  3065. if (column.property === "fNetweight") {
  3066. this.fNetweight = prev + curr;
  3067. }
  3068. if (column.property === "fQty") {
  3069. this.fQty = prev + curr;
  3070. this.sumMum = prev + curr;
  3071. }
  3072. if (column.property === "fCntqty") {
  3073. this.fCntqty = prev + curr;
  3074. }
  3075. return prev + curr;
  3076. } else {
  3077. return prev;
  3078. }
  3079. }, 0);
  3080. if (column.property === "fGrossweight") {
  3081. sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
  3082. } else if (column.property === "fNetweight") {
  3083. sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
  3084. } else {
  3085. sums[index] = sums[index].toFixed(2);
  3086. }
  3087. }
  3088. });
  3089. this.sums = sums;
  3090. return sums;
  3091. },
  3092. // 付款合计
  3093. warehouseDrSummaries(param) {
  3094. const { columns, data } = param;
  3095. const sums = [];
  3096. columns.forEach((column, index) => {
  3097. if (index === 0) {
  3098. sums[index] = "合计";
  3099. return;
  3100. }
  3101. const values = data.map((item) => Number(item[column.property]));
  3102. if (
  3103. column.property === "fUnitprice" ||
  3104. column.property === "fAmount" ||
  3105. column.property === "fQty" ||
  3106. column.property === "fQty"
  3107. ) {
  3108. sums[index] = values.reduce((prev, curr) => {
  3109. const value = Number(curr);
  3110. if (!isNaN(value)) {
  3111. return prev + curr;
  3112. } else {
  3113. return prev;
  3114. }
  3115. }, 0);
  3116. sums[index] = sums[index].toFixed(2);
  3117. }
  3118. });
  3119. return sums;
  3120. },
  3121. // 库存总账多选框
  3122. whgenlegSelectionChange(selection) {
  3123. this.dialogWhgenlegList = selection;
  3124. },
  3125. handleSelect(key) {
  3126. if (!this.form.fCorpid) {
  3127. this.$message({
  3128. message: "请维护客户",
  3129. type: "warning",
  3130. });
  3131. } else if (this.form.fProductName == undefined) {
  3132. this.$message({
  3133. message: "请维护入库明细品名",
  3134. type: "warning",
  3135. });
  3136. } else {
  3137. this.pageNum = 1;
  3138. this.pageSize = 10;
  3139. this.dialogWhgenlegList = [];
  3140. this.whgenlegTotal = 0;
  3141. this.warehousingagreements = true;
  3142. this.getWhgenlegList(key);
  3143. }
  3144. },
  3145. // 查询作业费信息
  3146. getWhgenlegList(key) {
  3147. let data = {};
  3148. if (key == 2) {
  3149. this.key_id = key;
  3150. this.Navigation = true;
  3151. data = {
  3152. pageNum: this.pageNum,
  3153. pageSize: this.pageSize,
  3154. fTaskType: key,
  3155. fLabour: this.form.fLabour,
  3156. };
  3157. } else if (key == 1) {
  3158. this.key_id = key;
  3159. this.Navigation = true;
  3160. data = {
  3161. pageNum: this.pageNum,
  3162. pageSize: this.pageSize,
  3163. fTaskType: key,
  3164. fFleet: this.form.fFleet,
  3165. };
  3166. } else {
  3167. this.Navigation = false;
  3168. this.key_id = key;
  3169. data = {
  3170. pageNum: this.pageNum,
  3171. pageSize: this.pageSize,
  3172. fCorpid: this.form.fCorpid,
  3173. };
  3174. }
  3175. operationAgreement(data).then((response) => {
  3176. response.rows.map((e) => {
  3177. if (e.fFeeUnitid) {
  3178. e.fFeeUnitid = e.fFeeUnitid.toString();
  3179. }
  3180. });
  3181. this.tasklegList = response.rows;
  3182. this.whgenlegTotal = response.total;
  3183. });
  3184. },
  3185. // 入库明细新增list
  3186. addRelevant() {
  3187. this.$refs["form"].validate((valid) => {
  3188. if (valid) {
  3189. this.whgenlegList = [];
  3190. this.dialogWhgenlegList = [];
  3191. this.whgenlegTotal = 0;
  3192. this.whgenlegVisible = true;
  3193. this.getDetailsList();
  3194. }
  3195. });
  3196. },
  3197. // 查询库存总账信息
  3198. getDetailsList() {
  3199. if (this.detailList.length == 0) {
  3200. this.whgenlegParams.fMblno = this.form.fMblno;
  3201. }
  3202. this.whgenlegParams.fCorpid = this.form.fCorpid;
  3203. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  3204. this.whgenlegParams.fWarehouseid = this.form.fInwarehouseid;
  3205. listWhgenleg(this.whgenlegParams).then((response) => {
  3206. response.rows.map((e) => {
  3207. e.fQtyblc2 = e.fQtyblc;
  3208. e.fGrossweightblc2 = e.fGrossweightblc;
  3209. e.fNetweightblc2 = e.fNetweightblc;
  3210. });
  3211. this.whgenlegList = response.rows;
  3212. this.whgenlegTotal = response.total;
  3213. });
  3214. },
  3215. printZyd() {
  3216. if (this.Printinglist.length > 0) {
  3217. for (let item in this.Printinglist) {
  3218. if (!this.Printinglist[item].fId) {
  3219. return this.$message.error("请先保存!");
  3220. }
  3221. if (
  3222. this.Printinglist[item].fTruckno !== this.Printinglist[0].fTruckno
  3223. ) {
  3224. return this.$message.error("请选择车相同车号");
  3225. }
  3226. }
  3227. this.print_zyd = true;
  3228. this.warehouseOptions.map((e) => {
  3229. if (e.fId == this.form.fWarehouseid) {
  3230. this.stockaddr = e.fAddr;
  3231. }
  3232. });
  3233. this.fDriverTel = this.Printinglist[0].fDriverTel;
  3234. } else {
  3235. this.$message.error("请选择需要打印的明细!");
  3236. }
  3237. },
  3238. handleCommand(command) {
  3239. if (this.Printinglist.length > 0) {
  3240. this.$refs["form"].validate((valid) => {
  3241. if (valid) {
  3242. for (let corp in this.fMblnoOptions) {
  3243. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  3244. this.$set(
  3245. this.form,
  3246. "fCorpidName",
  3247. this.fMblnoOptions[corp].fName
  3248. );
  3249. }
  3250. }
  3251. this.warehouseOptions.map((e) => {
  3252. if (e.fId == this.form.fWarehouseid) {
  3253. this.stockName = e.fName;
  3254. this.stockaddr = e.fAddr;
  3255. }
  3256. });
  3257. this.fDriverTel = this.Printinglist[0].fDriverTel;
  3258. this.fBsdate = this.Printinglist[0].fBsdate;
  3259. this.fTruckno = this.Printinglist[0].fTruckno;
  3260. this.allfCntqty = 0;
  3261. this.allfGrossweight = 0;
  3262. this.allfPlanqty = 0;
  3263. this.allfNetweight = 0;
  3264. this.allfQty = 0;
  3265. this.Printinglist.map((e) => {
  3266. if (e.fCntqty) {
  3267. this.allfCntqty += e.fCntqty;
  3268. }
  3269. if (e.fGrossweight) {
  3270. this.allfGrossweight += e.fGrossweight;
  3271. }
  3272. if (e.fPlanqty) {
  3273. this.allfPlanqty += e.fPlanqty;
  3274. }
  3275. if (e.fNetweight) {
  3276. this.allfNetweight += e.fNetweight;
  3277. }
  3278. if (e.fQty) {
  3279. this.allfQty += e.fQty;
  3280. }
  3281. });
  3282. if (command == "a") {
  3283. this.print_shd = true;
  3284. } else if (command == "b") {
  3285. this.print_rkd = true;
  3286. } else if (command == "c") {
  3287. this.print_ykd = true;
  3288. }
  3289. }
  3290. });
  3291. } else {
  3292. this.$message.error("请选择需要打印的明细!");
  3293. }
  3294. },
  3295. //计算仓储费日期变更
  3296. changeDate() {
  3297. this.$set(this.form, "fChargedate", this.form.fBsdate);
  3298. },
  3299. addRow() {
  3300. var obj = {};
  3301. this.CntrTable.push(obj);
  3302. },
  3303. deleteRow(index, rows) {
  3304. rows.splice(index, 1);
  3305. },
  3306. wDeleteRow(index, rows) {
  3307. rows.splice(index, 1);
  3308. this.sumMum = 0;
  3309. this.detailList.map((e) => {
  3310. if (e.fQty) {
  3311. this.sumMum += e.fQty;
  3312. }
  3313. });
  3314. if (this.detailList.length == 0) {
  3315. this.form.fProductName = "";
  3316. this.form.fMarks = "";
  3317. this.form.fNetweight = 0;
  3318. this.form.fPlanvolumn = 0;
  3319. this.form.fGrossweight = 0;
  3320. }
  3321. },
  3322. // 收款信息新行
  3323. addCollection() {
  3324. this.$refs["form"].validate((valid) => {
  3325. if (valid) {
  3326. if (this.form.fBusinessType == null) {
  3327. this.$message.error("请维护作业类型");
  3328. return false;
  3329. } else {
  3330. this.warehouseDrList.push({
  3331. fCorpid: this.form.fCorpid,
  3332. fFeeid: null,
  3333. fFeeUnitid: "",
  3334. fQty: null,
  3335. fUnitprice: null,
  3336. fAmount: null,
  3337. fCurrency: "RMB",
  3338. fExrate: "1",
  3339. fTaxrate: '0',
  3340. fCxrate: null,
  3341. fRate: null,
  3342. remarks: null,
  3343. fMblno: this.form.fMblno,
  3344. fProductName: this.form.fProductName,
  3345. fMarks: this.form.fMarks,
  3346. fBusinessType: this.form.fBusinessType,
  3347. fSrcTypeId: 0,
  3348. fStltypeid: '1',
  3349. });
  3350. this.fWbuOptions = [];
  3351. let queryParams = { pageNum: 1, fDc: "D" };
  3352. listFees(queryParams).then((response) => {
  3353. this.fDNameOptions = response.rows;
  3354. });
  3355. }
  3356. }
  3357. });
  3358. },
  3359. //付款信息新行
  3360. addpayment() {
  3361. this.$refs["form"].validate((valid) => {
  3362. if (valid) {
  3363. if (this.form.fBusinessType == null) {
  3364. return this.$message.error("请维护作业类型");
  3365. } else {
  3366. this.warehouseCrList.push({
  3367. fCorpid: this.form.fCorpid,
  3368. fFeeid: null,
  3369. fFeeUnitid: "",
  3370. fQty: null,
  3371. fUnitprice: null,
  3372. fAmount: null,
  3373. fCurrency: "RMB",
  3374. fExrate: "1",
  3375. fTaxrate: '0',
  3376. fCxrate: null,
  3377. fRate: null,
  3378. remarks: null,
  3379. fMblno: this.form.fMblno,
  3380. fProductName: this.form.fProductName,
  3381. fMarks: this.form.fMarks,
  3382. fBusinessType: this.form.fBusinessType,
  3383. fSrcTypeId: 0,
  3384. fStltypeid: '1',
  3385. });
  3386. this.fWbuOptions = [];
  3387. let queryParams = { pageNum: 1, fDc: "C" };
  3388. listFees(queryParams).then((response) => {
  3389. this.fCNameOptions = response.rows;
  3390. });
  3391. }
  3392. }
  3393. });
  3394. },
  3395. //导入收付款信息明细
  3396. zhgenlegData() {
  3397. if (this.dialogWhgenlegList.length === 0) {
  3398. this.$message({
  3399. message: "请选择需要导入的数据",
  3400. type: "warning",
  3401. });
  3402. } else {
  3403. this.dialogWhgenlegList.map((e) => {
  3404. let qty = 1;
  3405. if (e.fFeeUnitid == 1) {
  3406. qty = this.fQty;
  3407. } else if (e.fFeeUnitid == 2) {
  3408. qty = (this.fGrossweight / 1000).toFixed(2);
  3409. } else if (e.fFeeUnitid == 3) {
  3410. qty = (this.fNetweight / 1000).toFixed(2);
  3411. } else if (e.fFeeUnitid == 7) {
  3412. qty = this.fCntqty;
  3413. }
  3414. let fAmount = 0;
  3415. fAmount = e.fPrice * qty;
  3416. console.log(this.key_id);
  3417. if (this.key_id == 3) {
  3418. this.warehouseDrList.push({
  3419. fQty: qty,
  3420. fCorpid: e.fCorpid,
  3421. fFeeid: e.feeFId,
  3422. fFeeUnitid: e.fFeeUnitid,
  3423. fUnitprice: e.fPrice,
  3424. fCurrency: "RMB",
  3425. fExrate: 1,
  3426. fAmount: fAmount,
  3427. fTaxrate: '0',
  3428. fMblno: this.form.fMblno,
  3429. fProductName: this.form.fProductName,
  3430. fMarks: this.form.fMarks,
  3431. fBusinessType: this.form.fBusinessType,
  3432. fSrcTypeId: 1,
  3433. fStltypeid: '1',
  3434. });
  3435. } else {
  3436. this.warehouseCrList.push({
  3437. fQty: qty,
  3438. fCorpid: e.fCorpid,
  3439. fFeeid: e.feeFId,
  3440. fFeeUnitid: e.fFeeUnitid,
  3441. fUnitprice: e.fPrice,
  3442. fCurrency: "RMB",
  3443. fExrate: 1,
  3444. fAmount: fAmount,
  3445. fTaxrate: '0',
  3446. fMblno: this.form.fMblno,
  3447. fProductName: this.form.fProductName,
  3448. fMarks: this.form.fMarks,
  3449. fBusinessType: this.form.fBusinessType,
  3450. fSrcTypeId: 1,
  3451. fStltypeid: '1',
  3452. });
  3453. }
  3454. });
  3455. this.warehousingagreements = false;
  3456. }
  3457. },
  3458. // 收款选
  3459. Collectionoptions(selection) {
  3460. this.Collectionoptionss = selection;
  3461. for (let item in this.fWbuOptions) {
  3462. for (let li in this.Collectionoptionss) {
  3463. if (
  3464. this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
  3465. ) {
  3466. this.$set(
  3467. this.Collectionoptionss[li],
  3468. "fFeeids",
  3469. this.fWbuOptions[item].fName
  3470. );
  3471. }
  3472. }
  3473. }
  3474. },
  3475. //获取登陆人
  3476. queryUser() {
  3477. queryUserVal().then((response) => {
  3478. if (response.user !== null) {
  3479. this.userVal = response.user;
  3480. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3481. this.$set(this.form, "createBy", this.userVal.userName);
  3482. this.$set(this.form, "fStorekeeper", this.userVal.nickName);
  3483. this.$set(this.form, "fIfdamage", "1");
  3484. this.$set(this.form, "fIfweigh", "1");
  3485. this.$set(this.form, "fTrademodeid", "1");
  3486. this.$set(this.form, "createTime", Date.parse(new Date()));
  3487. this.$set(this.form, "fBstime", Date.parse(new Date()));
  3488. this.$set(this.form, "fBusinessType", "0");
  3489. }
  3490. if (response.dept !== null) {
  3491. this.deptOptions = [];
  3492. this.deptOptions.push(response.dept);
  3493. }
  3494. });
  3495. },
  3496. //作业类型校验
  3497. educationChange() {
  3498. if (this.form.fBusinessType === "1" || this.form.fBusinessType === "2") {
  3499. this.isrequired = 1;
  3500. this.isrequired2 = 2;
  3501. } else if (
  3502. this.form.fBusinessType === "3" ||
  3503. this.form.fBusinessType === "4"
  3504. ) {
  3505. this.isrequired2 = 1;
  3506. this.isrequired = 2;
  3507. } else {
  3508. this.isrequired = 2;
  3509. this.isrequired2 = 2;
  3510. }
  3511. },
  3512. // 数量计算
  3513. changeContractAmt(row) {
  3514. let fQty = 0;
  3515. let fUnitprice = 0;
  3516. if (row.fUnitprice) {
  3517. fUnitprice = row.fUnitprice;
  3518. }
  3519. if (row.fQty) {
  3520. fQty = row.fQty;
  3521. }
  3522. this.$set(row, "fAmount", (Number(fUnitprice) * Number(fQty)).toFixed(2));
  3523. },
  3524. // 变更计价单位
  3525. changeFeeUnit(row) {
  3526. if (!row.fFeeUnitid) {
  3527. return false;
  3528. }
  3529. if (row.fFeeUnitid === "2") {
  3530. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(3));
  3531. } else if (row.fFeeUnitid === "1") {
  3532. this.$set(row, "fQty", this.fQty.toFixed(2));
  3533. } else if (row.fFeeUnitid === "3") {
  3534. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(3));
  3535. } else if (row.fFeeUnitid === "7") {
  3536. this.$set(row, "fQty", this.fCntqty);
  3537. } else if (row.fFeeUnitid === "8") {
  3538. this.$set(row, "fQty", 1);
  3539. } else {
  3540. this.$set(row, "fQty", 0);
  3541. }
  3542. if (row.fUnitprice) {
  3543. this.$set(
  3544. row,
  3545. "fAmount",
  3546. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  3547. );
  3548. }
  3549. },
  3550. updateDeduplication() {
  3551. if (this.detailList.length) {
  3552. let fMarks = [];
  3553. let fProductName = [];
  3554. let fMblno = [];
  3555. this.detailList.map((e) => {
  3556. if (e.fMarks) {
  3557. fMarks.push(e.fMarks);
  3558. }
  3559. if (e.fGoodsids) {
  3560. fProductName.push(e.fGoodsids);
  3561. }
  3562. if (e.fMblno) {
  3563. fMblno.push(e.fMblno);
  3564. }
  3565. });
  3566. this.$set(this.form, "fMarks", [...new Set(fMarks)].join(","));
  3567. this.$set(
  3568. this.form,
  3569. "fProductName",
  3570. [...new Set(fProductName)].join(",")
  3571. );
  3572. fMblno = [...new Set(fMblno)];
  3573. if (fMblno.length <= 2) {
  3574. this.$set(this.form, "fMblno", [...new Set(fMblno)].join(","));
  3575. } else {
  3576. this.$set(this.form, "fMblno", fMblno[0] + "," + fMblno[1] + "…");
  3577. }
  3578. }
  3579. },
  3580. //打印
  3581. addprint(status) {
  3582. if (status == "zyd") {
  3583. if (this.CntrTable.length > 0) {
  3584. let arr = [];
  3585. this.CntrTable.map((e) => {
  3586. this.cntrList.map((item) => {
  3587. if (item.fId == e.fCntrid) {
  3588. arr.push(item.fName + "X" + e.fCntrcount);
  3589. }
  3590. });
  3591. });
  3592. arr = [...new Set(arr)];
  3593. this.form.fCntval = arr.join(",");
  3594. } else {
  3595. this.form.fCntval = null;
  3596. }
  3597. if (this.detailList.length > 0) {
  3598. let arr = [];
  3599. this.detailList.map((e) => {
  3600. this.goodsOptions.map((item) => {
  3601. if (e.fGoodsid == item.fId) {
  3602. arr.push(item.fName);
  3603. }
  3604. });
  3605. });
  3606. arr = [...new Set(arr)];
  3607. this.form.fProductName = arr.join(",");
  3608. } else {
  3609. this.form.fProductName = "";
  3610. }
  3611. if (this.detailList.length > 0) {
  3612. let arr = [];
  3613. this.detailList.map((e) => {
  3614. arr.push(e.fMarks);
  3615. });
  3616. arr = [...new Set(arr)];
  3617. this.form.fMarks = arr.join(",");
  3618. } else {
  3619. this.form.fMarks = "";
  3620. }
  3621. this.form.fBillingway = this.form.fFeetUnit;
  3622. if (this.detailList.length == 0) {
  3623. this.form.fNetweight = 0;
  3624. this.form.fPlanvolumn = 0;
  3625. this.form.fGrossweight = 0;
  3626. } else {
  3627. this.form.fNetweight = this.fNetweight;
  3628. this.form.fPlanvolumn = this.fPlanvolumn;
  3629. this.form.fGrossweight = this.fGrossweight;
  3630. }
  3631. let formData = new window.FormData();
  3632. formData.append("type", "2");
  3633. formData.append("warehouseBills", JSON.stringify(this.form));
  3634. formData.append(
  3635. "warehousebillsitems",
  3636. JSON.stringify(this.Printinglist)
  3637. );
  3638. formData.append(
  3639. "warehousebillsfeesDr",
  3640. JSON.stringify(this.warehouseDrList)
  3641. );
  3642. formData.append(
  3643. "warehousebillsfeesCr",
  3644. JSON.stringify(this.warehouseCrList)
  3645. );
  3646. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3647. formData.append("tCntr", JSON.stringify(this.CntrTable));
  3648. addJoblist(formData).then((response) => {
  3649. if (response.code == 200) {
  3650. this.detailList.map((e, index) => {
  3651. response.data.warehousebillsitems.map((item) => {
  3652. item.fBsdate = Date.parse(new Date(item.fBsdate));
  3653. if (item.fBusinessType) {
  3654. item.fBusinessType = item.fBusinessType.toString();
  3655. }
  3656. item.fLntype = item.fLntype ? item.fLntype.toString() : null;
  3657. if (e.fId == item.fId) {
  3658. this.$set(this.detailList, index, item);
  3659. }
  3660. });
  3661. });
  3662. this.$set(this.form, "fItemsStatus", 2);
  3663. }
  3664. });
  3665. }
  3666. const style =
  3667. "@page { } " +
  3668. "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
  3669. print({
  3670. printable: "print_area1",
  3671. type: "html",
  3672. style: style, // 亦可使用引入的外部css;
  3673. scanStyles: false,
  3674. });
  3675. },
  3676. cancel() {
  3677. if (this.$route.query.id) {
  3678. this.$router.push({ query: {} });
  3679. }
  3680. this.resetForm("form");
  3681. this.detailList = [];
  3682. this.relevantAttachments = [];
  3683. this.warehouseCrList = [];
  3684. this.warehouseDrList = [];
  3685. this.CntrTable = [];
  3686. this.$emit("changeShow", "true");
  3687. },
  3688. goBack() {
  3689. this.$confirm("是否确定返回列表?", "提示", {
  3690. confirmButtonText: "保存",
  3691. cancelButtonText: "取消",
  3692. type: "warning",
  3693. })
  3694. .then(() => {
  3695. this.saveForm("goBack");
  3696. })
  3697. .catch(() => {
  3698. this.cancel();
  3699. });
  3700. },
  3701. feeChange(fDC) {
  3702. let data = {
  3703. form: {},
  3704. warehousebillsfeesCr: [],
  3705. warehousebillsfeesDr: [],
  3706. billType: 'cargoClearance',
  3707. fDc: fDC
  3708. }
  3709. data.form = this.form
  3710. if (fDC == 'C') {
  3711. data.warehousebillsfeesCr = this.warehouseCrList
  3712. } else {
  3713. data.warehousebillsfeesDr = this.warehouseDrList
  3714. }
  3715. this.$router.push({
  3716. path: "/business/costModify",
  3717. query: { data: data },
  3718. });
  3719. },
  3720. // 费用明细请核
  3721. listCheck(row) {
  3722. feesCheck(row.fId).then(res => {
  3723. this.$message.success('请核成功')
  3724. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  3725. res.data.fStltypeid = res.data.fStltypeid.toString();
  3726. if (res.data.fDc == 'D') {
  3727. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  3728. this.warehouseDrList.splice(index, 1, res.data)
  3729. } else {
  3730. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  3731. this.warehouseCrList.splice(index, 1, res.data)
  3732. }
  3733. })
  3734. },
  3735. // 费用明细撤销请核
  3736. revokeListCheck(row) {
  3737. revokefeeCheck(row.fId).then(res => {
  3738. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  3739. res.data.fStltypeid = res.data.fStltypeid.toString();
  3740. this.$message.success('操作成功')
  3741. if (res.data.fDc == 'D') {
  3742. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  3743. this.warehouseDrList.splice(index, 1, res.data)
  3744. } else {
  3745. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  3746. this.warehouseCrList.splice(index, 1, res.data)
  3747. }
  3748. })
  3749. },
  3750. feeChoice(row) {
  3751. getFees(row.fFeeid).then(res => {
  3752. row.fFeeUnitid = (res.data.fFeeunitid).toString()
  3753. this.changeFeeUnit(row)
  3754. })
  3755. },
  3756. // 原仓库和新仓库一样
  3757. fInwarehouseChange() {
  3758. if (this.form.fInwarehouseid) this.$set(this.form, 'fWarehouseid', this.form.fInwarehouseid)
  3759. },
  3760. },
  3761. watch: {
  3762. // 监听 addOrUpdateVisible 改变
  3763. addOrUpdateVisible(oldVal, newVal) {
  3764. this.showDialog = this.addOrUpdateVisible;
  3765. },
  3766. },
  3767. };
  3768. </script>
  3769. <style lang="scss" scoped>
  3770. .tag-hover:hover {
  3771. background-color: #d9ebfb;
  3772. }
  3773. .tag-hover {
  3774. border-top-left-radius: 0;
  3775. border-bottom-left-radius: 0;
  3776. height: 15px;
  3777. padding: 0px 1px;
  3778. line-height: 12px;
  3779. }
  3780. .print-div {
  3781. color: #000;
  3782. }
  3783. .print_table {
  3784. table {
  3785. border-right: 1px solid #000;
  3786. border-bottom: 1px solid #000;
  3787. font-size: 12px;
  3788. margin-bottom: 5px;
  3789. }
  3790. table td {
  3791. border-left: 1px solid #000;
  3792. border-top: 1px solid #000;
  3793. vertical-align: middle;
  3794. padding: 2px;
  3795. text-align: center;
  3796. }
  3797. }
  3798. .print_form {
  3799. font-size: 12px;
  3800. }
  3801. </style>