payMoney.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499
  1. <template>
  2. <div>
  3. <!-- 列设置-->
  4. <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag append-to-body>
  5. <template slot="title">
  6. <div class="avue-crud__dialog__header">
  7. <span class="el-dialog__title">
  8. <span
  9. style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  10. </span>
  11. </div>
  12. </template>
  13. <div>配置排序列数据(拖动调整顺序)</div>
  14. <div style="margin-left: 17px">
  15. <el-checkbox v-model="allCheck" label="全选" @change="allChecked"></el-checkbox>
  16. </div>
  17. <div style="padding: 4px; display: flex; justify-content: center">
  18. <draggable v-model="setRowList" group="site" animation="300" @start="onStart" @end="onEnd"
  19. handle=".indraggable">
  20. <transition-group>
  21. <div v-for="item in setRowList" :key="item.surface" class="listStyle">
  22. <div style="width: 500px" class="indraggable">
  23. <div class="progress" :style="{ width: item.width + 'px' }">
  24. <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
  25. }}
  26. </el-checkbox>
  27. </div>
  28. </div>
  29. <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
  30. </el-input-number>
  31. </div>
  32. </transition-group>
  33. </draggable>
  34. </div>
  35. <span slot="footer" class="dialog-footer">
  36. <el-button @click="showSetting = false">取 消</el-button>
  37. <el-button @click="delRow" type="danger">重 置</el-button>
  38. <el-button type="primary" @click="save()">确 定</el-button>
  39. </span>
  40. </el-dialog>
  41. <div class="dialogTableTitle flex a-center jlr" style="
  42. display: flex;
  43. justify-content: space-between;
  44. align-items: center;
  45. margin: 10px 0;
  46. ">
  47. <div>
  48. <el-button type="primary" :disabled="browseStatus" @click.prevent="addpayment()" size="small">新行
  49. </el-button>
  50. <el-button type="primary" size="small" @click="saveForm" :disabled="browseStatus">保 存</el-button>
  51. <el-button type="danger" size="small" @click.prevent="handleSelect(1)">作业费协议</el-button>
  52. <el-button type="info" size="small" @click.prevent="printCr" v-if="isShowInvoice == 0">请款单
  53. </el-button>
  54. <el-button size="small" type="primary" @click="feesConfirm" v-if="isShowFeesConfirm == 0">请款单</el-button>
  55. <el-button type="primary" size="small" v-if="browseStatus" @click="feeChange">
  56. 费用变更
  57. </el-button>
  58. </div>
  59. <div style="margin: 0 10px;float: right">
  60. <el-button v-if="true" icon="el-icon-setting" size="mini" circle @click="showSetting = !showSetting">
  61. </el-button>
  62. </div>
  63. </div>
  64. <el-table :data="warehouseCrList" ref="table" tooltip-effect="dark" border stripe show-summary
  65. :summary-method="warehouseDrSummaries" @selection-change="SelectCr">
  66. <el-table-column type="selection" width="55" align="center" />
  67. <el-table-column label="序号" type="index" width="80"> </el-table-column>
  68. <el-table-column v-for="(item, index) in getRowList" :key="index" :label="item.name" :width="item.width"
  69. :prop="item.label" align="center" :fixed="item.fixed" :show-overflow-tooltip="true" sortable>
  70. <template slot-scope="scope">
  71. <span v-if="item.label == 'fCorpid'">
  72. <el-select v-model="scope.row.fCorpid" filterable clearable placeholder="客户名称"
  73. :disabled="browseStatus || scope.row.fBillstatus == 6">
  74. <el-option v-for="(item, index) in fMblnoOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  75. </el-option>
  76. </el-select>
  77. </span>
  78. <span v-else-if="item.label == 'fFeeid'">
  79. <el-select v-model="scope.row.fFeeid" clearable filterable placeholder="费用名称"
  80. :disabled="browseStatus || scope.row.fBillstatus == 6" @change="feeChoice(scope.row)">
  81. <el-option v-for="(item, index) in fCNameOptions" :key="index.fId" :label="item.fName" :value="item.fId">
  82. </el-option>
  83. </el-select>
  84. </span>
  85. <span v-else-if="item.label == 'fBusinessType'">
  86. <el-select style="width: 80%" v-model="scope.row.fBusinessType" filterable disabled>
  87. <el-option v-for="(item, index) in businessTypeOption" :key="index.dictValue" :label="item.dictLabel"
  88. :value="item.dictValue"></el-option>
  89. </el-select>
  90. </span>
  91. <span v-else-if="item.label == 'fFeeUnitid'">
  92. <el-select v-model="scope.row.fFeeUnitid" placeholder="请选择计价单位" clearable
  93. :disabled="browseStatus || scope.row.fBillstatus == 6" @change="changeFeeUnit(scope.row)">
  94. <el-option v-for="(item, index) in fFeetUnitOptions" :key="index.dictValue" :label="item.dictLabel"
  95. :value="item.dictValue" />
  96. </el-select>
  97. </span>
  98. <span v-else-if="item.label == 'fQty'">
  99. <el-input
  100. oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
  101. v-model="scope.row.fQty" :disabled="browseStatus || scope.row.fBillstatus == 6"
  102. @change="changeContractAmt(scope.row)" placeholder="数量" show-word-limit />
  103. </span>
  104. <span v-else-if="item.label == 'fUnitprice'">
  105. <el-input
  106. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
  107. v-model="scope.row.fUnitprice" :disabled="browseStatus || scope.row.fBillstatus == 6"
  108. @change="changeContractAmt(scope.row)" placeholder="单价" show-word-limit />
  109. </span>
  110. <span v-else-if="item.label == 'fAmount'">
  111. <el-input disabled
  112. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
  113. v-model="scope.row.fAmount" placeholder="金额" show-word-limit />
  114. </span>
  115. <span v-else-if="item.label == 'fStltypeid'">
  116. <el-select v-model="scope.row.fStltypeid" placeholder="请选择结算表票结、月结"
  117. :disabled="browseStatus || scope.row.fBillstatus == 6">
  118. <el-option v-for="(item, index) in fStltypeOptions" :key="index.dictValue" :label="item.dictLabel"
  119. :value="item.dictValue"></el-option>
  120. </el-select>
  121. </span>
  122. <span v-else-if="item.label == 'fCurrency'">
  123. <el-input v-model="scope.row.fCurrency" :disabled="browseStatus || scope.row.fBillstatus == 6"
  124. placeholder="币别" show-word-limit />
  125. </span>
  126. <span v-else-if="item.label == 'fExrate'">
  127. <el-input v-model="scope.row.fExrate" :disabled="browseStatus || scope.row.fBillstatus == 6"
  128. placeholder="汇率" show-word-limit />
  129. </span>
  130. <span v-else-if="item.label == 'fTaxrate'">
  131. <el-input v-model="scope.row.fTaxrate" :disabled="browseStatus || scope.row.fBillstatus == 6"
  132. placeholder="税率" show-word-limit />
  133. </span>
  134. <span v-else-if="item.label == 'fMblno'">
  135. <el-input v-model="scope.row.fMblno" :disabled="browseStatus || scope.row.fBillstatus == 6"
  136. placeholder="提单号" show-word-limit />
  137. </span>
  138. <span v-else-if="item.label == 'fProductName'">
  139. <el-input v-model="scope.row.fProductName" :disabled="browseStatus || scope.row.fBillstatus == 6"
  140. placeholder="品名" show-word-limit />
  141. </span>
  142. <span v-else-if="item.label == 'fMarks'">
  143. <el-input v-model="scope.row.fMarks" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="品牌"
  144. show-word-limit />
  145. </span>
  146. <span v-else-if="item.label == 'fSrcTypeId'">
  147. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  148. <span v-if="scope.row.fSrcTypeId == 1">协议</span>
  149. <span v-if="scope.row.fSrcTypeId == 10">变更</span>
  150. </span>
  151. <span v-else-if="item.label == 'remark'">
  152. <el-input v-model="scope.row.remark" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="备注"
  153. show-word-limit />
  154. </span>
  155. </template>
  156. </el-table-column>
  157. <!-- <el-table-column-->
  158. <!-- prop="fCorpid"-->
  159. <!-- header-align="center"-->
  160. <!-- align="center"-->
  161. <!-- width="300px"-->
  162. <!-- label="客户名称"-->
  163. <!-- >-->
  164. <!-- <template slot-scope="scope">-->
  165. <!-- <el-select-->
  166. <!-- v-model="scope.row.fCorpid"-->
  167. <!-- filterable-->
  168. <!-- clearable-->
  169. <!-- placeholder="客户名称"-->
  170. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  171. <!-- >-->
  172. <!-- <el-option-->
  173. <!-- v-for="(item, index) in fMblnoOptions"-->
  174. <!-- :key="index.fId"-->
  175. <!-- :label="item.fName"-->
  176. <!-- :value="item.fId"-->
  177. <!-- ></el-option>-->
  178. <!-- </el-select>-->
  179. <!-- </template>-->
  180. <!-- </el-table-column>-->
  181. <!-- <el-table-column-->
  182. <!-- prop="fFeeid"-->
  183. <!-- header-align="center"-->
  184. <!-- align="center"-->
  185. <!-- width="240px"-->
  186. <!-- label="费用名称"-->
  187. <!-- >-->
  188. <!-- <template slot-scope="scope">-->
  189. <!-- <el-select-->
  190. <!-- v-model="scope.row.fFeeid"-->
  191. <!-- clearable-->
  192. <!-- filterable-->
  193. <!-- placeholder="费用名称"-->
  194. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  195. <!-- >-->
  196. <!-- <el-option-->
  197. <!-- v-for="(item, index) in fCNameOptions"-->
  198. <!-- :key="index.fId"-->
  199. <!-- :label="item.fName"-->
  200. <!-- :value="item.fId"-->
  201. <!-- ></el-option>-->
  202. <!-- </el-select>-->
  203. <!-- </template>-->
  204. <!-- </el-table-column>-->
  205. <!-- <el-table-column-->
  206. <!-- prop="fBusinessType"-->
  207. <!-- header-align="center"-->
  208. <!-- align="center"-->
  209. <!-- width="180px"-->
  210. <!-- label="作业类型"-->
  211. <!-- >-->
  212. <!-- <template slot-scope="scope">-->
  213. <!-- <el-select-->
  214. <!-- style="width: 80%"-->
  215. <!-- v-model="scope.row.fBusinessType"-->
  216. <!-- filterable-->
  217. <!-- disabled-->
  218. <!-- >-->
  219. <!-- <el-option-->
  220. <!-- v-for="(item, index) in businessTypeOption"-->
  221. <!-- :key="index.dictValue"-->
  222. <!-- :label="item.dictLabel"-->
  223. <!-- :value="item.dictValue"-->
  224. <!-- ></el-option>-->
  225. <!-- </el-select>-->
  226. <!-- </template>-->
  227. <!-- </el-table-column>-->
  228. <!-- <el-table-column-->
  229. <!-- prop="fFeeUnitid"-->
  230. <!-- header-align="center"-->
  231. <!-- align="center"-->
  232. <!-- width="180px"-->
  233. <!-- label="计价单位"-->
  234. <!-- >-->
  235. <!-- <template slot-scope="scope">-->
  236. <!-- <el-select-->
  237. <!-- v-model="scope.row.fFeeUnitid"-->
  238. <!-- placeholder="请选择计价单位"-->
  239. <!-- clearable-->
  240. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  241. <!-- @change="changeFeeUnit(scope.row)"-->
  242. <!-- >-->
  243. <!-- <el-option-->
  244. <!-- v-for="(item, index) in fFeetUnitOptions"-->
  245. <!-- :key="index.dictValue"-->
  246. <!-- :label="item.dictLabel"-->
  247. <!-- :value="item.dictValue"-->
  248. <!-- />-->
  249. <!-- </el-select>-->
  250. <!-- </template>-->
  251. <!-- </el-table-column>-->
  252. <!-- <el-table-column-->
  253. <!-- prop="fQty"-->
  254. <!-- header-align="center"-->
  255. <!-- align="center"-->
  256. <!-- width="150px"-->
  257. <!-- label="数量"-->
  258. <!-- >-->
  259. <!-- <template slot-scope="scope">-->
  260. <!-- <el-input-->
  261. <!-- oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'-->
  262. <!-- v-model="scope.row.fQty"-->
  263. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  264. <!-- @change="changeContractAmt(scope.row)"-->
  265. <!-- placeholder="数量"-->
  266. <!-- show-word-limit-->
  267. <!-- />-->
  268. <!-- </template>-->
  269. <!-- </el-table-column>-->
  270. <!-- <el-table-column-->
  271. <!-- prop="fUnitprice"-->
  272. <!-- header-align="center"-->
  273. <!-- align="center"-->
  274. <!-- width="150px"-->
  275. <!-- label="单价"-->
  276. <!-- >-->
  277. <!-- <template slot-scope="scope">-->
  278. <!-- <el-input-->
  279. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  280. <!-- v-model="scope.row.fUnitprice"-->
  281. <!-- :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"-->
  282. <!-- @change="changeContractAmt(scope.row)"-->
  283. <!-- placeholder="单价"-->
  284. <!-- show-word-limit-->
  285. <!-- />-->
  286. <!-- </template>-->
  287. <!-- </el-table-column>-->
  288. <!-- <el-table-column-->
  289. <!-- prop="fAmount"-->
  290. <!-- header-align="center"-->
  291. <!-- align="center"-->
  292. <!-- width="150px"-->
  293. <!-- label="金额"-->
  294. <!-- >-->
  295. <!-- <template slot-scope="scope">-->
  296. <!-- <el-input-->
  297. <!-- disabled-->
  298. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  299. <!-- v-model="scope.row.fAmount"-->
  300. <!-- placeholder="金额"-->
  301. <!-- show-word-limit-->
  302. <!-- />-->
  303. <!-- </template>-->
  304. <!-- </el-table-column>-->
  305. <!-- <el-table-column-->
  306. <!-- prop="fStltypeid"-->
  307. <!-- header-align="center"-->
  308. <!-- align="center"-->
  309. <!-- width="130px"-->
  310. <!-- label="结算方式"-->
  311. <!-- >-->
  312. <!-- <template slot-scope="scope">-->
  313. <!-- <el-select-->
  314. <!-- v-model="scope.row.fStltypeid"-->
  315. <!-- placeholder="请选择结算表票结、月结"-->
  316. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  317. <!-- >-->
  318. <!-- <el-option-->
  319. <!-- v-for="(item, index) in fStltypeOptions"-->
  320. <!-- :key="index.dictValue"-->
  321. <!-- :label="item.dictLabel"-->
  322. <!-- :value="item.dictValue"-->
  323. <!-- ></el-option>-->
  324. <!-- </el-select>-->
  325. <!-- </template>-->
  326. <!-- </el-table-column>-->
  327. <!-- <el-table-column-->
  328. <!-- prop="fCurrency"-->
  329. <!-- header-align="center"-->
  330. <!-- align="center"-->
  331. <!-- width="150px"-->
  332. <!-- label="币别"-->
  333. <!-- >-->
  334. <!-- <template slot-scope="scope">-->
  335. <!-- <el-input-->
  336. <!-- v-model="scope.row.fCurrency"-->
  337. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  338. <!-- placeholder="币别"-->
  339. <!-- show-word-limit-->
  340. <!-- />-->
  341. <!-- </template>-->
  342. <!-- </el-table-column>-->
  343. <!-- <el-table-column-->
  344. <!-- prop="fExrate"-->
  345. <!-- header-align="center"-->
  346. <!-- align="center"-->
  347. <!-- width="150px"-->
  348. <!-- label="汇率"-->
  349. <!-- >-->
  350. <!-- <template slot-scope="scope">-->
  351. <!-- <el-input-->
  352. <!-- v-model="scope.row.fExrate"-->
  353. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  354. <!-- placeholder="汇率"-->
  355. <!-- show-word-limit-->
  356. <!-- />-->
  357. <!-- </template>-->
  358. <!-- </el-table-column>-->
  359. <!-- <el-table-column-->
  360. <!-- prop="fTaxrate"-->
  361. <!-- header-align="center"-->
  362. <!-- align="center"-->
  363. <!-- width="150px"-->
  364. <!-- label="税率"-->
  365. <!-- >-->
  366. <!-- <template slot-scope="scope">-->
  367. <!-- <el-input-->
  368. <!-- v-model="scope.row.fTaxrate"-->
  369. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  370. <!-- placeholder="税率"-->
  371. <!-- show-word-limit-->
  372. <!-- />-->
  373. <!-- </template>-->
  374. <!-- </el-table-column>-->
  375. <!-- <el-table-column-->
  376. <!-- prop="fMblno"-->
  377. <!-- header-align="center"-->
  378. <!-- align="center"-->
  379. <!-- width="130px"-->
  380. <!-- label="提单号"-->
  381. <!-- >-->
  382. <!-- <template slot-scope="scope">-->
  383. <!-- <el-input-->
  384. <!-- v-model="scope.row.fMblno"-->
  385. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  386. <!-- placeholder="提单号"-->
  387. <!-- show-word-limit-->
  388. <!-- />-->
  389. <!-- </template>-->
  390. <!-- </el-table-column>-->
  391. <!-- <el-table-column-->
  392. <!-- prop="fProductName"-->
  393. <!-- header-align="center"-->
  394. <!-- align="center"-->
  395. <!-- width="140px"-->
  396. <!-- label="品名"-->
  397. <!-- >-->
  398. <!-- <template slot-scope="scope">-->
  399. <!-- <el-input-->
  400. <!-- v-model="scope.row.fProductName"-->
  401. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  402. <!-- placeholder="品名"-->
  403. <!-- show-word-limit-->
  404. <!-- />-->
  405. <!-- </template>-->
  406. <!-- </el-table-column>-->
  407. <!-- <el-table-column-->
  408. <!-- prop="fMarks"-->
  409. <!-- header-align="center"-->
  410. <!-- align="center"-->
  411. <!-- width="130px"-->
  412. <!-- label="品牌"-->
  413. <!-- >-->
  414. <!-- <template slot-scope="scope">-->
  415. <!-- <el-input-->
  416. <!-- v-model="scope.row.fMarks"-->
  417. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  418. <!-- placeholder="品牌"-->
  419. <!-- show-word-limit-->
  420. <!-- />-->
  421. <!-- </template>-->
  422. <!-- </el-table-column>-->
  423. <!-- <el-table-column-->
  424. <!-- prop="fSrcTypeId"-->
  425. <!-- header-align="center"-->
  426. <!-- align="center"-->
  427. <!-- width="130px"-->
  428. <!-- label="来源"-->
  429. <!-- >-->
  430. <!-- <template slot-scope="scope">-->
  431. <!-- <span v-if="scope.row.fSrcTypeId === 0">录入</span>-->
  432. <!-- <span v-if="scope.row.fSrcTypeId == 1">协议</span>-->
  433. <!-- <span v-if="scope.row.fSrcTypeId == 10">变更</span>-->
  434. <!-- </template>-->
  435. <!-- </el-table-column>-->
  436. <!-- <el-table-column-->
  437. <!-- prop="remark"-->
  438. <!-- header-align="center"-->
  439. <!-- align="center"-->
  440. <!-- width="150px"-->
  441. <!-- label="备注"-->
  442. <!-- >-->
  443. <!-- <template slot-scope="scope">-->
  444. <!-- <el-input-->
  445. <!-- v-model="scope.row.remark"-->
  446. <!-- :disabled="browseStatus || scope.row.fBillstatus == 6"-->
  447. <!-- placeholder="备注"-->
  448. <!-- show-word-limit-->
  449. <!-- />-->
  450. <!-- </template>-->
  451. <!-- </el-table-column>-->
  452. <el-table-column header-align="center" align="center" width="200px" label="操作" fixed="right">
  453. <template slot-scope="scope">
  454. <!-- <el-button size="small">审核费用</el-button> -->
  455. <el-button @click.native.prevent="deleteRow(scope.$index, warehouseCrList)" size="small"
  456. :disabled="browseStatus || scope.row.fBillstatus == 6">移除</el-button>
  457. <el-button size="small" @click="listCheck(scope.row)" v-if="scope.row.fBillstatus < 6"
  458. :disabled="browseStatus">请核</el-button>
  459. <el-button size="small" @click="revokeListCheck(scope.row)" v-if="scope.row.fBillstatus == 6"
  460. :disabled="browseStatus">撤销请核</el-button>
  461. </template>
  462. </el-table-column>
  463. </el-table>
  464. <!-- 选择作业费协议数据 -->
  465. <el-dialog v-dialogDrag title="作业费协议" :close-on-click-modal="false" :modal="false"
  466. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important" :visible.sync="warehousingagreements" width="70%">
  467. <template slot="作业费协议">
  468. <div class="avue-crud__dialog__header">
  469. <span class="el-dialog__title">
  470. <span style="
  471. display: inline-block;
  472. width: 3px;
  473. height: 20px;
  474. margin-right: 5px;
  475. float: left;
  476. margin-top: 2px;
  477. "></span>
  478. </span>
  479. </div>
  480. </template>
  481. <el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal"
  482. @select="handleSelect">
  483. <el-menu-item index="1">车队作业费</el-menu-item>
  484. <el-menu-item index="2">劳务作业费</el-menu-item>
  485. </el-menu>
  486. <el-table :data="tasklegList" ref="table" tooltip-effect="dark" width="100%" border stripe
  487. @selection-change="whgenlegSelectionChange">
  488. <el-table-column type="selection" width="55"> </el-table-column>
  489. <el-table-column label="行号" type="index" width="80">
  490. </el-table-column>
  491. <el-table-column prop="fCorpname" header-align="center" align="center" label="客户名称" />
  492. <el-table-column prop="fName" header-align="center" align="center" label="费用名称" />
  493. <el-table-column prop="fFeeUnitid" header-align="center" align="center" width="180px" label="计价单位">
  494. <template slot-scope="scope">
  495. <el-select v-model="scope.row.fFeeUnitid" placeholder="请选择计价单位" @change="changeFeeUnit(scope.row)" disabled
  496. clearable>
  497. <el-option v-for="(dict, index) in fFeetUnitOptions" :key="index.dictValue" :label="dict.dictLabel"
  498. :value="dict.dictValue" />
  499. </el-select>
  500. </template>
  501. </el-table-column>
  502. <el-table-column prop="fPrice" header-align="center" align="center" label="单价" width="100px" />
  503. <el-table-column prop="remark" header-align="center" align="center" label="备注" />
  504. </el-table>
  505. <pagination v-show="whgenlegTotal > 0" :total="whgenlegTotal" :page.sync="pageNum" :limit.sync="pageSize"
  506. @pagination="getWhgenlegList" />
  507. <div slot="footer" class="dialog-footer">
  508. <el-button type="primary" @click="zhgenlegData" :disabled="browseStatus">导 入</el-button>
  509. <el-button @click="
  510. warehousingagreements = false;
  511. Navigation = false;
  512. ">取 消</el-button>
  513. </div>
  514. </el-dialog>
  515. <!-- 付款信息作业单-->
  516. <el-dialog :visible.sync="print_Cr" width="70%" :close-on-click-modal="false" :modal="false">
  517. <div id="print_Cr" class="print-div">
  518. <div class="print-title" style="
  519. display: flex;
  520. justify-content: center;
  521. font-size: 24px;
  522. margin-bottom: 5px;
  523. ">
  524. {{ company }}请款单
  525. </div>
  526. <div style="
  527. display: flex;
  528. justify-content: center;
  529. font-size: 18px;
  530. margin-bottom: 5px;
  531. "></div>
  532. <div style="
  533. display: flex;
  534. justify-content: space-between;
  535. margin-bottom: 5px;
  536. " class="print_form">
  537. <div style="display: flex; flex-direction: column;">
  538. <!-- <div>请款单号:</div>-->
  539. <div>源业务编码:{{ form.fBillno }}</div>
  540. <div>委托单位:{{ form.fCorpid | fMblnoFormat(fMblnoOptions) }}</div>
  541. </div>
  542. <div style="display: flex; flex-direction: column;margin-right: 15px;width: 150px">
  543. <div style="">请款日期:</div>
  544. </div>
  545. </div>
  546. <div class="print_table" style="display: flex">
  547. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; line-height: 30px">
  548. <tr>
  549. <td>结算单位</td>
  550. <td>提单号</td>
  551. <!-- <td>源业务编码</td>-->
  552. <td>业务日期</td>
  553. <td>数量</td>
  554. <td>单价</td>
  555. <td>费用</td>
  556. <td>人民币</td>
  557. <td>美元</td>
  558. </tr>
  559. <tr v-for="(item, index) in PrintingCrlist" :key="index">
  560. <td>{{ item.fCorpid | fMblnoFormat(fMblnoOptions) }}</td>
  561. <td>{{ form.fMblno }}</td>
  562. <!-- <td>{{ form.fBillno }}</td>-->
  563. <td>{{ form.fBsdate | fBsdateFormat }}</td>
  564. <td>{{ item.fQty }}</td>
  565. <td>{{ item.fUnitprice }}</td>
  566. <td>{{ item.fFeeid | fFeetFormat(fCNameOptions) }}</td>
  567. <td>{{ item.fAmount }}</td>
  568. <td></td>
  569. </tr>
  570. <tr>
  571. <td>合计</td>
  572. <td></td>
  573. <td></td>
  574. <td>{{ allCrfQty }}</td>
  575. <td></td>
  576. <td></td>
  577. <td>{{ allCrfAmount }}</td>
  578. <td></td>
  579. </tr>
  580. </table>
  581. </div>
  582. <div style="display: flex; justify-content: space-between; font-size: 12px">
  583. <div>领款人:</div>
  584. <div>业务经理:</div>
  585. <div>财务:</div>
  586. <div style="width: 150px">经理:</div>
  587. </div>
  588. </div>
  589. <span lot="footer" class="dialog-footer">
  590. <el-button type="primary" size="mini" @click="
  591. print_Cr = false;
  592. addprint('crzyd');
  593. ">打印
  594. </el-button>
  595. <el-button @click="print_Cr = false" size="mini">取消 </el-button>
  596. </span>
  597. </el-dialog>
  598. <!-- 费用确认单-->
  599. <el-dialog :visible.sync="print_fyqr" width="70%" :close-on-click-modal="false" :modal="false">
  600. <div id="print_fyqr" class="print-div">
  601. <div class="print-title" style="
  602. display: flex;
  603. justify-content: center;
  604. font-size: 28px;
  605. margin-bottom: 5px;
  606. ">
  607. <!-- {{ company }}-->
  608. </div>
  609. <div style="
  610. display: flex;
  611. justify-content: center;
  612. margin-bottom: 5px;
  613. ">
  614. <div style="font-size: 24px;letter-spacing: 3px;">请款单</div>
  615. </div>
  616. <div style="display: flex;justify-content: space-between;">
  617. <div>
  618. <div>业务编号:{{ form.fBillno }}</div>
  619. <div>客户名称:{{ form.fCorpidName }}</div>
  620. <div>提单号:{{ form.fMblno }}</div>
  621. <div>结算单位: {{ form.chargeUnit }}</div>
  622. </div>
  623. <div>
  624. <div>制单日期:{{ form.createTime | fBsdateFormat }}</div>
  625. <div>仓库名称:{{ form.fWarehouseid | warehouseFormat(warehouseOptions) }}</div>
  626. <div>箱型/箱量:{{ form.fCntval }}</div>
  627. </div>
  628. <div>
  629. <div>制单人:{{ form.createBy }}</div>
  630. <div>打印日期:{{ nowTime | fBsdateFormat }}</div>
  631. <div>品名:{{ form.fGoodsid | goodsFormat(goodsOptions) }}</div>
  632. </div>
  633. </div>
  634. <div class="print_table" style="display: flex">
  635. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; line-height: 30px">
  636. <tr>
  637. <td>序号</td>
  638. <td>费用项目</td>
  639. <td>计价单位</td>
  640. <td>数量</td>
  641. <td>单价</td>
  642. <td>是否含税</td>
  643. <td>税率</td>
  644. <td>不含税金额</td>
  645. <td>税额</td>
  646. <td>应付金额</td>
  647. <td>备注</td>
  648. </tr>
  649. <tr v-for="(item, index) in PrintingCrlist" :key="index">
  650. <td>{{ index + 1 }}</td>
  651. <td>{{ item.fFeeid | fFeetFormat(fCNameOptions) }}</td>
  652. <td>{{ item.fFeeUnitid | fFeetUnitFormat(fFeetUnitOptions) }}</td>
  653. <td>{{ item.fQty }}</td>
  654. <td>{{ item.fUnitprice }}</td>
  655. <td>{{ item.fTaxrate != 0 ? '√' : '×' }}</td>
  656. <td>{{ item.fTaxrate }}</td>
  657. <td>{{ item.taxAmount }}</td>
  658. <td>{{ item.exclTax }}</td>
  659. <td>{{ item.fAmount }}</td>
  660. <td>{{ item.remark }}</td>
  661. </tr>
  662. <tr>
  663. <td colspan="7">合计</td>
  664. <td>{{ allTaxAmount }}</td>
  665. <td>{{ allExclTax }}</td>
  666. <td>{{ allDrAmount }}</td>
  667. <td></td>
  668. </tr>
  669. </table>
  670. </div>
  671. </div>
  672. <span slot="footer" class="dialog-footer">
  673. <el-button type="primary" @click="
  674. addprint('fyqrd');
  675. print_fyqr = false;
  676. ">打印
  677. </el-button>
  678. <el-button @click="print_fyqr = false">取消 </el-button>
  679. </span>
  680. </el-dialog>
  681. </div>
  682. </template>
  683. <script>
  684. import { operationAgreement } from "@/api/agreement/agreement";
  685. import { feesCheck, revokefeeCheck } from "@/api/warehouseBusiness/warehouseInStock";
  686. import Cookies from "js-cookie";
  687. import { addSet, resetModule, select } from '@/api/system/set';
  688. import draggable from "vuedraggable";
  689. import print from "print-js";
  690. import {
  691. listWarehouse,
  692. treeselect,
  693. listWarehousesss,
  694. deliveryDetails
  695. } from "@/api/basicdata/warehouse";
  696. import { getFees } from "@/api/basicdata/fees";
  697. export default {
  698. name: 'payMoney',
  699. props: {
  700. browseStatus: {
  701. type: Boolean,
  702. default: false,
  703. },
  704. warehouseCrList: {
  705. type: Array,
  706. default: [],
  707. },
  708. businessTypeOption: {
  709. type: Array,
  710. default: [],
  711. },
  712. fMblnoOptions: {
  713. type: Array,
  714. default: [],
  715. },
  716. fCNameOptions: {
  717. type: Array,
  718. default: [],
  719. },
  720. fFeetUnitOptions: {
  721. type: Array,
  722. default: [],
  723. },
  724. fStltypeOptions: {
  725. type: Array,
  726. default: [],
  727. },
  728. fGrossweight: {
  729. type: Number,
  730. default: null,
  731. },
  732. fQty: {
  733. type: Number,
  734. default: null,
  735. },
  736. fNetweight: {
  737. type: Number,
  738. default: null,
  739. },
  740. fCntqty: {
  741. type: Number,
  742. default: null,
  743. },
  744. form: {
  745. type: Object,
  746. default: null,
  747. },
  748. goodsOptions: {
  749. type: Array,
  750. default: [],
  751. },
  752. CntrTable: {
  753. type: Array,
  754. default: [],
  755. },
  756. cntrList: {
  757. type: Array,
  758. default: [],
  759. },
  760. tableName: {
  761. type: String,
  762. default: '入库付费',
  763. },
  764. },
  765. components: {
  766. draggable
  767. },
  768. data() {
  769. return {
  770. warehousingagreements: false,
  771. dialogWhgenlegList: [],
  772. whgenlegTotal: 0,
  773. Navigation: false,
  774. tasklegList: [],
  775. // dialogWhgenlegList: [],
  776. pageNum: 1,
  777. pageSize: 10,
  778. warehouseOptions: [],
  779. // 收款信息明细
  780. PrintingCrlist: [],
  781. allCrfAmount: 0,
  782. allCrfQty: 0,
  783. // Cr打印弹窗是否开启
  784. print_Cr: false,
  785. company: '',
  786. nowTime: '',
  787. // 税额总数
  788. allTaxAmount: 0,
  789. // 不含税金额总数
  790. allExclTax: 0,
  791. // 收款金额合计
  792. allDrAmount: 0,
  793. print_fyqr: false,
  794. // 识别号
  795. Identifier: '',
  796. // 地址
  797. address: '',
  798. // 电话
  799. phone: '',
  800. // 开户行
  801. bank: '',
  802. // 银行账户
  803. bankAccount: '',
  804. // 是否启用请款单
  805. isShowInvoice: null,
  806. // 是否启用费用确认单
  807. isShowFeesConfirm: null,
  808. activeIndex: '1',
  809. // 设置列开关
  810. showSetting: false,
  811. setRowList: [],
  812. getRowList: [],
  813. //自定义列宽
  814. allCheck: false,
  815. drag: false,
  816. tableDate: [
  817. {
  818. surface: "1",
  819. label: "fCorpid",
  820. name: "客户名称",
  821. checked: 0,
  822. width: 300,
  823. },
  824. {
  825. surface: "2",
  826. label: "fFeeid",
  827. name: "费用名称",
  828. checked: 0,
  829. width: 240,
  830. },
  831. {
  832. surface: "3",
  833. label: "fFeeUnitid",
  834. name: "计价单位",
  835. checked: 0,
  836. width: 130,
  837. },
  838. {
  839. surface: "4",
  840. label: "fQty",
  841. name: "数量",
  842. checked: 0,
  843. width: 80,
  844. },
  845. {
  846. surface: "5",
  847. label: "fUnitprice",
  848. name: "单价",
  849. checked: 0,
  850. width: 80,
  851. },
  852. {
  853. surface: "6",
  854. label: "fAmount",
  855. name: "金额",
  856. checked: 0,
  857. width: 130,
  858. },
  859. {
  860. surface: "7",
  861. label: "fStltypeid",
  862. name: "结算方式",
  863. checked: 0,
  864. width: 100,
  865. },
  866. {
  867. surface: "8",
  868. label: "fCurrency",
  869. name: "币别",
  870. checked: 0,
  871. width: 100,
  872. },
  873. {
  874. surface: "9",
  875. label: "fExrate",
  876. name: "汇率",
  877. checked: 0,
  878. width: 80,
  879. },
  880. {
  881. surface: "10",
  882. label: "fTaxrate",
  883. name: "税率",
  884. checked: 0,
  885. width: 80,
  886. },
  887. {
  888. surface: "11",
  889. label: "fBusinessType",
  890. name: "作业类型",
  891. checked: 0,
  892. width: 180,
  893. },
  894. {
  895. surface: "12",
  896. label: "fMblno",
  897. name: "提单号",
  898. checked: 0,
  899. width: 150,
  900. },
  901. {
  902. surface: "13",
  903. label: "fProductName",
  904. name: "品名",
  905. checked: 0,
  906. width: 140,
  907. },
  908. {
  909. surface: "14",
  910. label: "fMarks",
  911. name: "品牌",
  912. checked: 0,
  913. width: 130,
  914. },
  915. {
  916. surface: "15",
  917. label: "fSrcTypeId",
  918. name: "来源",
  919. checked: 0,
  920. width: 130,
  921. },
  922. {
  923. surface: "16",
  924. label: "fAccamount",
  925. name: "对账金额",
  926. checked: 0,
  927. width: 130,
  928. },
  929. {
  930. surface: "17",
  931. label: "fStlamount",
  932. name: "结算金额",
  933. checked: 0,
  934. width: 130,
  935. },
  936. {
  937. surface: "18",
  938. label: "fBsdate",
  939. name: "账单日期",
  940. checked: 0,
  941. width: 130,
  942. },
  943. {
  944. surface: "19",
  945. label: "fStlamountDate",
  946. name: "结算日期",
  947. checked: 0,
  948. width: 130,
  949. },
  950. {
  951. surface: "20",
  952. label: "remark",
  953. name: "备注",
  954. checked: 0,
  955. width: 150,
  956. },
  957. ],
  958. handleKey: 0,
  959. };
  960. },
  961. created() {
  962. this.setRowList = this.tableDate;
  963. this.getRowList = this.tableDate;
  964. this.company = Cookies.get("companyName")
  965. this.getConfigKey("taxpayer.identification.number").then((response) => {
  966. this.Identifier = response.msg;
  967. });
  968. this.getConfigKey("print.address").then((response) => {
  969. this.address = response.msg;
  970. });
  971. this.getConfigKey("print.phone").then((response) => {
  972. this.phone = response.msg;
  973. });
  974. this.getConfigKey("print.bank").then((response) => {
  975. this.bank = response.msg;
  976. });
  977. this.getConfigKey("print.bank.account").then((response) => {
  978. this.bankAccount = response.msg;
  979. });
  980. this.getConfigKey("warehouse.show.invoice").then((response) => {
  981. this.isShowInvoice = response.msg;
  982. });
  983. this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
  984. this.isShowFeesConfirm = response.msg;
  985. });
  986. listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
  987. this.warehouseOptions = response.rows;
  988. });
  989. this.getRow();
  990. },
  991. filters: {
  992. fMblnoFormat(row, fMblnoOptions) {
  993. let name;
  994. fMblnoOptions.map((e) => {
  995. if (row == e.fId) {
  996. name = e.fName;
  997. }
  998. });
  999. return name;
  1000. },
  1001. fBsdateFormat(row) {
  1002. if (row) {
  1003. const dateMat = new Date(row);
  1004. const year = dateMat.getFullYear();
  1005. const month = dateMat.getMonth() + 1;
  1006. const day = dateMat.getDate();
  1007. const timeFormat = year + "-" + month + "-" + day;
  1008. return timeFormat;
  1009. }
  1010. },
  1011. fFeetFormat(row, fCNameOptions) {
  1012. let name;
  1013. fCNameOptions.map((e) => {
  1014. if (row == e.fId) {
  1015. name = e.fName;
  1016. }
  1017. });
  1018. return name;
  1019. },
  1020. warehouseFormat(row, warehouseOptions) {
  1021. let warehouse;
  1022. warehouseOptions.map((e) => {
  1023. if (row == e.fId) {
  1024. warehouse = e.fName;
  1025. }
  1026. });
  1027. return warehouse;
  1028. },
  1029. goodsFormat(row, goodsOptions) {
  1030. let goods;
  1031. goodsOptions.map((e) => {
  1032. if (row == e.fId) {
  1033. goods = e.fName;
  1034. }
  1035. });
  1036. return goods;
  1037. },
  1038. fFeetUnitFormat(row, fFeetUnitOptions) {
  1039. let name;
  1040. fFeetUnitOptions.map((e) => {
  1041. if (row == e.dictValue) {
  1042. name = e.dictLabel;
  1043. }
  1044. });
  1045. return name;
  1046. },
  1047. },
  1048. methods: {
  1049. feeChange() {
  1050. this.$emit("feeChangeC", 'C');
  1051. },
  1052. saveForm() {
  1053. this.$emit("chiSave");
  1054. },
  1055. addpayment() {
  1056. this.$emit("chiAdd");
  1057. },
  1058. // 付款合计
  1059. warehouseDrSummaries(param) {
  1060. const { columns, data } = param;
  1061. const sums = [];
  1062. columns.forEach((column, index) => {
  1063. if (index === 0) {
  1064. sums[index] = "合计";
  1065. return;
  1066. }
  1067. const values = data.map((item) => Number(item[column.property]));
  1068. if (
  1069. column.property === "fAmount"
  1070. // column.property === "fUnitprice" ||
  1071. // column.property === "fAmount" ||
  1072. // column.property === "fQty"
  1073. ) {
  1074. sums[index] = values.reduce((prev, curr) => {
  1075. const value = Number(curr);
  1076. if (!isNaN(value)) {
  1077. return prev + curr;
  1078. } else {
  1079. return prev;
  1080. }
  1081. }, 0);
  1082. sums[index] = sums[index].toFixed(2);
  1083. }
  1084. });
  1085. return sums;
  1086. },
  1087. deleteRow(index, rows) {
  1088. rows.splice(index, 1);
  1089. },
  1090. // 变更计价单位
  1091. changeFeeUnit(row) {
  1092. if (!row.fFeeUnitid) {
  1093. return false;
  1094. }
  1095. if (row.fFeeUnitid === "2") {
  1096. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(3));
  1097. } else if (row.fFeeUnitid === "1") {
  1098. this.$set(row, "fQty", this.fQty.toFixed(2));
  1099. } else if (row.fFeeUnitid === "3") {
  1100. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(3));
  1101. } else if (row.fFeeUnitid === "7") {
  1102. this.$set(row, "fQty", this.fCntqty);
  1103. } else if (row.fFeeUnitid === "8") {
  1104. this.$set(row, "fQty", 1);
  1105. } else {
  1106. this.$set(row, "fQty", 0);
  1107. }
  1108. if (row.fUnitprice) {
  1109. this.$set(
  1110. row,
  1111. "fAmount",
  1112. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  1113. );
  1114. }
  1115. },
  1116. // 数量计算
  1117. changeContractAmt(row) {
  1118. let fQty = 0;
  1119. let fUnitprice = 0;
  1120. if (row.fUnitprice) {
  1121. fUnitprice = row.fUnitprice;
  1122. }
  1123. if (row.fQty) {
  1124. fQty = row.fQty;
  1125. }
  1126. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1127. },
  1128. handleSelect(key) {
  1129. if (!this.form.fCorpid) {
  1130. this.$message({
  1131. message: "请维护客户",
  1132. type: "warning",
  1133. });
  1134. } else if (this.form.fProductName == undefined) {
  1135. this.$message({
  1136. message: "请维护入库明细品名",
  1137. type: "warning",
  1138. });
  1139. } else {
  1140. this.pageNum = 1;
  1141. this.pageSize = 10;
  1142. this.dialogWhgenlegList = [];
  1143. this.whgenlegTotal = 0;
  1144. this.warehousingagreements = true;
  1145. this.handleKey = key
  1146. this.getWhgenlegList();
  1147. }
  1148. },
  1149. // 查询作业费信息
  1150. getWhgenlegList() {
  1151. let data = {};
  1152. if (this.handleKey == 1) {
  1153. this.Navigation = true;
  1154. data = {
  1155. pageNum: this.pageNum,
  1156. pageSize: this.pageSize,
  1157. fTaskType: 1,
  1158. fFleet: this.form.fFleet,
  1159. };
  1160. } else if (this.handleKey == 2) {
  1161. this.Navigation = true;
  1162. data = {
  1163. pageNum: this.pageNum,
  1164. pageSize: this.pageSize,
  1165. fTaskType: 2,
  1166. fLabour: this.form.fLabour,
  1167. };
  1168. }
  1169. operationAgreement(data).then((response) => {
  1170. response.rows.map((e) => {
  1171. if (e.fFeeUnitid) {
  1172. e.fFeeUnitid = e.fFeeUnitid.toString();
  1173. }
  1174. });
  1175. this.tasklegList = response.rows;
  1176. this.whgenlegTotal = response.total;
  1177. });
  1178. },
  1179. // 库存总账多选框
  1180. whgenlegSelectionChange(selection) {
  1181. this.dialogWhgenlegList = selection;
  1182. },
  1183. //导入收付款信息明细
  1184. zhgenlegData() {
  1185. if (this.dialogWhgenlegList.length === 0) {
  1186. this.$message({
  1187. message: "请选择需要导入的数据",
  1188. type: "warning",
  1189. });
  1190. } else {
  1191. this.dialogWhgenlegList.map((e) => {
  1192. let qty = 1;
  1193. if (e.fFeeUnitid == 1) {
  1194. qty = this.fQty;
  1195. } else if (e.fFeeUnitid == 2) {
  1196. qty = (this.fGrossweight / 1000).toFixed(2);
  1197. } else if (e.fFeeUnitid == 3) {
  1198. qty = (this.fNetweight / 1000).toFixed(2);
  1199. } else if (e.fFeeUnitid == 7) {
  1200. qty = this.fCntqty;
  1201. }
  1202. let fAmount = 0;
  1203. fAmount = e.fPrice * qty;
  1204. this.warehouseCrList.push({
  1205. fQty: qty,
  1206. fCorpid: e.fCorpid,
  1207. fFeeid: e.feeFId,
  1208. fFeeUnitid: e.fFeeUnitid,
  1209. fUnitprice: e.fPrice,
  1210. fCurrency: "RMB",
  1211. fExrate: 1,
  1212. fAmount: fAmount,
  1213. fTaxrate: '0',
  1214. fMblno: this.form.fMblno,
  1215. fProductName: this.form.fProductName,
  1216. fMarks: this.form.fMarks,
  1217. fBusinessType: this.form.fBusinessType,
  1218. fSrcTypeId: 1,
  1219. fStltypeid: '1',
  1220. });
  1221. });
  1222. this.Navigation = false;
  1223. this.warehousingagreements = false;
  1224. }
  1225. },
  1226. // 费用明细请核
  1227. listCheck(row) {
  1228. this.$confirm("是否发起费用明细请核?", "提示", {
  1229. confirmButtonText: "确认",
  1230. cancelButtonText: "取消",
  1231. type: "warning",
  1232. }).then(() => {
  1233. feesCheck(row.fId).then(res => {
  1234. this.$message.success('请核成功')
  1235. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1236. res.data.fStltypeid = res.data.fStltypeid.toString();
  1237. if (res.data.fDc == 'D') {
  1238. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1239. this.warehouseDrList.splice(index, 1, res.data)
  1240. } else {
  1241. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1242. this.warehouseCrList.splice(index, 1, res.data)
  1243. }
  1244. })
  1245. });
  1246. },
  1247. // 费用明细撤销请核
  1248. revokeListCheck(row) {
  1249. this.$confirm("是否撤销请核?", "提示", {
  1250. confirmButtonText: "确认",
  1251. cancelButtonText: "取消",
  1252. type: "warning",
  1253. }).then(() => {
  1254. revokefeeCheck(row.fId).then(res => {
  1255. this.$message.success('操作成功')
  1256. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1257. res.data.fStltypeid = res.data.fStltypeid.toString();
  1258. if (res.data.fDc == 'D') {
  1259. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1260. this.warehouseDrList.splice(index, 1, res.data)
  1261. } else {
  1262. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1263. this.warehouseCrList.splice(index, 1, res.data)
  1264. }
  1265. })
  1266. });
  1267. },
  1268. // 付款明细多选
  1269. SelectCr(selection) {
  1270. this.PrintingCrlist = selection;
  1271. },
  1272. // 付款信息打印准备
  1273. printCr() {
  1274. if (this.PrintingCrlist.length > 0) {
  1275. for (let item in this.PrintingCrlist) {
  1276. if (!this.PrintingCrlist[item].fId) {
  1277. return this.$message.error("请先保存!");
  1278. }
  1279. }
  1280. this.allCrfAmount = 0;
  1281. this.allCrfQty = 0;
  1282. this.PrintingCrlist.forEach(item => {
  1283. this.allCrfAmount = this.allCrfAmount + item.fAmount
  1284. this.allCrfQty += item.fQty
  1285. })
  1286. this.print_Cr = true;
  1287. } else {
  1288. this.$message.error("请选择需要打印的明细!");
  1289. }
  1290. },
  1291. // 打印
  1292. addprint(status) {
  1293. const style =
  1294. "@page { } " +
  1295. "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
  1296. switch (status) {
  1297. case "crzyd":
  1298. print({
  1299. printable: "print_Cr",
  1300. type: "html",
  1301. style: style, // 亦可使用引入的外部css;
  1302. scanStyles: false,
  1303. });
  1304. break;
  1305. case "fyqrd":
  1306. print({
  1307. printable: "print_fyqr",
  1308. type: "html",
  1309. style: style, // 亦可使用引入的外部css;
  1310. scanStyles: false,
  1311. });
  1312. break;
  1313. }
  1314. },
  1315. // 打印费用确认单准备
  1316. feesConfirm() {
  1317. if (this.PrintingCrlist.length > 0) {
  1318. for (let item in this.PrintingCrlist) {
  1319. if (!this.PrintingCrlist[item].fId) {
  1320. return this.$message.error("请先保存!");
  1321. }
  1322. }
  1323. if (this.CntrTable.length > 0) {
  1324. let arr = [];
  1325. this.CntrTable.map((e) => {
  1326. this.cntrList.map((item) => {
  1327. if (item.fId == e.fCntrid) {
  1328. arr.push(item.fName + "X" + e.fCntrcount);
  1329. }
  1330. });
  1331. });
  1332. arr = [...new Set(arr)];
  1333. this.form.fCntval = arr.join(",");
  1334. } else {
  1335. this.form.fCntval = null;
  1336. }
  1337. this.allTaxAmount = 0;
  1338. this.allExclTax = 0;
  1339. this.allDrAmount = 0;
  1340. this.PrintingCrlist.forEach(item => {
  1341. // 税额
  1342. this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
  1343. item.taxAmount = item.taxAmount.toSuperFixed(2)
  1344. // 不含税金额
  1345. this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
  1346. item.exclTax = item.exclTax.toSuperFixed(2)
  1347. this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
  1348. this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
  1349. this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
  1350. this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
  1351. this.allExclTax = this.allExclTax.toSuperFixed(2)
  1352. this.allDrAmount = this.allDrAmount.toSuperFixed(2)
  1353. })
  1354. this.nowTime = new Date().toLocaleDateString()
  1355. for (let corp in this.fMblnoOptions) {
  1356. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  1357. this.$set(
  1358. this.form,
  1359. "fCorpidName",
  1360. this.fMblnoOptions[corp].fName
  1361. );
  1362. }
  1363. if (this.PrintingCrlist[0].fCorpid === this.fMblnoOptions[corp].fId) {
  1364. this.$set(
  1365. this.form,
  1366. "chargeUnit",
  1367. this.fMblnoOptions[corp].fName
  1368. );
  1369. }
  1370. }
  1371. this.print_fyqr = true;
  1372. } else {
  1373. this.$message.error("请选择需要打印的明细!");
  1374. }
  1375. },
  1376. feeChoice(row) {
  1377. getFees(row.fFeeid).then(res => {
  1378. row.fFeeUnitid = (res.data.fFeeunitid).toString()
  1379. this.changeFeeUnit(row)
  1380. })
  1381. },
  1382. //列设置全选
  1383. allChecked() {
  1384. if (this.allCheck == true) {
  1385. this.setRowList.map((e) => {
  1386. return (e.checked = 0);
  1387. });
  1388. } else {
  1389. this.setRowList.map((e) => {
  1390. return (e.checked = 1);
  1391. });
  1392. }
  1393. },
  1394. //开始拖拽事件
  1395. onStart() {
  1396. this.drag = true;
  1397. },
  1398. //拖拽结束事件
  1399. onEnd() {
  1400. this.drag = false;
  1401. },
  1402. //重置列表
  1403. delRow() {
  1404. this.data = {
  1405. tableName: this.tableName,
  1406. userId: Cookies.get("userName"),
  1407. };
  1408. resetModule(this.data).then((res) => {
  1409. if (res.code == 200) {
  1410. this.showSetting = false;
  1411. this.setRowList = this.tableDate;
  1412. console.log(this.setRowList)
  1413. this.getRowList = this.tableDate;
  1414. }
  1415. });
  1416. },
  1417. //保存列设置
  1418. save() {
  1419. this.showSetting = false;
  1420. this.data = {
  1421. tableName: this.tableName,
  1422. userId: Cookies.get("userName"),
  1423. sysTableSetList: this.setRowList,
  1424. };
  1425. addSet(this.data).then((res) => {
  1426. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1427. });
  1428. },
  1429. //查询列数据
  1430. getRow() {
  1431. let that = this;
  1432. this.data = {
  1433. tableName: this.tableName,
  1434. userId: Cookies.get("userName"),
  1435. };
  1436. select(this.data).then((res) => {
  1437. if (res.data.length != 0) {
  1438. this.getRowList = res.data.filter((e) => e.checked == 0);
  1439. this.setRowList = res.data;
  1440. this.setRowList = this.setRowList.reduce((res, item) => {
  1441. res.push({
  1442. surface: item.surface,
  1443. label: item.label,
  1444. name: item.name,
  1445. checked: item.checked,
  1446. width: item.width,
  1447. fixed: item.fixed,
  1448. });
  1449. return res;
  1450. }, []);
  1451. }
  1452. });
  1453. },
  1454. },
  1455. watch: {
  1456. browseStatus(val) {
  1457. this.browseStatus = val;
  1458. },
  1459. warehouseCrList(val) {
  1460. this.warehouseCrList = val;
  1461. },
  1462. },
  1463. };
  1464. </script>
  1465. <style scoped lang="scss">
  1466. .print_table {
  1467. table {
  1468. border-right: 1px solid #000;
  1469. border-bottom: 1px solid #000;
  1470. font-size: 12px;
  1471. margin-bottom: 5px;
  1472. }
  1473. table td {
  1474. border-left: 1px solid #000;
  1475. border-top: 1px solid #000;
  1476. vertical-align: middle;
  1477. padding: 2px;
  1478. text-align: center;
  1479. }
  1480. }
  1481. .print_form {
  1482. font-size: 12px;
  1483. }
  1484. </style>