index.vue 95 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865
  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="fBsdate">
  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. style="width: 80%"
  92. clearable
  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. :disabled="browseStatus"
  139. remote
  140. clearable
  141. style="width: 80%"
  142. :remote-method="warehouseRemoteMethod"
  143. @keyup.enter.native="handleQuery"
  144. placeholder="请选择仓库"
  145. >
  146. <el-option
  147. v-for="(dict, index) in warehouseOptions"
  148. :key="index.fId"
  149. :label="dict.fName"
  150. :value="dict.fId"
  151. ></el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="品牌" prop="fMarks">
  155. <el-input
  156. v-model="queryParams.fMarks"
  157. placeholder="请输入品牌"
  158. clearable
  159. style="width: 80%"
  160. size="small"
  161. @keyup.enter.native="handleQuery"
  162. />
  163. </el-form-item>
  164. <el-form-item>
  165. <el-button
  166. type="cyan"
  167. icon="el-icon-search"
  168. size="mini"
  169. @click="handleQuery"
  170. >搜索
  171. </el-button>
  172. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  173. >重置
  174. </el-button>
  175. </el-form-item>
  176. </el-form>
  177. <el-row :gutter="10" class="mb8">
  178. <el-col :span="1.5">
  179. <el-button
  180. type="primary"
  181. icon="el-icon-plus"
  182. size="mini"
  183. @click="handleAdd"
  184. v-hasPermi="['warehouseBusiness:goodsTransfer:add']"
  185. >新增
  186. </el-button>
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. type="success"
  191. icon="el-icon-edit"
  192. size="mini"
  193. :disabled="single"
  194. @click="handleUpdate"
  195. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  196. >修改
  197. </el-button>
  198. </el-col>
  199. <el-col :span="1.5">
  200. <el-button
  201. type="warning"
  202. icon="el-icon-download"
  203. size="mini"
  204. @click="handleExport"
  205. v-hasPermi="['warehouseBusiness:goodsTransfer:export']"
  206. >导出
  207. </el-button>
  208. </el-col>
  209. <right-toolbar
  210. :showSearch.sync="showSearch"
  211. @queryTable="getList"
  212. ></right-toolbar>
  213. </el-row>
  214. <el-table
  215. v-loading="loading"
  216. :data="goodsTransferList"
  217. @selection-change="handleSelectionChange"
  218. >
  219. <el-table-column type="selection" width="55" align="center"/>
  220. <el-table-column type="index" label="行号" align="center"/>
  221. <el-table-column
  222. :show-overflow-tooltip="true"
  223. label="货权方"
  224. align="center"
  225. prop="fCorpid"
  226. />
  227. <el-table-column
  228. :show-overflow-tooltip="true"
  229. label="转货权方"
  230. align="center"
  231. prop="fTocorpid"
  232. />
  233. <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
  234. <el-table-column
  235. :show-overflow-tooltip="true"
  236. label="品牌"
  237. align="center"
  238. prop="fMarks"
  239. />
  240. <el-table-column
  241. :show-overflow-tooltip="true"
  242. label="业务编号"
  243. align="center"
  244. prop="fBillno"
  245. />
  246. <el-table-column
  247. label="货转日期"
  248. align="center"
  249. prop="fBsdate"
  250. width="180"
  251. >
  252. <template slot-scope="scope">
  253. <span>{{ parseTime(scope.row.fBsdate, '{y}-{m}-{d}') }}</span>
  254. </template>
  255. </el-table-column>
  256. <el-table-column
  257. label="贸易方式"
  258. align="center"
  259. prop="fTrademodeid"
  260. :formatter="fTrademodeidFormat"
  261. />
  262. <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
  263. <el-table-column label="件数" align="center" prop="fQty"/>
  264. <el-table-column label="毛重" align="center" prop="fGrossweight"/>
  265. <el-table-column label="净重" align="center" prop="fNetweight"/>
  266. <el-table-column label="状态" align="center" prop="fBillstatus" width="120">
  267. <template slot-scope="scope">
  268. <span v-if="scope.row.fBillstatus == '1'">保存</span>
  269. <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
  270. <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
  271. <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
  272. <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
  273. <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column
  277. label="操作"
  278. align="center"
  279. class-name="small-padding fixed-width"
  280. width="100"
  281. >
  282. <template slot-scope="scope">
  283. <el-button
  284. size="mini"
  285. type="text"
  286. icon="el-icon-edit"
  287. @click="check_s(scope.row,0)"
  288. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  289. >查看
  290. </el-button>
  291. <el-button
  292. size="mini"
  293. type="text"
  294. icon="el-icon-edit"
  295. v-if="scope.row.fBillstatus <= 3"
  296. @click="handleUpdate(scope.row, false)"
  297. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  298. >修改
  299. </el-button>
  300. <el-button
  301. size="mini"
  302. type="text"
  303. icon="el-icon-edit"
  304. v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
  305. @click="check(scope.row)"
  306. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  307. >审批进度
  308. </el-button>
  309. <el-button
  310. size="mini"
  311. type="text"
  312. icon="el-icon-delete"
  313. v-if="scope.row.fBillstatus <= 3"
  314. @click="handleDelete(scope.row)"
  315. v-hasPermi="['warehouseBusiness:goodsTransfer:remove']"
  316. >删除
  317. </el-button>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. <pagination
  322. v-show="total > 0"
  323. :total="total"
  324. :page.sync="queryParams.pageNum"
  325. :limit.sync="queryParams.pageSize"
  326. @pagination="getList"
  327. />
  328. <!-- 添加或修改仓库主(出入库)对话框 -->
  329. <el-dialog
  330. :title="title"
  331. :visible.sync="open"
  332. :close-on-click-modal="false"
  333. width="80%"
  334. append-to-body
  335. :show-close="colseButton"
  336. >
  337. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  338. <el-row>
  339. <el-col :span="8">
  340. <el-form-item label="货权方" prop="fCorpid">
  341. <el-select
  342. v-model="form.fCorpid"
  343. filterable
  344. remote
  345. :disabled="notChange || formBrowseStatus"
  346. style="width: 80%"
  347. :remote-method="corpsRemoteMethod"
  348. placeholder="请选择货权方"
  349. >
  350. <el-option
  351. v-for="(dict, index) in fMblnoOptions"
  352. :key="index.fId"
  353. :label="dict.fName"
  354. :value="dict.fId"
  355. ></el-option>
  356. </el-select>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="8">
  360. <el-form-item label="新货权方" prop="fTocorpid">
  361. <el-select
  362. v-model="form.fTocorpid"
  363. filterable
  364. remote
  365. :disabled="notChange || formBrowseStatus"
  366. style="width: 80%"
  367. @change="changefCorpid(form)"
  368. :remote-method="corpsRemoteMethod"
  369. placeholder="请选择新货权方"
  370. >
  371. <el-option
  372. v-for="(dict, index) in fMblnoOptions"
  373. :key="index.fId"
  374. :label="dict.fName"
  375. :value="dict.fId"
  376. ></el-option>
  377. </el-select>
  378. </el-form-item>
  379. </el-col>
  380. <el-col :span="8">
  381. <el-form-item label="业务编号" prop="fBillno">
  382. <el-input
  383. v-model="form.fBillno"
  384. style="width: 80%"
  385. disabled
  386. placeholder="业务编号"
  387. />
  388. </el-form-item>
  389. </el-col>
  390. </el-row>
  391. <el-row>
  392. <el-col :span="8">
  393. <el-form-item label="货转日期" prop="fBsdate">
  394. <el-date-picker
  395. v-model="form.fBsdate"
  396. style="width: 80%"
  397. type="date"
  398. :disabled="notChange || formBrowseStatus"
  399. value-format="timestamp"
  400. placeholder="货转日期"
  401. >
  402. </el-date-picker>
  403. </el-form-item>
  404. </el-col>
  405. <el-col :span="8">
  406. <el-form-item label="仓储计费日期" prop="fChargedate">
  407. <el-date-picker
  408. v-model="form.fChargedate"
  409. style="width: 80%"
  410. type="date"
  411. :disabled="notChange || formBrowseStatus"
  412. value-format="timestamp"
  413. placeholder="仓储计费日期">
  414. </el-date-picker>
  415. </el-form-item>
  416. </el-col>
  417. <el-col :span="8">
  418. <el-form-item label="仓库" prop="fWarehouseid">
  419. <el-select
  420. v-model="form.fWarehouseid"
  421. filterable
  422. :disabled="notChange || formBrowseStatus"
  423. remote
  424. style="width: 80%"
  425. :remote-method="warehouseRemoteMethod"
  426. placeholder="请选择仓库">
  427. <el-option
  428. v-for="(dict, index) in warehouseOptions"
  429. :key="index.fId"
  430. :label="dict.fName"
  431. :value="dict.fId"
  432. ></el-option>
  433. </el-select>
  434. </el-form-item>
  435. </el-col>
  436. </el-row>
  437. <el-row>
  438. <el-col :span="8">
  439. <el-form-item label="结算方式" prop="fStltypeid">
  440. <el-select
  441. v-model="form.fStltypeid"
  442. placeholder="请选择结算方式"
  443. clearable
  444. :disabled="notChange || formBrowseStatus"
  445. style="width: 80%"
  446. >
  447. <el-option
  448. v-for="(dict, index) in fStltypeOptions"
  449. :key="index.dictValue"
  450. :label="dict.dictLabel"
  451. :value="dict.dictValue"
  452. />
  453. </el-select>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8">
  457. <el-form-item label="计费单位" prop="fFeetunit">
  458. <el-select
  459. v-model="form.fFeetunit"
  460. placeholder="请选择计费单位"
  461. clearable
  462. :disabled="notChange || formBrowseStatus"
  463. style="width: 80%"
  464. >
  465. <el-option
  466. v-for="(dict, index) in fFeetunitOptions"
  467. :key="index.dictValue"
  468. :label="dict.dictLabel"
  469. :value="dict.dictValue"
  470. />
  471. </el-select>
  472. </el-form-item>
  473. </el-col>
  474. <el-col :span="8">
  475. <el-form-item label="贸易方式" prop="fTrademodeid">
  476. <el-select
  477. v-model="form.fTrademodeid"
  478. placeholder="请选择贸易方式"
  479. clearable
  480. :disabled="notChange || formBrowseStatus"
  481. style="width: 80%"
  482. >
  483. <el-option
  484. v-for="(dict, index) in fTrademodeidOptions"
  485. :key="index.dictValue"
  486. :label="dict.dictLabel"
  487. :value="dict.dictValue"
  488. />
  489. </el-select>
  490. </el-form-item>
  491. </el-col>
  492. </el-row>
  493. <el-row>
  494. <el-col :span="8">
  495. <el-form-item label="提单号" prop="fMblno">
  496. <el-input
  497. v-model="form.fMblno"
  498. :disabled="notChange"
  499. style="width: 80%"
  500. placeholder="手工输入"
  501. />
  502. </el-form-item>
  503. </el-col>
  504. <el-col :span="8">
  505. <el-form-item label="原始入库单号" prop="fOriginalbillno">
  506. <el-input
  507. v-model="form.fOriginalbillno"
  508. style="width: 80%"
  509. :disabled="notChange"
  510. placeholder="原始入库单号"
  511. />
  512. </el-form-item>
  513. </el-col>
  514. <el-col :span="8">
  515. <el-form-item label="原始入库日期" prop="orgStorageDate">
  516. <el-date-picker
  517. v-model="orgStorageDate"
  518. type="daterange"
  519. value-format="yyyy-MM-dd"
  520. range-separator="至"
  521. style="width: 80%"
  522. :disabled="notChange"
  523. start-placeholder="开始日期"
  524. end-placeholder="结束日期"
  525. >
  526. </el-date-picker>
  527. </el-form-item>
  528. </el-col>
  529. </el-row>
  530. <el-row>
  531. <el-col :span="8">
  532. <el-form-item label="品牌" prop="fMarks">
  533. <el-input
  534. v-model="form.fMarks"
  535. style="width: 80%"
  536. disabled
  537. placeholder="品牌"
  538. />
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="8">
  542. <el-form-item label="品名" prop="fProductName">
  543. <el-input
  544. v-model="form.fProductName"
  545. style="width: 80%"
  546. disabled
  547. placeholder="品名"
  548. />
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="8">
  552. <el-form-item label="制单人" prop="createBy">
  553. <el-input
  554. disabled
  555. v-model="form.createBy"
  556. style="width: 80%"
  557. placeholder="制单人"
  558. />
  559. </el-form-item>
  560. </el-col>
  561. </el-row>
  562. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  563. <el-button type="primary" :disabled="notChange" @click="submitForm">请 核</el-button>
  564. </el-form>
  565. <div class="dialogTableTitle flex a-center jlr">
  566. <h3>货转明细</h3>
  567. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  568. >新增
  569. </el-button
  570. >
  571. <el-button
  572. :disabled="dataListSelection.length <= 0 || browseStatus"
  573. @click.prevent="creditClick()"
  574. >货转确认
  575. </el-button>
  576. <el-button
  577. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  578. @click.prevent="withdrawClick"
  579. >撤回货转
  580. </el-button
  581. >
  582. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  583. </div>
  584. <el-table
  585. :data="dataList"
  586. ref="tableListRef"
  587. tooltip-effect="dark"
  588. border
  589. stripe
  590. :summary-method="getSummaries"
  591. @selection-change="Selectinventory"
  592. show-summary
  593. >
  594. <el-table-column type="selection" width="55" align="center"/>
  595. <el-table-column label="序号" type="index" width="80">
  596. </el-table-column>
  597. <el-table-column
  598. prop="fGoodsids"
  599. header-align="center"
  600. align="center"
  601. width="140px"
  602. label="品名"
  603. >
  604. </el-table-column>
  605. <el-table-column
  606. prop="fMarks"
  607. header-align="center"
  608. align="center"
  609. width="140px"
  610. label="品牌"
  611. >
  612. </el-table-column>
  613. <el-table-column
  614. prop="fBusinessType"
  615. header-align="center"
  616. width="140px"
  617. align="center"
  618. label="*业务类型"
  619. >
  620. <template slot-scope="scope">
  621. <el-select v-model="scope.row.fBusinessType"
  622. filterable
  623. disabled
  624. placeholder="请选择业务类型"
  625. >
  626. <el-option
  627. v-for="(dict, index) in fStorageTypeOptions"
  628. :key="index.dictValue"
  629. :label="dict.dictLabel"
  630. :value="dict.dictValue"
  631. />
  632. </el-select>
  633. </template>
  634. </el-table-column>
  635. <el-table-column
  636. prop="fMarks"
  637. header-align="center"
  638. align="center"
  639. width="140px"
  640. label="*业务详情"
  641. >
  642. </el-table-column>
  643. <el-table-column
  644. prop="fMblno"
  645. header-align="center"
  646. align="center"
  647. width="140px"
  648. label="提单号"
  649. >
  650. </el-table-column>
  651. <el-table-column
  652. prop="fWarehouseids"
  653. header-align="center"
  654. width="150px"
  655. align="center"
  656. label="*仓库"
  657. >
  658. </el-table-column>
  659. <el-table-column
  660. prop="fWarehouselocids"
  661. header-align="center"
  662. width="150px"
  663. align="center"
  664. label="*库区"
  665. >
  666. </el-table-column>
  667. <el-table-column
  668. prop="fOriginalbillno"
  669. header-align="center"
  670. align="center"
  671. width="140px"
  672. label="原始入库单号"
  673. >
  674. </el-table-column>
  675. <el-table-column
  676. prop="fPlanqty"
  677. header-align="center"
  678. align="center"
  679. width="180px"
  680. label="*结余件数"
  681. >
  682. </el-table-column>
  683. <el-table-column
  684. prop="fPlangrossweight"
  685. header-align="center"
  686. align="center"
  687. width="180px"
  688. label="*库存毛重"
  689. >
  690. </el-table-column>
  691. <el-table-column
  692. prop="fPlannetweight"
  693. header-align="center"
  694. width="180px"
  695. align="center"
  696. label="*库存净重"
  697. >
  698. </el-table-column>
  699. <el-table-column
  700. prop="fQty"
  701. header-align="center"
  702. width="180px"
  703. align="center"
  704. label="*货转件数"
  705. >
  706. <template slot-scope="scope">
  707. <el-input
  708. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  709. @change="qtyChange(scope.row)"
  710. v-model="scope.row.fQty"
  711. placeholder="*货转件数"
  712. :disabled="browseStatus || scope.row.fBillstatus === 6"
  713. show-word-limit
  714. />
  715. </template>
  716. </el-table-column>
  717. <el-table-column
  718. prop="fGrossweight"
  719. header-align="center"
  720. width="180px"
  721. align="center"
  722. label="*货转毛重"
  723. >
  724. <template slot-scope="scope">
  725. <el-input
  726. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  727. :disabled="browseStatus || scope.row.fBillstatus === 6"
  728. @change="changeTransfer(scope.row)"
  729. v-model="scope.row.fGrossweight"
  730. placeholder="货转毛重"
  731. show-word-limit
  732. />
  733. </template>
  734. </el-table-column>
  735. <el-table-column
  736. prop="fNetweight"
  737. header-align="center"
  738. width="180px"
  739. align="center"
  740. label="*货转净重"
  741. >
  742. <template slot-scope="scope">
  743. <el-input
  744. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  745. :disabled="browseStatus || scope.row.fBillstatus === 6"
  746. v-model="scope.row.fNetweight"
  747. @change="changeTransfer(scope.row)"
  748. placeholder="货转净重"
  749. show-word-limit
  750. />
  751. </template>
  752. </el-table-column>
  753. <el-table-column
  754. prop="fCntqty"
  755. header-align="center"
  756. width="180px"
  757. align="center"
  758. label="箱量"
  759. >
  760. <template slot-scope="scope">
  761. <el-input
  762. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  763. v-model="scope.row.fCntqty"
  764. placeholder="箱量"
  765. :disabled="browseStatus || scope.row.fBillstatus === 6"
  766. show-word-limit
  767. />
  768. </template>
  769. </el-table-column>
  770. <el-table-column
  771. prop="fPackagespecs"
  772. header-align="center"
  773. width="180px"
  774. align="center"
  775. label="*包装规格"
  776. >
  777. <template slot-scope="scope">
  778. <el-input
  779. v-model="scope.row.fPackagespecs"
  780. :disabled="browseStatus || scope.row.fBillstatus === 6"
  781. placeholder="包装规格"
  782. show-word-limit
  783. />
  784. </template>
  785. </el-table-column>
  786. <el-table-column
  787. prop="fGoodsval"
  788. header-align="center"
  789. width="150px"
  790. align="center"
  791. label="货值"
  792. >
  793. <template slot-scope="scope">
  794. <el-input
  795. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  796. v-model="scope.row.fGoodsval"
  797. placeholder="货值"
  798. :disabled="browseStatus || scope.row.fBillstatus === 6"
  799. show-word-limit
  800. />
  801. </template>
  802. </el-table-column>
  803. <el-table-column
  804. prop="remark"
  805. header-align="center"
  806. width="150px"
  807. align="center"
  808. label="备注"
  809. >
  810. <template slot-scope="scope">
  811. <el-input
  812. v-model="scope.row.remark"
  813. placeholder="备注"
  814. :disabled="browseStatus || scope.row.fBillstatus === 6"
  815. show-word-limit
  816. />
  817. </template>
  818. </el-table-column>
  819. <el-table-column
  820. prop="fBillstatus"
  821. header-align="center"
  822. width="150px"
  823. align="center"
  824. label="状态"
  825. >
  826. <template slot-scope="scope">
  827. <span v-if="scope.row.fBillstatus === 6">货转</span>
  828. <span v-else>录入</span>
  829. </template>
  830. </el-table-column>
  831. <el-table-column
  832. header-align="center"
  833. align="center"
  834. label="操作"
  835. width="130PX"
  836. >
  837. <template slot-scope="scope">
  838. <el-button
  839. :disabled="browseStatus || scope.row.fBillstatus === 6"
  840. @click.native.prevent="deleteRow(scope.$index, dataList)"
  841. size="small"
  842. >移除
  843. </el-button
  844. >
  845. </template>
  846. </el-table-column>
  847. </el-table>
  848. <div class="dialogTableTitle flex a-center jlr">
  849. <h3>附件上传</h3>
  850. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  851. >新增
  852. </el-button>
  853. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  854. </div>
  855. <el-table
  856. :data="relevantAttachments"
  857. ref="attachTable"
  858. tooltip-effect="dark"
  859. border
  860. stripe
  861. style="width: 100%"
  862. height="150"
  863. >
  864. <el-table-column label="序号" type="index" width="80">
  865. </el-table-column>
  866. <el-table-column
  867. prop="fName"
  868. header-align="center"
  869. align="center"
  870. label="附件名称"
  871. >
  872. <template slot-scope="scope">
  873. <el-input
  874. v-model="scope.row.fName"
  875. :disabled="browseStatus"
  876. placeholder="附件名称"
  877. show-word-limit
  878. />
  879. </template>
  880. </el-table-column>
  881. <el-table-column
  882. prop="createBy"
  883. header-align="center"
  884. align="center"
  885. label="上传人"
  886. >
  887. <template slot-scope="scope">
  888. <el-input
  889. v-model="scope.row.createBy"
  890. :disabled="browseStatus"
  891. placeholder="上传人"
  892. show-word-limit
  893. />
  894. </template>
  895. </el-table-column>
  896. <el-table-column
  897. prop="createTime"
  898. header-align="center"
  899. align="center"
  900. label="上传时间"
  901. >
  902. <template slot-scope="scope">
  903. <el-date-picker
  904. v-model="scope.row.createTime"
  905. type="date"
  906. disabled
  907. placeholder="上传时间"
  908. format="yyyy-MM-dd HH:mm"
  909. value-format="timestamp"
  910. ></el-date-picker>
  911. </template>
  912. </el-table-column>
  913. <el-table-column
  914. prop="fUrl"
  915. header-align="center"
  916. align="center"
  917. width="80%"
  918. label="上传附件"
  919. >
  920. <template slot-scope="scope">
  921. <uploadFile @input="showFile" v-model="scope.row.fUrl"/>
  922. </template>
  923. </el-table-column>
  924. <el-table-column
  925. header-align="center"
  926. align="center"
  927. label="操作"
  928. width="130PX"
  929. >
  930. <template slot-scope="scope">
  931. <el-button
  932. @click.native.prevent="
  933. deleteRow(scope.$index, relevantAttachments)
  934. "
  935. :disabled="browseStatus"
  936. size="small"
  937. >移除
  938. </el-button>
  939. </template>
  940. </el-table-column>
  941. </el-table>
  942. <div class="dialogTableTitle flex a-center jlr">
  943. <h3>收款信息</h3>
  944. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  945. >新增
  946. </el-button>
  947. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  948. </div>
  949. <el-table
  950. :data="warehouseDrList"
  951. ref="warehouseDr"
  952. tooltip-effect="dark"
  953. border
  954. stripe
  955. :summary-method="warehouseDrSummaries"
  956. show-summary
  957. >
  958. <el-table-column label="序号" type="index" width="80">
  959. </el-table-column>
  960. <el-table-column
  961. prop="fCorpid"
  962. header-align="center"
  963. align="center"
  964. width="180px"
  965. label="客户名称"
  966. >
  967. <template slot-scope="scope">
  968. <el-select
  969. v-model="scope.row.fCorpid"
  970. filterable
  971. remote
  972. :disabled="browseStatus"
  973. :remote-method="corpsRemoteMethod"
  974. placeholder="客户名称"
  975. >
  976. <el-option
  977. v-for="(dict, index) in KHblnoOptions"
  978. :key="index.fId"
  979. :label="dict.fName"
  980. :value="dict.fId"
  981. ></el-option>
  982. </el-select>
  983. </template>
  984. </el-table-column>
  985. <el-table-column
  986. prop="fFeeid"
  987. header-align="center"
  988. align="center"
  989. width="180px"
  990. label="费用名称"
  991. >
  992. <template slot-scope="scope">
  993. <el-select
  994. :disabled="browseStatus"
  995. v-model="scope.row.fFeeid"
  996. filterable
  997. remote
  998. :remote-method="fWRemoteMethod"
  999. placeholder="费用名称"
  1000. >
  1001. <el-option
  1002. v-for="(dict, index) in fWbuOptions"
  1003. :key="index.fId"
  1004. :label="dict.fName"
  1005. :value="dict.fId"
  1006. ></el-option>
  1007. </el-select>
  1008. </template>
  1009. </el-table-column>
  1010. <el-table-column
  1011. prop="fFeeunitid"
  1012. header-align="center"
  1013. align="center"
  1014. width="180px"
  1015. label="计价单位"
  1016. >
  1017. <template slot-scope="scope">
  1018. <el-select
  1019. v-model="scope.row.fFeeunitid"
  1020. placeholder="请选择计价单位"
  1021. :disabled="browseStatus"
  1022. @change="changeFeeUnit(scope.row)"
  1023. clearable
  1024. >
  1025. <el-option
  1026. v-for="(dict, index) in fFeetunitOptions"
  1027. :key="index.dictValue"
  1028. :label="dict.dictLabel"
  1029. :value="dict.dictValue"
  1030. />
  1031. </el-select>
  1032. </template>
  1033. </el-table-column>
  1034. <el-table-column
  1035. prop="fQty"
  1036. header-align="center"
  1037. align="center"
  1038. width="150px"
  1039. label="数量"
  1040. >
  1041. <template slot-scope="scope">
  1042. <el-input
  1043. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1044. v-model="scope.row.fQty"
  1045. placeholder="数量"
  1046. :disabled="browseStatus"
  1047. @change="changeContractAmt(scope.row)"
  1048. show-word-limit
  1049. />
  1050. </template>
  1051. </el-table-column>
  1052. <el-table-column
  1053. prop="fUnitprice"
  1054. header-align="center"
  1055. align="center"
  1056. width="150px"
  1057. label="单价"
  1058. >
  1059. <template slot-scope="scope">
  1060. <el-input
  1061. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1062. v-model="scope.row.fUnitprice"
  1063. placeholder="单价"
  1064. :disabled="browseStatus"
  1065. @change="changeContractAmt(scope.row)"
  1066. show-word-limit
  1067. />
  1068. </template>
  1069. </el-table-column>
  1070. <el-table-column
  1071. prop="fAmount"
  1072. header-align="center"
  1073. align="center"
  1074. width="150px"
  1075. label="金额"
  1076. >
  1077. <template slot-scope="scope">
  1078. <el-input
  1079. disabled
  1080. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1081. v-model="scope.row.fAmount"
  1082. placeholder="金额"
  1083. show-word-limit
  1084. />
  1085. </template>
  1086. </el-table-column>
  1087. <el-table-column
  1088. prop="fCurrency"
  1089. header-align="center"
  1090. align="center"
  1091. width="150px"
  1092. label="币别"
  1093. >
  1094. <template slot-scope="scope">
  1095. <el-input
  1096. v-model="scope.row.fCurrency"
  1097. :disabled="browseStatus"
  1098. placeholder="币别"
  1099. show-word-limit
  1100. />
  1101. </template>
  1102. </el-table-column>
  1103. <el-table-column
  1104. prop="fExrate"
  1105. header-align="center"
  1106. align="center"
  1107. width="150px"
  1108. label="汇率"
  1109. >
  1110. <template slot-scope="scope">
  1111. <el-input
  1112. v-model="scope.row.fExrate"
  1113. :disabled="browseStatus"
  1114. placeholder="汇率"
  1115. show-word-limit
  1116. />
  1117. </template>
  1118. </el-table-column>
  1119. <el-table-column
  1120. prop="fTaxrate"
  1121. header-align="center"
  1122. align="center"
  1123. width="150px"
  1124. label="税率"
  1125. >
  1126. <template slot-scope="scope">
  1127. <el-input
  1128. v-model="scope.row.fTaxrate"
  1129. :disabled="browseStatus"
  1130. placeholder="税率"
  1131. show-word-limit
  1132. />
  1133. </template>
  1134. </el-table-column>
  1135. <el-table-column
  1136. prop="remarks"
  1137. header-align="center"
  1138. align="center"
  1139. width="150px"
  1140. label="备注"
  1141. >
  1142. <template slot-scope="scope">
  1143. <el-input
  1144. v-model="scope.row.remarks"
  1145. :disabled="browseStatus"
  1146. placeholder="备注"
  1147. show-word-limit
  1148. />
  1149. </template>
  1150. </el-table-column>
  1151. <el-table-column
  1152. header-align="center"
  1153. align="center"
  1154. label="操作"
  1155. width="150px"
  1156. >
  1157. <template slot-scope="scope">
  1158. <el-button size="small">审核费用</el-button>
  1159. <el-button
  1160. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1161. size="small"
  1162. >移除
  1163. </el-button
  1164. >
  1165. </template>
  1166. </el-table-column>
  1167. </el-table>
  1168. <div class="dialogTableTitle flex a-center jlr">
  1169. <h3>付款信息</h3>
  1170. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1171. >新增
  1172. </el-button>
  1173. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1174. </div>
  1175. <el-table
  1176. :data="warehouseCrList"
  1177. ref="warehouseCr"
  1178. tooltip-effect="dark"
  1179. border
  1180. stripe
  1181. :summary-method="warehouseDrSummaries"
  1182. show-summary
  1183. >
  1184. <el-table-column label="序号" type="index" width="80">
  1185. </el-table-column>
  1186. <el-table-column
  1187. prop="fCorpid"
  1188. header-align="center"
  1189. align="center"
  1190. width="180px"
  1191. label="客户名称"
  1192. >
  1193. <template slot-scope="scope">
  1194. <el-select
  1195. v-model="scope.row.fCorpid"
  1196. filterable
  1197. remote
  1198. :disabled="browseStatus"
  1199. :remote-method="corpsRemoteMethod"
  1200. placeholder="客户名称"
  1201. >
  1202. <el-option
  1203. v-for="(dict, index) in KHblnoOptions"
  1204. :key="index.fId"
  1205. :label="dict.fName"
  1206. :value="dict.fId"
  1207. ></el-option>
  1208. </el-select>
  1209. </template>
  1210. </el-table-column>
  1211. <el-table-column
  1212. prop="fFeeid"
  1213. header-align="center"
  1214. align="center"
  1215. width="180px"
  1216. label="费用名称"
  1217. >
  1218. <template slot-scope="scope">
  1219. <el-select
  1220. v-model="scope.row.fFeeid"
  1221. filterable
  1222. remote
  1223. :disabled="browseStatus"
  1224. :remote-method="fWRemoteMethod"
  1225. placeholder="费用名称"
  1226. >
  1227. <el-option
  1228. v-for="(dict, index) in fWbuOptions"
  1229. :key="index.fId"
  1230. :label="dict.fName"
  1231. :value="dict.fId"
  1232. ></el-option>
  1233. </el-select>
  1234. </template>
  1235. </el-table-column>
  1236. <el-table-column
  1237. prop="fFeeunitid"
  1238. header-align="center"
  1239. align="center"
  1240. width="180px"
  1241. label="计价单位"
  1242. >
  1243. <template slot-scope="scope">
  1244. <el-select
  1245. v-model="scope.row.fFeeunitid"
  1246. filterable
  1247. remote
  1248. :disabled="browseStatus"
  1249. @change="changeFeeUnit(scope.row)"
  1250. :remote-method="corpsRemoteMethod"
  1251. placeholder="计价单位"
  1252. >
  1253. <el-option
  1254. v-for="(dict, index) in fFeetunitOptions"
  1255. :key="index.dictValue"
  1256. :label="dict.dictLabel"
  1257. :value="dict.dictValue"
  1258. ></el-option>
  1259. </el-select>
  1260. </template>
  1261. </el-table-column>
  1262. <el-table-column
  1263. prop="fQty"
  1264. header-align="center"
  1265. align="center"
  1266. width="150px"
  1267. label="数量"
  1268. >
  1269. <template slot-scope="scope">
  1270. <el-input
  1271. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1272. v-model="scope.row.fQty"
  1273. :disabled="browseStatus"
  1274. @change="changeContractAmt(scope.row)"
  1275. placeholder="数量"
  1276. show-word-limit
  1277. />
  1278. </template>
  1279. </el-table-column>
  1280. <el-table-column
  1281. prop="fUnitprice"
  1282. header-align="center"
  1283. align="center"
  1284. width="150px"
  1285. label="单价"
  1286. >
  1287. <template slot-scope="scope">
  1288. <el-input
  1289. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1290. v-model="scope.row.fUnitprice"
  1291. :disabled="browseStatus"
  1292. @change="changeContractAmt(scope.row)"
  1293. placeholder="单价"
  1294. show-word-limit
  1295. />
  1296. </template>
  1297. </el-table-column>
  1298. <el-table-column
  1299. prop="fAmount"
  1300. header-align="center"
  1301. align="center"
  1302. width="150px"
  1303. label="金额"
  1304. >
  1305. <template slot-scope="scope">
  1306. <el-input
  1307. disabled
  1308. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1309. v-model="scope.row.fAmount"
  1310. placeholder="金额"
  1311. show-word-limit
  1312. />
  1313. </template>
  1314. </el-table-column>
  1315. <el-table-column
  1316. prop="fCurrency"
  1317. header-align="center"
  1318. align="center"
  1319. width="150px"
  1320. label="币别"
  1321. >
  1322. <template slot-scope="scope">
  1323. <el-input
  1324. v-model="scope.row.fCurrency"
  1325. :disabled="browseStatus"
  1326. placeholder="币别"
  1327. show-word-limit
  1328. />
  1329. </template>
  1330. </el-table-column>
  1331. <el-table-column
  1332. prop="fExrate"
  1333. header-align="center"
  1334. align="center"
  1335. width="150px"
  1336. label="汇率"
  1337. >
  1338. <template slot-scope="scope">
  1339. <el-input
  1340. v-model="scope.row.fExrate"
  1341. :disabled="browseStatus"
  1342. placeholder="汇率"
  1343. show-word-limit
  1344. />
  1345. </template>
  1346. </el-table-column>
  1347. <el-table-column
  1348. prop="fTaxrate"
  1349. header-align="center"
  1350. align="center"
  1351. width="150px"
  1352. label="税率"
  1353. >
  1354. <template slot-scope="scope">
  1355. <el-input
  1356. v-model="scope.row.fTaxrate"
  1357. :disabled="browseStatus"
  1358. placeholder="税率"
  1359. show-word-limit
  1360. />
  1361. </template>
  1362. </el-table-column>
  1363. <el-table-column
  1364. prop="remarks"
  1365. header-align="center"
  1366. align="center"
  1367. width="150px"
  1368. label="备注"
  1369. >
  1370. <template slot-scope="scope">
  1371. <el-input
  1372. v-model="scope.row.remarks"
  1373. :disabled="browseStatus"
  1374. placeholder="备注"
  1375. show-word-limit
  1376. />
  1377. </template>
  1378. </el-table-column>
  1379. <el-table-column
  1380. header-align="center"
  1381. align="center"
  1382. width="150px"
  1383. label="操作"
  1384. >
  1385. <template slot-scope="scope">
  1386. <el-button size="small">审核费用</el-button>
  1387. <el-button
  1388. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1389. :disabled="browseStatus"
  1390. size="small"
  1391. >移除
  1392. </el-button
  1393. >
  1394. </template>
  1395. </el-table-column>
  1396. </el-table>
  1397. <div slot="footer" class="dialog-footer">
  1398. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1399. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1400. <el-button type="primary" :disabled="notChange" @click="saveForm">保 存</el-button>
  1401. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  1402. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  1403. <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
  1404. <el-button type="primary" :disabled="notChange" @click="submitForm">提交审核</el-button>
  1405. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  1406. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  1407. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  1408. </div>
  1409. <!-- 选择库存总账数据 -->
  1410. <el-dialog
  1411. title="库存总账"
  1412. :modal="false"
  1413. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1414. :visible.sync="whgenlegVisible"
  1415. :close-on-click-modal="false"
  1416. width="70%"
  1417. >
  1418. <el-table
  1419. :data="whgenlegList"
  1420. ref="tableList"
  1421. tooltip-effect="dark"
  1422. width="100%"
  1423. border
  1424. stripe
  1425. @selection-change="whgenlegSelectionChange"
  1426. >
  1427. <el-table-column type="selection" width="55"></el-table-column>
  1428. <el-table-column
  1429. prop="fMblno"
  1430. header-align="center"
  1431. align="center"
  1432. label="提单号"
  1433. >
  1434. </el-table-column>
  1435. <el-table-column
  1436. prop="createTime"
  1437. header-align="center"
  1438. align="center"
  1439. width="180px"
  1440. label="入库日期"
  1441. >
  1442. </el-table-column>
  1443. <el-table-column
  1444. prop="fGoodsids"
  1445. header-align="center"
  1446. align="center"
  1447. label="品名"
  1448. >
  1449. </el-table-column>
  1450. <el-table-column
  1451. prop="fQtyblc"
  1452. header-align="center"
  1453. align="center"
  1454. label="结余数量"
  1455. >
  1456. </el-table-column>
  1457. <el-table-column
  1458. prop="fWarehouseLocationids"
  1459. header-align="center"
  1460. align="center"
  1461. label="库区"
  1462. >
  1463. </el-table-column>
  1464. </el-table>
  1465. <pagination
  1466. v-show="whgenlegTotal > 0"
  1467. :total="whgenlegTotal"
  1468. :page.sync="whgenlegParams.pageNum"
  1469. :limit.sync="whgenlegParams.pageSize"
  1470. @pagination="getWhgenlegList"
  1471. />
  1472. <div slot="footer" class="dialog-footer">
  1473. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1474. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1475. </div>
  1476. </el-dialog>
  1477. </el-dialog>
  1478. </div>
  1479. </template>
  1480. <script>
  1481. import print from 'print-js'
  1482. import {
  1483. backFee,
  1484. RevocationApproval,
  1485. addWhgenleg,
  1486. listGoodsTransfer,
  1487. getGoodsTransfer,
  1488. addGoodsTransfer,
  1489. warehouseSubmission,
  1490. delGoodsTransfer,
  1491. exportGoodsTransfer
  1492. } from '@/api/warehouseBusiness/goodsTransfer'
  1493. import { updateCredit } from '@/api/warehouseBusiness/goodsTransfer'
  1494. import { listCorps } from '@/api/basicdata/corps'
  1495. import { listFees } from '@/api/basicdata/fees'
  1496. import { listWarehouse } from '@/api/basicdata/warehouse'
  1497. import { listArea } from '@/api/basicdata/area'
  1498. import { listGoods } from '@/api/basicdata/goods'
  1499. import { listUser, queryUserVal } from '@/api/system/user'
  1500. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1501. import UploadFile from '@/components/Uploadfile'
  1502. import AddOrUpdate from '@/views/viewApproval'
  1503. import ApprovalComments from '@/views/startApproval'
  1504. import Global from '@/layout/components/global'
  1505. import { getAgreement } from '@/api/warehouseBusiness/agreement'
  1506. export default {
  1507. name: 'goodsTransfer',
  1508. components: {
  1509. UploadFile,
  1510. AddOrUpdate,
  1511. ApprovalComments
  1512. },
  1513. data() {
  1514. return {
  1515. Lander:'',
  1516. Operator:'',
  1517. colseButton:true,
  1518. cancelButton:true,
  1519. disappear:false,
  1520. goodsTransferId:130,
  1521. addOrUpdateVisible: false,
  1522. addOrUpdateVisib:false,
  1523. // 审批状态
  1524. approve:false,
  1525. notChange:false,
  1526. // 修改查看状态
  1527. browseStatus: false,
  1528. // 是否有明细入库
  1529. formBrowseStatus: false,
  1530. // 遮罩层
  1531. loading: true,
  1532. // 选中数组
  1533. ids: [],
  1534. userVal: {
  1535. userName: null,
  1536. nickName: null,
  1537. deptId: null
  1538. },
  1539. queryForm: {},
  1540. // 添加用户对话框
  1541. editDialogVisible_s: false,
  1542. editDialogVisible_ss: false,
  1543. editDialogClosed_ss: false,
  1544. dataList: [],
  1545. warehouseCrList: [],
  1546. warehouseDrList: [],
  1547. relevantAttachments: [],
  1548. fPlannetweight: '',
  1549. // 税率
  1550. fTaxrate: null,
  1551. // 非单个禁用
  1552. single: true,
  1553. // 非多个禁用
  1554. multiple: true,
  1555. // 显示搜索条件
  1556. showSearch: true,
  1557. // 总条数
  1558. total: 0,
  1559. // 仓库主(出入库)表格数据
  1560. goodsTransferList: [],
  1561. // 弹出层标题
  1562. title: '',
  1563. // 是否显示弹出层
  1564. open: false,
  1565. // 货权方(客户数据)
  1566. fMblnoOptions: [],
  1567. // 货权方(客户数据)
  1568. // 客户名称
  1569. KHblnoOptions: [],
  1570. fSbuOptions: [],
  1571. // 操作员
  1572. userOptions: [],
  1573. // 操作员
  1574. goodsOptions: [],
  1575. // 库存明细入账数组
  1576. dataListSelection: [],
  1577. // 库存明细撤回入账数组
  1578. dataWithdrawList: [],
  1579. // 仓库(仓库
  1580. warehouseOptions: [],
  1581. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  1582. fStorageTypeOptions: [],
  1583. kqhouseOptions: [],
  1584. // 贸易方式(数据字典),对应t_trademodels 字典
  1585. fTrademodeidOptions: [],
  1586. // 计费单位(数据字典),下拉选择毛重或净重字典
  1587. fFeetunitOptions: [
  1588. { dictLabel: "件数", dictValue: 1 },
  1589. { dictLabel: "毛重", dictValue: 2 },
  1590. { dictLabel: "净重", dictValue: 3 },
  1591. { dictLabel: "尺码", dictValue: 4 },
  1592. { dictLabel: "固定", dictValue: 5 }
  1593. ],
  1594. // 结算方式(数据字典),下拉选择字典
  1595. fStltypeOptions: [],
  1596. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1597. fIfweighOptions: [],
  1598. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1599. fIfpledgeOptions: [],
  1600. // 是否破损(数据字典),默认F否则T字典
  1601. fIfdamageOptions: [],
  1602. // 单据类型(数据字典)SJRK字典
  1603. fBilltypeOptions: [],
  1604. // 状态(数据字典),N 入字典
  1605. fBillstatusOptions: [],
  1606. // 费用名称
  1607. fWbuOptions: [],
  1608. // 查询参数
  1609. queryParams: {
  1610. pageNum: 1,
  1611. pageSize: 10,
  1612. fBillno: null,
  1613. createBy: null,
  1614. createTime: null,
  1615. fCustomsdeclartion: null,
  1616. fOriginalbillno: null,
  1617. fDeptid: null,
  1618. fBsdeptid: null,
  1619. fContacts: null,
  1620. fTel: null,
  1621. fCorpid: null,
  1622. fTocorpid: null,
  1623. fStltypeid: null,
  1624. fBscorpno: null,
  1625. fWarehouseid: null,
  1626. fStorekeeper: null,
  1627. fBsdate: null,
  1628. fPlanqty: null,
  1629. fPlangrossweight: null,
  1630. fPlannetweight: null,
  1631. fPlanvolumn: null,
  1632. fQty: null,
  1633. fGrossweight: null,
  1634. fNetweight: null,
  1635. fVolumn: null,
  1636. fTrademodeid: null,
  1637. fSbu: null,
  1638. fFeetunit: null,
  1639. fMblno: null,
  1640. fVslvoy: null,
  1641. fEta: null,
  1642. fCustomno: null,
  1643. fIfweigh: null,
  1644. fIfpledge: null,
  1645. fIfdamage: null,
  1646. fBankcorpid: null,
  1647. fBilltype: null,
  1648. fBillstatus: null,
  1649. fCreateby: null,
  1650. fCreatetime: null,
  1651. fGoodsid: null,
  1652. fCntrtype: null,
  1653. fCntqty: null
  1654. },
  1655. // 日期区间
  1656. orgStorageDate: null,
  1657. // 表单参数
  1658. form: {},
  1659. // 库存总账参数
  1660. whgenlegParams: {
  1661. pageNum: 1,
  1662. pageSize: 10,
  1663. fMblno: null,
  1664. fCorpid: null,
  1665. fWarehouseid: null,
  1666. fTrademodeid: null,
  1667. orgStorageDate: null
  1668. },
  1669. // 库存总账表
  1670. whgenlegList: [],
  1671. whgenlegTotal: 0,
  1672. // 弹窗库存总账数据
  1673. dialogWhgenlegList: [],
  1674. // 库存总账对话框
  1675. whgenlegVisible: false,
  1676. // 表单校验
  1677. rules: {
  1678. fBsdeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  1679. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1680. fBsdate: [{ required: true, message: ' ', trigger: 'blur' }],
  1681. fFeetunit: [{ required: true, message: ' ', trigger: 'blur' }],
  1682. fChargedate: [{ required: true, message: ' ', trigger: 'blur' }],
  1683. fTrademodeid: [{ required: true, message: ' ', trigger: 'blur' }],
  1684. fSbu: [{ required: true, message: ' ', trigger: 'blur' }],
  1685. fStorekeeper: {
  1686. required: true,
  1687. message: ' ',
  1688. trigger: 'blur'
  1689. },
  1690. fWarehouseid: [{ required: true, message: ' ', trigger: 'blur' }],
  1691. fbillingway: [
  1692. {
  1693. required: true,
  1694. message: ' ',
  1695. trigger: 'blur'
  1696. }
  1697. ],
  1698. fTocorpid: [
  1699. {
  1700. required: true,
  1701. message: ' ',
  1702. trigger: 'blur'
  1703. }
  1704. ]
  1705. }
  1706. }
  1707. },
  1708. created() {
  1709. this.getList()
  1710. this.getDicts('tax_rate').then((response) => {
  1711. this.fTaxrate = response.data[0].dictValue
  1712. })
  1713. this.getDicts('data_trademodes').then((response) => {
  1714. this.fTrademodeidOptions = response.data
  1715. })
  1716. this.getDicts("storage_type").then((response) => {
  1717. this.fStorageTypeOptions = response.data;
  1718. });
  1719. this.getDicts('data_stltype_type').then((response) => {
  1720. this.fStltypeOptions = response.data
  1721. })
  1722. this.getDicts('data_ifweigh_status').then((response) => {
  1723. this.fIfweighOptions = response.data
  1724. })
  1725. this.getDicts('data_ifpledge_status').then((response) => {
  1726. this.fIfpledgeOptions = response.data
  1727. })
  1728. this.getDicts('data_ifdamage_status').then((response) => {
  1729. this.fIfdamageOptions = response.data
  1730. })
  1731. this.getDicts('data_billtype_type').then((response) => {
  1732. this.fBilltypeOptions = response.data
  1733. })
  1734. this.getDicts('sys_common_status').then((response) => {
  1735. this.fBillstatusOptions = response.data
  1736. })
  1737. this.register()
  1738. },
  1739. activated(){
  1740. this.Jump()
  1741. },
  1742. methods: {
  1743. // 撤销审核
  1744. backrRconciliation(){
  1745. this.form.fBillstatus = '1'
  1746. backFee(this.form.fId).then(response=>{
  1747. this.msgSuccess("撤回成功")
  1748. this.getList()
  1749. this.open = false
  1750. this.getList()
  1751. })
  1752. },
  1753. // 默认录入人
  1754. register() {
  1755. queryUserVal().then((response)=>{
  1756. this.Lander = response.user.userName
  1757. })
  1758. },
  1759. // 审批按钮
  1760. goApproval(){
  1761. this.addOrUpdateVisib = true
  1762. this.$nextTick(() => {
  1763. this.$refs.ApprovalComments.init(this.form.fId,this.goodsTransferId)
  1764. })
  1765. },
  1766. Jump(){
  1767. this.approval = this.$route.query.data
  1768. if(this.approval){
  1769. this.colseButton = false
  1770. this.approval = JSON.parse(this.approval)
  1771. this.hide = false
  1772. this.open = true
  1773. this.browseStatus = true
  1774. this.notChange = true
  1775. this.approve = true
  1776. this.disappear = true
  1777. this.cancelButton = false
  1778. this.reset()
  1779. getGoodsTransfer(this.approval.billId).then((response) => {
  1780. this.form = response.data.warehousebills
  1781. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  1782. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  1783. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  1784. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  1785. this.fMblnoOptions = response.data.corps
  1786. this.KHblnoOptions = response.data.corps
  1787. this.fWbuOptions = response.data.feesList
  1788. this.warehouseOptions = response.data.warehouse
  1789. this.dataList = response.data.warehouseBillsItem
  1790. for (let list in this.dataList) {
  1791. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  1792. this.formBrowseStatus = true
  1793. }
  1794. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  1795. }
  1796. this.goodsOptions = response.data.goodsList
  1797. if (response.data.warehousebillsfeesDr) {
  1798. this.warehouseDrList = response.data.warehousebillsfeesDr
  1799. }
  1800. if (response.data.warehousebillsfeesCr) {
  1801. this.warehouseCrList = response.data.warehousebillsfeesCr
  1802. }
  1803. if (response.data.enclosures) {
  1804. this.relevantAttachments = response.data.enclosures;
  1805. }
  1806. this.userOptions = response.data.sysUser
  1807. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  1808. this.open = true
  1809. this.title = '修改货存转移'
  1810. })
  1811. }
  1812. },
  1813. homepaGe(){
  1814. let view = {
  1815. fullPath: "/business/goodsTransfer",
  1816. hash: "",
  1817. matched: Array(2),
  1818. meta: Object,
  1819. name: "GoodsTransfer",
  1820. params: Object,
  1821. path: "/business/goodsTransfer",
  1822. query: Object,
  1823. title: "货转"
  1824. }
  1825. this.$router.push({ path: '/index'})
  1826. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1827. if (this.isActive(view)) {
  1828. this.toLastView(visitedViews, view)
  1829. }
  1830. })
  1831. Global.$emit("removeCache", "closeSelectedTag", view);
  1832. },
  1833. homePage() {
  1834. this.open = false
  1835. let view = {
  1836. fullPath: "/business/goodsTransfer",
  1837. hash: "",
  1838. matched: Array(2),
  1839. meta: Object,
  1840. name: "GoodsTransfer",
  1841. params: Object,
  1842. path: "/business/goodsTransfer",
  1843. query: Object,
  1844. title: "货转"
  1845. }
  1846. this.$router.push({ path: '/index' })
  1847. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1848. if (this.isActive(view)) {
  1849. this.toLastView(visitedViews, view)
  1850. }
  1851. })
  1852. Global.$emit("removeCache", "closeSelectedTag", view);
  1853. },
  1854. // 撤销审批
  1855. backApproval(){
  1856. let data = {
  1857. id:this.form.fId,
  1858. actId:this.goodsTransferId,
  1859. billId:this.form.fId
  1860. }
  1861. RevocationApproval(data).then(response => {
  1862. this.msgSuccess("撤销审批成功")
  1863. this.disappear = true
  1864. this.open = false
  1865. this.getList()
  1866. })
  1867. },
  1868. returnData(){
  1869. this.addOrUpdateVisib = false
  1870. this.open = false
  1871. this.homepaGe()
  1872. },
  1873. getDataList(){
  1874. this.addOrUpdateVisible = false
  1875. },
  1876. // 查看审批流
  1877. addOrUpdateHandle(){
  1878. this.addOrUpdateVisible = true
  1879. this.addOrUpdateVisib = false
  1880. let id = '448'
  1881. let actId = '110'
  1882. this.$nextTick(() => {
  1883. this.$refs.addOrUpdate.init(this.form.fId,this.goodsTransferId)
  1884. })
  1885. },
  1886. // 上传成功返回数据
  1887. showFile(row) {
  1888. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  1889. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  1890. },
  1891. printSomething() {
  1892. // 此处的style即为打印时的样式
  1893. const style =
  1894. '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
  1895. print({
  1896. printable: 'print_area',
  1897. type: 'html',
  1898. style: style, // 亦可使用引入的外部css;
  1899. scanStyles: false
  1900. })
  1901. },
  1902. // 新增附件上传
  1903. addRelevt() {
  1904. this.relevantAttachments.push({
  1905. fUrl: null,
  1906. fName: null,
  1907. createBy: this.form.createBy,
  1908. createTime: Date.parse(new Date())
  1909. })
  1910. },
  1911. // 添加list
  1912. addRelevant() {
  1913. if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
  1914. this.$message({ message: '请维护货权方、贸易方式、仓库', type: 'warning' })
  1915. return false
  1916. }
  1917. this.whgenlegList = []
  1918. this.dialogWhgenlegList = []
  1919. this.whgenlegTotal = 0
  1920. this.whgenlegVisible = true
  1921. this.getWhgenlegList()
  1922. },
  1923. // 查询库存总账信息
  1924. getWhgenlegList() {
  1925. this.whgenlegParams.fMblno = this.form.fMblno
  1926. this.whgenlegParams.fCorpid = this.form.fCorpid
  1927. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  1928. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  1929. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  1930. listWhgenleg(this.whgenlegParams).then((response) => {
  1931. this.whgenlegList = response.rows
  1932. this.whgenlegTotal = response.total
  1933. })
  1934. },
  1935. // 库存总账多选框
  1936. whgenlegSelectionChange(selection) {
  1937. this.dialogWhgenlegList = selection
  1938. },
  1939. // 库存总账导出数据
  1940. whgenlegData() {
  1941. if (this.dialogWhgenlegList.length === 0) {
  1942. this.$message({ message: '未勾选信息', type: 'warning' })
  1943. return false
  1944. }
  1945. setTimeout(() => {
  1946. for (let whgen in this.dialogWhgenlegList) {
  1947. this.dataList.push({
  1948. fId: null,
  1949. fQty: 0,
  1950. fCntqty: 1,
  1951. remark: null,
  1952. fGoodsval: 0,
  1953. fNetweight: 0,
  1954. fBillstatus: 1,
  1955. fGrossweight: 0,
  1956. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  1957. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  1958. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  1959. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  1960. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  1961. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  1962. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  1963. fWarehouseids: this.dialogWhgenlegList[whgen].fWarehouseids,
  1964. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  1965. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  1966. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  1967. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  1968. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  1969. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  1970. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  1971. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids
  1972. })
  1973. }
  1974. }, 100)
  1975. setTimeout(() => {
  1976. this.updateDeduplication()
  1977. }, 300)
  1978. this.whgenlegVisible = false
  1979. },
  1980. // 更新主表品牌、品名并去重
  1981. updateDeduplication: function() {
  1982. if (this.dataList.length === 0) {
  1983. return false
  1984. }
  1985. let fMarks = []
  1986. let fProductName = []
  1987. for (let li in this.dataList) {
  1988. fMarks.push(this.dataList[li].fMarks)
  1989. fProductName.push(this.dataList[li].fGoodsids)
  1990. }
  1991. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  1992. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  1993. },
  1994. // 收货单打印界面
  1995. showEditDialog_s() {
  1996. this.editDialogVisible_s = true
  1997. },
  1998. showEditDialog_ss() {
  1999. this.editDialogVisible_ss = true
  2000. },
  2001. // 收款信息
  2002. addCollection() {
  2003. this.warehouseDrList.push({
  2004. fCorpid: null,
  2005. fFeeid: null,
  2006. fFeeunitid: 1,
  2007. fQty: 0,
  2008. fUnitprice: 0,
  2009. fAmount: 0,
  2010. fCurrency: null,
  2011. fCxrate: null,
  2012. fTaxrate: this.fTaxrate,
  2013. fRate: null,
  2014. remarks: null
  2015. })
  2016. },
  2017. addpayment() {
  2018. this.warehouseCrList.push({
  2019. fCorpid: null,
  2020. fFeeid: null,
  2021. fFeeunitid: 1,
  2022. fQty: 0,
  2023. fUnitprice: 0,
  2024. fAmount: 0,
  2025. fCurrency: null,
  2026. fTaxrate: this.fTaxrate,
  2027. fCxrate: null,
  2028. fRate: null,
  2029. remarks: null
  2030. })
  2031. },
  2032. queryUser() {
  2033. queryUserVal().then((response) => {
  2034. if (response.user !== null) {
  2035. this.userVal = response.user
  2036. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  2037. this.$set(this.form, 'createBy', this.userVal.userName)
  2038. this.$set(this.form, 'fTrademodeid', '1')
  2039. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2040. this.$set(this.form, 'createTime', Date.parse(new Date()))
  2041. }
  2042. })
  2043. },
  2044. /** 查询仓库主(出入库)列表 */
  2045. getList() {
  2046. this.loading = true
  2047. listGoodsTransfer(this.queryParams).then((response) => {
  2048. this.goodsTransferList = response.rows
  2049. this.total = response.total
  2050. this.loading = false
  2051. })
  2052. },
  2053. /* 远程模糊查询库区 */
  2054. kqhouseRemoteMethod(name) {
  2055. if (name == null || name === '') {
  2056. return false
  2057. }
  2058. if (!this.form.fWarehouseid) {
  2059. this.$message.error('请输入仓库!')
  2060. return false
  2061. }
  2062. let queryParams = {
  2063. pageNum: 1,
  2064. pageSize: 10,
  2065. fWarehouseid: this.form.fWarehouseid,
  2066. fName: name
  2067. }
  2068. listArea(queryParams).then((response) => {
  2069. this.kqhouseOptions = response.rows
  2070. })
  2071. },
  2072. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2073. fTrademodeidFormat(row, column) {
  2074. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
  2075. },
  2076. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2077. fIfweighFormat(row, column) {
  2078. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh)
  2079. },
  2080. // 编号字典翻译
  2081. fStltypeidFormat(row, column) {
  2082. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid)
  2083. },
  2084. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2085. fIfpledgeFormat(row, column) {
  2086. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge)
  2087. },
  2088. // 是否破损(数据字典),默认F否则T字典翻译
  2089. fIfdamageFormat(row, column) {
  2090. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage)
  2091. },
  2092. // 单据类型(数据字典)SJRK字典翻译
  2093. fBilltypeFormat(row, column) {
  2094. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype)
  2095. },
  2096. // 状态(数据字典),N 入字典翻译
  2097. fBillstatusFormat(row, column) {
  2098. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus)
  2099. },
  2100. // 取消按钮
  2101. cancel() {
  2102. this.reset()
  2103. this.open = false
  2104. this.getList()
  2105. },
  2106. // 表单重置
  2107. reset() {
  2108. this.disappear = false
  2109. this.addOrUpdateVisible = false
  2110. this.addOrUpdateVisib = false
  2111. this.approve = false
  2112. this.formBrowseStatus = false
  2113. this.detailsHidden = false
  2114. this.notChange = false
  2115. this.browseStatus = false
  2116. this.whgenlegVisible = false
  2117. this.editDialogVisible_ss = false
  2118. this.editDialogVisible_s = false
  2119. this.dataList = []
  2120. this.fWbuOptions = []
  2121. this.fWbuOptions = []
  2122. this.resetForm('form')
  2123. this.fMblnoOptions = []
  2124. this.KHblnoOptions = []
  2125. this.KHblnoOptions = []
  2126. this.warehouseDrList = []
  2127. this.warehouseCrList = []
  2128. this.warehouseOptions = []
  2129. this.relevantAttachments = []
  2130. },
  2131. /** 搜索按钮操作 */
  2132. handleQuery() {
  2133. this.queryParams.pageNum = 1
  2134. this.getList()
  2135. },
  2136. /** 重置按钮操作 */
  2137. resetQuery() {
  2138. this.resetForm('queryForm')
  2139. this.handleQuery()
  2140. },
  2141. // 多选框选中数据
  2142. handleSelectionChange(selection) {
  2143. this.ids = selection.map((item) => item.fId)
  2144. this.single = selection.length !== 1
  2145. this.multiple = !selection.length
  2146. },
  2147. /** 新增按钮操作 */
  2148. handleAdd() {
  2149. this.form = {
  2150. fCorpid:'',
  2151. fTocorpid:'',
  2152. fBillno:'',
  2153. fBsdate:'',
  2154. fChargedate:'',
  2155. fWarehouseid:'',
  2156. fStltypeid:'',
  2157. fFeetunit:'',
  2158. fTrademodeid:'',
  2159. fMblno:'',
  2160. fOriginalbillno:'',
  2161. orgStorageDate:''
  2162. }
  2163. this.notChange = false
  2164. this.browseStatus = false
  2165. this.reset()
  2166. this.queryUser()
  2167. this.open = true
  2168. this.dataList = []
  2169. this.warehouseCrList = []
  2170. this.warehouseDrList = []
  2171. this.relevantAttachments = []
  2172. this.title = '货权转移'
  2173. },
  2174. check_s(row) {
  2175. this.disappear = true
  2176. this.notChange = true
  2177. this.browseStatus = true
  2178. const fId = row.fId || this.ids
  2179. getGoodsTransfer(fId).then((response) => {
  2180. this.Operator = response.data.corps[0].createBy
  2181. this.form = response.data.warehousebills
  2182. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2183. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2184. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2185. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2186. this.fMblnoOptions = response.data.corps
  2187. this.KHblnoOptions = response.data.corps
  2188. this.fWbuOptions = response.data.feesList
  2189. this.warehouseOptions = response.data.warehouse
  2190. this.dataList = response.data.warehouseBillsItem
  2191. for (let list in this.dataList) {
  2192. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2193. this.formBrowseStatus = true
  2194. }
  2195. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2196. }
  2197. this.goodsOptions = response.data.goodsList
  2198. if (response.data.warehousebillsfeesDr) {
  2199. this.warehouseDrList = response.data.warehousebillsfeesDr
  2200. }
  2201. if (response.data.warehousebillsfeesCr) {
  2202. this.warehouseCrList = response.data.warehousebillsfeesCr
  2203. }
  2204. if (response.data.enclosures) {
  2205. this.relevantAttachments = response.data.enclosures;
  2206. }
  2207. this.userOptions = response.data.sysUser
  2208. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2209. this.open = true
  2210. this.title = '修改货存转移'
  2211. console.log(this.Operator)
  2212. console.log(this.Lander)
  2213. })
  2214. },
  2215. // 查看按钮
  2216. check(row) {
  2217. this.disappear = false
  2218. this.notChange = true
  2219. this.browseStatus = true
  2220. const fId = row.fId || this.ids
  2221. getGoodsTransfer(fId).then((response) => {
  2222. console.log(response.data.corps[0].createBy)
  2223. this.Operator = response.data.corps[0].createBy
  2224. this.form = response.data.warehousebills
  2225. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2226. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2227. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2228. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2229. this.fMblnoOptions = response.data.corps
  2230. this.KHblnoOptions = response.data.corps
  2231. this.fWbuOptions = response.data.feesList
  2232. this.warehouseOptions = response.data.warehouse
  2233. this.dataList = response.data.warehouseBillsItem
  2234. for (let list in this.dataList) {
  2235. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2236. this.formBrowseStatus = true
  2237. }
  2238. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2239. }
  2240. this.goodsOptions = response.data.goodsList
  2241. if (response.data.warehousebillsfeesDr) {
  2242. this.warehouseDrList = response.data.warehousebillsfeesDr
  2243. }
  2244. if (response.data.warehousebillsfeesCr) {
  2245. this.warehouseCrList = response.data.warehousebillsfeesCr
  2246. }
  2247. if (response.data.enclosures) {
  2248. this.relevantAttachments = response.data.enclosures;
  2249. }
  2250. this.userOptions = response.data.sysUser
  2251. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2252. this.open = true
  2253. this.title = '修改货存转移'
  2254. console.log(this.Operator)
  2255. console.log(this.Lander)
  2256. })
  2257. },
  2258. /** 修改按钮操作 */
  2259. handleUpdate(row, status) {
  2260. this.notChange = false
  2261. this.browseStatus = status
  2262. this.reset()
  2263. const fId = row.fId || this.ids
  2264. getGoodsTransfer(fId).then((response) => {
  2265. this.form = response.data.warehousebills
  2266. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2267. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2268. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2269. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2270. this.fMblnoOptions = response.data.corps
  2271. this.KHblnoOptions = response.data.corps
  2272. this.fWbuOptions = response.data.feesList
  2273. this.warehouseOptions = response.data.warehouse
  2274. this.dataList = response.data.warehouseBillsItem
  2275. for (let list in this.dataList) {
  2276. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2277. this.formBrowseStatus = true
  2278. }
  2279. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2280. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2281. }
  2282. this.goodsOptions = response.data.goodsList
  2283. if (response.data.warehousebillsfeesDr) {
  2284. this.warehouseDrList = response.data.warehousebillsfeesDr
  2285. }
  2286. if (response.data.warehousebillsfeesCr) {
  2287. this.warehouseCrList = response.data.warehousebillsfeesCr
  2288. }
  2289. if (response.data.enclosures) {
  2290. this.relevantAttachments = response.data.enclosures;
  2291. }
  2292. this.userOptions = response.data.sysUser
  2293. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2294. this.open = true
  2295. this.title = '修改货存转移'
  2296. })
  2297. },
  2298. // 库存明细合计
  2299. getSummaries(param) {
  2300. const { columns, data } = param
  2301. const sums = []
  2302. var values = []
  2303. columns.forEach((column, index) => {
  2304. if (index === 0) {
  2305. sums[index] = ''
  2306. return
  2307. }
  2308. if (column.property === 'fPlanqty') {
  2309. values = data.map((item) => Number(item['fPlanqty']))
  2310. }
  2311. if (column.property === 'fNetweight') {
  2312. values = data.map((item) => Number(item['fPlannetweight']))
  2313. }
  2314. if (column.property === 'fPlannetweight') {
  2315. values = data.map((item) => Number(item['fPlannetweight']))
  2316. }
  2317. if (column.property === 'fQty') {
  2318. values = data.map((item) => Number(item['fQty']))
  2319. }
  2320. if (column.property === 'fGrossweight') {
  2321. values = data.map((item) => Number(item['fGrossweight']))
  2322. }
  2323. if (column.property === 'fCntqty') {
  2324. values = data.map((item) => Number(item['fCntqty']))
  2325. } // const values = data.map(item => Number(item[column.property]))
  2326. if (
  2327. column.property === 'fPlanqty' ||
  2328. column.property === 'fPlannetweight' ||
  2329. column.property === 'fQty' ||
  2330. column.property === 'fGrossweight' ||
  2331. column.property === 'fCntqty' ||
  2332. column.property === 'fPlannetweight'
  2333. ) {
  2334. sums[index] = values.reduce((prev, curr) => {
  2335. const value = Number(curr)
  2336. if (!isNaN(value)) {
  2337. if (column.property === 'fGrossweight') {
  2338. this.form.fGrossweight = prev + curr
  2339. }
  2340. if (column.property === 'fQty') {
  2341. this.form.fQty = prev + curr
  2342. }
  2343. if (column.property === 'fCntqty') {
  2344. this.form.fCntqty = prev + curr
  2345. }
  2346. if (column.property === 'fPlannetweight') {
  2347. this.form.fNetweight = prev + curr
  2348. }
  2349. return prev + curr
  2350. } else {
  2351. return prev
  2352. }
  2353. }, 0) // sums[index]
  2354. }
  2355. })
  2356. this.sums = sums
  2357. return sums
  2358. },
  2359. // 入账
  2360. creditClick() {
  2361. if (this.dataList.length === 0) {
  2362. this.$message({ message: '未找到货转明细', type: 'warning' })
  2363. return false
  2364. }
  2365. for (let dataSelection in this.dataListSelection) {
  2366. if (!this.dataListSelection[dataSelection].fId) {
  2367. this.$message({ message: '请先点击保存,在进行货转确认', type: 'warning' })
  2368. return false
  2369. }
  2370. }
  2371. this.$refs['form'].validate((valid) => {
  2372. if (valid) {
  2373. for (let li in this.dataList) {
  2374. if (!this.dataList[li].fWarehouselocids) {
  2375. this.$message({ message: '请维护第' + Number(li) + 1 + '行库区', type: 'warning' })
  2376. return false
  2377. }
  2378. if (!this.dataList[li].fQty) {
  2379. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转件数', type: 'warning' })
  2380. return false
  2381. }
  2382. if (!this.dataList[li].fGrossweight) {
  2383. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转毛重', type: 'warning' })
  2384. return false
  2385. }
  2386. if (!this.dataList[li].fNetweight) {
  2387. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转净重', type: 'warning' })
  2388. return false
  2389. }
  2390. if (!this.dataList[li].fPackagespecs) {
  2391. this.$message({ message: '请维护第' + Number(li) + 1 + '行货包装规格', type: 'warning' })
  2392. return false
  2393. }
  2394. }
  2395. let formData = new window.FormData()
  2396. formData.append("warehouseBills", JSON.stringify(this.form));
  2397. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2398. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  2399. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2400. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2401. addWhgenleg(formData).then((response) => {
  2402. this.$refs.tableListRef.clearSelection()
  2403. this.msgSuccess('入账成功')
  2404. let item = response.data.warehouseItem
  2405. for (let li in this.dataList) {
  2406. for (let ite in item) {
  2407. if (this.dataList[li].fId === item[ite].fId) {
  2408. this.$set(this.dataList[li], 'fBillstatus', 6)
  2409. }
  2410. }
  2411. }
  2412. this.formBrowseStatus = true
  2413. })
  2414. }
  2415. })
  2416. },
  2417. // 撤回货转
  2418. withdrawClick() {
  2419. // 撤回货转
  2420. let formData = new window.FormData()
  2421. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  2422. formData.append("warehouseBills", JSON.stringify(this.form));
  2423. formData.append("warehousebillsitems", JSON.stringify(withdrawList));
  2424. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2425. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2426. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2427. updateCredit(formData).then((response) => {
  2428. this.fid = response.data
  2429. this.formBrowseStatus = false
  2430. this.msgSuccess('撤销入账成功')
  2431. this.$refs.tableListRef.clearSelection()
  2432. let mun = 0;
  2433. for (let i in this.dataList) {
  2434. for (let li in withdrawList) {
  2435. if (withdrawList[li].fId === this.dataList[i].fId) {
  2436. this.$set(this.dataList[i], 'fBillstatus', 1)
  2437. }
  2438. }
  2439. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus === 6) {
  2440. mun ++;
  2441. }
  2442. }
  2443. if (mun > 0) {
  2444. this.formBrowseStatus = true
  2445. } else {
  2446. this.formBrowseStatus = false
  2447. }
  2448. })
  2449. },
  2450. // 付款合计
  2451. warehouseDrSummaries(param) {
  2452. const { columns, data } = param
  2453. const sums = []
  2454. columns.forEach((column, index) => {
  2455. if (index === 0) {
  2456. sums[index] = '合计'
  2457. return
  2458. }
  2459. const values = data.map((item) => Number(item[column.property]))
  2460. if (
  2461. column.property === 'fUnitprice' ||
  2462. column.property === 'fAmount' ||
  2463. column.property === 'fQty' ||
  2464. column.property === 'fQty'
  2465. ) {
  2466. sums[index] = values.reduce((prev, curr) => {
  2467. const value = Number(curr)
  2468. if (!isNaN(value)) {
  2469. return prev + curr
  2470. } else {
  2471. return prev
  2472. }
  2473. }, 0) // sums[index]
  2474. sums[index] = sums[index].toFixed(2);
  2475. }
  2476. })
  2477. return sums
  2478. },
  2479. // 数量计算
  2480. changeContractAmt(row) {
  2481. let fQty = 0
  2482. let fUnitprice = 0
  2483. if (row.fUnitprice) {
  2484. fUnitprice = row.fUnitprice
  2485. }
  2486. if (row.fQty) {
  2487. fQty = row.fQty
  2488. }
  2489. this.$set(row, 'fAmount', Number(fUnitprice) * Number(fQty)).toFixed(2)
  2490. },
  2491. changefBsdate(row) {
  2492. if (this.dataList.length > 0) {
  2493. for (var i = 0; i < this.dataList.length; i++) {
  2494. this.$set(this.dataList[i], 'fBsdate', row)
  2495. }
  2496. }
  2497. },
  2498. // 库存明细多选
  2499. Selectinventory(selection) {
  2500. this.dataWithdrawList = []
  2501. this.dataListSelection = []
  2502. if (!selection || selection.length === 0) {
  2503. return false
  2504. }
  2505. for (let se in selection) {
  2506. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  2507. this.dataListSelection.push(selection[se])
  2508. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  2509. this.dataWithdrawList.push(selection[se])
  2510. }
  2511. }
  2512. },
  2513. // 库存明细多选框结果
  2514. dataListChange(row) {
  2515. this.dataListSelection = row
  2516. },
  2517. saveForm() {
  2518. this.updateDeduplication()
  2519. this.$refs['form'].validate((valid) => {
  2520. if (this.form.fCorpid === this.form.fTocorpid) {
  2521. this.$message.error('新货权方不得与货权方一致')
  2522. return false
  2523. }
  2524. if (this.dataList.length === 0) {
  2525. this.$message.error('请添加库存明细!')
  2526. return false
  2527. }
  2528. this.updateDeduplication()
  2529. for (let list in this.dataList) {
  2530. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2531. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2532. return false
  2533. }
  2534. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2535. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2536. return false
  2537. }
  2538. }
  2539. if (valid) {
  2540. this.form.fBillstatus = 2
  2541. let formData = new window.FormData()
  2542. formData.append("warehouseBills", JSON.stringify(this.form));
  2543. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2544. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2545. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2546. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2547. addGoodsTransfer(formData).then((response) => {
  2548. this.msgSuccess('保存成功')
  2549. this.form = response.data.warehouseBills
  2550. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2551. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2552. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2553. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2554. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2555. this.dataList = response.data.warehousebillsitems
  2556. for (let li in this.dataList) {
  2557. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  2558. }
  2559. })
  2560. }
  2561. })
  2562. },
  2563. /** 提交按钮 */
  2564. submitForm() {
  2565. this.$refs['form'].validate((valid) => {
  2566. if (this.form.fCorpid === this.form.fTocorpid) {
  2567. this.$message.error('新货权方不得与货权方一致')
  2568. return false
  2569. }
  2570. if (this.dataList.length === 0) {
  2571. this.$message.error('请添加库存明细!')
  2572. return false
  2573. }
  2574. for (let list in this.dataList) {
  2575. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2576. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2577. return false
  2578. }
  2579. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2580. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2581. return false
  2582. }
  2583. }
  2584. if (this.relevantAttachments.length !== 0) {
  2585. for (let relevant in this.relevantAttachments) {
  2586. if (!this.relevantAttachments[relevant].fName) {
  2587. this.$message.error('请输入附件名称!')
  2588. return false
  2589. }
  2590. }
  2591. }
  2592. if (this.warehouseDrList.length !== 0) {
  2593. for (let warehouseDr in this.warehouseDrList) {
  2594. if (!this.warehouseDrList[warehouseDr].fAmount) {
  2595. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  2596. return false
  2597. }
  2598. }
  2599. }
  2600. if (this.warehouseDrList.length !== 0) {
  2601. for (let warehouseCr in this.warehouseCrList) {
  2602. if (!this.warehouseCrList[warehouseCr].fAmount) {
  2603. this.$message.error(
  2604. '付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常'
  2605. )
  2606. return false
  2607. }
  2608. }
  2609. }
  2610. if (valid) {
  2611. // this.form.fBillstatus = 4
  2612. let formData = new window.FormData()
  2613. formData.append("warehouseBills", JSON.stringify(this.form));
  2614. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2615. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2616. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2617. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2618. warehouseSubmission(formData).then((response) => {
  2619. this.msgSuccess('提交成功')
  2620. this.browseStatus = true
  2621. this.notChange = true
  2622. this.cancel()
  2623. this.getList()
  2624. })
  2625. }
  2626. })
  2627. },
  2628. /** 删除按钮操作 */
  2629. handleDelete(row) {
  2630. const fIds = row.fId || this.ids
  2631. this.$confirm(
  2632. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2633. '警告',
  2634. {
  2635. confirmButtonText: '确定',
  2636. cancelButtonText: '取消',
  2637. type: 'warning'
  2638. }
  2639. )
  2640. .then(function() {
  2641. return delGoodsTransfer(fIds)
  2642. })
  2643. .then(() => {
  2644. this.getList()
  2645. this.msgSuccess('删除成功')
  2646. })
  2647. },
  2648. /** 导出按钮操作 */
  2649. handleExport() {
  2650. const queryParams = this.queryParams
  2651. this.$confirm('是否确认导出所有仓库主(出入库)数据项?', '警告', {
  2652. confirmButtonText: '确定',
  2653. cancelButtonText: '取消',
  2654. type: 'warning'
  2655. })
  2656. .then(function() {
  2657. return exportgoodsTransfer(queryParams)
  2658. })
  2659. .then((response) => {
  2660. this.download(response.msg)
  2661. })
  2662. },
  2663. // 货转件数的计算
  2664. qtyChange(row) {
  2665. if (!row.fQty || row.fQty === '') {
  2666. this.$set(row, 'fNetweight', 0)
  2667. this.$set(row, 'fGrossweight', 0)
  2668. return false
  2669. }
  2670. if (row.fPlanqty < row.fQty) {
  2671. this.$message.error("货转件数超出结余件数!");
  2672. this.$set(row, 'fQty', 0)
  2673. this.$set(row, 'fNetweight', 0)
  2674. this.$set(row, 'fGrossweight', 0)
  2675. return false;
  2676. }
  2677. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2)
  2678. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2)
  2679. this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2))
  2680. this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2))
  2681. },
  2682. // 修改毛重净重
  2683. changeTransfer (row) {
  2684. let fNetweight = 0;
  2685. let fGrossweight = 0;
  2686. if (row.fNetweight) {
  2687. fNetweight = row.fNetweight
  2688. }
  2689. if (row.fGrossweight) {
  2690. fGrossweight = row.fGrossweight
  2691. }
  2692. if (row.fPlannetweight < fNetweight) {
  2693. this.$message({ message: '货转净重超出结余净重', type: 'warning' })
  2694. return false
  2695. }
  2696. if (row.fPlangrossweight < fGrossweight) {
  2697. this.$message({ message: '货转毛重超出结余毛重', type: 'warning' })
  2698. return false
  2699. }
  2700. },
  2701. deleteRow(index, rows) {
  2702. rows.splice(index, 1)
  2703. this.this.updateDeduplication()
  2704. },
  2705. // 变更计价单位
  2706. changeFeeUnit(row) {
  2707. if (!row.fFeeunitid) {
  2708. return false
  2709. }
  2710. let fQty = 0;
  2711. let fGrossweight = 0;
  2712. let fNetweight = 0;
  2713. let volumn = 0;
  2714. let fixed = 1;
  2715. for (let li in this.dataList) {
  2716. if (this.dataList[li].fQty) {
  2717. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2718. }
  2719. if (this.dataList[li].fGrossweight) {
  2720. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  2721. }
  2722. if (this.dataList[li].fNetweight) {
  2723. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  2724. }
  2725. if (this.dataList[li].volumn) {
  2726. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  2727. }
  2728. }
  2729. if (row.fFeeunitid === 1) {
  2730. this.$set(row, 'fQty', fQty)
  2731. } else if (row.fFeeunitid === 2) {
  2732. this.$set(row, 'fQty', fGrossweight)
  2733. }else if (row.fFeeunitid === 3) {
  2734. this.$set(row, 'fQty', fNetweight)
  2735. }else if (row.fFeeunitid === 4) {
  2736. this.$set(row, 'fQty', volumn)
  2737. }else if (row.fFeeunitid === 5) {
  2738. this.$set(row, 'fQty', fixed)
  2739. }
  2740. if (row.fUnitprice) {
  2741. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  2742. }
  2743. },
  2744. // 选择新货权方自动带出结算方式
  2745. changefCorpid(row) {
  2746. this.$set(row, "fSbu", row.fCorpid);
  2747. for (let corp in this.fMblnoOptions) {
  2748. if (row.fTocorpid === this.fMblnoOptions[corp].fId) {
  2749. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + '');
  2750. }
  2751. }
  2752. },
  2753. /* 远程模糊查询用户 */
  2754. corpsRemoteMethod(name) {
  2755. if (name == null || name === '') {
  2756. return false
  2757. }
  2758. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2759. listCorps(queryParams).then((response) => {
  2760. this.fMblnoOptions = response.rows
  2761. this.KHblnoOptions = response.rows
  2762. })
  2763. },
  2764. /* 远程模糊查询商品 */
  2765. goodsRemoteMethod(name) {
  2766. if (name == null || name === '') {
  2767. return false
  2768. }
  2769. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2770. listGoods(queryParams).then((response) => {
  2771. this.goodsOptions = response.rows
  2772. })
  2773. },
  2774. // 远程模糊查询费用名称
  2775. fWRemoteMethod(name) {
  2776. if (name == null || name === '') {
  2777. return false
  2778. }
  2779. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2780. listFees(queryParams).then((response) => {
  2781. this.fWbuOptions = response.rows
  2782. })
  2783. },
  2784. /* 远程模糊查询经营单位 */
  2785. fSbuRemoteMethod(name) {
  2786. if (name == null || name === '') {
  2787. return false
  2788. }
  2789. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2790. listCorps(queryParams).then((response) => {
  2791. this.fSbuOptions = response.rows
  2792. })
  2793. },
  2794. /* 远程模糊查询仓库 */
  2795. warehouseRemoteMethod(name) {
  2796. if (name == null || name === '') {
  2797. return false
  2798. }
  2799. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2800. listWarehouse(queryParams).then((response) => {
  2801. this.warehouseOptions = response.rows
  2802. })
  2803. },
  2804. /* 远程模糊查询操作用户 */
  2805. userRemoteMethod(name) {
  2806. if (name == null || name === '') {
  2807. return false
  2808. }
  2809. let queryParams = { pageNum: 1, pageSize: 10, userName: name }
  2810. listUser(queryParams).then((response) => {
  2811. this.userOptions = response.rows
  2812. })
  2813. }
  2814. }
  2815. }
  2816. </script>
  2817. <style lang="scss">
  2818. .juzhong > th {
  2819. text-align: center;
  2820. }
  2821. .biaoge > tr > td {
  2822. height: 30px;
  2823. text-align: center;
  2824. border-right: 1px solid #dfe6ec !important;
  2825. order-bottom: 1px solid #dfe6ec !important;
  2826. border-bottom: 1px solid #dfe6ec !important;
  2827. }
  2828. .el-table thead th {
  2829. background: #1890ff;
  2830. color: #fff;
  2831. }
  2832. .upload-demo {
  2833. margin-left: 50px;
  2834. }
  2835. .el-form-item {
  2836. margin-bottom: 5px !important;
  2837. }
  2838. .el-form-item__label {
  2839. font-size: 12px !important;
  2840. }
  2841. </style>