index.vue 95 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069
  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 fSbuOptions"
  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. :disabled="browseStatus"
  314. style="width: 80%"
  315. :remote-method="corpsRemoteMethod"
  316. placeholder="请输入"
  317. >
  318. <el-option
  319. v-for="(dict, index) in fMblnoOptions"
  320. :key="index.fId"
  321. :label="dict.fName"
  322. :value="dict.fId"
  323. ></el-option>
  324. </el-select>
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="8">
  328. <el-form-item label="结算方式" prop="fStltypeid">
  329. <el-select
  330. v-model="form.fStltypeid"
  331. placeholder="请选择结算方式"
  332. clearable
  333. :disabled="browseStatus"
  334. style="width: 80%"
  335. >
  336. <el-option
  337. v-for="(dict, index) in fStltypeOptions"
  338. :key="index.dictValue"
  339. :label="dict.dictLabel"
  340. :value="dict.dictValue"
  341. />
  342. </el-select>
  343. </el-form-item>
  344. </el-col>
  345. <el-col :span="8">
  346. <el-form-item label="提单号" prop="fMblno">
  347. <el-input
  348. v-model="form.fMblno"
  349. :disabled="browseStatus"
  350. style="width: 80%"
  351. placeholder="手工输入"
  352. />
  353. </el-form-item>
  354. </el-col>
  355. </el-row>
  356. <el-row>
  357. <el-col :span="8">
  358. <el-form-item label="业务日期" prop="fBsdate">
  359. <el-date-picker
  360. v-model="form.fBsdate"
  361. style="width: 80%"
  362. type="date"
  363. :disabled="browseStatus"
  364. @change="changefBsdate"
  365. value-format="timestamp"
  366. placeholder="业务日期"
  367. >
  368. </el-date-picker>
  369. </el-form-item>
  370. </el-col>
  371. <el-col :span="8">
  372. <el-form-item label="仓管员" prop="fStorekeeper">
  373. <el-select
  374. v-model="form.fStorekeeper"
  375. filterable
  376. remote
  377. :disabled="browseStatus"
  378. style="width: 80%"
  379. :remote-method="userRemoteMethod"
  380. placeholder="请输入"
  381. >
  382. <el-option
  383. v-for="(dict, index) in userOptions"
  384. :key="index.userName"
  385. :label="dict.nickName"
  386. :value="dict.userName"
  387. ></el-option>
  388. </el-select>
  389. </el-form-item>
  390. </el-col>
  391. <el-col :span="8">
  392. <el-form-item label="仓库" prop="fWarehouseid">
  393. <el-select
  394. v-model="form.fWarehouseid"
  395. filterable
  396. :disabled="browseStatus"
  397. remote
  398. style="width: 80%"
  399. :remote-method="warehouseRemoteMethod"
  400. placeholder="请输入"
  401. >
  402. <el-option
  403. v-for="(dict, index) in warehouseOptions"
  404. :key="index.fId"
  405. :label="dict.fName"
  406. :value="dict.fId"
  407. ></el-option>
  408. </el-select>
  409. </el-form-item>
  410. </el-col>
  411. </el-row>
  412. <el-row>
  413. <el-col :span="8">
  414. <el-form-item label="存货编号" prop="fBscorpno">
  415. <el-input
  416. disabled
  417. v-model="form.fBscorpno"
  418. style="width: 80%"
  419. laceholder="存货编号"
  420. />
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="8">
  424. <el-form-item label="破损" prop="fIfdamage">
  425. <el-select
  426. v-model="form.fIfdamage"
  427. placeholder="请选择是否破损"
  428. clearable
  429. :disabled="browseStatus"
  430. style="width: 80%"
  431. >
  432. <el-option
  433. v-for="(dict, index) in fIfdamageOptions"
  434. :key="index.dictValue"
  435. :label="dict.dictLabel"
  436. :value="dict.dictValue"
  437. />
  438. </el-select>
  439. </el-form-item>
  440. </el-col>
  441. <el-col :span="8">
  442. <el-form-item label="过磅" prop="fIfweigh">
  443. <el-select
  444. v-model="form.fIfweigh"
  445. placeholder="请选择是否过磅"
  446. clearable
  447. :disabled="browseStatus"
  448. style="width: 80%"
  449. >
  450. <el-option
  451. v-for="(dict, index) in fIfweighOptions"
  452. :key="index.dictValue"
  453. :label="dict.dictLabel"
  454. :value="dict.dictValue"
  455. />
  456. </el-select>
  457. </el-form-item>
  458. </el-col>
  459. </el-row>
  460. <el-row>
  461. <el-col :span="8">
  462. <el-form-item label="质押" prop="fIfpledge">
  463. <el-select
  464. v-model="form.fIfpledge"
  465. placeholder="请选择是否过磅"
  466. clearable
  467. :disabled="browseStatus"
  468. style="width: 80%"
  469. >
  470. <el-option
  471. v-for="(dict, index) in fIfpledgeOptions"
  472. :key="index.dictValue"
  473. :label="dict.dictLabel"
  474. :value="dict.dictValue"
  475. />
  476. </el-select>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :span="8">
  480. <el-form-item label="质押银行" prop="fBankcorpid">
  481. <!-- <el-input
  482. v-model="form.fBankcorpid"
  483. laceholder="质押银行"
  484. :disabled="browseStatus"
  485. style="width: 80%"
  486. /> -->
  487. <el-select
  488. v-model="queryParams.fBankcorpid"
  489. filterable
  490. remote
  491. clearable
  492. style="width: 80%"
  493. @keyup.enter.native="handleQuery"
  494. :remote-method="corpsRemoteMethod"
  495. placeholder="请输入"
  496. >
  497. <el-option
  498. v-for="(dict, index) in fMblnoOptions"
  499. :key="index.fId"
  500. :label="dict.fName"
  501. :value="dict.fId"
  502. ></el-option>
  503. </el-select>
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="8">
  507. <el-form-item label="计费单位" prop="fFeetunit">
  508. <el-select
  509. v-model="form.fFeetunit"
  510. placeholder="请选择计费单位"
  511. clearable
  512. :disabled="browseStatus"
  513. style="width: 80%"
  514. >
  515. <el-option
  516. v-for="(dict, index) in fFeetunitOptions"
  517. :key="index.dictValue"
  518. :label="dict.dictLabel"
  519. :value="dict.dictValue"
  520. />
  521. </el-select>
  522. </el-form-item>
  523. </el-col>
  524. <el-col :span="8">
  525. <el-form-item label="唛头" prop="fbarks">
  526. <el-input
  527. v-model="form.fMarks"
  528. style="width: 80%"
  529. :disabled="browseStatus"
  530. placeholder="唛头"
  531. />
  532. </el-form-item>
  533. </el-col>
  534. </el-row>
  535. <el-row>
  536. <el-form-item label="备注" prop="remark">
  537. <el-input
  538. style="width: 100%"
  539. v-model="form.remark"
  540. type="textarea"
  541. :disabled="browseStatus"
  542. placeholder="请输入内容"
  543. />
  544. </el-form-item>
  545. </el-row>
  546. <!--点击展开-->
  547. <el-button
  548. @click="
  549. detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
  550. "
  551. >展开</el-button
  552. >
  553. <el-button
  554. type="danger"
  555. prop="打印"
  556. @click="showEditDialog_ss"
  557. >收货单
  558. </el-button>
  559. <el-button
  560. type="danger"
  561. prop="打印"
  562. @click="showEditDialog_s"
  563. >出库单
  564. </el-button>
  565. <el-button
  566. type="danger"
  567. prop="打印"
  568. @click="showEditDialog_sss"
  569. >作业单
  570. </el-button>
  571. <el-button type="primary" @click="submitForm(2)">保 存</el-button>
  572. <el-button type="primary" @click="submitForm(6)">提交审核</el-button>
  573. <div v-if="detailsHidden">
  574. <el-row style="margin-top: 30px">
  575. <el-col :span="8">
  576. <el-form-item label="仓库联系人" prop="fContacts">
  577. <el-input
  578. v-model="form.fContacts"
  579. style="width: 80%"
  580. :disabled="browseStatus"
  581. placeholder="仓库联系人"
  582. />
  583. </el-form-item>
  584. </el-col>
  585. <el-col :span="8">
  586. <el-form-item label="仓库电话" prop="fTel">
  587. <el-input
  588. v-model="form.fTel"
  589. :disabled="browseStatus"
  590. style="width: 80%"
  591. placeholder="请输仓库入电话"
  592. />
  593. </el-form-item>
  594. </el-col>
  595. <el-col :span="8">
  596. <el-form-item label="船名航次" prop="fVslvoy">
  597. <el-input
  598. v-model="form.fVslvoy"
  599. style="width: 80%"
  600. :disabled="browseStatus"
  601. placeholder="船名航次"
  602. />
  603. </el-form-item>
  604. </el-col>
  605. </el-row>
  606. <el-row>
  607. <el-col :span="8">
  608. <el-form-item label="到港日期" prop="fEta">
  609. <el-date-picker
  610. v-model="form.fEta"
  611. style="width: 80%"
  612. type="date"
  613. :disabled="browseStatus"
  614. value-format="timestamp"
  615. placeholder="到港日期"
  616. >
  617. </el-date-picker>
  618. </el-form-item>
  619. </el-col>
  620. <el-col :span="8">
  621. <el-form-item label="报关单号" prop="fCustomno">
  622. <el-input
  623. v-model="form.fCustomno"
  624. style="width: 80%"
  625. :disabled="browseStatus"
  626. laceholder="报关单号"
  627. />
  628. </el-form-item>
  629. </el-col>
  630. <el-col :span="8">
  631. <el-form-item label="经营单位" prop="fSbu">
  632. <el-select
  633. v-model="form.fSbu"
  634. filterable
  635. remote
  636. :disabled="browseStatus"
  637. :remote-method="fSbuRemoteMethod"
  638. style="width: 80%"
  639. placeholder="请选择经营单位"
  640. >
  641. <el-option
  642. v-for="(dict, index) in fSbuOptions"
  643. :key="index.fId"
  644. :label="dict.fName"
  645. :value="dict.fId"
  646. ></el-option>
  647. </el-select>
  648. </el-form-item>
  649. </el-col>
  650. </el-row>
  651. <el-row>
  652. <el-col :span="8">
  653. <el-form-item label="单据编号" prop="fBillno">
  654. <el-input
  655. v-model="form.fBillno"
  656. disabled
  657. style="width: 80%"
  658. placeholder="单据编号"
  659. />
  660. </el-form-item>
  661. </el-col>
  662. <el-col :span="8">
  663. <el-form-item label="贸易方式" prop="fTrademodeid">
  664. <el-select
  665. v-model="form.fTrademodeid"
  666. placeholder="请选择贸易方式"
  667. :disabled="browseStatus"
  668. clearable
  669. style="width: 80%"
  670. >
  671. <el-option
  672. v-for="(dict, index) in fTrademodeidOptions"
  673. :key="index.dictValue"
  674. :label="dict.dictLabel"
  675. :value="dict.dictValue"
  676. />
  677. </el-select>
  678. </el-form-item>
  679. </el-col>
  680. <el-col :span="8">
  681. <el-form-item label="制单人" prop="createBy">
  682. <el-input
  683. disabled
  684. v-model="form.createBy"
  685. style="width: 80%"
  686. placeholder="制单人"
  687. />
  688. </el-form-item>
  689. </el-col>
  690. </el-row>
  691. <el-row>
  692. <el-col :span="8">
  693. <el-form-item label="制单部门" prop="fDeptid">
  694. <el-select
  695. v-model="form.fDeptid"
  696. filterable
  697. disabled
  698. style="width: 80%"
  699. remote
  700. >
  701. <el-option
  702. v-for="(dict, index) in deptOptions"
  703. :key="index.deptId"
  704. :label="dict.deptName"
  705. :value="dict.deptId"
  706. ></el-option>
  707. </el-select>
  708. </el-form-item>
  709. </el-col>
  710. <el-col :span="8">
  711. <el-form-item disabled label="制单日期" prop="fbilldate">
  712. <el-date-picker
  713. v-model="form.createTime"
  714. size="large"
  715. type="date"
  716. disabled
  717. value-format="timestamp"
  718. placeholder="制单日期"
  719. >
  720. </el-date-picker>
  721. </el-form-item>
  722. </el-col>
  723. </el-row>
  724. </div>
  725. </el-form>
  726. <div class="dialogTableTitle flex a-center jlr">
  727. <h2>库存明细</h2>
  728. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  729. >新增
  730. </el-button>
  731. <el-button :disabled="dataListSelection.length <= 0" @click.prevent="creditClick()"
  732. >入库确认
  733. </el-button>
  734. <el-button :disabled="browseStatus" @click.prevent="deleteRoww(warehouseDrList)"
  735. >删除
  736. </el-button>
  737. <el-button type="primary" @click="submitForm(2)">保 存</el-button>
  738. </div>
  739. <el-table
  740. :data="dataList"
  741. ref="table"
  742. tooltip-effect="dark"
  743. border
  744. stripe
  745. :summary-method="getSummaries"
  746. @selection-change="Selectinventory"
  747. show-summary
  748. >
  749. <el-table-column type="selection" width="55" align="center" />
  750. <el-table-column label="序号" type="index" width="80">
  751. </el-table-column>
  752. <el-table-column
  753. prop="fBsdate"
  754. header-align="center"
  755. align="center"
  756. width="150px"
  757. label="入库日期"
  758. >
  759. <template slot-scope="scope">
  760. <el-date-picker
  761. v-model="scope.row.fBsdate"
  762. style="width: 138px"
  763. type="date"
  764. disabled
  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="fcntrtype"
  798. header-align="center"
  799. align="center"
  800. width="140px"
  801. label="箱型"
  802. >
  803. <template slot-scope="scope">
  804. <el-input
  805. v-model="scope.row.fCntrtype"
  806. placeholder="箱型"
  807. :disabled="browseStatus"
  808. show-word-limit
  809. />
  810. </template>
  811. </el-table-column>
  812. <el-table-column
  813. prop="fCntqty"
  814. header-align="center"
  815. align="center"
  816. width="140px"
  817. label="箱量"
  818. >
  819. <template slot-scope="scope">
  820. <el-input
  821. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$4")'
  822. v-model="scope.row.fCntqty"
  823. placeholder="箱量"
  824. :disabled="browseStatus"
  825. show-word-limit
  826. />
  827. </template>
  828. </el-table-column>
  829. <el-table-column
  830. prop="fPlangrossweight"
  831. header-align="center"
  832. align="center"
  833. width="150px"
  834. label="计划毛重"
  835. >
  836. <template slot-scope="scope">
  837. <el-input
  838. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  839. v-model="scope.row.fPlangrossweight"
  840. placeholder="计划毛重"
  841. :disabled="browseStatus"
  842. show-word-limit
  843. />
  844. </template>
  845. </el-table-column>
  846. <el-table-column
  847. prop="fPlannetweight"
  848. header-align="center"
  849. align="center"
  850. width="150px"
  851. label="计划净重"
  852. >
  853. <template slot-scope="scope">
  854. <el-input
  855. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  856. v-model="scope.row.fPlannetweight"
  857. :disabled="browseStatus"
  858. placeholder="计划净重"
  859. show-word-limit
  860. />
  861. </template>
  862. </el-table-column>
  863. <el-table-column
  864. prop="fPlanvolumn"
  865. header-align="center"
  866. width="150px"
  867. align="center"
  868. label="计划尺码"
  869. >
  870. <template slot-scope="scope">
  871. <el-input
  872. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
  873. v-model="scope.row.fPlanvolumn"
  874. placeholder="尺码"
  875. :disabled="browseStatus"
  876. show-word-limit
  877. />
  878. </template>
  879. </el-table-column>
  880. <el-table-column
  881. prop="fPlanqty"
  882. header-align="center"
  883. width="150px"
  884. align="center"
  885. label="计划件数"
  886. >
  887. <template slot-scope="scope">
  888. <el-input
  889. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  890. v-model="scope.row.fPlanqty"
  891. placeholder="件数"
  892. :disabled="browseStatus"
  893. show-word-limit
  894. />
  895. </template>
  896. </el-table-column>
  897. <el-table-column
  898. prop="fGrossweight"
  899. header-align="center"
  900. width="150px"
  901. align="center"
  902. label="入库毛重"
  903. >
  904. <template slot-scope="scope">
  905. <el-input
  906. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  907. v-model="scope.row.fGrossweight"
  908. placeholder="入库毛重"
  909. :disabled="browseStatus"
  910. show-word-limit
  911. />
  912. </template>
  913. </el-table-column>
  914. <el-table-column
  915. prop="fNetweight"
  916. header-align="center"
  917. width="150px"
  918. align="center"
  919. label="入库净重"
  920. >
  921. <template slot-scope="scope">
  922. <el-input
  923. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  924. v-model="scope.row.fNetweight"
  925. placeholder="入库净重"
  926. :disabled="browseStatus"
  927. show-word-limit
  928. />
  929. </template>
  930. </el-table-column>
  931. <el-table-column
  932. prop="fQty"
  933. header-align="center"
  934. width="150px"
  935. align="center"
  936. label="入库件数"
  937. >
  938. <template slot-scope="scope">
  939. <el-input
  940. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  941. v-model="scope.row.fQty"
  942. placeholder="入库件数"
  943. :disabled="browseStatus"
  944. show-word-limit
  945. />
  946. </template>
  947. </el-table-column>
  948. <el-table-column
  949. prop="fPackagespecs"
  950. header-align="center"
  951. width="150px"
  952. align="center"
  953. label="包装规格"
  954. >
  955. <template slot-scope="scope">
  956. <el-input
  957. oninput="value=value.replace(/[^\d.]/g,'')"
  958. v-model="scope.row.fPackagespecs"
  959. placeholder="包装规格"
  960. :disabled="browseStatus"
  961. show-word-limit
  962. />
  963. </template>
  964. </el-table-column>
  965. <el-table-column
  966. prop="fWarehouselocid"
  967. header-align="center"
  968. width="140px"
  969. align="center"
  970. label="库区"
  971. >
  972. <template slot-scope="scope">
  973. <el-select
  974. v-model="scope.row.fWarehouselocid"
  975. filterable
  976. remote
  977. :disabled="browseStatus"
  978. :remote-method="kqhouseRemoteMethod"
  979. placeholder="请选择库区"
  980. >
  981. <el-option
  982. v-for="(dict, index) in kqhouseOptions"
  983. :key="index.fId"
  984. :label="dict.fName"
  985. :value="dict.fId"
  986. ></el-option>
  987. </el-select>
  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="changeEstmateAmt(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">50kg</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">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. fPlangrossweight: "",
  2002. fPlannetweight: "",
  2003. fPlanvolumn: "",
  2004. fPlanqty: "",
  2005. fFeeUnitid: "",
  2006. fFeeUnitids: "",
  2007. fGrossweight: "",
  2008. fCntqty: "",
  2009. fNetweight: "",
  2010. fQty: "",
  2011. fPlangrossweight: 0,
  2012. // 遮罩层
  2013. loading: true,
  2014. // 选中数组
  2015. ids: [],
  2016. Printinglist: [],
  2017. Collectionoptionss: [],
  2018. userVal: {
  2019. userName: null,
  2020. nickName: null,
  2021. deptId: null,
  2022. },
  2023. queryForm: {},
  2024. // 新增用户对话框
  2025. editDialogVisible_s: false,
  2026. editDialogVisible_ss: false,
  2027. editDialogVisible_sss: false,
  2028. editDialogClosed_ss: false,
  2029. dataList: [],
  2030. warehouseCrList: [],
  2031. warehouseDrList: [],
  2032. relevantAttachments: [],
  2033. // 非单个禁用
  2034. single: true,
  2035. // 非多个禁用
  2036. multiple: true,
  2037. // 显示搜索条件
  2038. showSearch: true,
  2039. // 总条数
  2040. total: 0,
  2041. // 仓库主(出入库)表格数据
  2042. warehousebillsList: [],
  2043. // 弹出层标题
  2044. title: "",
  2045. // 是否显示弹出层
  2046. open: false,
  2047. // 货权方(客户数据)
  2048. fMblnoOptions: [],
  2049. // 货权方(客户数据)
  2050. // 客户名称
  2051. KHblnoOptions: [],
  2052. // 库存明细入账数组
  2053. dataListSelection: [],
  2054. fSbuOptions: [],
  2055. // 操作员
  2056. userOptions: [],
  2057. // 操作员
  2058. goodsOptions: [],
  2059. // 制单部门
  2060. deptOptions: [],
  2061. // 仓库(仓库数据)
  2062. warehouseOptions: [],
  2063. kqhouseOptions: [],
  2064. // 贸易方式(数据字典),对应t_trademodels 字典
  2065. fTrademodeidOptions: [],
  2066. // 计费单位(数据字典),下拉选择毛重或净重字典
  2067. fFeetunitOptions: [],
  2068. // 结算方式(数据字典),下拉选择字典
  2069. fStltypeOptions: [],
  2070. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2071. fIfweighOptions: [],
  2072. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  2073. fIfpledgeOptions: [],
  2074. // 是否破损(数据字典),默认F否则T字典
  2075. fIfdamageOptions: [],
  2076. // 单据类型(数据字典)SJRK字典
  2077. fBilltypeOptions: [],
  2078. // 状态(数据字典),N 入字典
  2079. fBillstatusOptions: [],
  2080. // 费用名称
  2081. fWbuOptions: [],
  2082. // 计价单位
  2083. jFeetunitOptions: [],
  2084. // 查询参数
  2085. queryParams: {
  2086. pageNum: 1,
  2087. pageSize: 10,
  2088. fBillno: null,
  2089. createBy: null,
  2090. createTime: null,
  2091. fCustomsdeclartion: null,
  2092. fOriginalbillno: null,
  2093. fDeptid: null,
  2094. timeInterval: null,
  2095. fBsdeptid: null,
  2096. fContacts: null,
  2097. fTel: null,
  2098. fCorpid: null,
  2099. fTocorpid: null,
  2100. fStltypeid: null,
  2101. fBscorpno: null,
  2102. fWarehouseid: null,
  2103. fStorekeeper: null,
  2104. fBsdate: null,
  2105. fPlanqty: null,
  2106. fPlangrossweight: null,
  2107. fPlannetweight: null,
  2108. fPlanvolumn: null,
  2109. fQty: null,
  2110. fGrossweight: null,
  2111. fNetweight: null,
  2112. fVolumn: null,
  2113. fTrademodeid: null,
  2114. fSbu: null,
  2115. fFeetunit: null,
  2116. fMblno: null,
  2117. fVslvoy: null,
  2118. fEta: null,
  2119. fCustomno: null,
  2120. fIfweigh: null,
  2121. fIfpledge: null,
  2122. fIfdamage: null,
  2123. fBankcorpid: null,
  2124. fBilltype: null,
  2125. fBillstatus: null,
  2126. fCreateby: null,
  2127. fCreatetime: null,
  2128. fGoodsid: null,
  2129. fCntrtype: null,
  2130. fCntqty: null,
  2131. },
  2132. // 表单参数
  2133. form: {},
  2134. // 表单校验
  2135. rules: {
  2136. fDeptid: [
  2137. { required: true, message: " ", trigger: "blur" },
  2138. ],
  2139. fMblno: [{ required: true, message: " ", trigger: "blur" }],
  2140. fBsdeptid: [
  2141. { required: true, message: " ", trigger: "blur" },
  2142. ],
  2143. fCorpid: [
  2144. {
  2145. required: true,
  2146. message: " ",
  2147. trigger: "blur",
  2148. },
  2149. ],
  2150. fBsdate: [
  2151. { required: true, message: " ", trigger: "blur" },
  2152. ],
  2153. fTrademodeid: [
  2154. { required: true, message: " ", trigger: "blur" },
  2155. ],
  2156. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2157. fStorekeeper: {
  2158. required: true,
  2159. message: " ",
  2160. trigger: "blur",
  2161. },
  2162. fWarehouseid: [
  2163. { required: true, message: " ", trigger: "blur" },
  2164. ],
  2165. fbillingway: [
  2166. {
  2167. required: true,
  2168. message: " ",
  2169. trigger: "blur",
  2170. },
  2171. ],
  2172. fTocorpid: [
  2173. {
  2174. required: true,
  2175. message:
  2176. " ",
  2177. trigger: "blur",
  2178. },
  2179. ],
  2180. },
  2181. };
  2182. },
  2183. created() {
  2184. this.getList();
  2185. this.getDicts("data_trademodes").then((response) => {
  2186. this.fTrademodeidOptions = response.data;
  2187. });
  2188. this.getDicts("data_unitfees").then((response) => {
  2189. this.fFeetunitOptions = response.data;
  2190. this.jFeetunitOptions = JSON.parse(JSON.stringify(response.data));
  2191. });
  2192. this.getDicts("data_stltype_type").then((response) => {
  2193. this.fStltypeOptions = response.data;
  2194. });
  2195. this.getDicts("data_ifweigh_status").then((response) => {
  2196. this.fIfweighOptions = response.data;
  2197. console.log(this.fIfweighOptions)
  2198. });
  2199. this.getDicts("data_ifpledge_status").then((response) => {
  2200. this.fIfpledgeOptions = response.data;
  2201. });
  2202. this.getDicts("data_ifdamage_status").then((response) => {
  2203. this.fIfdamageOptions = response.data;
  2204. });
  2205. this.getDicts("data_billtype_type").then((response) => {
  2206. this.fBilltypeOptions = response.data;
  2207. });
  2208. this.getDicts("sys_common_status").then((response) => {
  2209. this.fBillstatusOptions = response.data;
  2210. });
  2211. },
  2212. methods: {
  2213. // 上传成功返回数据
  2214. showFile(row) {
  2215. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  2216. this.$set(this.relevantAttachments[0], "fUrl", row.url);
  2217. },
  2218. printSomething() {
  2219. // 此处的style即为打印时的样式
  2220. const style =
  2221. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2222. print({
  2223. printable: "print_area",
  2224. type: "html",
  2225. style: style, // 亦可使用引入的外部css;
  2226. scanStyles: false,
  2227. });
  2228. },
  2229. // 新增附件上传
  2230. addRelevt() {
  2231. this.relevantAttachments.push({
  2232. fUrl: null,
  2233. fName: null,
  2234. createBy: this.queryParams.createBy,
  2235. createTime: Date.parse(new Date()),
  2236. });
  2237. },
  2238. // 新增list
  2239. addRelevant() {
  2240. let time = null;
  2241. if (this.form.fBsdate) {
  2242. time = this.form.fBsdate;
  2243. }
  2244. this.dataList.push({
  2245. fBsdate: time,
  2246. fGoodsid: null,
  2247. fCntrtype: null,
  2248. fCntqty: 1,
  2249. fPlangrossweight: 0,
  2250. fPlannetweight: 0,
  2251. fNetweight: 0,
  2252. fPlanvolumn: 0,
  2253. fPlanqty: 0,
  2254. fGrossweight: 0,
  2255. fQty: 0,
  2256. fPackagespecs: null,
  2257. fWarehouselocid: null,
  2258. fBoxno: null,
  2259. fGoodsval: null,
  2260. fTruckno: null,
  2261. remark: null,
  2262. });
  2263. },
  2264. // 收货单打印界面
  2265. showEditDialog_s() {
  2266. for(let corp in this.fMblnoOptions){
  2267. if(this.form.fCorpId === this.fMblnoOptions[corp].fId) {
  2268. this.fMblnoOptions[corp].fName
  2269. console.log(this.fMblnoOptions[corp].fName)
  2270. }
  2271. }
  2272. console.log(this.form)
  2273. this.editDialogVisible_s = true;
  2274. },
  2275. showEditDialog_ss() {
  2276. this.editDialogVisible_ss = true;
  2277. },
  2278. showEditDialog_sss() {
  2279. this.editDialogVisible_sss = true;
  2280. },
  2281. // 收款信息
  2282. addCollection() {
  2283. this.warehouseDrList.push({
  2284. fCorpid: null,
  2285. fFeeid: null,
  2286. fFeeUnitid: null,
  2287. fQty: null,
  2288. fUnitprice: null,
  2289. fAmount: null,
  2290. fCurrency: "RMB",
  2291. fExrate: "1",
  2292. fCxrate: null,
  2293. fRate: null,
  2294. remarks: null,
  2295. });
  2296. },
  2297. addpayment() {
  2298. this.warehouseCrList.push({
  2299. fCorpid: null,
  2300. fFeeid: null,
  2301. fFeeUnitid: null,
  2302. fQty: null,
  2303. fUnitprice: null,
  2304. fAmount: null,
  2305. fCurrency: 'RMB',
  2306. fExrate: "1",
  2307. fCxrate: null,
  2308. fRate: null,
  2309. remarks: null,
  2310. });
  2311. },
  2312. queryUser() {
  2313. queryUserVal().then((response) => {
  2314. console.log(response)
  2315. if (response.user !== null) {
  2316. this.userVal = response.user;
  2317. console.log(this.userVal)
  2318. this.$set(this.form, "fDeptid", this.userVal.deptId);
  2319. this.$set(this.form, "createBy", this.userVal.userName);
  2320. this.$set(this.form, "fIfdamage", "1");
  2321. this.$set(this.form, "fIfweigh", "1");
  2322. this.$set(this.form, "fTrademodeid", "1");
  2323. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2324. this.$set(this.form, "createTime", Date.parse(new Date()));
  2325. }
  2326. if (response.dept !== null) {
  2327. this.deptOptions = [];
  2328. this.deptOptions.push(response.dept);
  2329. }
  2330. });
  2331. },
  2332. /** 查询仓库主(出入库)列表 */
  2333. getList() {
  2334. this.loading = true;
  2335. listWarehousebills(this.queryParams).then((response) => {
  2336. this.warehousebillsList = response.rows;
  2337. console.log(response.rows);
  2338. this.total = response.total;
  2339. this.loading = false;
  2340. });
  2341. },
  2342. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2343. fTrademodeidFormat(row, column) {
  2344. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  2345. },
  2346. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  2347. fFeetunitFormat(row, column) {
  2348. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  2349. },
  2350. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2351. fIfweighFormat(row, column) {
  2352. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  2353. },
  2354. // 编号字典翻译
  2355. fStltypeidFormat(row, column) {
  2356. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid);
  2357. },
  2358. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2359. fIfpledgeFormat(row, column) {
  2360. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  2361. },
  2362. // 是否破损(数据字典),默认F否则T字典翻译
  2363. fIfdamageFormat(row, column) {
  2364. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  2365. },
  2366. // 单据类型(数据字典)SJRK字典翻译
  2367. fBilltypeFormat(row, column) {
  2368. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  2369. },
  2370. // 状态(数据字典),N 入字典翻译
  2371. fBillstatusFormat(row, column) {
  2372. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  2373. },
  2374. // 取消按钮
  2375. cancel() {
  2376. this.open = false;
  2377. this.reset();
  2378. },
  2379. // 表单重置
  2380. reset() {
  2381. this.form = {
  2382. fId: null,
  2383. fBillno: null,
  2384. fCustomsdeclartion: null,
  2385. fOriginalbillno: null,
  2386. fDeptid: null,
  2387. fBsdeptid: null,
  2388. fContacts: null,
  2389. fTel: null,
  2390. fCorpid: null,
  2391. fTocorpid: null,
  2392. fStltypeid: null,
  2393. fBscorpno: null,
  2394. fWarehouseid: null,
  2395. fStorekeeper: null,
  2396. fBsdate: null,
  2397. fPlanqty: null,
  2398. fPlangrossweight: null,
  2399. fPlannetweight: null,
  2400. fPlanvolumn: null,
  2401. fQty: null,
  2402. fGrossweight: null,
  2403. fNetweight: null,
  2404. fVolumn: null,
  2405. fTrademodeid: null,
  2406. fSbu: null,
  2407. fFeetunit: null,
  2408. fMblno: null,
  2409. fVslvoy: null,
  2410. fEta: null,
  2411. fCustomno: null,
  2412. fIfweigh: null,
  2413. fIfpledge: null,
  2414. fIfdamage: null,
  2415. fBankcorpid: null,
  2416. fBilltype: null,
  2417. fBillstatus: null,
  2418. delFlag: null,
  2419. createBy: null,
  2420. createTime: null,
  2421. updateBy: null,
  2422. updateTime: null,
  2423. remark: null,
  2424. fCreateby: null,
  2425. fCreatetime: null,
  2426. fGoodsid: null,
  2427. fCntrtype: null,
  2428. fCntqty: null,
  2429. };
  2430. this.fMblnoOptions = [];
  2431. this.userOptions = [];
  2432. this.warehouseOptions = [];
  2433. this.fSbuOptions = [];
  2434. this.goodsOptions = [];
  2435. this.kqhouseOptions = [];
  2436. this.relevantAttachments = [];
  2437. this.KHblnoOptions = [];
  2438. this.fWbuOptions = [];
  2439. this.resetForm("form");
  2440. },
  2441. /** 搜索按钮操作 */
  2442. handleQuery() {
  2443. this.queryParams.pageNum = 1;
  2444. this.getList();
  2445. },
  2446. /** 重置按钮操作 */
  2447. resetQuery() {
  2448. this.resetForm("queryForm");
  2449. this.handleQuery();
  2450. },
  2451. // 多选框选中数据
  2452. handleSelectionChange(selection) {
  2453. console.log(selection);
  2454. this.ids = selection.map((item) => item.fId);
  2455. this.single = selection.length !== 1;
  2456. this.multiple = !selection.length;
  2457. },
  2458. // 库存明细多选
  2459. Selectinventory(selection) {
  2460. console.log(selection);
  2461. this.Printinglist = selection;
  2462. this.dataListSelection = selection;
  2463. if (this.Printinglist.length > 0) {
  2464. this.fTruckno = selection[0].fTruckno;
  2465. this.fBsdate = selection[0].fBsdate;
  2466. this.fCntrtype = selection[0].fCntrtype;
  2467. this.fGoodsids = selection[0].fGoodsids;
  2468. }
  2469. },
  2470. // 收款选择
  2471. Collectionoptions(selection) {
  2472. console.log(selection)
  2473. console.log("666")
  2474. this.Collectionoptionss = selection
  2475. },
  2476. // 收款删除
  2477. deleteRow(row) {
  2478. console.log("$")
  2479. row.splice(this.Collectionoptionss);
  2480. },
  2481. deleteRoww(row) {
  2482. },
  2483. // 付款选择
  2484. Paymentoptions(selection) {
  2485. console.log(selection)
  2486. },
  2487. /** 新增按钮操作 */
  2488. handleAdd(status) {
  2489. this.browseStatus = status;
  2490. this.reset();
  2491. this.queryUser();
  2492. this.open = true;
  2493. this.dataList = [];
  2494. this.warehouseCrList = [];
  2495. this.warehouseDrList = [];
  2496. this.relevantAttachments = [];
  2497. this.title = "入库单";
  2498. },
  2499. /** 修改按钮操作 */
  2500. handleUpdate(row, status) {
  2501. console.log(status);
  2502. this.browseStatus = status;
  2503. this.reset();
  2504. const fId = row.fId || this.ids;
  2505. getWarehousebills(fId).then((response) => {
  2506. console.log(response)
  2507. if (response.data.warehousebills) {
  2508. this.form = response.data.warehousebills;
  2509. }
  2510. if (response.data.corps) {
  2511. this.fMblnoOptions = response.data.corps;
  2512. this.KHblnoOptions = response.data.corps;
  2513. this.fSbuOptions = response.data.corps;
  2514. }
  2515. if (response.data.feesList) {
  2516. this.fWbuOptions = response.data.feesList;
  2517. }
  2518. if (response.data.warehouse) {
  2519. this.warehouseOptions = response.data.warehouse;
  2520. }
  2521. if (response.data.warehouseBillsItem) {
  2522. this.dataList = response.data.warehouseBillsItem;
  2523. }
  2524. if (response.data.enclosures) {
  2525. this.relevantAttachments = response.data.enclosures;
  2526. }
  2527. this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
  2528. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  2529. this.$set(this.form, "createTime", Date.parse(this.form.createTime));
  2530. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
  2531. for (let list in this.dataList) {
  2532. this.$set(
  2533. this.dataList[list],
  2534. "fBsdate",
  2535. Date.parse(this.dataList[list].fBsdate)
  2536. );
  2537. }
  2538. this.goodsOptions = response.data.goodsList;
  2539. this.kqhouseOptions = response.data.warehouseAreas;
  2540. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2541. for (let dr in this.warehouseDrList) {
  2542. this.$set(
  2543. this.warehouseDrList[dr],
  2544. "fFeeUnitid",
  2545. this.warehouseDrList[dr].fFeeUnitid + ""
  2546. );
  2547. }
  2548. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2549. for (let cr in this.warehouseCrList) {
  2550. this.$set(
  2551. this.warehouseCrList[cr],
  2552. "fFeeUnitid",
  2553. this.warehouseCrList[cr].fFeeUnitid + ""
  2554. );
  2555. }
  2556. this.userOptions = response.data.sysUser;
  2557. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2558. this.open = true;
  2559. this.title = "修改仓入库)";
  2560. });
  2561. },
  2562. // 库存明细多选框结果
  2563. dataListChange (row) {
  2564. console.log(JSON.stringify(row))
  2565. this.dataListSelection = row
  2566. },
  2567. // 合计
  2568. getSummaries(param) {
  2569. console.log(param);
  2570. const { columns, data } = param;
  2571. const sums = [];
  2572. var values = [];
  2573. columns.forEach((column, index) => {
  2574. if (index === 0) {
  2575. sums[index] = "";
  2576. return;
  2577. }
  2578. if (column.property === "fPlangrossweight") {
  2579. values = data.map((item) => Number(item["fPlangrossweight"]));
  2580. }
  2581. if (column.property === "fPlannetweight") {
  2582. values = data.map((item) => Number(item["fPlannetweight"]));
  2583. }
  2584. if (column.property === "fPlanvolumn") {
  2585. values = data.map((item) => Number(item["fPlanvolumn"]));
  2586. }
  2587. if (column.property === "fPlanqty") {
  2588. values = data.map((item) => Number(item["fPlanqty"]));
  2589. }
  2590. if (column.property === "fGrossweight") {
  2591. values = data.map((item) => Number(item["fGrossweight"]));
  2592. }
  2593. if (column.property === "fNetweight") {
  2594. values = data.map((item) => Number(item["fNetweight"]));
  2595. }
  2596. if (column.property === "fQty") {
  2597. values = data.map((item) => Number(item["fQty"]));
  2598. }
  2599. if (column.property === "fCntqty") {
  2600. values = data.map((item) => Number(item["fCntqty"]));
  2601. } // const values = data.map(item => Number(item[column.property]))
  2602. if (
  2603. column.property === "fPlangrossweight" ||
  2604. column.property === "fPlannetweight" ||
  2605. column.property === "fPlanvolumn" ||
  2606. column.property === "fPlanqty" ||
  2607. column.property === "fGrossweight" ||
  2608. column.property === "fNetweight" ||
  2609. column.property === "fQty" ||
  2610. column.property === "fCntqty"
  2611. ) {
  2612. sums[index] = values.reduce((prev, curr) => {
  2613. const value = Number(curr);
  2614. if (!isNaN(value)) {
  2615. if (column.property === "fPlangrossweight") {
  2616. this.fPlangrossweight = prev + curr;
  2617. }
  2618. if (column.property === "fPlannetweight") {
  2619. this.fPlannetweight = prev + curr;
  2620. }
  2621. if (column.property === "fPlanvolumn") {
  2622. this.fPlanvolumn = prev + curr;
  2623. }
  2624. if (column.property === "fPlanqty") {
  2625. this.fPlanqty = prev + curr;
  2626. }
  2627. if (column.property === "fGrossweight") {
  2628. this.fGrossweight = prev + curr;
  2629. }
  2630. if (column.property === "fNetweight") {
  2631. this.fNetweight = prev + curr;
  2632. }
  2633. if (column.property === "fQty") {
  2634. this.fQty = prev + curr;
  2635. }
  2636. if (column.property === "fCntqty") {
  2637. this.fCntqty = prev + curr;
  2638. }
  2639. return prev + curr;
  2640. } else {
  2641. return prev;
  2642. }
  2643. }, 0); // sums[index]
  2644. }
  2645. });
  2646. this.sums = sums;
  2647. return sums;
  2648. },
  2649. // 付款合计
  2650. warehouseDrSummaries(param) {
  2651. const { columns, data } = param;
  2652. const sums = [];
  2653. columns.forEach((column, index) => {
  2654. if (index === 0) {
  2655. sums[index] = "合计";
  2656. return;
  2657. }
  2658. const values = data.map((item) => Number(item[column.property]));
  2659. if (
  2660. column.property === "fUnitprice" ||
  2661. column.property === "fAmount" ||
  2662. column.property === "fQty" ||
  2663. column.property === "fQty"
  2664. ) {
  2665. sums[index] = values.reduce((prev, curr) => {
  2666. const value = Number(curr);
  2667. if (!isNaN(value)) {
  2668. return prev + curr;
  2669. } else {
  2670. return prev;
  2671. }
  2672. }, 0); // sums[index]
  2673. }
  2674. });
  2675. return sums;
  2676. },
  2677. // 数量计算
  2678. changeContractAmt(row) {
  2679. let fQty = 0;
  2680. let fUnitprice = 0;
  2681. if (row.fUnitprice) {
  2682. fUnitprice = row.fUnitprice;
  2683. }
  2684. if (row.fQty) {
  2685. fQty = row.fQty;
  2686. }
  2687. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  2688. },
  2689. changefBsdate(row) {
  2690. if (this.dataList.length > 0) {
  2691. for (var i = 0; i < this.dataList.length; i++) {
  2692. this.$set(this.dataList[i], "fBsdate", row);
  2693. }
  2694. }
  2695. },
  2696. // 变更计价单位
  2697. changeFeeUnit(row) {
  2698. console.log(this.fCntqty);
  2699. console.log(row);
  2700. if (!row.fFeeUnitid) {
  2701. return false;
  2702. }
  2703. if (row.fFeeUnitid === "0") {
  2704. this.$set(row, "fQty", this.fCntqty);
  2705. } else if (row.fFeeUnitid === "1") {
  2706. this.$set(row, "fQty", this.fGrossweight);
  2707. }
  2708. if (row.fUnitprice) {
  2709. this.$set(
  2710. row,
  2711. "fAmount",
  2712. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  2713. );
  2714. }
  2715. },
  2716. changefBsdate(row) {
  2717. if (this.dataList.length > 0) {
  2718. for (var i = 0; i < this.dataList.length; i++) {
  2719. this.$set(this.dataList[i], "fBsdate", row);
  2720. }
  2721. }
  2722. },
  2723. // 入账
  2724. creditClick () {
  2725. this.$refs["form"].validate((valid) => {
  2726. if (valid) {
  2727. let formData = new window.FormData();
  2728. formData.append("warehouseBills", JSON.stringify(this.form))
  2729. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection))
  2730. formData.append("whgenleg", JSON.stringify(this.relevantAttachments))
  2731. addWhgenleg(formData).then((response) => {
  2732. this.creditStatus = true
  2733. this.msgSuccess("入账成功");
  2734. for (let li in this.dataListSelection) {
  2735. for (let i in this.dataList) {
  2736. let fQty = this.dataList[i].fQty === this.dataListSelection[li].fQty;
  2737. let fBsdate = this.dataList[i].fBsdate === this.dataListSelection[li].fBsdate;
  2738. let fGoodsid = this.dataList[i].fGoodsid === this.dataListSelection[li].fGoodsid;
  2739. let fcntrtype = this.dataList[i].fcntrtype === this.dataListSelection[li].fcntrtype;
  2740. let fNetweight = this.dataList[i].fNetweight === this.dataListSelection[li].fNetweight;
  2741. let fGrossweight = this.dataList[i].fGrossweight === this.dataListSelection[li].fGrossweight;
  2742. if (fBsdate && fGoodsid && fcntrtype && fGrossweight && fNetweight && fQty) {
  2743. this.$set(this.dataList[i], 'fBillstatus', '7')
  2744. }
  2745. }
  2746. }
  2747. })
  2748. }
  2749. })
  2750. console.log('有东西')
  2751. },
  2752. /** 提交按钮 */
  2753. submitForm(status) {
  2754. this.$refs["form"].validate((valid) => {
  2755. if (status === 2) {
  2756. console.log("@@");
  2757. console.log(this.form);
  2758. console.log(this.dataList);
  2759. console.log(this.warehouseCrList);
  2760. console.log(this.warehouseDrList);
  2761. if (valid) {
  2762. this.form.fBillstatus = status;
  2763. this.form.fNetweight = this.fNetweight;
  2764. this.form.fPlangrossweight = this.fPlangrossweight;
  2765. this.form.fPlannetweight = this.fPlannetweight;
  2766. this.form.fPlanvolumn = this.fPlanvolumn;
  2767. this.form.fPlanqty = this.fPlanqty;
  2768. this.form.fGrossweight = this.fGrossweight;
  2769. this.form.fQty = this.fQty;
  2770. let formData = new window.FormData();
  2771. // 附件数据
  2772. formData.append("tWarehouseBills", JSON.stringify(this.form));
  2773. // 库存明细
  2774. formData.append(
  2775. "tWarehousebillsitems",
  2776. JSON.stringify(this.dataList)
  2777. );
  2778. // 附件数据
  2779. formData.append(
  2780. "tWhgenleg",
  2781. JSON.stringify(this.relevantAttachments)
  2782. );
  2783. // 费用明细付款
  2784. formData.append(
  2785. "tWarehousebillsfeesCr",
  2786. JSON.stringify(this.warehouseCrList)
  2787. );
  2788. // 收款
  2789. formData.append(
  2790. "tWarehousebillsfeesDr",
  2791. JSON.stringify(this.warehouseDrList)
  2792. );
  2793. addWarehousebills(formData).then((response) => {
  2794. this.msgSuccess("提交成功");
  2795. this.open = false;
  2796. this.getList();
  2797. });
  2798. }
  2799. } else {
  2800. if (this.dataList.length === 0) {
  2801. this.$message.error("请新增库存明细!");
  2802. return false;
  2803. }
  2804. if (this.relevantAttachments.length === 0) {
  2805. this.$message.error("请新增附件上传!");
  2806. return false;
  2807. }
  2808. if (this.warehouseDrList.length === 0) {
  2809. this.$message.error("请新增收款信息!");
  2810. return false;
  2811. }
  2812. if (this.warehouseCrList.length === 0) {
  2813. this.$message.error("请新增付款信息!");
  2814. return false;
  2815. }
  2816. for (let list in this.dataList) {
  2817. if (!this.dataList[list].fGoodsid) {
  2818. this.$message.error("请输入品名!");
  2819. return false;
  2820. }
  2821. if (!this.dataList[list].fWarehouselocid) {
  2822. this.$message.error("请输入库区!");
  2823. return false;
  2824. }
  2825. }
  2826. for (let relevant in this.relevantAttachments) {
  2827. if (!this.relevantAttachments[relevant].fName) {
  2828. this.$message.error("请输入附件名称!");
  2829. return false;
  2830. }
  2831. }
  2832. for (let warehouseDr in this.warehouseDrList) {
  2833. if (!this.warehouseDrList[warehouseDr].fCorpid) {
  2834. this.$message.error("请选择客户名称");
  2835. return false;
  2836. }
  2837. if (!this.warehouseDrList[warehouseDr].fFeeid) {
  2838. this.$message.error("请选择费用名称");
  2839. return false;
  2840. }
  2841. if (!this.warehouseDrList[warehouseDr]) {
  2842. this.$message.error("请选择收款计费单位");
  2843. return false;
  2844. }
  2845. }
  2846. for (let warehouseCr in this.warehouseCrList) {
  2847. if (!this.warehouseCrList[warehouseCr].fCorpid) {
  2848. this.$message.error("请选择客户名称");
  2849. return false;
  2850. }
  2851. if (!this.warehouseCrList[warehouseCr].fFeeid) {
  2852. this.$message.error("请选择费用名称");
  2853. return false;
  2854. }
  2855. if (!this.warehouseCrList[warehouseCr].fFeeUnitid) {
  2856. this.$message.error("请选择付款计费单位");
  2857. return false;
  2858. }
  2859. }
  2860. if (valid) {
  2861. this.form.fBillstatus = status;
  2862. this.form.fNetweight = this.fNetweight;
  2863. this.form.fPlangrossweight = this.fPlangrossweight;
  2864. this.form.fPlannetweight = this.fPlannetweight;
  2865. this.form.fPlanvolumn = this.fPlanvolumn;
  2866. this.form.fPlanqty = this.fPlanqty;
  2867. this.form.fGrossweight = this.fGrossweight;
  2868. this.form.fQty = this.fQty;
  2869. console.log(this.amt);
  2870. let formData = new window.FormData();
  2871. // 附件数据
  2872. formData.append("tWarehouseBills", JSON.stringify(this.form));
  2873. // 库存明细
  2874. formData.append(
  2875. "tWarehousebillsitems",
  2876. JSON.stringify(this.dataList)
  2877. );
  2878. // 附件数据
  2879. formData.append(
  2880. "tWhgenleg",
  2881. JSON.stringify(this.relevantAttachments)
  2882. );
  2883. // 费用明细付款
  2884. formData.append(
  2885. "tWarehousebillsfeesCr",
  2886. JSON.stringify(this.warehouseCrList)
  2887. );
  2888. // 收款
  2889. formData.append(
  2890. "tWarehousebillsfeesDr",
  2891. JSON.stringify(this.warehouseDrList)
  2892. );
  2893. addWarehousebills(formData).then((response) => {
  2894. this.msgSuccess("提交成功");
  2895. this.open = false;
  2896. this.getList();
  2897. });
  2898. }
  2899. }
  2900. });
  2901. },
  2902. /** 删除按钮操作 */
  2903. handleDelete(row) {
  2904. const fIds = row.fId || this.ids;
  2905. this.$confirm(
  2906. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2907. "警告",
  2908. {
  2909. confirmButtonText: "确定",
  2910. cancelButtonText: "取消",
  2911. type: "warning",
  2912. }
  2913. )
  2914. .then(function () {
  2915. return delWarehousebills(fIds);
  2916. })
  2917. .then(() => {
  2918. this.getList();
  2919. this.msgSuccess("删除成功");
  2920. });
  2921. },
  2922. /** 导出按钮操作 */
  2923. handleExport() {
  2924. const queryParams = this.queryParams;
  2925. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  2926. confirmButtonText: "确定",
  2927. cancelButtonText: "取消",
  2928. type: "warning",
  2929. })
  2930. .then(function () {
  2931. return exportWarehousebills(queryParams);
  2932. })
  2933. .then((response) => {
  2934. this.download(response.msg);
  2935. });
  2936. },
  2937. deleteRow(index, rows) {
  2938. rows.splice(index, 1);
  2939. },
  2940. /* 远程模糊查询用户 */
  2941. corpsRemoteMethod(name) {
  2942. if (name == null || name === "") {
  2943. return false;
  2944. }
  2945. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  2946. listCorps(queryParams).then((response) => {
  2947. this.fMblnoOptions = response.rows;
  2948. this.KHblnoOptions = response.rows;
  2949. });
  2950. },
  2951. /* 远程模糊查询商品 */
  2952. goodsRemoteMethod(name) {
  2953. if (name == null || name === "") {
  2954. return false;
  2955. }
  2956. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2957. listGoods(queryParams).then((response) => {
  2958. this.goodsOptions = response.rows;
  2959. });
  2960. },
  2961. // 远程模糊查询费用名称
  2962. fWRemoteMethod(name) {
  2963. if (name == null || name === "") {
  2964. return false;
  2965. }
  2966. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2967. listFees(queryParams).then((response) => {
  2968. this.fWbuOptions = response.rows;
  2969. });
  2970. },
  2971. /* 远程模糊查询经营单位 */
  2972. fSbuRemoteMethod(name) {
  2973. if (name == null || name === "") {
  2974. return false;
  2975. }
  2976. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2977. listCorps(queryParams).then((response) => {
  2978. this.fSbuOptions = response.rows;
  2979. });
  2980. },
  2981. /* 远程模糊查询仓库 */
  2982. warehouseRemoteMethod(name) {
  2983. if (name == null || name === "") {
  2984. return false;
  2985. }
  2986. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2987. listWarehouse(queryParams).then((response) => {
  2988. this.warehouseOptions = response.rows;
  2989. });
  2990. },
  2991. /* 远程模糊查询库区 */
  2992. kqhouseRemoteMethod(name) {
  2993. if (name == null || name === "") {
  2994. return false;
  2995. }
  2996. if (!this.form.fWarehouseid) {
  2997. this.$message.error("请输入仓库!");
  2998. return false;
  2999. }
  3000. let queryParams = {
  3001. pageNum: 1,
  3002. pageSize: 10,
  3003. fWarehouseid: this.form.fWarehouseid,
  3004. fName: name,
  3005. };
  3006. listArea(queryParams).then((response) => {
  3007. this.kqhouseOptions = response.rows;
  3008. });
  3009. },
  3010. /* 远程模糊查询操作用户 */
  3011. userRemoteMethod(name) {
  3012. if (name == null || name === "") {
  3013. return false;
  3014. }
  3015. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  3016. listUser(queryParams).then((response) => {
  3017. this.userOptions = response.rows;
  3018. });
  3019. },
  3020. },
  3021. };
  3022. </script>
  3023. <style lang="scss">
  3024. .juzhong > th {
  3025. text-align: center;
  3026. }
  3027. .biaoge > tr > td {
  3028. height: 50px;
  3029. text-align: center;
  3030. border-right: 1px solid #dfe6ec !important;
  3031. order-bottom: 1px solid #dfe6ec !important;
  3032. border-bottom: 1px solid #dfe6ec !important;
  3033. }
  3034. .el-table thead th {
  3035. background: #1890ff;
  3036. color: #fff;
  3037. }
  3038. .upload-demo {
  3039. margin-left: 50px;
  3040. }
  3041. .el-form-item {
  3042. margin-bottom: 5px;
  3043. }
  3044. </style>