index.vue 81 KB

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