index.vue 96 KB

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