index.vue 90 KB

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