index.vue 128 KB

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