index.vue 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478
  1. <template>
  2. <div class="app-container">
  3. <el-button
  4. icon="el-icon-arrow-left"
  5. type="danger"
  6. v-if="cancelButton === true"
  7. @click="cancel"
  8. style="margin-bottom: 5px"
  9. >返回列表
  10. </el-button>
  11. <el-collapse v-model="activeNames" @change="">
  12. <el-collapse-item title="基础资料" name="1">
  13. <el-form ref="form" :model="form" label-width="130px" size="mini" class="selectForm" :rules="rules">
  14. <el-row>
  15. <el-col :span="6">
  16. <el-form-item label="订舱单位" prop="corpName">
  17. <el-input
  18. v-model="form.corpName"
  19. :disabled="modify"
  20. size="small"
  21. style="width: 100%"
  22. />
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item label="提单号" prop="fMblno">
  27. <el-input
  28. v-model="form.fMblno"
  29. :disabled="changeNum"
  30. size="small"
  31. style="width: 100%"
  32. placeholder="手工输入"
  33. />
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="6">
  37. <el-form-item label="起运港口" prop="fDestportid">
  38. <el-select
  39. v-model="form.fLoadportid"
  40. filterable
  41. remote
  42. style="width: 100%;"
  43. :disabled="modify"
  44. class="elSelect"
  45. placeholder="请输入模糊查找目的港口"
  46. >
  47. <el-scrollbar>
  48. <el-option
  49. v-for="(dict, index) in fMblnoOptions"
  50. :key="dict.fId"
  51. :label="dict.fName"
  52. :value="dict.fId"
  53. ></el-option>
  54. </el-scrollbar>
  55. </el-select>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label="目的港口" prop="destportid">
  60. <el-select
  61. v-model="form.fDestportid"
  62. filterable
  63. remote
  64. style="width: 100%;"
  65. :disabled="modify"
  66. class="elSelect"
  67. placeholder="请输入模糊查找目的港口"
  68. >
  69. <el-scrollbar>
  70. <el-option
  71. v-for="(dict, index) in fMblnoOptions"
  72. :key="dict.fId"
  73. :label="dict.fName"
  74. :value="dict.fId"
  75. ></el-option>
  76. </el-scrollbar>
  77. </el-select>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="6">
  81. <el-form-item label="预计装货时间" prop="fBsdate">
  82. <el-date-picker
  83. v-model="form.fBsdate"
  84. type="date"
  85. size="small"
  86. style="width: 100%"
  87. :disabled="modify"
  88. placeholder="选择日期"
  89. format="yyyy-MM-dd"
  90. >
  91. </el-date-picker>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="6">
  95. <el-form-item label="运输条款" prop="fServiceitems">
  96. <el-select
  97. v-model="form.fServiceitems"
  98. :disabled="modify"
  99. size="small"
  100. style="width: 100%"
  101. >
  102. <el-option
  103. v-for="(dict, index) in transport"
  104. :key="dict.dictValue"
  105. :label="dict.dictLabel"
  106. :value="dict.dictValue"
  107. ></el-option>
  108. </el-select>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="6">
  112. <el-form-item label="付款方式" prop="fPaymode">
  113. <el-select
  114. v-model="form.fPaymode"
  115. :disabled="modify"
  116. size="small"
  117. style="width: 100%"
  118. >
  119. <el-option
  120. v-for="(dict, index) in paymentMethod"
  121. :key="dict.dictValue"
  122. :label="dict.dictLabel"
  123. :value="dict.dictValue"
  124. ></el-option>
  125. </el-select>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="6">
  129. <el-form-item label="售票方" prop="fInvoceobj">
  130. <el-select
  131. v-model="form.fInvoceobj"
  132. :disabled="modify"
  133. size="small"
  134. style="width: 100%"
  135. >
  136. <el-option
  137. v-for="(dict, index) in drawee"
  138. :key="dict.dictValue"
  139. :label="dict.dictLabel"
  140. :value="dict.dictValue"
  141. ></el-option>
  142. </el-select>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="6">
  146. <el-form-item label="箱内签收单" prop="fSign">
  147. <el-select
  148. v-model="form.fSign"
  149. :disabled="modify"
  150. size="small"
  151. style="width: 100%"
  152. >
  153. <el-option
  154. v-for="(dict, index) in cEsign"
  155. :key="dict.dictValue"
  156. :label="dict.dictLabel"
  157. :value="dict.dictValue"
  158. ></el-option>
  159. </el-select>
  160. </el-form-item>
  161. </el-col>
  162. <el-col :span="6">
  163. <el-form-item label="订舱人扣货" prop="fDetentioncargo">
  164. <el-select
  165. v-model="form.fDetentioncargo"
  166. :disabled="modify"
  167. style="width: 100%"
  168. size="small"
  169. >
  170. <el-option
  171. v-for="(dict, index) in etentioncargo"
  172. :key="dict.dictValue"
  173. :label="dict.dictLabel"
  174. :value="dict.dictValue"
  175. ></el-option>
  176. </el-select>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="6">
  180. <el-form-item label="船名" prop="vslid">
  181. <el-select
  182. v-model="form.fVslid"
  183. filterable
  184. remote
  185. style="width: 100%;"
  186. :disabled="modify"
  187. class="elSelect"
  188. placeholder="请输入模糊查找目的船名"
  189. >
  190. <el-scrollbar>
  191. <el-option
  192. v-for="(dict, index) in vslidList"
  193. :key="dict.fId"
  194. :label="dict.fName"
  195. :value="dict.fId"
  196. ></el-option>
  197. </el-scrollbar>
  198. </el-select>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="6">
  202. <el-form-item label="航次" prop="voyidName">
  203. <el-select
  204. v-model="form.fVoyid"
  205. filterable
  206. remote
  207. style="width: 100%;"
  208. :disabled="modify"
  209. class="elSelect"
  210. placeholder="请输入模糊查找目的船名"
  211. >
  212. <el-scrollbar>
  213. <el-option
  214. v-for="(dict, index) in voyidList"
  215. :key="dict.fId"
  216. :label="dict.fNo"
  217. :value="dict.fId"
  218. ></el-option>
  219. </el-scrollbar>
  220. </el-select>
  221. </el-form-item>
  222. </el-col>
  223. <el-col :span="14">
  224. <el-form-item label="备注" prop="remarks">
  225. <el-input
  226. v-model="form.remark"
  227. :disabled="modify"
  228. size="small"
  229. style="width: 75%"
  230. >
  231. </el-input>
  232. <el-button type="primary" size="small" @click="check(1)">查看</el-button>
  233. </el-form-item>
  234. </el-col>
  235. </el-row>
  236. </el-form>
  237. </el-collapse-item>
  238. <el-collapse-item title="预计时间" name="2">
  239. <el-form v-model="estimatedTime" label-width="130px" size="mini">
  240. <el-row>
  241. <el-col :span="6">
  242. <el-form-item label="起运港口" prop="portofloadidName">
  243. <el-input
  244. v-model="estimatedTime.portofloadidName"
  245. :disabled="doNot"
  246. size="small"
  247. style="width: 100%"
  248. />
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item label="中转港口" prop="portoftransshipmentName">
  253. <el-input
  254. v-model="estimatedTime.portoftransshipmentName"
  255. :disabled="doNot"
  256. size="small"
  257. style="width: 100%"
  258. />
  259. </el-form-item>
  260. </el-col>
  261. <!-- <el-col :span="6">-->
  262. <!-- <el-form-item label="预计中转抵港日期" prop="fMblno">-->
  263. <!-- <el-input-->
  264. <!-- v-model="form.fMblno"-->
  265. <!-- :disabled="modify"-->
  266. <!-- size="small"-->
  267. <!-- style="width: 100%"-->
  268. <!-- placeholder="手工输入"-->
  269. <!-- />-->
  270. <!-- </el-form-item>-->
  271. <!-- </el-col>-->
  272. <!-- <el-col :span="6">-->
  273. <!-- <el-form-item label="预计中转开航日期" prop="fMblno">-->
  274. <!-- <el-input-->
  275. <!-- v-model="form.fMblno"-->
  276. <!-- :disabled="modify"-->
  277. <!-- size="small"-->
  278. <!-- style="width: 100%"-->
  279. <!-- placeholder="手工输入"-->
  280. <!-- />-->
  281. <!-- </el-form-item>-->
  282. <!-- </el-col>-->
  283. <el-col :span="6">
  284. <el-form-item label="目的港口" prop="portofdischargeidName">
  285. <el-input
  286. v-model="estimatedTime.portofdischargeidName"
  287. :disabled="doNot"
  288. size="small"
  289. style="width: 100%"
  290. />
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="6">
  294. <el-form-item label="预计开航日期" prop="fEtd">
  295. <el-input
  296. v-model="estimatedTime.fEtd"
  297. :disabled="doNot"
  298. size="small"
  299. style="width: 100%"
  300. />
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="6">
  304. <el-form-item label="预计抵港日期" prop="fEta">
  305. <el-input
  306. v-model="estimatedTime.fEta"
  307. :disabled="doNot"
  308. size="small"
  309. style="width: 100%"
  310. />
  311. </el-form-item>
  312. </el-col>
  313. </el-row>
  314. </el-form>
  315. </el-collapse-item>
  316. <el-collapse-item title="收发货人信息" name="3">
  317. <el-form v-model="form" label-width="130px" size="mini">
  318. <el-row>
  319. <el-col :span="6">
  320. <el-form-item label="发货人全称" prop="fShippername">
  321. <el-input
  322. v-model="form.fShippername"
  323. :disabled="modify"
  324. size="small"
  325. style="width: 100%"
  326. placeholder="手工输入"
  327. />
  328. </el-form-item>
  329. </el-col>
  330. <el-col :span="6">
  331. <el-form-item label="发货人联系人" prop="fShipperattn">
  332. <el-input
  333. v-model="form.fShipperattn"
  334. :disabled="modify"
  335. style="width: 100%"
  336. size="small"
  337. placeholder="手工输入"
  338. />
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="6">
  342. <el-form-item label="发货人电话" prop="fShippertel">
  343. <el-input
  344. v-model="form.fShippertel"
  345. :disabled="modify"
  346. size="small"
  347. style="width: 100%"
  348. placeholder="手工输入"
  349. />
  350. </el-form-item>
  351. </el-col>
  352. </el-row>
  353. <el-row>
  354. <el-col :span="6">
  355. <el-form-item label="收货人全称" prop="fConsigneername">
  356. <el-input
  357. v-model="form.fConsigneername"
  358. :disabled="modify"
  359. size="small"
  360. style="width: 100%"
  361. placeholder="手工输入"
  362. />
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="6">
  366. <el-form-item label="收货人联系人" prop="fConsigneeattn">
  367. <el-input
  368. v-model="form.fConsigneeattn"
  369. :disabled="modify"
  370. style="width: 100%"
  371. size="small"
  372. placeholder="手工输入"
  373. />
  374. </el-form-item>
  375. </el-col>
  376. <el-col :span="6">
  377. <el-form-item label="收货人电话" prop="fConsigneetel">
  378. <el-input
  379. v-model="form.fConsigneetel"
  380. :disabled="modify"
  381. style="width: 100%"
  382. size="small"
  383. placeholder="手工输入"
  384. />
  385. </el-form-item>
  386. </el-col>
  387. </el-row>
  388. </el-form>
  389. </el-collapse-item>
  390. <el-collapse-item title="费用信息" name="5" class="minHeight">
  391. <el-form v-model="form" label-width="130px" size="mini">
  392. <el-row>
  393. <el-col :span="6">
  394. <el-form-item label="是否办理保险" prop="fInsurance">
  395. <el-select
  396. v-model="form.fInsurance"
  397. :disabled="modify"
  398. size="small"
  399. style="width: 100%"
  400. >
  401. <el-option
  402. v-for="(dict, index) in insurance"
  403. :key="dict.dictValue"
  404. :label="dict.dictLabel"
  405. :value="dict.dictValue"
  406. ></el-option>
  407. </el-select>
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="6">
  411. <el-form-item label="保险货值(万元)" prop="fInsuranceamt">
  412. <el-input
  413. v-model="form.fInsuranceamt"
  414. :disabled="modify"
  415. style="width: 100%"
  416. size="small"
  417. />
  418. </el-form-item>
  419. </el-col>
  420. </el-row>
  421. </el-form>
  422. </el-collapse-item>
  423. <el-collapse-item title="货物信息" name="4">
  424. <el-table :data="goodsList" style="width: 100%;" align="center">
  425. <el-table-column label="行号" type="index" min-width="100px"/>
  426. <el-table-column label="货物名称" prop="fGoodsid" min-width="100px">
  427. <template slot-scope="scope">
  428. <el-select v-model="scope.row.fGoodsid" @change="selectChange(scope)" :disabled="modify">
  429. <el-option
  430. v-for="(item,index) in goods"
  431. :key="index"
  432. :label="item.fName"
  433. :value="item.fId"
  434. />
  435. </el-select>
  436. </template>
  437. </el-table-column>
  438. <el-table-column label="货类" prop="typeidName" min-width="100px">
  439. <template slot-scope="scope">
  440. <el-input v-model="scope.row.typeidName" :disabled="modify"></el-input>
  441. </template>
  442. </el-table-column>
  443. <el-table-column label="包装类型" prop="fPackageid" min-width="100px">
  444. <template slot-scope="scope">
  445. <el-select v-model="scope.row.fPackageid" :disabled="modify">
  446. <el-option
  447. v-for="item in packgeOptions"
  448. :key="item.dictValue"
  449. :label="item.dictLabel"
  450. :value="item.dictValue"
  451. />
  452. </el-select>
  453. </template>
  454. </el-table-column>
  455. <el-table-column label="箱型" prop="fCntrid" min-width="100px">
  456. <template slot-scope="scope">
  457. <el-select v-model="scope.row.fCntrid" @change="seleEt(scope)" :disabled="modify">
  458. <el-option
  459. v-for="item in cntrOptions"
  460. :key="item.fId"
  461. :label="item.fNo"
  462. :value="item.fId"
  463. />
  464. </el-select>
  465. </template>
  466. </el-table-column>
  467. <el-table-column label="箱量" prop="fCntrcount" min-width="100px">
  468. <template slot-scope="scope">
  469. <el-input v-model="scope.row.fCntrcount" :disabled="modify" :maxlength="3" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  470. </template>
  471. </el-table-column>
  472. <el-table-column label="单箱重量(吨)" prop="fCntrweight" min-width="120px">
  473. <template slot-scope="scope">
  474. <el-input v-model="scope.row.fCntrweight" :disabled="modify" @input="cntrWeight"></el-input>
  475. </template>
  476. </el-table-column>
  477. <el-table-column label="箱态" prop="fCntrstatus" min-width="100px">
  478. <template slot-scope="scope">
  479. <el-select v-model="scope.row.fCntrstatus" :disabled="modify">
  480. <el-option
  481. v-for="item in fStatus"
  482. :key="item.dictValue"
  483. :label="item.dictLabel"
  484. :value="item.dictValue"
  485. />
  486. </el-select>
  487. </template>
  488. </el-table-column>
  489. <el-table-column label="自备货柜" prop="fSoc" min-width="100px">
  490. <template slot-scope="scope">
  491. <el-select v-model="scope.row.fSoc" :disabled="modify">
  492. <el-option label="是" value="0"></el-option>
  493. <el-option label="否" value="1"></el-option>
  494. </el-select>
  495. </template>
  496. </el-table-column>
  497. <div v-if="whether === true">
  498. <el-table-column label="设置温度(℃)" prop="fTemperature" min-width="120px">
  499. <template slot-scope="scope">
  500. <el-input v-model="scope.row.fTemperature" :disabled="modify" @input="temperature" oninput='this.value=this.value.replace(/[^\-?\d.]/g,"")'></el-input>
  501. </template>
  502. </el-table-column>
  503. <el-table-column label="风门开度(%)" prop="fDraught" min-width="120px">
  504. <template slot-scope="scope">
  505. <el-input v-model="scope.row.fDraught" :disabled="modify" @input="throttleOpening" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  506. </template>
  507. </el-table-column>
  508. <el-table-column label="湿度设置(%)" prop="fHumidity" min-width="120px">
  509. <template slot-scope="scope">
  510. <el-input v-model="scope.row.fHumidity" :disabled="modify" @input="throttleOpening" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  511. </template>
  512. </el-table-column>
  513. <el-table-column label="预冷要求" prop="fPrecooling" min-width="100px">
  514. <template slot-scope="scope">
  515. <el-select v-model="scope.row.fPrecooling" :disabled="modify">
  516. <el-option label="是" value="1"></el-option>
  517. <el-option label="否" value="2"></el-option>
  518. </el-select>
  519. </template>
  520. </el-table-column>
  521. </div>
  522. <el-table-column label="是否危险品" prop="ifdangerName" min-width="100px">
  523. <template slot-scope="scope">
  524. <span>{{ scope.row.ifdangerName }}</span>
  525. <el-button type="primary" size="small" @click="check(2)" style="margin-left: 5px;">查看</el-button>
  526. </template>
  527. </el-table-column>
  528. <el-table-column label="备注" prop="remark" min-width="100px"/>
  529. </el-table>
  530. </el-collapse-item>
  531. <el-collapse-item title="箱信息" name="6" class="minHeight">
  532. <div
  533. class="dialogTableTitle flex a-center jlr"
  534. style="
  535. display: flex;
  536. justify-content: space-between;
  537. align-items: center;
  538. margin: 10px 0;
  539. font-size: 16px;
  540. font-weight: bolder;
  541. "
  542. >
  543. <div>
  544. <el-button
  545. size="small"
  546. type="primary"
  547. :disabled="modify"
  548. @click.prevent="addList()"
  549. >新行
  550. </el-button>
  551. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  552. >删除
  553. </el-button> -->
  554. <el-button
  555. type="primary"
  556. size="small"
  557. :disabled="modify"
  558. @click="approval(1)"
  559. >保 存
  560. </el-button
  561. >
  562. </div>
  563. </div>
  564. <el-table :data="dataList" style="width: 100%;">
  565. <el-table-column type="selection" width="55" align="center"/>
  566. <el-table-column label="序号" type="index" width="80"/>
  567. <el-table-column label="箱号" align="center" prop="fCntrno">
  568. <template slot-scope="scope">
  569. <el-input v-model="scope.row.fCntrno" :disabled="modify"/>
  570. </template>
  571. </el-table-column>
  572. <el-table-column label="铅封号" align="center" prop="fSealno">
  573. <template slot-scope="scope">
  574. <el-input v-model="scope.row.fSealno" :disabled="modify"/>
  575. </template>
  576. </el-table-column>
  577. <el-table-column prop="fCntrweight" label="单箱重量(吨)" align="center">
  578. <template slot-scope="scope">
  579. <el-input v-model="scope.row.fCntrweight" :disabled="modify"
  580. @input="cntrWeight"
  581. />
  582. </template>
  583. </el-table-column>
  584. <el-table-column prop="fGoodsid" label="货名" align="center">
  585. <template slot-scope="scope">
  586. <el-select clearable v-model="scope.row.fGoodsid" :disabled="modify">
  587. <el-option
  588. v-for="item in goodsOptions"
  589. :key="item.fId"
  590. :label="item.fName"
  591. :value="item.fId"
  592. />
  593. </el-select>
  594. </template>
  595. </el-table-column>
  596. <el-table-column prop="fPackageid" label="包装类型" align="center">
  597. <template slot-scope="scope">
  598. <el-select clearable v-model="scope.row.fPackageid" :disabled="modify">
  599. <el-option
  600. v-for="dict in packgeOptions"
  601. :key="dict.dictValue"
  602. :label="dict.dictLabel"
  603. :value="dict.dictValue"
  604. />
  605. </el-select>
  606. </template>
  607. </el-table-column>
  608. <el-table-column prop="fCntrid" label="箱型" align="center">
  609. <template slot-scope="scope">
  610. <el-select clearable v-model="scope.row.fCntrid" :disabled="modify">
  611. <el-option
  612. v-for="item in cntrOptions"
  613. :key="item.fId"
  614. :label="item.fNo"
  615. :value="item.fId"
  616. />
  617. </el-select>
  618. </template>
  619. </el-table-column>
  620. <!-- <el-table-column prop="fManual" label="来源" align="center">-->
  621. <!-- <template slot-scope="scope">-->
  622. <!-- <el-select clearable v-model="scope.row.fManual" :disabled="modify">-->
  623. <!-- <el-option />-->
  624. <!-- </el-select>-->
  625. <!-- </template>-->
  626. <!-- </el-table-column>-->
  627. <el-table-column prop="address" label="操作" align="center">
  628. <template slot-scope="scope">
  629. <el-button size="small" :disabled="scope.row.fManual == 0 || modify"
  630. @click="deleteRow(scope.$index, dataList)"
  631. >移除
  632. </el-button>
  633. </template>
  634. </el-table-column>
  635. </el-table>
  636. </el-collapse-item>
  637. <el-collapse-item name="7">
  638. <template slot="title">
  639. <i class="el-icon-circle-plus"></i>应收费用
  640. </template>
  641. <div
  642. class="dialogTableTitle flex a-center jlr"
  643. style="
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. margin: 10px 0;">
  648. <div>
  649. <el-button
  650. size="small"
  651. type="primary"
  652. :disabled="modify"
  653. @click.prevent="addCollection()"
  654. >新行
  655. </el-button>
  656. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  657. >删除
  658. </el-button> -->
  659. <el-button
  660. type="primary"
  661. size="small"
  662. :disabled="modify"
  663. @click="approval(1)"
  664. >保 存
  665. </el-button
  666. >
  667. <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
  668. <el-button
  669. size="small"
  670. @click.prevent="handleSelect(3)"
  671. :disabled="modify"
  672. type="danger"
  673. >导入协议
  674. </el-button
  675. >
  676. </div>
  677. </div>
  678. <el-table
  679. :data="warehouseDrList"
  680. ref="table"
  681. tooltip-effect="dark"
  682. border
  683. stripe
  684. show-summary
  685. @selection-change=""
  686. :summary-method="warehouseDrSummaries"
  687. >
  688. <el-table-column type="selection" width="55" align="center"/>
  689. <el-table-column label="序号" type="index" width="80">
  690. </el-table-column>
  691. <el-table-column
  692. prop="fBusinessType"
  693. header-align="center"
  694. align="center"
  695. width="180px"
  696. label="业务类型"
  697. >
  698. <template slot-scope="scope">
  699. <el-select
  700. v-model="scope.row.fBusinessType"
  701. filterable
  702. remote
  703. :disabled="modify || scope.row.fSrcTypeId != 0"
  704. placeholder="请选择业务类型"
  705. >
  706. <el-option
  707. v-for="dict in businessTypeOptions"
  708. :key="dict.dictValue"
  709. :label="dict.dictLabel"
  710. :value="dict.dictValue"
  711. ></el-option>
  712. </el-select>
  713. </template>
  714. </el-table-column>
  715. <el-table-column
  716. prop="fCorpid"
  717. header-align="center"
  718. align="center"
  719. width="180px"
  720. label="客户名称"
  721. >
  722. <template slot-scope="scope">
  723. <el-select
  724. v-model="scope.row.fCorpid"
  725. filterable
  726. remote
  727. :disabled="modify || scope.row.fSrcTypeId != 0"
  728. placeholder="请选择客户名称"
  729. >
  730. <el-option
  731. v-for="item in nameOptions"
  732. :key="item.fId"
  733. :label="item.fName"
  734. :value="item.fId"
  735. ></el-option>
  736. </el-select>
  737. </template>
  738. </el-table-column>
  739. <el-table-column
  740. prop="fFeeid"
  741. header-align="center"
  742. align="center"
  743. width="180px"
  744. label="费用名称"
  745. >
  746. <template slot-scope="scope">
  747. <el-select
  748. v-model="scope.row.fFeeid"
  749. filterable
  750. remote
  751. :disabled="modify || scope.row.fSrcTypeId !== 0"
  752. placeholder="请选择费用名称"
  753. >
  754. <el-option
  755. v-for="(dict, index) in fDNameOptions"
  756. :key="index.fId"
  757. :label="dict.fName"
  758. :value="dict.fId"
  759. ></el-option>
  760. </el-select>
  761. </template>
  762. </el-table-column>
  763. <el-table-column
  764. prop="fFeeUnitid"
  765. header-align="center"
  766. align="center"
  767. width="180px"
  768. label="计价单位"
  769. >
  770. <template slot-scope="scope">
  771. <el-select
  772. v-model="scope.row.fFeeUnitid"
  773. placeholder="请选择计价单位"
  774. @change="changeFeeUnit(scope.row)"
  775. clearable
  776. :disabled="modify || scope.row.fSrcTypeId !== 0"
  777. >
  778. <el-option
  779. v-for="(dict, index) in jFeetunitOptions"
  780. :key="index.dictValue"
  781. :label="dict.dictLabel"
  782. :value="dict.dictValue"
  783. />
  784. </el-select>
  785. </template>
  786. </el-table-column>
  787. <el-table-column
  788. prop="fQty"
  789. header-align="center"
  790. align="center"
  791. width="130px"
  792. label="数量"
  793. >
  794. <template slot-scope="scope">
  795. <el-input
  796. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  797. v-model="scope.row.fQty"
  798. placeholder="数量"
  799. :disabled="modify || scope.row.fSrcTypeId !== 0"
  800. @change="changeContractAmt(scope.row)"
  801. show-word-limit
  802. />
  803. </template>
  804. </el-table-column>
  805. <el-table-column
  806. prop="fUnitprice"
  807. header-align="center"
  808. align="center"
  809. width="130px"
  810. label="单价"
  811. >
  812. <template slot-scope="scope">
  813. <el-input
  814. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  815. v-model="scope.row.fUnitprice"
  816. placeholder="单价"
  817. :disabled="modify || scope.row.fSrcTypeId !== 0"
  818. @change="changeContractAmt(scope.row)"
  819. show-word-limit
  820. />
  821. </template>
  822. </el-table-column>
  823. <el-table-column
  824. prop="fAmount"
  825. header-align="center"
  826. align="center"
  827. width="130px"
  828. label="金额"
  829. >
  830. <template slot-scope="scope">
  831. <el-input
  832. disabled
  833. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  834. v-model="scope.row.fAmount"
  835. placeholder="金额"
  836. show-word-limit
  837. />
  838. </template>
  839. </el-table-column>
  840. <el-table-column
  841. prop="fStltypeid"
  842. header-align="center"
  843. align="center"
  844. width="130px"
  845. label="结算方式"
  846. >
  847. <template slot-scope="scope">
  848. <el-select
  849. v-model="scope.row.fStltypeid"
  850. placeholder="请选择结算表票结、月结"
  851. :disabled="modify || scope.row.fSrcTypeId !== 0"
  852. >
  853. <el-option
  854. v-for="(dict, index) in fStltypeOptions"
  855. :key="index.dictValue"
  856. :label="dict.dictLabel"
  857. :value="parseInt(dict.dictValue)"
  858. ></el-option>
  859. </el-select>
  860. </template>
  861. </el-table-column>
  862. <el-table-column
  863. prop="fCurrency"
  864. header-align="center"
  865. align="center"
  866. width="130px"
  867. label="币别"
  868. >
  869. <template slot-scope="scope">
  870. <el-input
  871. v-model="scope.row.fCurrency"
  872. :disabled="modify || scope.row.fSrcTypeId !== 0"
  873. placeholder="币别"
  874. show-word-limit
  875. />
  876. </template>
  877. </el-table-column>
  878. <el-table-column
  879. prop="fExrate"
  880. header-align="center"
  881. align="center"
  882. width="130px"
  883. label="汇率"
  884. >
  885. <template slot-scope="scope">
  886. <el-input
  887. v-model="scope.row.fExrate"
  888. :disabled="modify || scope.row.fSrcTypeId !== 0"
  889. placeholder="汇率"
  890. show-word-limit
  891. />
  892. </template>
  893. </el-table-column>
  894. <el-table-column
  895. prop="fTaxrate"
  896. header-align="center"
  897. align="center"
  898. width="130px"
  899. label="税率"
  900. >
  901. <template slot-scope="scope">
  902. <el-input
  903. v-model="scope.row.fTaxrate"
  904. :disabled="modify || scope.row.fSrcTypeId !== 0"
  905. placeholder="税率"
  906. show-word-limit
  907. />
  908. </template>
  909. </el-table-column>
  910. <el-table-column
  911. prop="fSrcTypeId"
  912. header-align="center"
  913. align="center"
  914. width="130px"
  915. label="来源"
  916. >
  917. <template slot-scope="scope">
  918. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  919. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  920. </template>
  921. </el-table-column>
  922. <el-table-column
  923. prop="remarks"
  924. header-align="center"
  925. align="center"
  926. width="150px"
  927. label="备注"
  928. >
  929. <template slot-scope="scope">
  930. <el-input
  931. v-model="scope.row.Remarks"
  932. :disabled="modify || scope.row.fSrcTypeId !== 0"
  933. placeholder="备注"
  934. show-word-limit
  935. />
  936. </template>
  937. </el-table-column>
  938. <el-table-column
  939. header-align="center"
  940. align="center"
  941. label="操作"
  942. width="200px"
  943. >
  944. <template slot-scope="scope">
  945. <el-button
  946. @click.native.prevent="
  947. deleteRow(scope.$index, warehouseDrList)
  948. "
  949. size="small"
  950. :disabled="modify"
  951. >移除
  952. </el-button
  953. >
  954. </template>
  955. </el-table-column>
  956. </el-table>
  957. </el-collapse-item>
  958. <el-collapse-item name="8">
  959. <template slot="title">
  960. <i class="el-icon-remove"></i>应付费用
  961. </template>
  962. <div
  963. class="dialogTableTitle flex a-center jlr"
  964. style="
  965. display: flex;
  966. justify-content: space-between;
  967. align-items: center;
  968. margin: 10px 0;
  969. "
  970. >
  971. <div>
  972. <el-button
  973. type="primary"
  974. :disabled="modify"
  975. @click.prevent="addpayment()"
  976. size="small"
  977. >新行
  978. </el-button>
  979. <el-button
  980. type="primary"
  981. size="small"
  982. @click="approval(1)"
  983. :disabled="modify"
  984. >保 存
  985. </el-button
  986. >
  987. <el-button
  988. type="danger"
  989. size="small"
  990. @click.prevent="handleSelect(1)"
  991. :disabled="modify"
  992. >导入协议
  993. </el-button
  994. >
  995. </div>
  996. </div>
  997. <el-table
  998. :data="warehouseCrList"
  999. ref="table"
  1000. tooltip-effect="dark"
  1001. border
  1002. stripe
  1003. show-summary
  1004. @selection-change=""
  1005. :summary-method="warehouseCrSummaries"
  1006. >
  1007. <el-table-column type="selection" width="55" align="center"/>
  1008. <el-table-column label="序号" type="index" width="80">
  1009. </el-table-column>
  1010. <el-table-column
  1011. prop="fCorpid"
  1012. header-align="center"
  1013. align="center"
  1014. width="180px"
  1015. label="业务类型"
  1016. >
  1017. <template slot-scope="scope">
  1018. <el-select
  1019. v-model="scope.row.fBusinessType"
  1020. filterable
  1021. remote
  1022. :disabled="modify || scope.row.fSrcTypeId != 0"
  1023. placeholder="请选择业务类型"
  1024. >
  1025. <el-option
  1026. v-for="dict in businessTypeOptions"
  1027. :key="dict.dictValue"
  1028. :label="dict.dictLabel"
  1029. :value="dict.dictValue"
  1030. ></el-option>
  1031. </el-select>
  1032. </template>
  1033. </el-table-column>
  1034. <el-table-column
  1035. prop="fCorpid"
  1036. header-align="center"
  1037. align="center"
  1038. width="180px"
  1039. label="客户名称"
  1040. >
  1041. <template slot-scope="scope">
  1042. <el-select
  1043. v-model="scope.row.fCorpid"
  1044. filterable
  1045. remote
  1046. :disabled="modify || scope.row.fSrcTypeId != 0"
  1047. placeholder="请选择客户名称"
  1048. >
  1049. <el-option
  1050. v-for="item in nameOptions"
  1051. :key="item.fId"
  1052. :label="item.fName"
  1053. :value="item.fId"
  1054. ></el-option>
  1055. </el-select>
  1056. </template>
  1057. </el-table-column>
  1058. <el-table-column
  1059. prop="fFeeid"
  1060. header-align="center"
  1061. align="center"
  1062. width="180px"
  1063. label="费用名称"
  1064. >
  1065. <template slot-scope="scope">
  1066. <el-select
  1067. v-model="scope.row.fFeeid"
  1068. filterable
  1069. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1070. remote
  1071. placeholder="请选择费用名称"
  1072. >
  1073. <el-option
  1074. v-for="(dict, index) in fCNameOptions"
  1075. :key="index.fId"
  1076. :label="dict.fName"
  1077. :value="dict.fId"
  1078. ></el-option>
  1079. </el-select>
  1080. </template>
  1081. </el-table-column>
  1082. <el-table-column
  1083. prop="fFeeUnitid"
  1084. header-align="center"
  1085. align="center"
  1086. width="180px"
  1087. label="计价单位"
  1088. >
  1089. <template slot-scope="scope">
  1090. <el-select
  1091. v-model="scope.row.fFeeUnitid"
  1092. filterable
  1093. remote
  1094. @change="changeFeeUnit(scope.row)"
  1095. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1096. placeholder="请选择计价单位"
  1097. >
  1098. <el-option
  1099. v-for="(dict, index) in jFeetunitOptions"
  1100. :key="index.dictValue"
  1101. :label="dict.dictLabel"
  1102. :value="dict.dictValue"
  1103. ></el-option>
  1104. </el-select>
  1105. </template>
  1106. </el-table-column>
  1107. <el-table-column
  1108. prop="fQty"
  1109. header-align="center"
  1110. align="center"
  1111. width="150px"
  1112. label="数量"
  1113. >
  1114. <template slot-scope="scope">
  1115. <el-input
  1116. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1117. v-model="scope.row.fQty"
  1118. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1119. @change="changeContractAmt(scope.row)"
  1120. placeholder="数量"
  1121. show-word-limit
  1122. />
  1123. </template>
  1124. </el-table-column>
  1125. <el-table-column
  1126. prop="fUnitprice"
  1127. header-align="center"
  1128. align="center"
  1129. width="150px"
  1130. label="单价"
  1131. >
  1132. <template slot-scope="scope">
  1133. <el-input
  1134. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1135. v-model="scope.row.fUnitprice"
  1136. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1137. @change="changeContractAmt(scope.row)"
  1138. placeholder="单价"
  1139. show-word-limit
  1140. />
  1141. </template>
  1142. </el-table-column>
  1143. <el-table-column
  1144. prop="fAmount"
  1145. header-align="center"
  1146. align="center"
  1147. width="150px"
  1148. label="金额"
  1149. >
  1150. <template slot-scope="scope">
  1151. <el-input
  1152. disabled
  1153. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1154. v-model="scope.row.fAmount"
  1155. placeholder="金额"
  1156. show-word-limit
  1157. />
  1158. </template>
  1159. </el-table-column>
  1160. <el-table-column
  1161. prop="fStltypeid"
  1162. header-align="center"
  1163. align="center"
  1164. width="130px"
  1165. label="结算方式"
  1166. >
  1167. <template slot-scope="scope">
  1168. <el-select
  1169. v-model="scope.row.fStltypeid"
  1170. placeholder="请选择结算表票结、月结"
  1171. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1172. >
  1173. <el-option
  1174. v-for="(dict, index) in fStltypeOptions"
  1175. :key="index.dictValue"
  1176. :label="dict.dictLabel"
  1177. :value="parseInt(dict.dictValue)"
  1178. ></el-option>
  1179. </el-select>
  1180. </template>
  1181. </el-table-column>
  1182. <el-table-column
  1183. prop="fCurrency"
  1184. header-align="center"
  1185. align="center"
  1186. width="150px"
  1187. label="币别"
  1188. >
  1189. <template slot-scope="scope">
  1190. <el-input
  1191. v-model="scope.row.fCurrency"
  1192. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1193. placeholder="币别"
  1194. show-word-limit
  1195. />
  1196. </template>
  1197. </el-table-column>
  1198. <el-table-column
  1199. prop="fExrate"
  1200. header-align="center"
  1201. align="center"
  1202. width="150px"
  1203. label="汇率"
  1204. >
  1205. <template slot-scope="scope">
  1206. <el-input
  1207. v-model="scope.row.fExrate"
  1208. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1209. placeholder="汇率"
  1210. show-word-limit
  1211. />
  1212. </template>
  1213. </el-table-column>
  1214. <el-table-column
  1215. prop="fTaxrate"
  1216. header-align="center"
  1217. align="center"
  1218. width="150px"
  1219. label="税率"
  1220. >
  1221. <template slot-scope="scope">
  1222. <el-input
  1223. v-model="scope.row.fTaxrate"
  1224. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1225. placeholder="税率"
  1226. show-word-limit
  1227. />
  1228. </template>
  1229. </el-table-column>
  1230. <el-table-column
  1231. prop="fSrcTypeId"
  1232. header-align="center"
  1233. align="center"
  1234. width="130px"
  1235. label="来源"
  1236. >
  1237. <template slot-scope="scope">
  1238. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1239. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  1240. </template>
  1241. </el-table-column>
  1242. <el-table-column
  1243. prop="remarks"
  1244. header-align="center"
  1245. align="center"
  1246. width="150px"
  1247. label="备注"
  1248. >
  1249. <template slot-scope="scope">
  1250. <el-input
  1251. v-model="scope.row.remarks"
  1252. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1253. placeholder="备注"
  1254. show-word-limit
  1255. />
  1256. </template>
  1257. </el-table-column>
  1258. <el-table-column
  1259. header-align="center"
  1260. align="center"
  1261. width="200px"
  1262. label="操作"
  1263. >
  1264. <template slot-scope="scope">
  1265. <!-- <el-button size="small">审核费用</el-button> -->
  1266. <el-button
  1267. @click.native.prevent="
  1268. deleteRow(scope.$index, warehouseCrList)
  1269. "
  1270. size="small"
  1271. :disabled="modify"
  1272. >移除
  1273. </el-button
  1274. >
  1275. </template>
  1276. </el-table-column>
  1277. </el-table>
  1278. </el-collapse-item>
  1279. <el-collapse-item name="9" class="minHeight" title="箱信息">
  1280. <template slot="title">
  1281. <i class="el-icon-circle-plus"></i>利润合计:
  1282. {{this.amountDr != null && this.amountCr != null ? this.amountDr - this.amountCr :
  1283. (!this.amountDr && this.amountCr ? 0 - this.amountCr :
  1284. (!this.amountDr && !this.amountCr ? '' : this.amountDr))}}
  1285. </template>
  1286. </el-collapse-item>
  1287. </el-collapse>
  1288. <div style="margin:60px;float: right">
  1289. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1290. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"
  1291. ></approval-comments>
  1292. <el-button type="info" :disabled="jumpDonot" v-if="this.form.fBillstatus == 11" @click="modify = false">修 改
  1293. </el-button>
  1294. <el-button type="success" :disabled="modify" v-if="this.form.fBillstatus == 11" @click="approval(1)">保 存
  1295. </el-button>
  1296. <el-button type="primary" :disabled="modify" v-if="this.form.fBillstatus == 11 && this.form.moneyStatus < 4"
  1297. @click="feeSubmission"
  1298. >费用请核
  1299. </el-button>
  1300. <el-button type="success" v-if="approVal" @click="addOrUpdateHand(form,'f_billstatus')">审 批</el-button>
  1301. <el-button type="primary"
  1302. v-if="(form.fUpdeteStatus === 4 || form.fUpdeteStatus === 5 || form.fUpdeteStatus === 6 || form.fUpdeteStatus === 2) && (form.fSubmitUpdate == 2 || form.fSubmitUpdate == 4) && (form.fDeleteStatus === 2 || form.fDeleteStatus === 4) && approvalTwo"
  1303. @click="modifyApproval()"
  1304. >审批
  1305. </el-button>
  1306. <el-button type="danger" :disabled="disappear" v-if="form.moneyStatus === 4 && current == before"
  1307. @click="revokeTwo('f_billstatus')"
  1308. >撤销请核
  1309. </el-button>
  1310. <el-button type="primary"
  1311. v-if="(form.fUpdeteStatus !== 4 && form.fUpdeteStatus !== 5 && form.fUpdeteStatus !== 6 && form.fUpdeteStatus !== 2) && (form.fBillstatus != 11 ||form.moneyStatus == null || form.moneyStatus != null && form.moneyStatus >= 4)"
  1312. @click="addOrUpdateHandle('f_billstatus')"
  1313. >查看审批
  1314. </el-button>
  1315. <el-button type="primary"
  1316. v-if="(form.fUpdeteStatus === 4 || form.fUpdeteStatus === 5 || form.fUpdeteStatus === 6 || form.fUpdeteStatus === 2) && (form.fSubmitUpdate == 2 || form.fSubmitUpdate == 4) && (form.fDeleteStatus === 2 || form.fDeleteStatus === 4)"
  1317. @click="revisionApproval()"
  1318. >查看审批
  1319. </el-button>
  1320. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" @click="cancel">返回列表</el-button>
  1321. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" @click="cancelTwo"
  1322. >返回首页
  1323. </el-button
  1324. >
  1325. </div>
  1326. <!-- 附件查看-->
  1327. <el-dialog
  1328. title="查看附件"
  1329. :visible.sync="dialogVisible"
  1330. width="60%"
  1331. v-dialogDrag
  1332. >
  1333. <el-table
  1334. :data="relevantAttachments"
  1335. ref="table"
  1336. tooltip-effect="dark"
  1337. border
  1338. stripe
  1339. style="width: 100%"
  1340. height="150"
  1341. >
  1342. <el-table-column label="序号" type="index" width="80">
  1343. </el-table-column>
  1344. <el-table-column
  1345. prop="fName"
  1346. header-align="center"
  1347. align="center"
  1348. width="250px"
  1349. label="附件名称"
  1350. >
  1351. <template slot-scope="scope">
  1352. <el-input
  1353. v-model="scope.row.fName"
  1354. placeholder="附件名称"
  1355. show-word-limit
  1356. />
  1357. </template>
  1358. </el-table-column>
  1359. <el-table-column
  1360. prop="createTime"
  1361. header-align="center"
  1362. align="center"
  1363. width="250px"
  1364. label="上传时间"
  1365. >
  1366. <template slot-scope="scope">
  1367. <el-input
  1368. v-model="scope.row.createTime"
  1369. disabled
  1370. placeholder="上传时间"
  1371. ></el-input>
  1372. </template>
  1373. </el-table-column>
  1374. <el-table-column
  1375. prop="createBy"
  1376. header-align="center"
  1377. align="center"
  1378. width="150px"
  1379. label="上传人"
  1380. >
  1381. <template slot-scope="scope">
  1382. <el-input
  1383. v-model="scope.row.createBy"
  1384. disabled
  1385. placeholder="上传人"
  1386. show-word-limit
  1387. />
  1388. </template>
  1389. </el-table-column>
  1390. <el-table-column
  1391. prop="fUrl"
  1392. header-align="center"
  1393. align="center"
  1394. width="150px"
  1395. label="操作"
  1396. >
  1397. <template slot-scope="scope">
  1398. <!-- <el-upload-->
  1399. <!-- class="upload-demo"-->
  1400. <!-- :action="uploadImgUrl"-->
  1401. <!-- :on-success="(res,file)=>{handleSucces(scope,res,file)}"-->
  1402. <!-- :headers="headers"-->
  1403. <!-- style="width:25%;float: left"-->
  1404. <!-- :show-file-list="false"-->
  1405. <!-- :limit="1"-->
  1406. <!-- >-->
  1407. <!-- <el-button size="small" type="primary" style="margin-left:20px">点击上传</el-button>-->
  1408. <!-- </el-upload>-->
  1409. <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
  1410. <!-- <el-button size="small" type="primary" @click="deleteFile(scope)">删除</el-button>-->
  1411. </template>
  1412. </el-table-column>
  1413. </el-table>
  1414. <span slot="footer" class="dialog-footer">
  1415. <el-button @click="dialogVisible = false">取 消</el-button>
  1416. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  1417. </span>
  1418. </el-dialog>
  1419. </div>
  1420. </template>
  1421. <script>
  1422. import {
  1423. listCorps,
  1424. addmodify,
  1425. getCntr,
  1426. postApproval,
  1427. listFees,
  1428. getGoodName,
  1429. getFName,
  1430. getfee,
  1431. getName,
  1432. portInquiry,
  1433. nameOfVessel,
  1434. voyageNumber
  1435. } from '@/api/kaihe/domesticTrade/orderInformation'
  1436. import Global from '@/layout/components/global'
  1437. import { getToken } from '@/utils/auth'
  1438. import Cookies from 'js-cookie'
  1439. import draggable from 'vuedraggable'
  1440. import Vue from 'vue'
  1441. import AddOrUpdate from '@/views/viewApproval'
  1442. import ApprovalComments from '@/views/startApproval'
  1443. import { revoke, revokeTwo } from '@/api/warehouseBusiness/warehouseInStock'
  1444. import { queryUserVal } from '@/api/system/user'
  1445. Vue.directive('dialogDrag', {
  1446. bind(el, binding, vnode, oldVnode) {
  1447. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1448. const dragDom = el.querySelector('.el-dialog')
  1449. const enlarge = el.querySelector('.enlarge')
  1450. dialogHeaderEl.style.cursor = 'move'
  1451. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1452. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1453. if (enlarge) {
  1454. enlarge.onclick = (e) => {
  1455. dragDom.style.top = '0px'
  1456. dragDom.style.left = '0px'
  1457. }
  1458. }
  1459. dialogHeaderEl.onmousedown = (e) => {
  1460. // 鼠标按下,计算当前元素距离可视区的距离
  1461. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1462. const disY = e.clientY - dialogHeaderEl.offsetTop
  1463. // 获取到的值带px 正则匹配替换
  1464. let styL, styT
  1465. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1466. if (sty.left.includes('%')) {
  1467. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1468. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1469. } else {
  1470. styL = +sty.left.replace(/\px/g, '')
  1471. styT = +sty.top.replace(/\px/g, '')
  1472. }
  1473. document.onmousemove = function(e) {
  1474. // 通过事件委托,计算移动的距离
  1475. const l = e.clientX - disX
  1476. const t = e.clientY - disY
  1477. // 移动当前元素
  1478. if ((t + styT) >= 0) {
  1479. dragDom.style.top = `${t + styT}px`
  1480. }
  1481. dragDom.style.left = `${l + styL}px`
  1482. // 将此时的位置传出去
  1483. // binding.value({x:e.pageX,y:e.pageY})
  1484. }
  1485. document.onmouseup = function(e) {
  1486. document.onmousemove = null
  1487. document.onmouseup = null
  1488. }
  1489. }
  1490. }
  1491. })
  1492. export default {
  1493. name: 'orderInformation',
  1494. components: {
  1495. AddOrUpdate,
  1496. ApprovalComments
  1497. },
  1498. data() {
  1499. return {
  1500. insurance:[],
  1501. etentioncargo:[],
  1502. vslidList:[],
  1503. voyidList:[],
  1504. cEsign:[],
  1505. transport:[],
  1506. paymentMethod:[],
  1507. drawee:[],
  1508. whether:false,
  1509. fStatus:[],
  1510. goods:[],
  1511. rules: {
  1512. fMblno: [{ required: true, message: ' ', trigger: 'blur' }]
  1513. },
  1514. changeNum: true,
  1515. cancelButton: true,
  1516. jumpDonot: false,
  1517. disappear: false,
  1518. businessTypeOptions: [],
  1519. id: null,
  1520. current: '',
  1521. before: '',
  1522. approVal: false,
  1523. //客户名称下拉模糊
  1524. nameOptions: [],
  1525. //字典表包装类型
  1526. packgeOptions: [],
  1527. //货名下拉
  1528. goodsOptions: [],
  1529. //箱型下拉
  1530. cntrOptions: [],
  1531. fTaxrate: '',
  1532. //结算方式
  1533. fStltypeOptions: [],
  1534. //计价单位
  1535. jFeetunitOptions: [],
  1536. //收付款费用名称字典表
  1537. fDNameOptions: [],
  1538. fCNameOptions: [],
  1539. warehouseCrList: [],
  1540. estimatedTime: {},
  1541. addOrUpdateVisible: false,
  1542. addOrUpdateVisib: false,
  1543. warehouseDrList: [],
  1544. goodsList: [],
  1545. dataList: [],
  1546. visible: false,
  1547. dataForm: {},
  1548. modify: true,
  1549. doNot: true,
  1550. activeNames: ['1', '2', '3', '4', '5', '6'],
  1551. form: {},
  1552. fMblnoOptions:[],
  1553. uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传的图片服务器地址
  1554. relevantAttachments: [],
  1555. headers: { Authorization: 'Bearer ' + getToken() },
  1556. //集装箱尺码字典表
  1557. CntrsizeOptions: [],
  1558. //模糊查询箱类型
  1559. typeOptions: [],
  1560. //附件上传弹窗
  1561. dialogVisible: false,
  1562. //调箱动作字典表
  1563. boxActionOptions: [],
  1564. //集装箱主字典表
  1565. ownerOptions: [],
  1566. //模糊下拉查询地点
  1567. addressOptions: [],
  1568. //空重字典表
  1569. updateEFOptions: [],
  1570. //状态字典表
  1571. cntrstatusOptions: [],
  1572. // 遮罩层
  1573. loading: true,
  1574. // 选中数组
  1575. ids: [],
  1576. // 显示搜索条件
  1577. showSearch: true,
  1578. // 总条数
  1579. total: 0,
  1580. // 客户详情表格数据
  1581. corpsList: [],
  1582. // 查询参数
  1583. select: '',
  1584. querDate: [],
  1585. file: [],
  1586. row: [],
  1587. res: [],
  1588. formList:{},
  1589. approvalTwo:false,
  1590. amountDr:null,
  1591. amountCr:null
  1592. }
  1593. },
  1594. //页面跳转后传递参数
  1595. activated() {
  1596. this.modify = true
  1597. let formDate
  1598. if (this.$route.query.list) {
  1599. formDate = {
  1600. fId: JSON.parse(this.$route.query.list).billId
  1601. }
  1602. this.formList = formDate
  1603. this.approVal = true
  1604. this.cancelButton = false
  1605. } else if (this.$route.query.data) {
  1606. formDate = {
  1607. fId: JSON.parse(this.$route.query.data).fId,
  1608. num: JSON.parse(this.$route.query.data).num
  1609. }
  1610. this.id = formDate.fId
  1611. this.formList = {
  1612. fId: formDate.fId
  1613. }
  1614. this.approVal = false
  1615. }else if (this.$route.query.testing){
  1616. console.log(this.$route.query.testing)
  1617. formDate = {
  1618. fId:JSON.parse(this.$route.query.testing).billId
  1619. }
  1620. this.formList = formDate
  1621. this.approvalTwo = true
  1622. this.cancelButton = false
  1623. }
  1624. if (formDate) {
  1625. addmodify(formDate).then(response => {
  1626. console.log(response)
  1627. if(response.code == 200){
  1628. this.form = response.rows[0]
  1629. if (this.form.fMblno == null) {
  1630. this.changeNum = false
  1631. } else {
  1632. this.changeNum = true
  1633. }
  1634. let data = {
  1635. actId: 460,
  1636. id: this.form.fId
  1637. }
  1638. getName(data).then(response => {
  1639. if (response.data.length != 0) {
  1640. this.before = response.data[0].userName
  1641. }
  1642. })
  1643. queryUserVal().then((response) => {
  1644. this.current = response.user.userName
  1645. if (formDate.num) {
  1646. if (this.form.moneyStatus >= 4) {
  1647. this.jumpDonot = true
  1648. }
  1649. if (this.current == this.before) {
  1650. this.disappear = false
  1651. }
  1652. } else {
  1653. this.jumpDonot = true
  1654. this.disappear = true
  1655. }
  1656. })
  1657. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  1658. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  1659. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  1660. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1661. this.estimatedTime = response.rows[0].tVoyageL
  1662. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1663. this.loading = false
  1664. if (response.rows[0].tWarehousebillsfeesDr) {
  1665. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1666. for (let item in this.warehouseDrList) {
  1667. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1668. // this.$set(this.warehouseDrList[item], 'fCorpid', JSON.stringify(this.warehouseDrList[item].fCorpid))
  1669. }
  1670. }
  1671. if (response.rows[0].warehousebillsfeesCr) {
  1672. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1673. for (let item in this.warehouseCrList) {
  1674. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1675. }
  1676. }
  1677. }
  1678. })
  1679. }
  1680. },
  1681. created() {
  1682. nameOfVessel().then(res =>{
  1683. this.vslidList = res.rows
  1684. })
  1685. voyageNumber().then(res =>{
  1686. this.voyidList = res.rows
  1687. })
  1688. portInquiry().then(res =>{
  1689. this.fMblnoOptions = res.rows;
  1690. })
  1691. this.getDicts('data_unitfees').then((response) => {
  1692. if (response.data) {
  1693. this.jFeetunitOptions = response.data
  1694. }
  1695. })
  1696. this.getDicts('data_stltype_type').then((response) => {
  1697. if (response.data) {
  1698. this.fStltypeOptions = response.data
  1699. }
  1700. })
  1701. this.getDicts('tax_rate').then((response) => {
  1702. if (response.data) {
  1703. this.fTaxrate = response.data[0].dictValue
  1704. }
  1705. })
  1706. this.getDicts('f_packageid').then((response) => {
  1707. if (response.data) {
  1708. this.packgeOptions = response.data
  1709. }
  1710. })
  1711. this.getDicts('data_billType').then((response) => {
  1712. if (response.data) {
  1713. this.businessTypeOptions = response.data
  1714. }
  1715. })
  1716. this.getDicts('f_updateEF').then((response) => {
  1717. if (response.data) {
  1718. this.fStatus = response.data
  1719. }
  1720. })
  1721. this.getDicts('f_serviceitems').then((response) => {
  1722. if (response.data) {
  1723. this.transport = response.data
  1724. }
  1725. })
  1726. this.getDicts('f_paymode').then((response) => {
  1727. if (response.data) {
  1728. this.paymentMethod = response.data
  1729. }
  1730. })
  1731. this.getDicts('f_invoceobj').then((response) => {
  1732. if (response.data) {
  1733. this.drawee = response.data
  1734. }
  1735. })
  1736. this.getDicts('f_sign').then((response) => {
  1737. if (response.data) {
  1738. this.cEsign = response.data
  1739. }
  1740. })
  1741. this.getDicts('f_detentioncargo').then((response) => {
  1742. if (response.data) {
  1743. this.etentioncargo = response.data
  1744. }
  1745. })
  1746. this.getDicts('f_insurance').then((response) => {
  1747. if (response.data) {
  1748. this.insurance = response.data
  1749. }
  1750. })
  1751. this.cntrtypeRemoteMethod()
  1752. this.goodRemoteMethod()
  1753. this.nameRemoteMethod()
  1754. this.fWRemoteMethod()
  1755. this.queryGoods()
  1756. let queryParams = { pageNum: 1, fDc: 'C' }
  1757. listFees(queryParams).then((response) => {
  1758. this.fCNameOptions = response.rows
  1759. })
  1760. let query = { pageNum: 1, fDc: 'D' }
  1761. listFees(query).then((response) => {
  1762. this.fDNameOptions = response.rows
  1763. })
  1764. },
  1765. methods: {
  1766. seleEt(scope) {
  1767. console.log(scope)
  1768. for (let item in this.cntrOptions) {
  1769. if (this.cntrOptions[item].fId === scope.row.fCntrid) {
  1770. if (this.cntrOptions[item].fType === 2) {
  1771. this.whether = true;
  1772. return;
  1773. } else {
  1774. this.whether = false;
  1775. return;
  1776. }
  1777. }
  1778. }
  1779. },
  1780. throttleOpening(res) {
  1781. if (res <= 100) {
  1782. } else {
  1783. this.list.fDraught = '';
  1784. this.$message({
  1785. showClose: true,
  1786. message: '不能大于100%或小于0%',
  1787. type: 'error',
  1788. offset: 90
  1789. });
  1790. }
  1791. },
  1792. temperature(res) {
  1793. if (res < 20 && res > -30) {
  1794. } else if (res == '-') {
  1795. } else {
  1796. this.list.fTemperature = '';
  1797. this.$message({
  1798. showClose: true,
  1799. message: '冷藏箱温度为-30℃至20℃之间的整数',
  1800. type: 'error',
  1801. offset: 90
  1802. });
  1803. }
  1804. },
  1805. selectChange(scope) {
  1806. for (let item in this.goods) {
  1807. if (this.goods[item].fId === scope.row.fGoodsid) {
  1808. scope.row.typeidName = this.goods[item].typeName;
  1809. }
  1810. }
  1811. },
  1812. queryGoods() {
  1813. getGoodName().then(res=>{
  1814. if(res.code == 200){
  1815. this.goods = res.data
  1816. }
  1817. })
  1818. },
  1819. homePage() {
  1820. this.open = false
  1821. let view = {
  1822. fullPath: '/finance/contrast',
  1823. hash: '',
  1824. matched: Array(2),
  1825. meta: Object,
  1826. name: 'Contrast',
  1827. params: Object,
  1828. path: '/finance/contrast',
  1829. query: Object,
  1830. title: '对账'
  1831. }
  1832. this.$router.push({ path: '/index' })
  1833. this.$store
  1834. .dispatch('tagsView/delView', view)
  1835. .then(({ visitedViews }) => {
  1836. if (this.isActive(view)) {
  1837. this.toLastView(visitedViews, view)
  1838. }
  1839. })
  1840. Global.$emit('removeCache', 'closeSelectedTag', view)
  1841. },
  1842. cancel() {
  1843. if (this.form.moneyStatus === 4 ||
  1844. this.form.fBillstatus === 4 ||
  1845. this.form.fBillstatus === 9 ||
  1846. this.modify == true) {
  1847. this.$router.push({ path: '/domesticTrade/myOrder' })
  1848. } else {
  1849. this.$confirm('返回列表,是否保存?', '提示', {
  1850. confirmButtonText: '保存',
  1851. cancelButtonText: '取消',
  1852. type: 'warning'
  1853. })
  1854. .then(() => {
  1855. this.approval()
  1856. })
  1857. .catch(() => {
  1858. this.$router.push({ path: '/domesticTrade/myOrder' })
  1859. this.modify = true
  1860. })
  1861. }
  1862. },
  1863. //撤销审批
  1864. revokeTwo(status) {
  1865. let data = {
  1866. actId: 460,
  1867. billId: this.form.fId,
  1868. id: this.form.fId,
  1869. fidStatus: status,
  1870. }
  1871. revokeTwo(data).then((data) => {
  1872. if (data.code === 200) {
  1873. this.msgSuccess('撤销成功')
  1874. this.jumpDonot = false
  1875. if (this.formList) {
  1876. addmodify(this.formList).then(response => {
  1877. this.form = response.rows[0]
  1878. let data = {
  1879. actId: 460,
  1880. id: this.form.fId
  1881. }
  1882. getName(data).then(response => {
  1883. if (response.data.length != 0) {
  1884. this.before = response.data[0].userName
  1885. }
  1886. })
  1887. queryUserVal().then((response) => {
  1888. this.current = response.user.userName
  1889. })
  1890. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1891. this.estimatedTime = response.rows[0].tVoyageL
  1892. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1893. this.loading = false
  1894. if (response.rows[0].tWarehousebillsfeesDr) {
  1895. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1896. for (let item in this.warehouseDrList) {
  1897. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1898. }
  1899. }
  1900. if (response.rows[0].warehousebillsfeesCr) {
  1901. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1902. for (let item in this.warehouseCrList) {
  1903. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1904. }
  1905. }
  1906. // if(this.current == this.before)
  1907. // this.disappear = false;
  1908. })
  1909. }
  1910. this.reset()
  1911. }
  1912. })
  1913. },
  1914. //费用提交审核
  1915. feeSubmission() {
  1916. if (!this.warehouseDrList && !this.warehouseCrList) {
  1917. this.$message.error('请维护费用')
  1918. return false
  1919. }
  1920. if (this.warehouseDrList) {
  1921. for (let li in this.warehouseDrList) {
  1922. if (!this.warehouseDrList[li].fBusinessType) {
  1923. this.$message.error('应收费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1924. return false
  1925. } else if (!this.warehouseDrList[li].fCorpid) {
  1926. this.$message.error('应收费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1927. return false
  1928. } else if (!this.warehouseDrList[li].fFeeid) {
  1929. this.$message.error('应收费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1930. return false
  1931. } else if (!this.warehouseDrList[li].fQty) {
  1932. this.$message.error('应收费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1933. return false
  1934. } else if (!this.warehouseDrList[li].fUnitprice) {
  1935. this.$message.error('应收费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1936. return false
  1937. }
  1938. }
  1939. }
  1940. if (this.warehouseCrList) {
  1941. for (let li in this.warehouseCrList) {
  1942. if (!this.warehouseCrList[li].fBusinessType) {
  1943. this.$message.error('应付费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1944. return false
  1945. } else if (!this.warehouseDrList[li].fCorpid) {
  1946. this.$message.error('应付费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1947. return false
  1948. } else if (!this.warehouseDrList[li].fFeeid) {
  1949. this.$message.error('应付费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1950. return false
  1951. } else if (!this.warehouseDrList[li].fQty) {
  1952. this.$message.error('应付费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1953. return false
  1954. } else if (!this.warehouseDrList[li].fUnitprice) {
  1955. this.$message.error('应付费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1956. return false
  1957. }
  1958. }
  1959. }
  1960. let form = {
  1961. fId: this.form.fId,
  1962. fMblno: this.form.fMblno
  1963. }
  1964. let formData = new window.FormData()
  1965. for (let li in this.warehouseDrList) {
  1966. this.warehouseDrList[li].fMblno = this.form.fMblno
  1967. for (let item in this.nameOptions) {
  1968. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  1969. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  1970. }
  1971. }
  1972. }
  1973. for (let li in this.warehouseCrList) {
  1974. this.warehouseCrList[li].fMblno = this.form.fMblno
  1975. }
  1976. formData.append('tWarehousebills', JSON.stringify(form))
  1977. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  1978. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  1979. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  1980. getfee(formData).then(response => {
  1981. this.$message.success('操作成功')
  1982. this.form.moneyStatus = 4
  1983. this.jumpDonot = true
  1984. this.modify = true
  1985. let data = {
  1986. actId: 460,
  1987. id: this.form.fId
  1988. }
  1989. getName(data).then(response => {
  1990. if (response.data.length != 0) {
  1991. this.before = response.data[0].userName
  1992. if (this.current == this.before) {
  1993. this.disappear = false
  1994. }
  1995. }
  1996. })
  1997. })
  1998. },
  1999. //箱信息操作限制
  2000. cntrWeight(res) {
  2001. if (res < 40 && res > 0) {
  2002. return
  2003. } else if (res == '' || res == null) {
  2004. } else {
  2005. this.$message({
  2006. showClose: true,
  2007. message: '单箱重量应在0-40吨之间',
  2008. type: 'error',
  2009. offset: 90
  2010. })
  2011. }
  2012. },
  2013. //获取客户名称下拉
  2014. nameRemoteMethod() {
  2015. let queryParams = { pageNum: 1 }
  2016. getFName(queryParams).then(response => {
  2017. this.nameOptions = response.data
  2018. })
  2019. },
  2020. //货名下拉
  2021. goodRemoteMethod() {
  2022. let queryParams = { pageNum: 1 }
  2023. getGoodName(queryParams).then(response => {
  2024. this.goodsOptions = response.data
  2025. })
  2026. },
  2027. //箱型下拉获取
  2028. cntrtypeRemoteMethod() {
  2029. let queryParams = { pageNum: 1 }
  2030. getCntr(queryParams).then(response => {
  2031. this.cntrOptions = response.rows
  2032. })
  2033. },
  2034. //计价单位
  2035. // corpsRemoteMethod(name) {
  2036. // if (name == null || name === "") {
  2037. // return false;
  2038. // }
  2039. // let queryParams = { pageNum: 1, fName: name, type: 1 };
  2040. // listCorps(queryParams).then((response) => {
  2041. // this.fMblnoOptions = response.rows;
  2042. // this.KHblnoOptions = response.rows;
  2043. // });
  2044. // },
  2045. //应付信息新行
  2046. addpayment() {
  2047. this.warehouseCrList.push({
  2048. fBusinessType: null,
  2049. fCorpid: null,
  2050. fFeeid: null,
  2051. fFeeUnitid: '7',
  2052. fQty: null,
  2053. fUnitprice: null,
  2054. fAmount: null,
  2055. fStltypeid: null,
  2056. fCurrency: 'RMB',
  2057. fExrate: '1',
  2058. fTaxrate: this.fTaxrate,
  2059. fSrcTypeId: 0,
  2060. remarks: null
  2061. })
  2062. },
  2063. // 数量计算
  2064. changeContractAmt(row) {
  2065. let fQty = 0
  2066. let fUnitprice = 0
  2067. if (row.fUnitprice) {
  2068. fUnitprice = row.fUnitprice
  2069. }
  2070. if (row.fQty) {
  2071. fQty = row.fQty
  2072. }
  2073. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  2074. },
  2075. // 变更计价单位
  2076. changeFeeUnit(row) {
  2077. if (!row.fFeeUnitid) {
  2078. return false
  2079. }
  2080. // if (row.fFeeUnitid === "2") {
  2081. // this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  2082. // } else if (row.fFeeUnitid === "1") {
  2083. // this.$set(row, "fQty", this.fQty);
  2084. // } else if (row.fFeeUnitid === "3") {
  2085. // this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  2086. // } else if (row.fFeeUnitid === "7") {
  2087. // this.$set(row, "fQty", this.fCntqty);
  2088. // } else {
  2089. // this.$set(row, "fQty", 0);
  2090. // }
  2091. if (row.fUnitprice) {
  2092. this.$set(
  2093. row,
  2094. 'fAmount',
  2095. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  2096. )
  2097. }
  2098. },
  2099. // 选择费用信息时获取计价单位
  2100. // changeFeeId(row) {
  2101. // for (let li in this.fWbuOptions) {
  2102. // if (row.fFeeid === this.fWbuOptions[li].fId) {
  2103. // this.$set(row, "fFeeUnitid", this.fWbuOptions[li].fFeeunitid + "");
  2104. // this.changeFeeUnit(row);
  2105. // break;
  2106. // }
  2107. // }
  2108. // },
  2109. // 远程模糊查询费用名称
  2110. fWRemoteMethod(name) {
  2111. if (name == null || name === '') {
  2112. return false
  2113. }
  2114. let queryParams = { pageNum: 1, fDc: 'C', fName: name }
  2115. listFees(queryParams).then((response) => {
  2116. this.fCNameOptions = response.rows
  2117. })
  2118. let query = { pageNum: 1, fDc: 'D', fName: name }
  2119. listFees(query).then((response) => {
  2120. this.fDNameOptions = response.rows
  2121. })
  2122. },
  2123. // 收款合计
  2124. warehouseDrSummaries(param) {
  2125. const { columns, data } = param
  2126. const sums = []
  2127. columns.forEach((column, index) => {
  2128. if (index === 0) {
  2129. sums[index] = '合计'
  2130. return
  2131. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2132. const values = data.map((item) => Number(item[column.property]));
  2133. if (!values.every((value) => isNaN(value))) {
  2134. sums[index] = values.reduce((prev, curr) => {
  2135. const value = Number(curr);
  2136. if (!isNaN(value)) {
  2137. return prev + curr;
  2138. } else {
  2139. return prev;
  2140. }
  2141. }, 0);
  2142. }
  2143. }
  2144. });
  2145. this.amountDr = sums[8]
  2146. return sums
  2147. },
  2148. //付款合计
  2149. warehouseCrSummaries(param) {
  2150. const { columns, data } = param
  2151. const sums = []
  2152. columns.forEach((column, index) => {
  2153. if (index === 0) {
  2154. sums[index] = '合计'
  2155. return
  2156. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2157. const values = data.map((item) => Number(item[column.property]));
  2158. if (!values.every((value) => isNaN(value))) {
  2159. sums[index] = values.reduce((prev, curr) => {
  2160. const value = Number(curr);
  2161. if (!isNaN(value)) {
  2162. return prev + curr;
  2163. } else {
  2164. return prev;
  2165. }
  2166. }, 0);
  2167. }
  2168. }
  2169. });
  2170. this.amountCr = sums[8]
  2171. return sums
  2172. },
  2173. addOrUpdateHand(form,status) {
  2174. // if(form.fMblno == null){
  2175. // this.addOrUpdateVisib = false;
  2176. // this.$message.error("提单号为空,请维护提单号")
  2177. // return false
  2178. // }else{
  2179. // this.addOrUpdateVisib = true;
  2180. // }
  2181. this.$refs['form'].validate((valid) => {
  2182. if (valid) {
  2183. this.addOrUpdateVisib = true
  2184. this.$nextTick(() => {
  2185. let actId = ''
  2186. if (this.form.fBillstatus < 6) {
  2187. actId = '410'
  2188. this.$refs.ApprovalComments.init(form.fId,status,actId,this.form.fMblno)
  2189. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2190. actId = '460'
  2191. this.$refs.ApprovalComments.init(form.fId,status,actId)
  2192. } else {
  2193. actId = '420'
  2194. this.$refs.ApprovalComments.init(form.fId, status,actId)
  2195. }
  2196. })
  2197. } else {
  2198. this.$message.error('提单号为空,请维护提单号')
  2199. }
  2200. })
  2201. },
  2202. modifyApproval(){
  2203. this.addOrUpdateVisib = true
  2204. let list = JSON.parse(this.$route.query.testing)
  2205. this.$nextTick(() => {
  2206. let actId = ''
  2207. console.log(list)
  2208. this.addOrUpdateVisible = true
  2209. if(list.refno4 == 'XGDD'){
  2210. actId = 471
  2211. }else if (list.refno4 == 'XGTJ'){
  2212. actId = 472
  2213. }else if(list.refno4 == 'DDSC'){
  2214. actId = 473
  2215. }
  2216. this.$refs.ApprovalComments.init(this.form.fId,status,actId,this.form.fMblno)
  2217. })
  2218. },
  2219. //首页审批跳转关闭返回首页
  2220. cancelTwo() {
  2221. this.open = false
  2222. let view = {
  2223. fullPath: '/domesticTrade/orderInformation?data=%7B%22fId%22%3A687%7D',
  2224. hash: '',
  2225. matched: Array(2),
  2226. meta: Object,
  2227. name: 'OrderInformation',
  2228. params: Object,
  2229. path: '/domesticTrade/orderInformation',
  2230. query: Object,
  2231. title: '订单信息'
  2232. }
  2233. this.$router.push({ path: '/index' })
  2234. this.$store
  2235. .dispatch('tagsView/delView', view)
  2236. .then(({ visitedViews }) => {
  2237. if (this.isActive(view)) {
  2238. this.toLastView(visitedViews, view)
  2239. }
  2240. })
  2241. Global.$emit('removeCache', 'closeSelectedTag', view)
  2242. },
  2243. // 查看审批流
  2244. getDataList() {
  2245. this.addOrUpdateVisible = false
  2246. },
  2247. returnData() {
  2248. this.addOrUpdateVisib = false
  2249. this.open = false
  2250. this.cancelTwo()
  2251. },
  2252. revisionApproval(){
  2253. let list = JSON.parse(this.$route.query.testing)
  2254. let actId = ''
  2255. console.log(list)
  2256. this.addOrUpdateVisible = true
  2257. if(list.refno4 == 'XGDD'){
  2258. actId = 471
  2259. }else if (list.refno4 == 'XGTJ'){
  2260. actId = 472
  2261. }else if(list.refno4 == 'DDSC'){
  2262. actId = 473
  2263. }
  2264. this.$nextTick(() => {
  2265. this.$refs.addOrUpdate.init(this.form.fId,actId,list.fidStatus)
  2266. })
  2267. },
  2268. addOrUpdateHandle(status) {
  2269. this.addOrUpdateVisible = true
  2270. let id = '448'
  2271. let actId = ''
  2272. if (this.form.fBillstatus < 6) {
  2273. actId = '410'
  2274. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2275. actId = '460'
  2276. } else {
  2277. actId = '420'
  2278. }
  2279. this.$nextTick(() => {
  2280. this.$refs.addOrUpdate.init(this.form.fId, actId,status)
  2281. })
  2282. },
  2283. handleSelect() {
  2284. },
  2285. //应收新行
  2286. addCollection() {
  2287. this.warehouseDrList.push({
  2288. fBusinessType: null,
  2289. fCorpid: this.form.corpName,
  2290. fFeeid: null,
  2291. fFeeUnitid: '7',
  2292. fQty: null,
  2293. fUnitprice: null,
  2294. fAmount: null,
  2295. fStltypeid: null,
  2296. fCurrency: 'RMB',
  2297. fExrate: '1',
  2298. fTaxrate: this.fTaxrate,
  2299. fSrcTypeId: 0,
  2300. remarks: null
  2301. })
  2302. },
  2303. //提交审批
  2304. approval(res) {
  2305. if (!this.form.fMblno) {
  2306. this.$message.error('请维护提单号')
  2307. return false
  2308. }
  2309. if (this.dataList.length === 0) {
  2310. this.$message.error('请维护箱信息')
  2311. return false
  2312. }
  2313. if (res != 1 && this.form.fMblno || res != 1 && this.dataList.length != 0) {
  2314. this.$router.push({ path: '/domesticTrade/myOrder' })
  2315. this.modify = true
  2316. }
  2317. let form = {
  2318. fId: this.form.fId,
  2319. fMblno: this.form.fMblno
  2320. }
  2321. let formData = new window.FormData()
  2322. for (let li in this.warehouseDrList) {
  2323. this.warehouseDrList[li].fMblno = this.form.fMblno
  2324. for (let item in this.nameOptions) {
  2325. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  2326. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  2327. }
  2328. }
  2329. }
  2330. for (let item in this.warehouseCrList) {
  2331. this.warehouseCrList[item].fMblno = this.form.fMblno
  2332. }
  2333. formData.append('tWarehousebills', JSON.stringify(this.form))
  2334. formData.append("tWarehousebillsCntr",JSON.stringify(this.goodsList))
  2335. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  2336. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2337. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2338. postApproval(formData).then(response => {
  2339. this.msgSuccess('操作成功')
  2340. if (response.data.tWarehouseBills) {
  2341. this.form = response.data.tWarehouseBills
  2342. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  2343. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  2344. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  2345. }
  2346. if(response.data.tWarehousebillsCntrList){
  2347. this.goodsList = response.data.tWarehousebillsCntrList
  2348. }
  2349. if (response.data.tWarehousebillsCntritemsList) {
  2350. this.dataList = response.data.tWarehousebillsCntritemsList
  2351. }
  2352. if (response.data.warehousebillsfeesCrList) {
  2353. this.warehouseCrList = response.data.warehousebillsfeesCrList
  2354. for (let item in this.warehouseCrList) {
  2355. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  2356. }
  2357. }
  2358. if (response.data.warehousebillsfeesDrList) {
  2359. this.warehouseDrList = response.data.warehousebillsfeesDrList
  2360. for (let item in this.warehouseDrList) {
  2361. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  2362. }
  2363. }
  2364. })
  2365. },
  2366. //新行
  2367. addList() {
  2368. this.dataList.push({
  2369. fManual: '1',
  2370. fCntrno: null,
  2371. fSealno: null,
  2372. fCntrweight: null,
  2373. fGoodsid: null,
  2374. fPackageid: null,
  2375. fCntrid: null
  2376. })
  2377. },
  2378. //查看附件
  2379. check(status) {
  2380. this.dialogVisible = true
  2381. if (status === 1) {
  2382. } else {
  2383. }
  2384. },
  2385. saveFile() {
  2386. this.row.accessoryList = this.file
  2387. this.dialogVisible = false
  2388. this.relevantAttachments = []
  2389. },
  2390. deleteRow(index, rows) {
  2391. rows.splice(index, 1)
  2392. },
  2393. //多选框选中
  2394. handleSelectionChange(selection) {
  2395. this.ids = selection.map(item => item.fId)
  2396. this.select = selection
  2397. }
  2398. }
  2399. }
  2400. </script>
  2401. <style lang="scss" scoped>
  2402. .tabSetting {
  2403. display: flex;
  2404. justify-content: flex-end;
  2405. }
  2406. .listStyle {
  2407. display: flex;
  2408. border-top: 1px solid #dcdfe6;
  2409. border-left: 1px solid #dcdfe6;
  2410. border-right: 1px solid #dcdfe6;
  2411. }
  2412. .listStyle:last-child {
  2413. border-bottom: 1px solid #dcdfe6;
  2414. }
  2415. .progress {
  2416. display: flex;
  2417. align-items: center;
  2418. padding: 2px;
  2419. background-color: rgba(0, 0, 0, 0.05);
  2420. height: 100%;
  2421. }
  2422. .el-form {
  2423. padding-top: 20px;
  2424. //border-top:1px dashed #ccc;
  2425. }
  2426. .selectForm > > > .el-form-item__label {
  2427. font-size: 12px !important;
  2428. }
  2429. .app-container /deep/ .el-collapse-item__content{
  2430. padding-bottom:0
  2431. }
  2432. </style>
  2433. <style lang="scss">
  2434. .el-collapse-item__header {
  2435. font-size: 16px;
  2436. font-weight: bolder;
  2437. padding-left: 5px;
  2438. background-color: #f8f8f9;
  2439. }
  2440. .el-form-item__label {
  2441. font-size: 12px;
  2442. }
  2443. </style>