index.vue 90 KB

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