index.vue 132 KB

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