AddOrUpdate.vue 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930
  1. <template>
  2. <div>
  3. <el-breadcrumb separator="/">
  4. <el-breadcrumb-item
  5. ><span style="font-weight: 700">入库</span></el-breadcrumb-item
  6. >
  7. <el-breadcrumb-item
  8. ><span style="font-weight: 700">入库详情页</span></el-breadcrumb-item
  9. >
  10. </el-breadcrumb>
  11. <br />
  12. <div>
  13. <el-popconfirm title="是否确认离开此页面?" @confirm="changeShow">
  14. <el-button slot="reference" size="mini" icon="el-icon-arrow-left"
  15. >返回列表</el-button
  16. >
  17. </el-popconfirm>
  18. </div>
  19. <br />
  20. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  21. <el-row>
  22. <el-col :span="8">
  23. <el-form-item label="货权方" prop="fCorpid">
  24. <el-select
  25. v-model="form.fCorpid"
  26. clearable
  27. filterable
  28. remote
  29. reserve-keyword
  30. placeholder="请输入关键词"
  31. :remote-method="corpremoteMethod"
  32. :loading="selectloading"
  33. @clear="clear('fCorpid')"
  34. style="width: 80%"
  35. >
  36. <el-option
  37. v-for="(item, index) in fMblnoOptions"
  38. :key="index.fId"
  39. :label="item.fName"
  40. :value="item.fId"
  41. ></el-option>
  42. </el-select>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="8">
  46. <el-form-item label="结算方式" prop="fStltypeid">
  47. <el-select
  48. v-model="form.fStltypeid"
  49. placeholder="请选择结算方式"
  50. clearable
  51. :disabled="browseStatus || formBrowseStatus"
  52. style="width: 80%"
  53. >
  54. <el-option
  55. v-for="(item, index) in fStltypeOptions"
  56. :key="index.dictValue"
  57. :label="item.dictLabel"
  58. :value="item.dictValue"
  59. />
  60. </el-select>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :span="8">
  64. <el-form-item label="提单号" prop="fMblno">
  65. <el-input
  66. v-model="form.fMblno"
  67. :disabled="browseStatus || formBrowseStatus"
  68. style="width: 80%"
  69. placeholder="手工输入"
  70. />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. <el-row>
  75. <el-col :span="8">
  76. <el-form-item label="入库日期" prop="fBsdate">
  77. <el-date-picker
  78. v-model="form.fBsdate"
  79. style="width: 80%"
  80. type="date"
  81. :disabled="browseStatus || formBrowseStatus"
  82. value-format="timestamp"
  83. placeholder="入库日期"
  84. @change="changeDate"
  85. >
  86. </el-date-picker>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="8">
  90. <el-form-item label="入库时间" prop="fBstime">
  91. <el-time-picker
  92. style="width: 80%"
  93. :disabled="browseStatus || formBrowseStatus"
  94. v-model="form.fBstime"
  95. :picker-options="{
  96. selectableRange: '00:00:00 - 23:59:59',
  97. }"
  98. value-format="timestamp"
  99. placeholder="任意时间点"
  100. >
  101. </el-time-picker>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="8">
  105. <el-form-item prop="fChargedate" label="仓储费计算日期">
  106. <el-date-picker
  107. v-model="form.fChargedate"
  108. type="date"
  109. style="width: 80%"
  110. value-format="timestamp"
  111. :disabled="browseStatus || formBrowseStatus"
  112. placeholder="仓储费计算日期"
  113. >
  114. </el-date-picker>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="8">
  118. <el-form-item prop="fGoodsid" label="品名">
  119. <el-select
  120. filterable
  121. v-model="form.fGoodsid"
  122. style="width: 80%"
  123. :disabled="browseStatus || formBrowseStatus"
  124. placeholder="请选择品名"
  125. >
  126. <el-option
  127. v-for="(item, index) in goodsOptions"
  128. :key="index.fId"
  129. :label="item.fName"
  130. :value="item.fId"
  131. ></el-option>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="8">
  136. <el-form-item label="仓库" prop="fWarehouseid">
  137. <el-select
  138. v-model="form.fWarehouseid"
  139. filterable
  140. :disabled="browseStatus || formBrowseStatus"
  141. style="width: 80%"
  142. @keyup.enter.native="handleQuery"
  143. placeholder="请选择"
  144. >
  145. <el-option
  146. v-for="(item, index) in warehouseOptions"
  147. :key="index.fId"
  148. :label="item.fName"
  149. :value="item.fId"
  150. ></el-option>
  151. </el-select>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="8">
  155. <el-form-item label="仓管员" prop="fStorekeeper">
  156. <el-select
  157. v-model="form.fStorekeeper"
  158. filterable
  159. remote
  160. clearable
  161. reserve-keyword
  162. :disabled="browseStatus || formBrowseStatus"
  163. style="width: 80%"
  164. :remote-method="userRemoteMethod"
  165. placeholder="请输入模糊查找"
  166. :loading="selectloading"
  167. @clear="clear('fStorekeeper')"
  168. >
  169. <el-option
  170. v-for="(item, index) in userOptions"
  171. :key="index.userName"
  172. :label="item.nickName"
  173. :value="item.userName"
  174. ></el-option>
  175. </el-select>
  176. </el-form-item>
  177. </el-col>
  178. </el-row>
  179. <el-row>
  180. <el-col :span="8">
  181. <el-form-item label="计划件数" prop="fPlanqty">
  182. <el-input
  183. v-model.number="form.fPlanqty"
  184. style="width: 80%"
  185. maxlength="9"
  186. laceholder="计划件数"
  187. :disabled="browseStatus || current !== before"
  188. />
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="8">
  192. <el-form-item label="计划净重(kg)" prop="fPlannetweight">
  193. <el-input
  194. v-model.number="form.fPlannetweight"
  195. style="width: 80%"
  196. maxlength="9"
  197. v-input-limit="0"
  198. laceholder="计划净重"
  199. :disabled="browseStatus || current !== before"
  200. />
  201. </el-form-item>
  202. </el-col>
  203. <el-col :span="8">
  204. <el-form-item label="计划毛重(kg)" prop="fPlangrossweight">
  205. <el-input
  206. v-model.number="form.fPlangrossweight"
  207. v-input-limit="0"
  208. style="width: 80%"
  209. laceholder="计划毛重"
  210. maxlength="9"
  211. :disabled="browseStatus || current !== before"
  212. />
  213. </el-form-item>
  214. </el-col>
  215. </el-row>
  216. <el-row>
  217. <el-col :span="8">
  218. <el-form-item label="作业类型" prop="fBusinessType">
  219. <el-select
  220. style="width: 80%"
  221. v-model="form.fBusinessType"
  222. filterable
  223. :disabled="contrOl || browseStatus"
  224. >
  225. <el-option
  226. v-for="(item, index) in businessTypeOption"
  227. :key="index.dictValue"
  228. :label="item.dictLabel"
  229. :value="item.dictValue"
  230. ></el-option>
  231. </el-select>
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="8">
  235. <el-form-item label="劳务公司" prop="fLabour">
  236. <el-select
  237. style="width: 80%"
  238. v-model="form.fLabour"
  239. clearable
  240. filterable
  241. remote
  242. reserve-keyword
  243. placeholder="请输入关键词"
  244. :remote-method="flabourRemoteMethod"
  245. :loading="selectloading"
  246. @clear="clear('fLabour')"
  247. >
  248. <el-option
  249. v-for="(item, index) in fCompanyOptIons"
  250. :key="index.fId"
  251. :label="item.fName"
  252. :value="item.fId"
  253. ></el-option>
  254. </el-select>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="8">
  258. <el-form-item
  259. label="车队"
  260. prop="fFleet"
  261. :rules="{
  262. required: isrequired === 1 ? true : false,
  263. message: '请选择',
  264. trigger: ['blur', 'change'],
  265. }"
  266. >
  267. <el-select
  268. style="width: 80%"
  269. v-model="form.fFleet"
  270. clearable
  271. filterable
  272. remote
  273. reserve-keyword
  274. placeholder="请输入关键词"
  275. :remote-method="fleetRemoteMethod"
  276. :disabled="contrOl || browseStatus"
  277. :loading="selectloading"
  278. @clear="clear('fFleet')"
  279. >
  280. <el-option
  281. v-for="(item, index) in fleetOptions"
  282. :key="index.fId"
  283. :label="item.fName"
  284. :value="item.fId"
  285. ></el-option>
  286. </el-select>
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. <el-row>
  291. <el-col :span="8">
  292. <el-form-item label="计费单位" prop="fFeetunit">
  293. <el-select
  294. v-model="form.fFeetunit"
  295. placeholder="请选择计费单位"
  296. clearable
  297. :disabled="browseStatus || formBrowseStatus"
  298. style="width: 80%"
  299. >
  300. <el-option
  301. v-for="(item, index) in fFeetunitOptions"
  302. :key="index.dictValue"
  303. :label="item.dictLabel"
  304. :value="item.dictValue"
  305. />
  306. </el-select>
  307. </el-form-item>
  308. </el-col>
  309. <el-col :span="8">
  310. <el-form-item
  311. label="车号"
  312. prop="fTruckno"
  313. :rules="{
  314. required: isrequired_s === 1 ? true : false,
  315. message: '请选择',
  316. trigger: ['blur', 'change'],
  317. }"
  318. >
  319. <el-input
  320. v-model="form.fTruckno"
  321. style="width: 80%"
  322. :disabled="browseStatus || formBrowseStatus"
  323. placeholder="车号"
  324. />
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="8">
  328. <el-form-item
  329. label="司机姓名"
  330. prop="fDriverName"
  331. :rules="{
  332. required: isrequired_s === 1 ? true : false,
  333. message: '请选择',
  334. trigger: ['blur', 'change'],
  335. }"
  336. >
  337. <el-input
  338. v-model="form.fDriverName"
  339. style="width: 80%"
  340. :disabled="browseStatus || formBrowseStatus"
  341. placeholder="司机姓名"
  342. />
  343. </el-form-item>
  344. </el-col>
  345. </el-row>
  346. <el-row>
  347. <el-col :span="16">
  348. <el-row>
  349. <el-col :span="12">
  350. <el-form-item
  351. label="司机身份证"
  352. prop="fDriverIdCar"
  353. :rules="{
  354. required: isrequired_s === 1 ? true : false,
  355. message: '请选择',
  356. trigger: ['blur', 'change'],
  357. }"
  358. >
  359. <el-input
  360. v-model="form.fDriverIdCar"
  361. style="width: 80%"
  362. :disabled="browseStatus || formBrowseStatus"
  363. placeholder="司机身份证"
  364. />
  365. </el-form-item>
  366. </el-col>
  367. <el-col :span="12">
  368. <el-form-item
  369. label="司机电话"
  370. prop="fDriverTel"
  371. :rules="{
  372. required: isrequired_s === 1 ? true : false,
  373. message: '请选择',
  374. trigger: ['blur', 'change'],
  375. }"
  376. >
  377. <el-input
  378. v-model="form.fDriverTel"
  379. style="width: 80%"
  380. :disabled="browseStatus || formBrowseStatus"
  381. placeholder="司机电话"
  382. />
  383. </el-form-item>
  384. </el-col>
  385. </el-row>
  386. <el-row>
  387. <el-col :span="24">
  388. <el-form-item label="备注" prop="remark">
  389. <el-input
  390. style="width: 91.5%"
  391. v-model="form.remark"
  392. type="textarea"
  393. :disabled="browseStatus"
  394. placeholder="请输入内容"
  395. />
  396. </el-form-item>
  397. </el-col>
  398. </el-row>
  399. <el-row>
  400. <el-col :offset="16" :span="2">
  401. <el-form-item>
  402. <el-button
  403. @click="
  404. detailsHidden
  405. ? (detailsHidden = false)
  406. : (detailsHidden = true)
  407. "
  408. >{{ detailsHidden ? "隐藏" : "展开" }}
  409. </el-button>
  410. </el-form-item>
  411. </el-col>
  412. </el-row>
  413. </el-col>
  414. <el-col :span="8">
  415. <el-form-item>
  416. <el-table
  417. :data="CntrTable"
  418. style="width: 80%"
  419. :header-cell-style="{ lineHeight: '16px' }"
  420. height="139"
  421. >
  422. <el-table-column
  423. prop="fCntrid "
  424. label="箱型"
  425. header-align="center"
  426. align="center"
  427. >
  428. <template slot-scope="scope">
  429. <el-select
  430. placeholder="请选择箱型"
  431. v-model="scope.row.fCntrid"
  432. size="mini"
  433. >
  434. <el-option
  435. v-for="(item, index) in fCntridlist"
  436. :key="index.value"
  437. :label="item.label"
  438. :value="item.value"
  439. >
  440. </el-option>
  441. </el-select>
  442. </template>
  443. </el-table-column>
  444. <el-table-column
  445. prop="fCntrcount"
  446. label="箱量"
  447. header-align="center"
  448. align="center"
  449. >
  450. <template slot-scope="scope">
  451. <el-input
  452. placeholder="请输入箱量"
  453. v-model="scope.row.fCntrcount"
  454. size="mini"
  455. >
  456. </el-input>
  457. </template>
  458. </el-table-column>
  459. <el-table-column
  460. prop="fCntrcount"
  461. label="操作"
  462. header-align="center"
  463. align="center"
  464. width="50"
  465. >
  466. <template slot-scope="scope">
  467. <el-button
  468. size="mini"
  469. type="text"
  470. @click.native.prevent="deleteRow(scope.$index, CntrTable)"
  471. icon="el-icon-delete"
  472. ></el-button>
  473. </template>
  474. </el-table-column>
  475. </el-table>
  476. <div style="display: flex; justify-content: center; width: 80%">
  477. <el-tag class="tag-hover" @click="addRow"
  478. ><i class="el-icon-plus"></i
  479. ></el-tag>
  480. </div>
  481. </el-form-item>
  482. </el-col>
  483. </el-row>
  484. <div v-if="detailsHidden">
  485. <el-row style="margin-top: 30px">
  486. <el-col :span="8">
  487. <el-form-item label="仓库联系人" prop="fContacts">
  488. <el-input
  489. v-model="form.fContacts"
  490. style="width: 80%"
  491. :disabled="browseStatus || formBrowseStatus"
  492. placeholder="仓库联系人"
  493. />
  494. </el-form-item>
  495. </el-col>
  496. <el-col :span="8">
  497. <el-form-item label="仓库电话" prop="fTel">
  498. <el-input
  499. v-model="form.fTel"
  500. :disabled="browseStatus || formBrowseStatus"
  501. style="width: 80%"
  502. placeholder="请输仓库入电话"
  503. />
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="8">
  507. <el-form-item label="船名航次" prop="fVslvoy">
  508. <el-input
  509. v-model="form.fVslvoy"
  510. style="width: 80%"
  511. :disabled="browseStatus || formBrowseStatus"
  512. placeholder="船名航次"
  513. />
  514. </el-form-item>
  515. </el-col>
  516. </el-row>
  517. <el-row>
  518. <el-col :span="8">
  519. <el-form-item label="到港日期" prop="fEta">
  520. <el-date-picker
  521. v-model="form.fEta"
  522. style="width: 80%"
  523. type="date"
  524. :disabled="browseStatus || formBrowseStatus"
  525. value-format="timestamp"
  526. placeholder="到港日期"
  527. >
  528. </el-date-picker>
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="8">
  532. <el-form-item label="报关单号" prop="fCustomno">
  533. <el-input
  534. v-model="form.fCustomno"
  535. style="width: 80%"
  536. :disabled="browseStatus || formBrowseStatus"
  537. laceholder="报关单号"
  538. />
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="8">
  542. <el-form-item label="经营单位" prop="fSbu">
  543. <el-select
  544. v-model="form.fSbu"
  545. clearable
  546. filterable
  547. remote
  548. reserve-keyword
  549. placeholder="请输入关键词"
  550. :remote-method="fSbuRemoteMethod"
  551. :loading="selectloading"
  552. @clear="clear('fSbu')"
  553. >
  554. <el-option
  555. v-for="(item, index) in fSbuOptions"
  556. :key="index.fId"
  557. :label="item.fName"
  558. :value="item.fId"
  559. ></el-option>
  560. </el-select>
  561. </el-form-item>
  562. </el-col>
  563. </el-row>
  564. <el-row>
  565. <el-col :span="8">
  566. <el-form-item label="单据编号" prop="fBillno">
  567. <el-input
  568. v-model="form.fBillno"
  569. disabled
  570. style="width: 80%"
  571. placeholder="单据编号"
  572. />
  573. </el-form-item>
  574. </el-col>
  575. <el-col :span="8">
  576. <el-form-item label="贸易方式" prop="fTrademodeid">
  577. <el-select
  578. v-model="form.fTrademodeid"
  579. placeholder="请选择贸易方式"
  580. :disabled="browseStatus || formBrowseStatus"
  581. clearable
  582. style="width: 80%"
  583. >
  584. <el-option
  585. v-for="(item, index) in fTrademodeidOptions"
  586. :key="index.dictValue"
  587. :label="item.dictLabel"
  588. :value="item.dictValue"
  589. />
  590. </el-select>
  591. </el-form-item>
  592. </el-col>
  593. <el-col :span="8">
  594. <el-form-item label="制单人" prop="createBy">
  595. <el-input
  596. disabled
  597. v-model="form.createBy"
  598. style="width: 80%"
  599. placeholder="制单人"
  600. />
  601. </el-form-item>
  602. </el-col>
  603. </el-row>
  604. <el-row>
  605. <el-col :span="8">
  606. <el-form-item label="制单部门" prop="fDeptid">
  607. <el-select
  608. v-model="form.fDeptid"
  609. filterable
  610. disabled
  611. style="width: 80%"
  612. remote
  613. >
  614. <el-option
  615. v-for="(item, index) in deptOptions"
  616. :key="index.deptId"
  617. :label="item.deptName"
  618. :value="item.deptId"
  619. ></el-option>
  620. </el-select>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="8">
  624. <el-form-item disabled label="制单日期" prop="fbilldate">
  625. <el-date-picker
  626. v-model="form.createTime"
  627. size="large"
  628. type="date"
  629. disabled
  630. style="width: 80%"
  631. value-format="timestamp"
  632. placeholder="制单日期"
  633. >
  634. </el-date-picker>
  635. </el-form-item>
  636. </el-col>
  637. <el-col :span="8">
  638. <el-form-item label="过磅" prop="fIfweigh">
  639. <el-select
  640. v-model="form.fIfweigh"
  641. placeholder="请选择是否过磅"
  642. clearable
  643. :disabled="browseStatus || formBrowseStatus"
  644. style="width: 80%"
  645. >
  646. <el-option
  647. v-for="(item, index) in fIfweighOptions"
  648. :key="index.dictValue"
  649. :label="item.dictLabel"
  650. :value="item.dictValue"
  651. />
  652. </el-select>
  653. </el-form-item>
  654. </el-col>
  655. </el-row>
  656. <el-row>
  657. <el-col :span="8">
  658. <el-form-item label="品名" prop="fProductName">
  659. <el-input
  660. v-model="form.fProductName"
  661. style="width: 80%"
  662. disabled
  663. placeholder="品名"
  664. />
  665. </el-form-item>
  666. </el-col>
  667. <el-col :span="8">
  668. <el-form-item label="品牌">
  669. <el-input
  670. v-model="form.fMarks"
  671. style="width: 80%"
  672. disabled
  673. placeholder="品牌"
  674. />
  675. </el-form-item>
  676. </el-col>
  677. <el-col :span="8">
  678. <el-form-item label="存货编号" prop="fBscorpno">
  679. <el-input
  680. disabled
  681. v-model="form.fBscorpno"
  682. style="width: 80%"
  683. laceholder="存货编号"
  684. />
  685. </el-form-item>
  686. </el-col>
  687. </el-row>
  688. <el-row>
  689. <el-col :span="8">
  690. <el-form-item label="质押" prop="fIfpledge">
  691. <el-select
  692. v-model="form.fIfpledge"
  693. placeholder="请选择是否质押"
  694. clearable
  695. :disabled="browseStatus || formBrowseStatus"
  696. style="width: 80%"
  697. >
  698. <el-option
  699. v-for="(item, index) in fIfpledgeOptions"
  700. :key="index.dictValue"
  701. :label="item.dictLabel"
  702. :value="item.dictValue"
  703. />
  704. </el-select>
  705. </el-form-item>
  706. </el-col>
  707. <el-col :span="8">
  708. <el-form-item label="质押银行" prop="fBankcorpid">
  709. <el-select
  710. v-model="form.fBankcorpid"
  711. filterable
  712. remote
  713. clearable
  714. style="width: 80%"
  715. :disabled="browseStatus || formBrowseStatus"
  716. @keyup.enter.native="handleQuery"
  717. :remote-method="corpsRemoteMethodd"
  718. placeholder="请输入关键词"
  719. @clear="clear('fBankcorpid')"
  720. >
  721. <el-option
  722. v-for="(item, index) in Pledgebank"
  723. :key="index.fId"
  724. :label="item.fName"
  725. :value="item.fId"
  726. ></el-option>
  727. </el-select>
  728. </el-form-item>
  729. </el-col>
  730. </el-row>
  731. </div>
  732. </el-form>
  733. <el-collapse v-model="collapselist">
  734. <el-collapse-item name="1">
  735. <template slot="title">
  736. <i class="el-icon-s-home" style="font-size: 16px"></i>
  737. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  738. >入库明细</span
  739. >
  740. </template>
  741. <div>
  742. <el-row
  743. type="flex"
  744. justify="space-between"
  745. style="margin-bottom: 10px"
  746. >
  747. <el-col>
  748. <el-button
  749. type="primary"
  750. :disabled="browseStatus"
  751. size="small"
  752. @click="addRelevant"
  753. >新行
  754. </el-button>
  755. <el-button
  756. :disabled="browseStatus"
  757. type="primary"
  758. size="small"
  759. @click="saveForm"
  760. >保 存</el-button
  761. >
  762. </el-col>
  763. <el-col style="display: flex; justify-content: flex-end">
  764. <el-button
  765. size="small"
  766. type="info"
  767. :disabled="browseStatus"
  768. prop="打印"
  769. @click="printZyd"
  770. >作业单
  771. </el-button>
  772. <el-button
  773. size="small"
  774. :disabled="browseStatus"
  775. @click="discharge"
  776. >叫车进场</el-button
  777. >
  778. <el-button
  779. size="small"
  780. :disabled="dataListSelection.length <= 0 || browseStatus"
  781. @click="creditClick"
  782. >入库确认
  783. </el-button>
  784. <el-button
  785. size="small"
  786. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  787. @click.prevent="withdrawClick"
  788. >撤回入库
  789. </el-button>
  790. <el-dropdown @command="handleCommand" style="margin-left: 10px">
  791. <el-button :disabled="browseStatus" size="small" type="success">
  792. 打印单据<i class="el-icon-arrow-down el-icon--right"></i>
  793. </el-button>
  794. <el-dropdown-menu slot="dropdown">
  795. <el-dropdown-item command="a">收货单</el-dropdown-item>
  796. <el-dropdown-item command="b">入库单</el-dropdown-item>
  797. <el-dropdown-item command="c">理货单</el-dropdown-item>
  798. <el-dropdown-item command="d">货物确认</el-dropdown-item>
  799. <el-dropdown-item command="e">劳务确认</el-dropdown-item>
  800. <el-dropdown-item command="f">吊牌信息</el-dropdown-item>
  801. </el-dropdown-menu>
  802. </el-dropdown>
  803. </el-col>
  804. </el-row>
  805. <el-table
  806. :data="detailList"
  807. tooltip-effect="dark"
  808. stripe
  809. :summary-method="getSummaries"
  810. @selection-change="Selectinventory"
  811. show-summary
  812. >
  813. <el-table-column type="selection" width="55" align="center" fixed />
  814. <el-table-column label="序号" type="index" width="80" fixed />
  815. <el-table-column
  816. prop="fBillstatus"
  817. header-align="center"
  818. width="150px"
  819. align="center"
  820. fixed
  821. label="状态"
  822. >
  823. <template slot-scope="scope">
  824. <span v-if="scope.row.fBillstatus === 10">计划</span>
  825. <span v-if="scope.row.fBillstatus === 20">待入库</span>
  826. <span v-if="scope.row.fBillstatus === 30">入库中</span>
  827. <span v-if="scope.row.fBillstatus === 40">已入库</span>
  828. </template>
  829. </el-table-column>
  830. <el-table-column
  831. fixed
  832. prop="fBsdate"
  833. header-align="center"
  834. align="center"
  835. width="150px"
  836. label="入库日期"
  837. :formatter="fBsdateFormat"
  838. />
  839. <el-table-column
  840. prop="fMblno"
  841. header-align="center"
  842. align="center"
  843. width="140px"
  844. label="提单号"
  845. />
  846. <el-table-column
  847. prop="fGoodsid"
  848. header-align="center"
  849. align="center"
  850. width="140px"
  851. label="*品名"
  852. :formatter="goodsFormat"
  853. />
  854. <el-table-column
  855. prop="fBusinessType"
  856. header-align="center"
  857. width="140px"
  858. align="center"
  859. label="*货物属性"
  860. :formatter="fStorageTypeFormat"
  861. />
  862. <el-table-column
  863. prop="fMarks"
  864. header-align="center"
  865. align="center"
  866. width="140px"
  867. label="*属性详情"
  868. />
  869. <el-table-column
  870. prop="fWarehouseInformation"
  871. header-align="center"
  872. width="240px"
  873. align="center"
  874. label="*库区"
  875. />
  876. <el-table-column
  877. prop="fCntrtype"
  878. header-align="center"
  879. align="center"
  880. width="140px"
  881. label="箱型"
  882. />
  883. <el-table-column
  884. prop="fCntqty"
  885. header-align="center"
  886. align="center"
  887. width="140px"
  888. label="箱量"
  889. />
  890. <el-table-column
  891. prop="fQty"
  892. header-align="center"
  893. width="150px"
  894. align="center"
  895. label="*入库件数"
  896. />
  897. <el-table-column
  898. prop="fGrossweight"
  899. header-align="center"
  900. width="180px"
  901. align="center"
  902. label="*入库毛重(kg)"
  903. />
  904. <el-table-column
  905. prop="fNetweight"
  906. header-align="center"
  907. width="180px"
  908. align="center"
  909. label="*入库净重(kg)"
  910. />
  911. <el-table-column
  912. prop="fPackagespecs"
  913. header-align="center"
  914. width="150px"
  915. align="center"
  916. label="*包装规格"
  917. />
  918. <el-table-column
  919. prop="fTruckno"
  920. header-align="center"
  921. width="130px"
  922. align="center"
  923. label="*车号"
  924. />
  925. <el-table-column
  926. prop="fDriverName"
  927. header-align="center"
  928. width="130px"
  929. align="center"
  930. label="司机名"
  931. />
  932. <el-table-column
  933. prop="fDriverTel"
  934. header-align="center"
  935. width="200px"
  936. align="center"
  937. label="司机电话"
  938. />
  939. <el-table-column
  940. prop="fDriverIdCar"
  941. header-align="center"
  942. width="200px"
  943. align="center"
  944. label="司机身份证"
  945. />
  946. <el-table-column
  947. prop="fSerialNumber"
  948. header-align="center"
  949. width="160px"
  950. align="center"
  951. label="流水号"
  952. />
  953. <el-table-column
  954. prop="fCntrno"
  955. header-align="center"
  956. width="130px"
  957. align="center"
  958. label="箱号"
  959. />
  960. <el-table-column
  961. prop="fGoodsval"
  962. header-align="center"
  963. width="130px"
  964. align="center"
  965. label="货值"
  966. />
  967. <el-table-column
  968. prop="remark"
  969. header-align="center"
  970. width="130px"
  971. align="center"
  972. label="备注"
  973. />
  974. <el-table-column
  975. header-align="center"
  976. align="center"
  977. label="操作"
  978. width="130PX"
  979. >
  980. <template slot-scope="scope">
  981. <el-button
  982. :disabled="
  983. browseStatus ||
  984. scope.row.fBillstatus === 20 ||
  985. scope.row.fBillstatus === 30 ||
  986. scope.row.fBillstatus === 40
  987. "
  988. type="text"
  989. @click.native.prevent="fixRow(scope.row, scope.$index)"
  990. size="small"
  991. >修改</el-button
  992. >
  993. <el-button
  994. :disabled="
  995. browseStatus ||
  996. scope.row.fBillstatus === 20 ||
  997. scope.row.fBillstatus === 30 ||
  998. scope.row.fBillstatus === 40
  999. "
  1000. type="text"
  1001. @click.native.prevent="wDeleteRow(scope.$index, detailList)"
  1002. size="small"
  1003. >移除</el-button
  1004. >
  1005. </template>
  1006. </el-table-column>
  1007. </el-table>
  1008. </div>
  1009. </el-collapse-item>
  1010. <el-collapse-item>
  1011. <template slot="title">
  1012. <i class="el-icon-s-order" style="font-size: 16px"></i>
  1013. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  1014. >附件明细</span
  1015. >
  1016. </template>
  1017. </el-collapse-item>
  1018. <el-collapse-item>
  1019. <template slot="title">
  1020. <i class="el-icon-circle-plus" style="font-size: 16px"></i>
  1021. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  1022. >收款信息</span
  1023. >
  1024. </template>
  1025. </el-collapse-item>
  1026. <el-collapse-item>
  1027. <template slot="title">
  1028. <i class="el-icon-remove" style="font-size: 16px"></i>
  1029. <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  1030. >付款信息</span
  1031. >
  1032. </template>
  1033. </el-collapse-item>
  1034. </el-collapse>
  1035. <el-dialog
  1036. v-dialogDrag
  1037. :title="title"
  1038. :visible.sync="weightList"
  1039. width="80%"
  1040. :close-on-click-modal="false"
  1041. >
  1042. <div>
  1043. <el-form
  1044. ref="importList"
  1045. :model="importList"
  1046. :rules="imporRules"
  1047. label-width="120px"
  1048. >
  1049. <el-row>
  1050. <el-col :span="8">
  1051. <el-form-item label="入库日期" prop="fBsdate">
  1052. <el-date-picker
  1053. v-model="importList.fBsdate"
  1054. type="date"
  1055. style="width: 80%"
  1056. value-format="timestamp"
  1057. placeholder="入库日期"
  1058. >
  1059. </el-date-picker>
  1060. </el-form-item>
  1061. </el-col>
  1062. <el-col :span="8">
  1063. <el-form-item label="品名" prop="fGoodsid">
  1064. <el-select
  1065. filterable
  1066. v-model="importList.fGoodsid"
  1067. style="width: 80%"
  1068. placeholder="请选择品名"
  1069. >
  1070. <el-option
  1071. v-for="(item, index) in goodsOptions"
  1072. :key="index.fId"
  1073. :label="item.fName"
  1074. :value="item.fId"
  1075. ></el-option>
  1076. </el-select>
  1077. </el-form-item>
  1078. </el-col>
  1079. <el-col :span="8">
  1080. <el-form-item label="货物属性" prop="fBusinessType">
  1081. <el-select
  1082. filterable
  1083. v-model="importList.fBusinessType"
  1084. style="width: 80%"
  1085. placeholder="请选择商品属性"
  1086. >
  1087. <el-option
  1088. v-for="(item, index) in fStorageTypeOptions"
  1089. :key="index.dictValue"
  1090. :label="item.dictLabel"
  1091. :value="item.dictValue"
  1092. />
  1093. </el-select>
  1094. </el-form-item>
  1095. </el-col>
  1096. </el-row>
  1097. <el-row>
  1098. <el-col :span="8">
  1099. <el-form-item label="属性详情" prop="fMarks">
  1100. <el-input
  1101. v-model="importList.fMarks"
  1102. style="width: 80%"
  1103. placeholder="请填写属性描述"
  1104. />
  1105. </el-form-item>
  1106. </el-col>
  1107. <el-col :span="8">
  1108. <el-form-item label="库区" prop="fWarehouseInformation">
  1109. <el-select
  1110. filterable
  1111. v-model="importList.fWarehouseInformation"
  1112. style="width: 80%"
  1113. placeholder="请选择库区"
  1114. >
  1115. <el-option
  1116. v-for="(item, index) in fWarehouseidOptions"
  1117. :key="index.id"
  1118. :label="item.label"
  1119. :value="item.fWarehouseInformation"
  1120. ></el-option>
  1121. </el-select>
  1122. </el-form-item>
  1123. </el-col>
  1124. <el-col :span="8">
  1125. <el-form-item label="箱型" prop="fCntrtype">
  1126. <el-input
  1127. v-model="importList.fCntrtype"
  1128. style="width: 80%"
  1129. maxlength="4"
  1130. placeholder="箱型"
  1131. />
  1132. </el-form-item>
  1133. </el-col>
  1134. </el-row>
  1135. <el-row>
  1136. <el-col :span="8">
  1137. <el-form-item label="计划件数" prop="fQty">
  1138. <el-input
  1139. v-input-limit="0"
  1140. v-model.number="importList.fQty"
  1141. style="width: 80%"
  1142. placeholder="计划件数"
  1143. @input="imporComputer"
  1144. />
  1145. </el-form-item>
  1146. </el-col>
  1147. <el-col :span="8">
  1148. <el-form-item label="计划净重(kg)" prop="fNetweight">
  1149. <el-input
  1150. v-model.number="importList.fNetweight"
  1151. v-input-limit="2"
  1152. style="width: 80%"
  1153. disabled
  1154. placeholder="计划毛重"
  1155. />
  1156. </el-form-item>
  1157. </el-col>
  1158. <el-col :span="8">
  1159. <el-form-item label="计划毛重(kg)" prop="fGrossweight">
  1160. <el-input
  1161. v-model.number="importList.fGrossweight"
  1162. v-input-limit="2"
  1163. style="width: 80%"
  1164. disabled
  1165. placeholder="计划毛重"
  1166. />
  1167. </el-form-item>
  1168. </el-col>
  1169. </el-row>
  1170. <el-row>
  1171. <el-col :span="8">
  1172. <el-form-item label="箱量" prop="fCntqty">
  1173. <el-input
  1174. v-model="importList.fCntqty"
  1175. style="width: 80%"
  1176. placeholder="箱量"
  1177. />
  1178. </el-form-item>
  1179. </el-col>
  1180. <el-col :span="8">
  1181. <el-form-item label="包装规格" prop="fPackagespecs">
  1182. <el-input
  1183. v-model="importList.fPackagespecs"
  1184. style="width: 80%"
  1185. placeholder="包装规格"
  1186. />
  1187. </el-form-item>
  1188. </el-col>
  1189. <el-col :span="8">
  1190. <el-form-item label="车号" prop="fTruckno">
  1191. <el-input
  1192. v-model="importList.fTruckno"
  1193. style="width: 80%"
  1194. placeholder="车号"
  1195. />
  1196. </el-form-item>
  1197. </el-col>
  1198. </el-row>
  1199. <el-row>
  1200. <el-col :span="8">
  1201. <el-form-item label="司机名" prop="fDriverName">
  1202. <el-input
  1203. v-model="importList.fDriverName"
  1204. style="width: 80%"
  1205. placeholder="司机名"
  1206. />
  1207. </el-form-item>
  1208. </el-col>
  1209. <el-col :span="8">
  1210. <el-form-item label="司机电话" prop="fDriverTel">
  1211. <el-input
  1212. v-model="importList.fDriverTel"
  1213. style="width: 80%"
  1214. placeholder="司机电话"
  1215. />
  1216. </el-form-item>
  1217. </el-col>
  1218. <el-col :span="8">
  1219. <el-form-item label="司机身份证" prop="fDriverIdCar">
  1220. <el-input
  1221. v-model="importList.fDriverIdCar"
  1222. style="width: 80%"
  1223. placeholder="司机身份证"
  1224. />
  1225. </el-form-item>
  1226. </el-col>
  1227. </el-row>
  1228. <el-row>
  1229. <el-col :span="8">
  1230. <el-form-item label="流水号" prop="fSerialNumber">
  1231. <el-input
  1232. v-model="importList.fSerialNumber"
  1233. style="width: 80%"
  1234. placeholder="流水号"
  1235. />
  1236. </el-form-item>
  1237. </el-col>
  1238. <el-col :span="8">
  1239. <el-form-item label="箱号" prop="fCntrno">
  1240. <el-input
  1241. v-model="importList.fCntrno"
  1242. style="width: 80%"
  1243. placeholder="箱号"
  1244. />
  1245. </el-form-item>
  1246. </el-col>
  1247. <el-col :span="8">
  1248. <el-form-item label="货值" prop="fGoodsval">
  1249. <el-input
  1250. v-model="importList.fGoodsval"
  1251. style="width: 80%"
  1252. placeholder="货值"
  1253. />
  1254. </el-form-item>
  1255. </el-col>
  1256. </el-row>
  1257. <el-row>
  1258. <el-col>
  1259. <el-form-item label="备注" prop="remark">
  1260. <el-input
  1261. v-model="importList.remark"
  1262. style="width: 95%"
  1263. type="textarea"
  1264. placeholder="备注"
  1265. />
  1266. </el-form-item>
  1267. </el-col>
  1268. </el-row>
  1269. </el-form>
  1270. </div>
  1271. <span slot="footer" class="dialog-footer">
  1272. <el-button v-if="fixdetaiNum == null" type="info" @click="imporTable"
  1273. >导入库存明细</el-button
  1274. >
  1275. <el-button v-else type="info" @click="fiximporTable"
  1276. >确认修改</el-button
  1277. >
  1278. <el-button @click="weightList = false">取 消</el-button>
  1279. </span>
  1280. </el-dialog>
  1281. <el-dialog
  1282. :visible.sync="print_zyd"
  1283. width="70%"
  1284. :close-on-click-modal="false"
  1285. :modal="false"
  1286. >
  1287. <div id="print_area1" class="print-div">
  1288. <div
  1289. class="print-title"
  1290. style="
  1291. display: flex;
  1292. justify-content: center;
  1293. font-size: 24px;
  1294. margin-bottom: 5px;
  1295. "
  1296. >
  1297. {{ company }}有限公司作业单
  1298. </div>
  1299. <div
  1300. style="
  1301. display: flex;
  1302. justify-content: center;
  1303. font-size: 18px;
  1304. margin-bottom: 5px;
  1305. "
  1306. ></div>
  1307. <div class="print_table" style="display: flex">
  1308. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1309. <tr>
  1310. <td>作业类型</td>
  1311. <td colspan="2">
  1312. {{ form.fBusinessType | fBusinessTypeFormat }}
  1313. </td>
  1314. <td>入库时间</td>
  1315. <td colspan="2"></td>
  1316. </tr>
  1317. <tr>
  1318. <td>车号</td>
  1319. <td>物品名称</td>
  1320. <td>提单号</td>
  1321. <td>品牌/规格/产地</td>
  1322. <td>净重(KG)</td>
  1323. <td>件数/规格</td>
  1324. </tr>
  1325. <tr v-for="(item, index) in Printinglist" :key="index">
  1326. <td>{{ item.fTruckno }}</td>
  1327. <td>{{ item.fGoodsids }}</td>
  1328. <td>{{ item.fMblno }}</td>
  1329. <td>
  1330. {{ item.fBusinessType | fStorageFormat }}/{{ item.fMarks }}
  1331. </td>
  1332. <td>{{ item.fNetweight }}</td>
  1333. <td>{{ item.fQty }}/{{ item.fPackagespecs }}</td>
  1334. </tr>
  1335. <tr>
  1336. <td>备注</td>
  1337. <td colspan="5"></td>
  1338. </tr>
  1339. <tr v-for="(item, index) in Collectionoptionss" :key="index">
  1340. <td>收费</td>
  1341. <td colspan="2">{{ item.fFeeids }}</td>
  1342. <td colspan="3">{{ item.fAmount }} 元</td>
  1343. </tr>
  1344. <tr>
  1345. <td>司机签字</td>
  1346. <td></td>
  1347. <td>电话</td>
  1348. <td>{{ fDriverTel }}</td>
  1349. <td colspan="2" rowspan="2">
  1350. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  1351. </td>
  1352. </tr>
  1353. <tr>
  1354. <td>制表</td>
  1355. <td>{{ form.createBy }}</td>
  1356. <td>机械/人工</td>
  1357. <td></td>
  1358. </tr>
  1359. <tr>
  1360. <td>地址</td>
  1361. <td colspan="2">{{ stockaddr }}</td>
  1362. <td>电话</td>
  1363. <td colspan="2">{{ form.fTel }}</td>
  1364. </tr>
  1365. </table>
  1366. </div>
  1367. </div>
  1368. <span lot="footer" class="dialog-footer">
  1369. <el-button
  1370. type="primary"
  1371. size="mini"
  1372. :disabled="browseStatus"
  1373. @click="addprint('zyd')"
  1374. >打印
  1375. </el-button>
  1376. <el-button @click="print_zyd = false" size="mini">取消 </el-button>
  1377. </span>
  1378. </el-dialog>
  1379. <el-dialog
  1380. :visible.sync="print_shd"
  1381. width="70%"
  1382. :close-on-click-modal="false"
  1383. :modal="false"
  1384. >
  1385. <div id="print_area1" class="print-div">
  1386. <div
  1387. class="print-title"
  1388. style="
  1389. display: flex;
  1390. justify-content: center;
  1391. font-size: 24px;
  1392. margin-bottom: 5px;
  1393. "
  1394. >
  1395. {{ company }}有限公司收货单
  1396. </div>
  1397. <div class="print_table" style="display: flex">
  1398. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1399. <tr>
  1400. <td>车号</td>
  1401. <td>{{ fTruckno }}</td>
  1402. <td>日期</td>
  1403. <td>{{ fBsdate }}</td>
  1404. </tr>
  1405. <tr v-for="(item, index) in Printinglist" :key="index">
  1406. <td>货物品名</td>
  1407. <td>{{ item.fGoodsids }}</td>
  1408. <td>件数</td>
  1409. <td>{{ item.fQty }}件</td>
  1410. </tr>
  1411. <tr>
  1412. <td>备注</td>
  1413. <td colspan="3"></td>
  1414. </tr>
  1415. <tr>
  1416. <td>司机签字</td>
  1417. <td></td>
  1418. <td>司机电话</td>
  1419. <td>{{ fDriverTel }}</td>
  1420. </tr>
  1421. <tr>
  1422. <td>制单人</td>
  1423. <td>{{ form.createBy }}</td>
  1424. <td>收货人</td>
  1425. <td>{{ form.fContacts }}</td>
  1426. </tr>
  1427. <tr>
  1428. <td>地址</td>
  1429. <td>{{ stockaddr }}</td>
  1430. <td>电话</td>
  1431. <td>{{ form.fTel }}</td>
  1432. </tr>
  1433. </table>
  1434. </div>
  1435. </div>
  1436. <span slot="footer" class="dialog-footer">
  1437. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1438. >打印
  1439. </el-button>
  1440. <el-button @click="print_shd = false">取消 </el-button>
  1441. </span>
  1442. </el-dialog>
  1443. <el-dialog
  1444. :visible.sync="print_rkd"
  1445. width="70%"
  1446. :close-on-click-modal="false"
  1447. :modal="false"
  1448. >
  1449. <div id="print_area1" class="print-div">
  1450. <div
  1451. class="print-title"
  1452. style="
  1453. display: flex;
  1454. justify-content: center;
  1455. font-size: 24px;
  1456. margin-bottom: 5px;
  1457. "
  1458. >
  1459. {{ company }}有限公司进仓单
  1460. </div>
  1461. <div class="print_table" style="display: flex">
  1462. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1463. <tr>
  1464. <td>货权方</td>
  1465. <td>{{ form.fCorpidName }}</td>
  1466. <td>仓库</td>
  1467. <td>{{ form.fWarehouseids }}</td>
  1468. <td>地址</td>
  1469. <td colspan="2">{{ stockaddr }}</td>
  1470. </tr>
  1471. <tr>
  1472. <td>保管方</td>
  1473. <td width="200">{{ company }}有限公司</td>
  1474. <td>联系人</td>
  1475. <td>{{ form.fContacts }}</td>
  1476. <td>电话</td>
  1477. <td colspan="2">{{ form.fTel }}</td>
  1478. </tr>
  1479. <tr>
  1480. <td>提单号</td>
  1481. <td>品名</td>
  1482. <td>箱型</td>
  1483. <td>品牌</td>
  1484. <td>件数</td>
  1485. <td>重量</td>
  1486. <td>包装规格</td>
  1487. </tr>
  1488. <tr>
  1489. <td></td>
  1490. <td></td>
  1491. <td></td>
  1492. <td></td>
  1493. <td></td>
  1494. <td></td>
  1495. <td></td>
  1496. </tr>
  1497. <tr>
  1498. <td>序号</td>
  1499. <td>入货日期</td>
  1500. <td>箱量(20GP)</td>
  1501. <td>重量</td>
  1502. <td>件数</td>
  1503. <td>入库重量</td>
  1504. <td>入库件数</td>
  1505. </tr>
  1506. <tr v-for="(item, index) in Printinglist" :key="index">
  1507. <td>{{ index + 1 }}</td>
  1508. <td>{{ item.fBsdate }}</td>
  1509. <td>{{ item.fCntqty }}</td>
  1510. <td v-if="item.fGrossweight">
  1511. {{ (item.fGrossweight / 1000).toFixed(2) }}
  1512. </td>
  1513. <td v-else></td>
  1514. <td>{{ item.fPlanqty }}</td>
  1515. <td v-if="item.fNetweight">
  1516. {{ (item.fNetweight / 1000).toFixed(2) }}
  1517. </td>
  1518. <td v-else></td>
  1519. <td>{{ item.fQty }}</td>
  1520. </tr>
  1521. <tr>
  1522. <td colspan="2">合计</td>
  1523. <td>{{ allfCntqty }}</td>
  1524. <td>{{ (allfGrossweight / 1000).toFixed(2) }}</td>
  1525. <td>{{ allfPlanqty }}</td>
  1526. <td>{{ (allfNetweight / 1000).toFixed(2) }}</td>
  1527. <td>{{ allfQty }}</td>
  1528. </tr>
  1529. <tr>
  1530. <td>备注</td>
  1531. <td colspan="6"></td>
  1532. </tr>
  1533. <tr>
  1534. <td colspan="7">
  1535. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1536. </td>
  1537. </tr>
  1538. </table>
  1539. </div>
  1540. <div
  1541. style="display: flex; justify-content: space-between; font-size: 12px"
  1542. >
  1543. <div>开单员:</div>
  1544. <div style="width: 150px">仓管员:</div>
  1545. </div>
  1546. <div
  1547. style="display: flex; justify-content: space-between; font-size: 12px"
  1548. >
  1549. <div>开单时间:</div>
  1550. <div style="width: 150px">(盖章)</div>
  1551. </div>
  1552. </div>
  1553. <span slot="footer" class="dialog-footer">
  1554. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1555. >打印
  1556. </el-button>
  1557. <el-button @click="print_rkd = false">取消 </el-button>
  1558. </span>
  1559. </el-dialog>
  1560. <el-dialog
  1561. :visible.sync="print_lhd"
  1562. width="70%"
  1563. :close-on-click-modal="false"
  1564. :modal="false"
  1565. >
  1566. <div id="print_area1" class="print-div">
  1567. <div
  1568. class="print-title"
  1569. style="
  1570. display: flex;
  1571. justify-content: center;
  1572. font-size: 24px;
  1573. margin-bottom: 5px;
  1574. "
  1575. >
  1576. {{ company }}有限公司
  1577. </div>
  1578. <div
  1579. style="
  1580. display: flex;
  1581. justify-content: center;
  1582. font-size: 18px;
  1583. margin-bottom: 5px;
  1584. "
  1585. >
  1586. <div>入&nbsp;库&nbsp;计&nbsp;划&nbsp;单</div>
  1587. </div>
  1588. <div
  1589. style="
  1590. display: flex;
  1591. justify-content: space-between;
  1592. margin-bottom: 5px;
  1593. "
  1594. class="print_form"
  1595. >
  1596. <div>
  1597. <div>提单号:{{ form.fMblno }}</div>
  1598. <div>客户名称:{{ form.fCorpidName }}</div>
  1599. <div>货物名称:{{ form.fProductName }}</div>
  1600. <div>预计净重:{{ form.fPlannetweight }}</div>
  1601. </div>
  1602. <div>
  1603. <div>入库计划单号:{{ form.fBillno }}</div>
  1604. <div>计划入库日期:{{ form.fBstime }}</div>
  1605. <div>制单日期:{{ form.createTime }}</div>
  1606. <div>实际毛重:</div>
  1607. </div>
  1608. <div>
  1609. <div>清单号:{{ form.fCustomno }}</div>
  1610. <div>存放仓库:{{ stockName }}</div>
  1611. <div>预计毛重:{{ form.fPlangrossweight }}</div>
  1612. <div>实际净重:</div>
  1613. </div>
  1614. </div>
  1615. <div class="print_table" style="display: flex">
  1616. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1617. <tr>
  1618. <td>箱号</td>
  1619. <td>铅封号</td>
  1620. <td>预计件数</td>
  1621. <td>实际件数</td>
  1622. <td>垛位</td>
  1623. <td>实际入库日期</td>
  1624. <td>送货车号</td>
  1625. <td>送货司机</td>
  1626. <td>备注</td>
  1627. </tr>
  1628. <tr v-for="(item, index) in Printinglist" :key="index">
  1629. <td>{{ item.fCntrno }}</td>
  1630. <td></td>
  1631. <td>{{ item.fQty }}</td>
  1632. <td></td>
  1633. <td>{{ item.fWarehouseInformation }}</td>
  1634. <td>{{ item.fChargedate }}</td>
  1635. <td>{{ item.fTruckno }}</td>
  1636. <td>{{ item.fDriverName }}</td>
  1637. <td>{{ item.remark }}</td>
  1638. </tr>
  1639. <tr>
  1640. <td colspan="2">合计:</td>
  1641. <td>{{ allfQty }}</td>
  1642. <td></td>
  1643. <td></td>
  1644. <td></td>
  1645. <td></td>
  1646. <td></td>
  1647. <td></td>
  1648. </tr>
  1649. </table>
  1650. </div>
  1651. <div
  1652. style="display: flex; justify-content: space-between; font-size: 12px"
  1653. >
  1654. <div>操作:{{ form.createBy }}</div>
  1655. <div>库管:{{ form.fContacts }}</div>
  1656. <div style="width: 100px">叉车:</div>
  1657. </div>
  1658. </div>
  1659. <span slot="footer" class="dialog-footer">
  1660. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1661. >打印
  1662. </el-button>
  1663. <el-button @click="print_lhd = false">取消 </el-button>
  1664. </span>
  1665. </el-dialog>
  1666. <el-dialog
  1667. :visible.sync="print_hwqr"
  1668. width="70%"
  1669. :close-on-click-modal="false"
  1670. :modal="false"
  1671. >
  1672. <div id="print_area1" class="print-div">
  1673. <div
  1674. class="print-title"
  1675. style="
  1676. display: flex;
  1677. justify-content: center;
  1678. font-size: 24px;
  1679. margin-bottom: 5px;
  1680. "
  1681. >
  1682. {{ company }}有限公司
  1683. </div>
  1684. <div
  1685. style="
  1686. display: flex;
  1687. justify-content: center;
  1688. font-size: 18px;
  1689. margin-bottom: 5px;
  1690. "
  1691. >
  1692. <div>入&nbsp;库&nbsp;单</div>
  1693. </div>
  1694. <div style="margin-bottom: 5px" class="print_form">
  1695. <div>客户名称:{{ form.fCorpidName }}</div>
  1696. </div>
  1697. <div class="print_table" style="display: flex">
  1698. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1699. <tr>
  1700. <td>序号</td>
  1701. <td>实际入库日期</td>
  1702. <td>商品名称</td>
  1703. <td>提单号</td>
  1704. <td>箱号</td>
  1705. <td>件数</td>
  1706. <td>毛重</td>
  1707. <td>净重</td>
  1708. <td>备注</td>
  1709. </tr>
  1710. <tr v-for="(item, index) in Printinglist" :key="index">
  1711. <td>{{ index + 1 }}</td>
  1712. <td>{{ item.fChargedate }}</td>
  1713. <td>{{ item.fGoodsids }}</td>
  1714. <td>{{ item.fMblno }}</td>
  1715. <td>{{ item.fCntrno }}</td>
  1716. <td>{{ item.fQty }}</td>
  1717. <td>{{ item.fGrossweight }}</td>
  1718. <td>{{ item.fNetweight }}</td>
  1719. <td>{{ item.remark }}</td>
  1720. </tr>
  1721. <tr>
  1722. <td colspan="5">合计:</td>
  1723. <td>{{ allfQty }}</td>
  1724. <td>{{ allfGrossweight }}</td>
  1725. <td>{{ allfNetweight }}</td>
  1726. <td></td>
  1727. </tr>
  1728. </table>
  1729. </div>
  1730. <div
  1731. style="display: flex; justify-content: space-between; font-size: 12px"
  1732. >
  1733. <div>制单人:{{ form.createBy }}</div>
  1734. <div style="width: 100px">审核人:</div>
  1735. </div>
  1736. </div>
  1737. <span slot="footer" class="dialog-footer">
  1738. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1739. >打印
  1740. </el-button>
  1741. <el-button @click="print_hwqr = false">取消 </el-button>
  1742. </span>
  1743. </el-dialog>
  1744. <el-dialog
  1745. :visible.sync="print_lwqr"
  1746. width="70%"
  1747. :close-on-click-modal="false"
  1748. :modal="false"
  1749. >
  1750. <div id="print_area1" class="print-div">
  1751. <div
  1752. class="print-title"
  1753. style="
  1754. display: flex;
  1755. justify-content: center;
  1756. font-size: 24px;
  1757. margin-bottom: 5px;
  1758. "
  1759. >
  1760. {{ company }}有限公司
  1761. </div>
  1762. <div
  1763. style="
  1764. display: flex;
  1765. justify-content: center;
  1766. font-size: 18px;
  1767. margin-bottom: 5px;
  1768. "
  1769. >
  1770. <div>入&nbsp;库&nbsp;单</div>
  1771. </div>
  1772. <div style="display: flex; margin-bottom: 5px">
  1773. <div>
  1774. <div>报关单号:{{ form.fCustomno }}</div>
  1775. <div>存货地点:</div>
  1776. </div>
  1777. </div>
  1778. <div class="print_table" style="display: flex">
  1779. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1780. <tr>
  1781. <td>品名</td>
  1782. <td colspan="3">{{ form.fProductName }}</td>
  1783. <td colspan="3">清单号</td>
  1784. <td colspan="2">{{ form.fCustomno }}</td>
  1785. </tr>
  1786. <tr>
  1787. <td>提单号</td>
  1788. <td colspan="8">{{ form.fMblno }}</td>
  1789. </tr>
  1790. <tr>
  1791. <td>入库日期</td>
  1792. <td>箱号</td>
  1793. <td>铅封号</td>
  1794. <td>预计件数</td>
  1795. <td>垛位</td>
  1796. <td>实收件数</td>
  1797. <td>实收净重(吨)</td>
  1798. <td>毛重(吨)</td>
  1799. <td>备注</td>
  1800. </tr>
  1801. <tr v-for="(item, index) in Printinglist" :key="index">
  1802. <td>{{ item.fChargedate }}</td>
  1803. <td>{{ item.fCntrno }}</td>
  1804. <td></td>
  1805. <td>{{ item.fQty }}</td>
  1806. <td>{{ item.fWarehouseInformation }}</td>
  1807. <td></td>
  1808. <td></td>
  1809. <td></td>
  1810. <td>{{ item.remark }}</td>
  1811. </tr>
  1812. </table>
  1813. </div>
  1814. <div
  1815. style="display: flex; justify-content: space-between; font-size: 12px"
  1816. >
  1817. <div>库管:{{ form.fContacts }}</div>
  1818. <div style="width: 100px">叉车:</div>
  1819. </div>
  1820. </div>
  1821. <span slot="footer" class="dialog-footer">
  1822. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1823. >打印
  1824. </el-button>
  1825. <el-button @click="print_lwqr = false">取消 </el-button>
  1826. </span>
  1827. </el-dialog>
  1828. <el-dialog
  1829. :visible.sync="print_dpxx"
  1830. width="70%"
  1831. :close-on-click-modal="false"
  1832. :modal="false"
  1833. >
  1834. <div id="print_area1" class="print-div">
  1835. <div
  1836. class="print-title"
  1837. style="
  1838. display: flex;
  1839. justify-content: center;
  1840. font-size: 24px;
  1841. margin-bottom: 5px;
  1842. "
  1843. >
  1844. {{ company }}有限公司货物标识卡
  1845. </div>
  1846. <div
  1847. style="
  1848. display: flex;
  1849. justify-content: center;
  1850. font-size: 18px;
  1851. margin-bottom: 5px;
  1852. "
  1853. >
  1854. <div>入&nbsp;库&nbsp;计&nbsp;划&nbsp;单</div>
  1855. </div>
  1856. <div class="print_table" style="display: flex">
  1857. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
  1858. <tr>
  1859. <td>货物名称</td>
  1860. <td colspan="2">{{ form.fProductName }}</td>
  1861. <td>库位</td>
  1862. <td colspan="2">{{ stockName }}</td>
  1863. </tr>
  1864. <tr>
  1865. <td>提单号</td>
  1866. <td colspan="2">{{ form.fMblno }}</td>
  1867. <td>清单号</td>
  1868. <td colspan="2">{{ form.fCustomno }}</td>
  1869. </tr>
  1870. <tr>
  1871. <td>箱号</td>
  1872. <td colspan="2"></td>
  1873. <td>总箱量</td>
  1874. <td colspan="2"></td>
  1875. </tr>
  1876. <tr>
  1877. <td>总件数</td>
  1878. <td colspan="2">{{ form.fPlanqty }}</td>
  1879. <td>总净重</td>
  1880. <td colspan="2">{{ form.fPlannetweight }}</td>
  1881. </tr>
  1882. <tr>
  1883. <td>总毛重</td>
  1884. <td colspan="2">{{ form.fPlangrossweight }}</td>
  1885. <td>本垛件数</td>
  1886. <td colspan="2">{{ allfQty }}</td>
  1887. </tr>
  1888. <tr>
  1889. <td>本垛净重</td>
  1890. <td colspan="2">{{ allfGrossweight }}</td>
  1891. <td>本垛毛重</td>
  1892. <td colspan="2">{{ allfNetweight }}</td>
  1893. </tr>
  1894. <tr>
  1895. <td>入库日期</td>
  1896. <td colspan="2">{{ form.fBstime }}</td>
  1897. <td>仓管员</td>
  1898. <td colspan="2">{{ form.fContacts }}</td>
  1899. </tr>
  1900. <tr>
  1901. <td>出库日期</td>
  1902. <td>出库件数</td>
  1903. <td>剩余件数</td>
  1904. <td>出库仓管员</td>
  1905. <td>盘点日期</td>
  1906. <td>盘点人</td>
  1907. </tr>
  1908. <tr style="height: 17.8px" v-for="(item, index) in 10" :key="index">
  1909. <td></td>
  1910. <td></td>
  1911. <td></td>
  1912. <td></td>
  1913. <td></td>
  1914. <td></td>
  1915. </tr>
  1916. <tr style="height: 50px">
  1917. <td>备注</td>
  1918. <td colspan="5"></td>
  1919. </tr>
  1920. </table>
  1921. </div>
  1922. </div>
  1923. <span slot="footer" class="dialog-footer">
  1924. <el-button type="primary" :disabled="browseStatus" @click="addprint"
  1925. >打印
  1926. </el-button>
  1927. <el-button @click="print_dpxx = false">取消 </el-button>
  1928. </span>
  1929. </el-dialog>
  1930. </div>
  1931. </template>
  1932. <script>
  1933. import print from "print-js";
  1934. import {
  1935. addWhgenleg,
  1936. addJoblist,
  1937. disChargelist,
  1938. updateCredit,
  1939. listWarehousebills,
  1940. getWarehousebills,
  1941. delWarehousebills,
  1942. addWarehousebills,
  1943. addWarehouse,
  1944. exportWarehousebills,
  1945. revoke,
  1946. revokeTwo,
  1947. delinStock_s,
  1948. } from "@/api/warehouseBusiness/warehouseInStock";
  1949. import { operationAgreement } from "@/api/agreement/agreement";
  1950. import { listCorps } from "@/api/basicdata/corps";
  1951. import { listFees, getFees } from "@/api/basicdata/fees";
  1952. import {
  1953. listWarehouse,
  1954. treeselect,
  1955. listWarehousesss,
  1956. } from "@/api/basicdata/warehouse";
  1957. import { listGoods } from "@/api/basicdata/goods";
  1958. import { listUser, queryUserVal } from "@/api/system/user";
  1959. import ApprovalComments from "@/views/startApproval";
  1960. import AddOrUpdate from "@/views/viewApproval";
  1961. import Global from "@/layout/components/global";
  1962. import Treeselect from "@riophae/vue-treeselect";
  1963. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  1964. import UploadFile from "@/components/Uploadfile";
  1965. import Cookies from "js-cookie";
  1966. import { getToken } from "@/utils/auth";
  1967. export default {
  1968. name: "inStock",
  1969. props: {
  1970. chiId: {
  1971. type: Number,
  1972. required: null,
  1973. },
  1974. },
  1975. components: {
  1976. UploadFile,
  1977. },
  1978. data() {
  1979. return {
  1980. mblnoStatus: "",
  1981. selectloading: false,
  1982. fMblnoOptions: [],
  1983. warehouseDrList: [],
  1984. relevantAttachments: [],
  1985. warehouseCrList: [],
  1986. fStltypeOptions: [],
  1987. form: {},
  1988. rules: {
  1989. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  1990. fMblno: [{ required: true, message: " ", trigger: "blur" }],
  1991. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  1992. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1993. fFeetunit: [{ required: true, message: " ", trigger: "blur" }],
  1994. fPlanqty: [{ required: true, message: " ", trigger: "blur" }],
  1995. fPlangrossweight: [{ required: true, message: " ", trigger: "blur" }],
  1996. fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
  1997. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  1998. fMarks: [{ required: true, message: " ", trigger: "blur" }],
  1999. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  2000. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  2001. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2002. fBusinessType: [{ required: true, message: " ", trigger: "blur" }],
  2003. fStorekeeper: { required: true, message: " ", trigger: "blur" },
  2004. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  2005. fbillingway: [{ required: true, message: " ", trigger: "blur" }],
  2006. fTocorpid: [{ required: true, message: " ", trigger: "blur" }],
  2007. fGoodsid: [{ required: true, message: " ", trigger: "blur" }],
  2008. },
  2009. imporRules: {
  2010. fQty: [{ required: true, message: " ", trigger: "blur" }],
  2011. fGoodsid: [{ required: true, message: " ", trigger: "blur" }],
  2012. fBusinessType: [{ required: true, message: " ", trigger: "blur" }],
  2013. fMarks: [{ required: true, message: " ", trigger: "blur" }],
  2014. fWarehouseInformation: [
  2015. { required: true, message: " ", trigger: "blur" },
  2016. ],
  2017. fPackagespecs: [{ required: true, message: " ", trigger: "blur" }],
  2018. fTruckno: [{ required: true, message: " ", trigger: "blur" }],
  2019. fDriverName: [{ required: true, message: " ", trigger: "blur" }],
  2020. fDriverTel: [{ required: true, message: " ", trigger: "blur" }],
  2021. fDriverIdCar: [{ required: true, message: " ", trigger: "blur" }],
  2022. fCntrno: [{ required: true, message: " ", trigger: "blur" }],
  2023. },
  2024. browseStatus: false,
  2025. formBrowseStatus: false,
  2026. goodsOptions: [],
  2027. warehouseOptions: [],
  2028. userOptions: [],
  2029. businessTypeOption: [],
  2030. fCompanyOptIons: [],
  2031. fleetOptions: [],
  2032. fFeetunitOptions: [],
  2033. current: "",
  2034. before: "",
  2035. contrOl: false,
  2036. isrequired: 2,
  2037. isrequired_s: 2,
  2038. detailsHidden: false,
  2039. CntrTable: [{}],
  2040. fCntridlist: [],
  2041. fTrademodeidOptions: [],
  2042. fIfweighOptions: [],
  2043. fIfpledgeOptions: [],
  2044. fSbuOptions: [],
  2045. Pledgebank: [],
  2046. collapselist: ["1"],
  2047. fStorageTypeOptions: [],
  2048. weightList: false,
  2049. importList: {},
  2050. headers: {
  2051. Authorization: "Bearer " + getToken(),
  2052. },
  2053. sumMum: 0,
  2054. allfPlanqty: 0,
  2055. detailList: [],
  2056. fWarehouseidOptions: [],
  2057. print_zyd: false,
  2058. print_shd: false,
  2059. print_rkd: false,
  2060. print_lhd: false,
  2061. print_hwqr: false,
  2062. print_lwqr: false,
  2063. print_dpxx: false,
  2064. company: "",
  2065. Printinglist: [],
  2066. //库位
  2067. stockName: "",
  2068. //库位地址
  2069. stockaddr: "",
  2070. Collectionoptionss: [],
  2071. fDriverTel: "",
  2072. fBsdate: "",
  2073. fTruckno: "",
  2074. allfCntqty: 0,
  2075. allfGrossweight: 0,
  2076. allfPlanqty: 0,
  2077. allfNetweight: 0,
  2078. allfQty: 0,
  2079. fixdetaiNum: null,
  2080. dataListSelection: [],
  2081. dataWithdrawList: [],
  2082. title: "",
  2083. fWarehouselocid: null,
  2084. };
  2085. },
  2086. created() {
  2087. this.getDicts("data_stltype_type").then((response) => {
  2088. this.fStltypeOptions = response.data;
  2089. });
  2090. this.getDicts("st_in_type").then((response) => {
  2091. this.businessTypeOption = response.data;
  2092. localStorage.setItem("businessTypeList", JSON.stringify(response.data));
  2093. });
  2094. this.getDicts("data_unitfees").then((response) => {
  2095. this.fFeetunitOptions = response.data;
  2096. });
  2097. this.getDicts("data_trademodes").then((response) => {
  2098. this.fTrademodeidOptions = response.data;
  2099. });
  2100. this.getDicts("data_ifweigh_status").then((response) => {
  2101. this.fIfweighOptions = response.data;
  2102. });
  2103. listGoods({ fStatus: 0, delFlag: 0 }).then((response) => {
  2104. this.goodsOptions = response.rows;
  2105. });
  2106. this.getDicts("data_ifpledge_status").then((response) => {
  2107. this.fIfpledgeOptions = response.data;
  2108. });
  2109. this.getDicts("storage_type").then((response) => {
  2110. this.fStorageTypeOptions = response.data;
  2111. localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
  2112. });
  2113. listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
  2114. this.warehouseOptions = response.rows;
  2115. });
  2116. this.company = localStorage.getItem("companyName");
  2117. this.queryUser();
  2118. },
  2119. filters: {
  2120. fStorageFormat(row) {
  2121. let name;
  2122. for (const item of JSON.parse(localStorage.getItem("fStorageTypeList"))) {
  2123. if (row == item.dictValue) {
  2124. name = item.dictLabel;
  2125. }
  2126. }
  2127. return name;
  2128. },
  2129. fBusinessTypeFormat(row) {
  2130. let name;
  2131. for (const item of JSON.parse(localStorage.getItem("businessTypeList"))) {
  2132. if (row == item.dictValue) {
  2133. name = item.dictLabel;
  2134. }
  2135. }
  2136. return name;
  2137. },
  2138. },
  2139. methods: {
  2140. init() {
  2141. this.resetForm("form");
  2142. this.resetForm("importList");
  2143. this.detailList = [];
  2144. this.getForm();
  2145. },
  2146. reset() {
  2147. this.importList = {
  2148. fBillstatus: null,
  2149. fMblno: null,
  2150. fQty: null,
  2151. fNetweight: null,
  2152. fGrossweight: null,
  2153. fBsdate: null,
  2154. fGoodsid: null,
  2155. fBusinessType: null,
  2156. fMarks: null,
  2157. fWarehouselocid: null,
  2158. fWarehouseInformation: null,
  2159. fCntrtype: null,
  2160. fCntqty: null,
  2161. fPackagespecs: null,
  2162. fTruckno: null,
  2163. fDriverName: null,
  2164. fDriverTel: null,
  2165. fDriverIdCar: null,
  2166. fSerialNumber: null,
  2167. fCntrno: null,
  2168. fGoodsval: null,
  2169. remark: null,
  2170. };
  2171. },
  2172. discharge() {
  2173. if (this.Printinglist.length > 0) {
  2174. for (let item in this.Printinglist) {
  2175. if (this.Printinglist[item].fBillstatus === 10) {
  2176. return this.$message.error("请先打印作业单");
  2177. }
  2178. if (this.Printinglist[item].fBillstatus >= 30) {
  2179. return this.$message.error("请勿重复卸货");
  2180. }
  2181. if (
  2182. this.Printinglist[item].ifCntrno == 1 &&
  2183. !this.Printinglist[item].fCntrno
  2184. ) {
  2185. return this.$message.error(
  2186. "请输入第" + (Number(item) + 1) + "行的箱号"
  2187. );
  2188. }
  2189. }
  2190. let formData = new window.FormData();
  2191. formData.append("warehouseBills", JSON.stringify(this.form));
  2192. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2193. formData.append(
  2194. "warehousebillsitems",
  2195. JSON.stringify(this.Printinglist)
  2196. );
  2197. formData.append(
  2198. "warehousebillsfeesDr",
  2199. JSON.stringify(this.warehouseDrList)
  2200. );
  2201. formData.append(
  2202. "warehousebillsfeesCr",
  2203. JSON.stringify(this.warehouseCrList)
  2204. );
  2205. disChargelist(formData).then((response) => {
  2206. if ((response.code = 200)) {
  2207. this.detailList.map((e, index) => {
  2208. response.data.warehousebillsitems.map((item) => {
  2209. if (e.fId == item.fId) {
  2210. e = item;
  2211. this.$set(this.detailList, index, e);
  2212. }
  2213. });
  2214. });
  2215. this.msgSuccess("卸货成功");
  2216. }
  2217. });
  2218. } else {
  2219. this.$message.error("请选择需要卸货的明细!");
  2220. }
  2221. },
  2222. creditClick() {
  2223. for (let item in this.Printinglist) {
  2224. if (!this.Printinglist[item].fId) {
  2225. return this.$message.error("请存在未保存的数据");
  2226. }
  2227. if (this.Printinglist[item].fBillstatus == 10) {
  2228. return this.$message.error("请存在未打印的作业单");
  2229. }
  2230. if (this.Printinglist[item].fBillstatus == 20) {
  2231. return this.$message.error("请存在未卸货的数据");
  2232. }
  2233. }
  2234. let formData = new window.FormData();
  2235. formData.append("warehouseBills", JSON.stringify(this.form));
  2236. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2237. formData.append(
  2238. "warehousebillsfeesDr",
  2239. JSON.stringify(this.warehouseDrList)
  2240. );
  2241. formData.append(
  2242. "warehousebillsfeesCr",
  2243. JSON.stringify(this.warehouseCrList)
  2244. );
  2245. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2246. formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
  2247. addWhgenleg(formData).then((response) => {
  2248. if ((response.code = 200)) {
  2249. this.detailList.map((e, index) => {
  2250. response.data.warehousebillsitems.map((item) => {
  2251. if (e.fId == item.fId) {
  2252. e = item;
  2253. this.$set(this.detailList, index, e);
  2254. }
  2255. });
  2256. });
  2257. this.msgSuccess("入库成功");
  2258. }
  2259. });
  2260. },
  2261. // 撤回入账
  2262. withdrawClick() {
  2263. for (let item in this.Printinglist) {
  2264. if (!this.Printinglist[item].fId) {
  2265. return this.$message.error("请存在未保存的数据");
  2266. }
  2267. if (this.Printinglist[item].fBillstatus == 10) {
  2268. return this.$message.error("请存在未打印的作业单");
  2269. }
  2270. if (this.Printinglist[item].fBillstatus == 20) {
  2271. return this.$message.error("请存在未卸货的数据");
  2272. }
  2273. if (this.Printinglist[item].fBillstatus == 30) {
  2274. return this.$message.error("请存在未入库的数据");
  2275. }
  2276. }
  2277. // 撤回入库
  2278. let formData = new window.FormData();
  2279. formData.append("warehouseBills", JSON.stringify(this.form));
  2280. formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
  2281. formData.append(
  2282. "warehousebillsfeesDr",
  2283. JSON.stringify(this.warehouseDrList)
  2284. );
  2285. formData.append(
  2286. "warehousebillsfeesCr",
  2287. JSON.stringify(this.warehouseCrList)
  2288. );
  2289. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2290. updateCredit(formData).then((response) => {
  2291. this.Printinglist.map((e) => {
  2292. this.detailList.map((item, index) => {
  2293. if (e.fId == item.fId) {
  2294. this.$set(this.detailList[index], "fBillstatus", 10);
  2295. }
  2296. });
  2297. });
  2298. this.msgSuccess("撤回成功");
  2299. });
  2300. },
  2301. fStorageTypeFormat(row) {
  2302. let fStorageType;
  2303. this.fStorageTypeOptions.map((e) => {
  2304. if (row.fBusinessType == e.dictValue) {
  2305. fStorageType = e.dictLabel;
  2306. }
  2307. });
  2308. return fStorageType;
  2309. },
  2310. goodsFormat(row) {
  2311. let goods;
  2312. this.goodsOptions.map((e) => {
  2313. if (row.fGoodsid == e.fId) {
  2314. goods = e.fName;
  2315. }
  2316. });
  2317. return goods;
  2318. },
  2319. fBsdateFormat(row) {
  2320. const dateMat = new Date(row.fBsdate);
  2321. const year = dateMat.getFullYear();
  2322. const month = dateMat.getMonth() + 1;
  2323. const day = dateMat.getDate();
  2324. const timeFormat = year + "-" + month + "-" + day;
  2325. return timeFormat;
  2326. },
  2327. getForm() {
  2328. getWarehousebills(this.chiId).then((response) => {
  2329. this.form = response.data.warehousebills;
  2330. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  2331. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2332. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  2333. this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
  2334. if (this.form.fTrademodeid) {
  2335. this.$set(
  2336. this.form,
  2337. "fTrademodeid",
  2338. this.form.fTrademodeid.toString()
  2339. );
  2340. }
  2341. if (this.form.fStltypeid) {
  2342. this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
  2343. }
  2344. if (response.data.corps) {
  2345. this.fMblnoOptions = response.data.corps;
  2346. this.KHblnoOptions = response.data.corps;
  2347. this.fCompanyOptIons = response.data.corps;
  2348. this.fSbuOptions = response.data.corps;
  2349. }
  2350. this.detailList = response.data.warehouseBillsItem;
  2351. });
  2352. },
  2353. saveForm() {
  2354. this.$refs["form"].validate((valid) => {
  2355. if (valid) {
  2356. if (this.detailList.length > 0) {
  2357. let formDatae = new window.FormData();
  2358. // 附件数据
  2359. this.form.fBillingway = this.form.fFeetunit;
  2360. // this.form.fBstime = JSON.stringify(this.form.fBstime)
  2361. formDatae.append("tWarehouseBills", JSON.stringify(this.form));
  2362. // 库存明细
  2363. formDatae.append(
  2364. "tWarehousebillsitems",
  2365. JSON.stringify(this.detailList)
  2366. );
  2367. // 附件数据
  2368. formDatae.append(
  2369. "tEnclosure",
  2370. JSON.stringify(this.relevantAttachments)
  2371. );
  2372. // 费用明细付款
  2373. formDatae.append(
  2374. "tWarehousebillsfeesCr",
  2375. JSON.stringify(this.warehouseCrList)
  2376. );
  2377. // 收款
  2378. formDatae.append(
  2379. "tWarehousebillsfeesDr",
  2380. JSON.stringify(this.warehouseDrList)
  2381. );
  2382. formDatae.append("mblnoStatus", this.mblnoStatus);
  2383. addWarehousebills(formDatae).then((response) => {
  2384. if (response.data == false) {
  2385. this.$confirm(response.msg, "提示", {
  2386. confirmButtonText: "确定",
  2387. cancelButtonText: "取消",
  2388. type: "warning",
  2389. })
  2390. .then(() => {
  2391. this.mblnoStatus = true;
  2392. this.saveForm();
  2393. })
  2394. .catch(() => {
  2395. this.$message({
  2396. type: "info",
  2397. message: "已取消",
  2398. });
  2399. });
  2400. } else {
  2401. this.mblnoStatus = "";
  2402. this.form = response.data.warehouseBills;
  2403. this.detailList = response.data.warehousebillsitems;
  2404. this.msgSuccess("保存成功");
  2405. }
  2406. });
  2407. } else {
  2408. this.$message.error("至少添加一条入库明细");
  2409. }
  2410. }
  2411. });
  2412. },
  2413. imporTable() {
  2414. this.$refs["importList"].validate((valid) => {
  2415. if (valid) {
  2416. let obj = {};
  2417. this.fWarehouselocid = null;
  2418. this.fWarehouseidOptions.map((e) => {
  2419. if (
  2420. e.fWarehouseInformation == this.importList.fWarehouseInformation
  2421. ) {
  2422. this.fWarehouselocid = e.id;
  2423. }
  2424. });
  2425. this.detailList.push({
  2426. fBillstatus: 10,
  2427. fMblno: this.form.fMblno,
  2428. fQty: this.importList.fQty,
  2429. fNetweight: this.importList.fNetweight,
  2430. fGrossweight: this.importList.fGrossweight,
  2431. fBsdate: this.importList.fBsdate,
  2432. fGoodsid: this.importList.fGoodsid,
  2433. fBusinessType: this.importList.fBusinessType,
  2434. fMarks: this.importList.fMarks,
  2435. fWarehouselocid: this.fWarehouselocid,
  2436. fWarehouseInformation: this.importList.fWarehouseInformation,
  2437. fCntrtype: this.importList.fCntrtype,
  2438. fCntqty: this.importList.fCntqty,
  2439. fPackagespecs: this.importList.fPackagespecs,
  2440. fTruckno: this.importList.fTruckno,
  2441. fDriverName: this.importList.fDriverName,
  2442. fDriverTel: this.importList.fDriverTel,
  2443. fDriverIdCar: this.importList.fDriverIdCar,
  2444. fSerialNumber: this.importList.fSerialNumber,
  2445. fCntrno: this.importList.fCntrno,
  2446. fGoodsval: this.importList.fGoodsval,
  2447. remark: this.importList.remark,
  2448. });
  2449. this.weightList = false;
  2450. }
  2451. });
  2452. },
  2453. fiximporTable() {
  2454. this.detailList[this.fixdetaiNum] = this.importList;
  2455. this.weightList = false;
  2456. },
  2457. // 库存明细多选
  2458. Selectinventory(selection) {
  2459. this.Printinglist = selection;
  2460. //允许确认入库list
  2461. this.dataListSelection = [];
  2462. this.dataListSelection = selection.filter((e) => e.fBillstatus == 30);
  2463. //允许撤销入库list
  2464. this.dataWithdrawList = [];
  2465. this.dataWithdrawList = selection.filter((e) => e.fBillstatus == 40);
  2466. console.log("ruku");
  2467. console.log(this.dataListSelection);
  2468. console.log("chexiao");
  2469. console.log(this.dataWithdrawList);
  2470. },
  2471. // 合计
  2472. getSummaries(param) {
  2473. const { columns, data } = param;
  2474. const sums = [];
  2475. var values = [];
  2476. columns.forEach((column, index) => {
  2477. if (index === 0) {
  2478. sums[index] = "";
  2479. return;
  2480. }
  2481. if (column.property === "fGrossweight") {
  2482. values = data.map((item) => Number(item["fGrossweight"]));
  2483. }
  2484. if (column.property === "fNetweight") {
  2485. values = data.map((item) => Number(item["fNetweight"]));
  2486. }
  2487. if (column.property === "fQty") {
  2488. values = data.map((item) => Number(item["fQty"]));
  2489. }
  2490. if (
  2491. column.property === "fGrossweight" ||
  2492. column.property === "fNetweight" ||
  2493. column.property === "fQty"
  2494. ) {
  2495. sums[index] = values.reduce((prev, curr) => {
  2496. const value = Number(curr);
  2497. if (!isNaN(value)) {
  2498. if (column.property === "fQty") {
  2499. this.sumMum = prev + curr;
  2500. }
  2501. return prev + curr;
  2502. } else {
  2503. return prev;
  2504. }
  2505. }, 0);
  2506. sums[index] = sums[index].toFixed(2);
  2507. }
  2508. });
  2509. this.sums = sums;
  2510. return sums;
  2511. },
  2512. playcomputer() {
  2513. let Num1 = this.form.fPlannetweight / this.form.fPlanqty;
  2514. let Num2 = this.form.fPlangrossweight / this.form.fPlanqty;
  2515. this.importList.fNetweight = Number(
  2516. (this.importList.fQty * Num1).toFixed(2)
  2517. );
  2518. this.importList.fGrossweight = Number(
  2519. (this.importList.fQty * Num2).toFixed(2)
  2520. );
  2521. },
  2522. imporComputer() {
  2523. if (this.importList.fQty > this.allfPlanqty) {
  2524. return this.$alert("计划件数不能超过" + this.allfPlanqty, "提示", {
  2525. confirmButtonText: "确定",
  2526. type: "warning",
  2527. callback: (action) => {
  2528. this.importList.fQty = this.allfPlanqty;
  2529. this.playcomputer();
  2530. },
  2531. });
  2532. } else {
  2533. this.playcomputer();
  2534. }
  2535. },
  2536. // 入库明细新增list
  2537. addRelevant() {
  2538. this.$refs["form"].validate((valid) => {
  2539. if (valid) {
  2540. this.title = "新增";
  2541. this.reset();
  2542. this.fixdetaiNum = null;
  2543. if (
  2544. !this.form.fPlannetweight ||
  2545. !this.form.fPlangrossweight ||
  2546. !this.form.fPlanqty
  2547. ) {
  2548. return this.$message({
  2549. message: "请维护计划净重(kg),计划毛重(kg),计划件数",
  2550. type: "warning",
  2551. });
  2552. }
  2553. this.importList.fQty = Number(
  2554. (this.form.fPlanqty - this.sumMum).toFixed(2)
  2555. );
  2556. if (this.form.fTruckno) {
  2557. this.importList.fTruckno = this.form.fTruckno;
  2558. }
  2559. if (this.form.fDriverTel) {
  2560. this.importList.fDriverTel = this.form.fDriverTel;
  2561. }
  2562. if (this.form.fDriverName) {
  2563. this.importList.fDriverName = this.form.fDriverName;
  2564. }
  2565. if (this.form.fDriverIdCar) {
  2566. this.importList.fDriverIdCar = this.form.fDriverIdCar;
  2567. }
  2568. this.allfPlanqty = this.importList.fQty;
  2569. this.importList.fBsdate = this.form.fBsdate;
  2570. this.importList.fGoodsid = this.form.fGoodsid;
  2571. this.playcomputer();
  2572. treeselect(this.form.fWarehouseid).then((response) => {
  2573. this.fWarehouseidOptions = response.data;
  2574. });
  2575. this.weightList = true;
  2576. }
  2577. });
  2578. },
  2579. printZyd() {
  2580. if (this.Printinglist.length > 0) {
  2581. for (let item in this.Printinglist) {
  2582. if (!this.Printinglist[item].fId) {
  2583. return this.$message.error("请先保存!");
  2584. }
  2585. if (
  2586. this.Printinglist[item].fTruckno !== this.Printinglist[0].fTruckno
  2587. ) {
  2588. return this.$message.error("请选择车相同车号");
  2589. }
  2590. }
  2591. this.print_zyd = true;
  2592. this.warehouseOptions.map((e) => {
  2593. if (e.fId == this.form.fWarehouseid) {
  2594. this.stockaddr = e.fAddr;
  2595. }
  2596. });
  2597. this.fDriverTel = this.Printinglist[0].fDriverTel;
  2598. } else {
  2599. this.$message.error("请选择需要打印的明细!");
  2600. }
  2601. },
  2602. handleCommand(command) {
  2603. if (this.Printinglist.length > 0) {
  2604. this.$refs["form"].validate((valid) => {
  2605. if (valid) {
  2606. for (let corp in this.fMblnoOptions) {
  2607. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  2608. this.$set(
  2609. this.form,
  2610. "fCorpidName",
  2611. this.fMblnoOptions[corp].fName
  2612. );
  2613. }
  2614. }
  2615. this.warehouseOptions.map((e) => {
  2616. if (e.fId == this.form.fWarehouseid) {
  2617. this.stockName = e.fName;
  2618. this.stockaddr = e.fAddr;
  2619. }
  2620. });
  2621. this.fDriverTel = this.Printinglist[0].fDriverTel;
  2622. this.fBsdate = this.Printinglist[0].fBsdate;
  2623. this.fTruckno = this.Printinglist[0].fTruckno;
  2624. this.allfCntqty = 0;
  2625. this.allfGrossweight = 0;
  2626. this.allfPlanqty = 0;
  2627. this.allfNetweight = 0;
  2628. this.allfQty = 0;
  2629. this.Printinglist.map((e) => {
  2630. if (e.fCntqty) {
  2631. this.allfCntqty += e.fCntqty;
  2632. }
  2633. if (e.fGrossweight) {
  2634. this.allfGrossweight += e.fGrossweight;
  2635. }
  2636. if (e.fPlanqty) {
  2637. this.allfPlanqty += e.fPlanqty;
  2638. }
  2639. if (e.fNetweight) {
  2640. this.allfNetweight += e.fNetweight;
  2641. }
  2642. if (e.fQty) {
  2643. this.allfQty += e.fQty;
  2644. }
  2645. });
  2646. if (command == "a") {
  2647. this.print_shd = true;
  2648. } else if (command == "b") {
  2649. this.print_rkd = true;
  2650. } else if (command == "c") {
  2651. this.print_lhd = true;
  2652. } else if (command == "d") {
  2653. this.print_hwqr = true;
  2654. } else if (command == "e") {
  2655. this.print_lwqr = true;
  2656. } else if (command == "f") {
  2657. this.print_dpxx = true;
  2658. }
  2659. }
  2660. });
  2661. } else {
  2662. this.$message.error("请选择需要打印的明细!");
  2663. }
  2664. },
  2665. //计算仓储费日期变更
  2666. changeDate() {
  2667. this.$set(this.form, "fChargedate", this.form.fBsdate);
  2668. },
  2669. addRow() {
  2670. var obj = {};
  2671. this.CntrTable.push(obj);
  2672. },
  2673. fixRow(row, index) {
  2674. this.title = "修改";
  2675. this.reset();
  2676. this.fixdetaiNum = null;
  2677. this.fixdetaiNum = index;
  2678. row.fBsdate = new Date(row.fBsdate).getTime();
  2679. this.importList = row;
  2680. this.weightList = true;
  2681. },
  2682. deleteRow(index, rows) {
  2683. rows.splice(index, 1);
  2684. },
  2685. wDeleteRow(index, rows) {
  2686. rows.splice(index, 1);
  2687. this.sumMum = 0;
  2688. this.detailList.map((e) => {
  2689. if (e.fQty) {
  2690. this.sumMum += e.fQty;
  2691. }
  2692. });
  2693. },
  2694. //获取登陆人
  2695. queryUser() {
  2696. queryUserVal().then((response) => {
  2697. if (response.user !== null) {
  2698. this.userVal = response.user;
  2699. this.$set(this.form, "fDeptid", this.userVal.deptId);
  2700. this.$set(this.form, "createBy", this.userVal.userName);
  2701. this.$set(this.form, "fStorekeeper", this.userVal.nickName);
  2702. this.$set(this.form, "fIfdamage", "1");
  2703. this.$set(this.form, "fIfweigh", "1");
  2704. this.$set(this.form, "fTrademodeid", "1");
  2705. this.$set(this.form, "createTime", Date.parse(new Date()));
  2706. }
  2707. if (response.dept !== null) {
  2708. this.deptOptions = [];
  2709. this.deptOptions.push(response.dept);
  2710. }
  2711. });
  2712. },
  2713. //作业类型校验
  2714. educationChange() {
  2715. if (this.form.fBusinessType === "1" || this.form.fBusinessType === "2") {
  2716. this.isrequired = 1;
  2717. this.isrequired_s = 2;
  2718. } else if (
  2719. this.form.fBusinessType === "3" ||
  2720. this.form.fBusinessType === "4"
  2721. ) {
  2722. this.isrequired_s = 1;
  2723. this.isrequired = 2;
  2724. } else {
  2725. this.isrequired = 2;
  2726. this.isrequired_s = 2;
  2727. }
  2728. },
  2729. userRemoteMethod(query) {
  2730. if (query !== "") {
  2731. this.selectloading = true;
  2732. setTimeout(() => {
  2733. listUser({ userName: query }).then((response) => {
  2734. this.selectloading = false;
  2735. this.userOptions = response.rows;
  2736. });
  2737. }, 200);
  2738. } else {
  2739. this.userOptions = [];
  2740. }
  2741. },
  2742. corpremoteMethod(query) {
  2743. if (query !== "") {
  2744. this.selectloading = true;
  2745. setTimeout(() => {
  2746. listCorps({ fName: query, type: 1 }).then((response) => {
  2747. this.selectloading = false;
  2748. this.fMblnoOptions = response.rows;
  2749. });
  2750. }, 200);
  2751. } else {
  2752. this.fMblnoOptions = [];
  2753. }
  2754. },
  2755. flabourRemoteMethod(query) {
  2756. if (query !== "") {
  2757. this.selectloading = true;
  2758. setTimeout(() => {
  2759. listCorps({ fName: query, fTypeid: 6 }).then((response) => {
  2760. this.selectloading = false;
  2761. this.fCompanyOptIons = response.rows;
  2762. });
  2763. }, 200);
  2764. } else {
  2765. this.fCompanyOptIons = [];
  2766. }
  2767. },
  2768. fleetRemoteMethod(query) {
  2769. if (query !== "") {
  2770. this.selectloading = true;
  2771. setTimeout(() => {
  2772. listCorps({ fName: query, fTypeid: 2 }).then((response) => {
  2773. this.selectloading = false;
  2774. this.fleetOptions = response.rows;
  2775. });
  2776. }, 200);
  2777. } else {
  2778. this.fleetOptions = [];
  2779. }
  2780. },
  2781. corpsRemoteMethodd(query) {
  2782. if (query !== "") {
  2783. this.selectloading = true;
  2784. setTimeout(() => {
  2785. listCorps({ fName: query, type: 5 }).then((response) => {
  2786. this.selectloading = false;
  2787. this.Pledgebank = response.rows;
  2788. });
  2789. }, 200);
  2790. } else {
  2791. this.Pledgebank = [];
  2792. }
  2793. },
  2794. fSbuRemoteMethod(query) {
  2795. if (query !== "") {
  2796. this.selectloading = true;
  2797. setTimeout(() => {
  2798. listCorps({ fName: query }).then((response) => {
  2799. this.selectloading = false;
  2800. this.fSbuOptions = response.rows;
  2801. });
  2802. }, 200);
  2803. } else {
  2804. this.fSbuOptions = [];
  2805. }
  2806. },
  2807. clear(e) {
  2808. if (e == "fCorpid") {
  2809. this.fMblnoOptions = [];
  2810. }
  2811. if (e == "fStorekeeper") {
  2812. this.userOptions = [];
  2813. }
  2814. if (e == "fLabour") {
  2815. this.fCompanyOptIons = [];
  2816. }
  2817. if (e == "fFleet") {
  2818. this.fleetOptions = [];
  2819. }
  2820. if (e == "fBankcorpid") {
  2821. this.Pledgebank = [];
  2822. }
  2823. if (e == "fSbu") {
  2824. this.fSbuOptions = [];
  2825. }
  2826. },
  2827. //打印
  2828. addprint(status) {
  2829. if (status == "zyd") {
  2830. let formData = new window.FormData();
  2831. formData.append("warehouseBills", JSON.stringify(this.form));
  2832. formData.append(
  2833. "warehousebillsitems",
  2834. JSON.stringify(this.Printinglist)
  2835. );
  2836. formData.append(
  2837. "warehousebillsfeesDr",
  2838. JSON.stringify(this.warehouseDrList)
  2839. );
  2840. formData.append(
  2841. "warehousebillsfeesCr",
  2842. JSON.stringify(this.warehouseCrList)
  2843. );
  2844. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2845. addJoblist(formData).then((response) => {
  2846. this.detailList.map((e, index) => {
  2847. response.data.warehousebillsitems.map((item) => {
  2848. if (e.fId == item.fId) {
  2849. e = item;
  2850. this.$set(this.detailList, index, e);
  2851. }
  2852. });
  2853. });
  2854. });
  2855. }
  2856. const style =
  2857. "@page { } " +
  2858. "@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;}";
  2859. print({
  2860. printable: "print_area1",
  2861. type: "html",
  2862. style: style, // 亦可使用引入的外部css;
  2863. scanStyles: false,
  2864. });
  2865. },
  2866. changeShow(status) {
  2867. if (status == "save") {
  2868. this.saveForm();
  2869. }
  2870. this.resetForm("form");
  2871. this.resetForm("importList");
  2872. this.detailList = [];
  2873. this.$emit("changeShow", "true");
  2874. },
  2875. },
  2876. watch: {
  2877. // 监听 addOrUpdateVisible 改变
  2878. addOrUpdateVisible(oldVal, newVal) {
  2879. this.showDialog = this.addOrUpdateVisible;
  2880. },
  2881. },
  2882. };
  2883. </script>
  2884. <style lang="scss" scoped>
  2885. .tag-hover:hover {
  2886. background-color: #d9ebfb;
  2887. }
  2888. .tag-hover {
  2889. border-top-left-radius: 0;
  2890. border-top-right-radius: 0;
  2891. height: 15px;
  2892. padding: 0px 4px;
  2893. line-height: 12px;
  2894. }
  2895. .print-div {
  2896. color: #000;
  2897. }
  2898. .print_table {
  2899. table {
  2900. border-right: 1px solid #000;
  2901. border-bottom: 1px solid #000;
  2902. font-size: 12px;
  2903. margin-bottom: 5px;
  2904. }
  2905. table td {
  2906. border-left: 1px solid #000;
  2907. border-top: 1px solid #000;
  2908. vertical-align: middle;
  2909. padding: 2px;
  2910. text-align: center;
  2911. }
  2912. }
  2913. .print_form {
  2914. font-size: 12px;
  2915. }
  2916. </style>