index.vue 131 KB

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