payMoney.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
  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: "fStlamountDate",
  939. name: "结算日期",
  940. checked: 0,
  941. width: 130,
  942. },
  943. {
  944. surface: "19",
  945. label: "remark",
  946. name: "备注",
  947. checked: 0,
  948. width: 150,
  949. },
  950. ],
  951. handleKey:0,
  952. };
  953. },
  954. created() {
  955. this.setRowList = this.tableDate;
  956. this.getRowList = this.tableDate;
  957. this.company = Cookies.get("companyName")
  958. this.getConfigKey("taxpayer.identification.number").then((response) => {
  959. this.Identifier = response.msg;
  960. });
  961. this.getConfigKey("print.address").then((response) => {
  962. this.address = response.msg;
  963. });
  964. this.getConfigKey("print.phone").then((response) => {
  965. this.phone = response.msg;
  966. });
  967. this.getConfigKey("print.bank").then((response) => {
  968. this.bank = response.msg;
  969. });
  970. this.getConfigKey("print.bank.account").then((response) => {
  971. this.bankAccount = response.msg;
  972. });
  973. this.getConfigKey("warehouse.show.invoice").then((response) => {
  974. this.isShowInvoice = response.msg;
  975. });
  976. this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
  977. this.isShowFeesConfirm = response.msg;
  978. });
  979. listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
  980. this.warehouseOptions = response.rows;
  981. });
  982. this.getRow();
  983. },
  984. filters: {
  985. fMblnoFormat(row, fMblnoOptions) {
  986. let name;
  987. fMblnoOptions.map((e) => {
  988. if (row == e.fId) {
  989. name = e.fName;
  990. }
  991. });
  992. return name;
  993. },
  994. fBsdateFormat(row) {
  995. if (row) {
  996. const dateMat = new Date(row);
  997. const year = dateMat.getFullYear();
  998. const month = dateMat.getMonth() + 1;
  999. const day = dateMat.getDate();
  1000. const timeFormat = year + "-" + month + "-" + day;
  1001. return timeFormat;
  1002. }
  1003. },
  1004. fFeetFormat(row, fCNameOptions) {
  1005. let name;
  1006. fCNameOptions.map((e) => {
  1007. if (row == e.fId) {
  1008. name = e.fName;
  1009. }
  1010. });
  1011. return name;
  1012. },
  1013. warehouseFormat(row, warehouseOptions) {
  1014. let warehouse;
  1015. warehouseOptions.map((e) => {
  1016. if (row == e.fId) {
  1017. warehouse = e.fName;
  1018. }
  1019. });
  1020. return warehouse;
  1021. },
  1022. goodsFormat(row, goodsOptions) {
  1023. let goods;
  1024. goodsOptions.map((e) => {
  1025. if (row == e.fId) {
  1026. goods = e.fName;
  1027. }
  1028. });
  1029. return goods;
  1030. },
  1031. fFeetUnitFormat(row, fFeetUnitOptions) {
  1032. let name;
  1033. fFeetUnitOptions.map((e) => {
  1034. if (row == e.dictValue) {
  1035. name = e.dictLabel;
  1036. }
  1037. });
  1038. return name;
  1039. },
  1040. },
  1041. methods: {
  1042. feeChange() {
  1043. this.$emit("feeChangeC", 'C');
  1044. },
  1045. saveForm() {
  1046. this.$emit("chiSave");
  1047. },
  1048. addpayment() {
  1049. this.$emit("chiAdd");
  1050. },
  1051. // 付款合计
  1052. warehouseDrSummaries(param) {
  1053. const { columns, data } = param;
  1054. const sums = [];
  1055. columns.forEach((column, index) => {
  1056. if (index === 0) {
  1057. sums[index] = "合计";
  1058. return;
  1059. }
  1060. const values = data.map((item) => Number(item[column.property]));
  1061. if (
  1062. column.property === "fAmount"
  1063. // column.property === "fUnitprice" ||
  1064. // column.property === "fAmount" ||
  1065. // column.property === "fQty"
  1066. ) {
  1067. sums[index] = values.reduce((prev, curr) => {
  1068. const value = Number(curr);
  1069. if (!isNaN(value)) {
  1070. return prev + curr;
  1071. } else {
  1072. return prev;
  1073. }
  1074. }, 0);
  1075. sums[index] = sums[index].toFixed(2);
  1076. }
  1077. });
  1078. return sums;
  1079. },
  1080. deleteRow(index, rows) {
  1081. rows.splice(index, 1);
  1082. },
  1083. // 变更计价单位
  1084. changeFeeUnit(row) {
  1085. if (!row.fFeeUnitid) {
  1086. return false;
  1087. }
  1088. if (row.fFeeUnitid === "2") {
  1089. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(3));
  1090. } else if (row.fFeeUnitid === "1") {
  1091. this.$set(row, "fQty", this.fQty.toFixed(2));
  1092. } else if (row.fFeeUnitid === "3") {
  1093. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(3));
  1094. } else if (row.fFeeUnitid === "7") {
  1095. this.$set(row, "fQty", this.fCntqty);
  1096. } else if (row.fFeeUnitid === "8") {
  1097. this.$set(row, "fQty", 1);
  1098. } else {
  1099. this.$set(row, "fQty", 0);
  1100. }
  1101. if (row.fUnitprice) {
  1102. this.$set(
  1103. row,
  1104. "fAmount",
  1105. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  1106. );
  1107. }
  1108. },
  1109. // 数量计算
  1110. changeContractAmt(row) {
  1111. let fQty = 0;
  1112. let fUnitprice = 0;
  1113. if (row.fUnitprice) {
  1114. fUnitprice = row.fUnitprice;
  1115. }
  1116. if (row.fQty) {
  1117. fQty = row.fQty;
  1118. }
  1119. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1120. },
  1121. handleSelect(key) {
  1122. if (!this.form.fCorpid) {
  1123. this.$message({
  1124. message: "请维护客户",
  1125. type: "warning",
  1126. });
  1127. } else if (this.form.fProductName == undefined) {
  1128. this.$message({
  1129. message: "请维护入库明细品名",
  1130. type: "warning",
  1131. });
  1132. } else {
  1133. this.pageNum = 1;
  1134. this.pageSize = 10;
  1135. this.dialogWhgenlegList = [];
  1136. this.whgenlegTotal = 0;
  1137. this.warehousingagreements = true;
  1138. this.handleKey = key
  1139. this.getWhgenlegList();
  1140. }
  1141. },
  1142. // 查询作业费信息
  1143. getWhgenlegList() {
  1144. let data = {};
  1145. this.Navigation = true;
  1146. data = {
  1147. pageNum: this.pageNum,
  1148. pageSize: this.pageSize,
  1149. fTaskType:this.handleKey,
  1150. fFleet: this.form.fFleet,
  1151. };
  1152. operationAgreement(data).then((response) => {
  1153. response.rows.map((e) => {
  1154. if (e.fFeeUnitid) {
  1155. e.fFeeUnitid = e.fFeeUnitid.toString();
  1156. }
  1157. });
  1158. this.tasklegList = response.rows;
  1159. this.whgenlegTotal = response.total;
  1160. });
  1161. },
  1162. // 库存总账多选框
  1163. whgenlegSelectionChange(selection) {
  1164. this.dialogWhgenlegList = selection;
  1165. },
  1166. //导入收付款信息明细
  1167. zhgenlegData() {
  1168. if (this.dialogWhgenlegList.length === 0) {
  1169. this.$message({
  1170. message: "请选择需要导入的数据",
  1171. type: "warning",
  1172. });
  1173. } else {
  1174. this.dialogWhgenlegList.map((e) => {
  1175. let qty = 1;
  1176. if (e.fFeeUnitid == 1) {
  1177. qty = this.fQty;
  1178. } else if (e.fFeeUnitid == 2) {
  1179. qty = (this.fGrossweight / 1000).toFixed(2);
  1180. } else if (e.fFeeUnitid == 3) {
  1181. qty = (this.fNetweight / 1000).toFixed(2);
  1182. } else if (e.fFeeUnitid == 7) {
  1183. qty = this.fCntqty;
  1184. }
  1185. let fAmount = 0;
  1186. fAmount = e.fPrice * qty;
  1187. this.warehouseCrList.push({
  1188. fQty: qty,
  1189. fCorpid: e.fCorpid,
  1190. fFeeid: e.feeFId,
  1191. fFeeUnitid: e.fFeeUnitid,
  1192. fUnitprice: e.fPrice,
  1193. fCurrency: "RMB",
  1194. fExrate: 1,
  1195. fAmount: fAmount,
  1196. fTaxrate: '0',
  1197. fMblno: this.form.fMblno,
  1198. fProductName: this.form.fProductName,
  1199. fMarks: this.form.fMarks,
  1200. fBusinessType: this.form.fBusinessType,
  1201. fSrcTypeId: 1,
  1202. fStltypeid: '1',
  1203. });
  1204. });
  1205. this.Navigation = false;
  1206. this.warehousingagreements = false;
  1207. }
  1208. },
  1209. // 费用明细请核
  1210. listCheck(row) {
  1211. this.$confirm("是否发起费用明细请核?", "提示", {
  1212. confirmButtonText: "确认",
  1213. cancelButtonText: "取消",
  1214. type: "warning",
  1215. }).then(() => {
  1216. feesCheck(row.fId).then(res => {
  1217. this.$message.success('请核成功')
  1218. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1219. res.data.fStltypeid = res.data.fStltypeid.toString();
  1220. if (res.data.fDc == 'D') {
  1221. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1222. this.warehouseDrList.splice(index, 1, res.data)
  1223. } else {
  1224. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1225. this.warehouseCrList.splice(index, 1, res.data)
  1226. }
  1227. })
  1228. });
  1229. },
  1230. // 费用明细撤销请核
  1231. revokeListCheck(row) {
  1232. this.$confirm("是否撤销请核?", "提示", {
  1233. confirmButtonText: "确认",
  1234. cancelButtonText: "取消",
  1235. type: "warning",
  1236. }).then(() => {
  1237. revokefeeCheck(row.fId).then(res => {
  1238. this.$message.success('操作成功')
  1239. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1240. res.data.fStltypeid = res.data.fStltypeid.toString();
  1241. if (res.data.fDc == 'D') {
  1242. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1243. this.warehouseDrList.splice(index, 1, res.data)
  1244. } else {
  1245. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1246. this.warehouseCrList.splice(index, 1, res.data)
  1247. }
  1248. })
  1249. });
  1250. },
  1251. // 付款明细多选
  1252. SelectCr(selection) {
  1253. this.PrintingCrlist = selection;
  1254. },
  1255. // 付款信息打印准备
  1256. printCr() {
  1257. if (this.PrintingCrlist.length > 0) {
  1258. for (let item in this.PrintingCrlist) {
  1259. if (!this.PrintingCrlist[item].fId) {
  1260. return this.$message.error("请先保存!");
  1261. }
  1262. }
  1263. this.allCrfAmount = 0;
  1264. this.allCrfQty = 0;
  1265. this.PrintingCrlist.forEach(item => {
  1266. this.allCrfAmount = this.allCrfAmount + item.fAmount
  1267. this.allCrfQty += item.fQty
  1268. })
  1269. this.print_Cr = true;
  1270. } else {
  1271. this.$message.error("请选择需要打印的明细!");
  1272. }
  1273. },
  1274. // 打印
  1275. addprint(status) {
  1276. const style =
  1277. "@page { } " +
  1278. "@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;}";
  1279. switch (status) {
  1280. case "crzyd":
  1281. print({
  1282. printable: "print_Cr",
  1283. type: "html",
  1284. style: style, // 亦可使用引入的外部css;
  1285. scanStyles: false,
  1286. });
  1287. break;
  1288. case "fyqrd":
  1289. print({
  1290. printable: "print_fyqr",
  1291. type: "html",
  1292. style: style, // 亦可使用引入的外部css;
  1293. scanStyles: false,
  1294. });
  1295. break;
  1296. }
  1297. },
  1298. // 打印费用确认单准备
  1299. feesConfirm() {
  1300. if (this.PrintingCrlist.length > 0) {
  1301. for (let item in this.PrintingCrlist) {
  1302. if (!this.PrintingCrlist[item].fId) {
  1303. return this.$message.error("请先保存!");
  1304. }
  1305. }
  1306. if (this.CntrTable.length > 0) {
  1307. let arr = [];
  1308. this.CntrTable.map((e) => {
  1309. this.cntrList.map((item) => {
  1310. if (item.fId == e.fCntrid) {
  1311. arr.push(item.fName + "X" + e.fCntrcount);
  1312. }
  1313. });
  1314. });
  1315. arr = [...new Set(arr)];
  1316. this.form.fCntval = arr.join(",");
  1317. } else {
  1318. this.form.fCntval = null;
  1319. }
  1320. this.allTaxAmount = 0;
  1321. this.allExclTax = 0;
  1322. this.allDrAmount = 0;
  1323. this.PrintingCrlist.forEach(item => {
  1324. // 税额
  1325. this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
  1326. item.taxAmount = item.taxAmount.toSuperFixed(2)
  1327. // 不含税金额
  1328. this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
  1329. item.exclTax = item.exclTax.toSuperFixed(2)
  1330. this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
  1331. this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
  1332. this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
  1333. this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
  1334. this.allExclTax = this.allExclTax.toSuperFixed(2)
  1335. this.allDrAmount = this.allDrAmount.toSuperFixed(2)
  1336. })
  1337. this.nowTime = new Date().toLocaleDateString()
  1338. for (let corp in this.fMblnoOptions) {
  1339. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  1340. this.$set(
  1341. this.form,
  1342. "fCorpidName",
  1343. this.fMblnoOptions[corp].fName
  1344. );
  1345. }
  1346. if (this.PrintingCrlist[0].fCorpid === this.fMblnoOptions[corp].fId) {
  1347. this.$set(
  1348. this.form,
  1349. "chargeUnit",
  1350. this.fMblnoOptions[corp].fName
  1351. );
  1352. }
  1353. }
  1354. this.print_fyqr = true;
  1355. } else {
  1356. this.$message.error("请选择需要打印的明细!");
  1357. }
  1358. },
  1359. feeChoice(row) {
  1360. getFees(row.fFeeid).then(res => {
  1361. row.fFeeUnitid = (res.data.fFeeunitid).toString()
  1362. this.changeFeeUnit(row)
  1363. })
  1364. },
  1365. //列设置全选
  1366. allChecked() {
  1367. if (this.allCheck == true) {
  1368. this.setRowList.map((e) => {
  1369. return (e.checked = 0);
  1370. });
  1371. } else {
  1372. this.setRowList.map((e) => {
  1373. return (e.checked = 1);
  1374. });
  1375. }
  1376. },
  1377. //开始拖拽事件
  1378. onStart() {
  1379. this.drag = true;
  1380. },
  1381. //拖拽结束事件
  1382. onEnd() {
  1383. this.drag = false;
  1384. },
  1385. //重置列表
  1386. delRow() {
  1387. this.data = {
  1388. tableName: this.tableName,
  1389. userId: Cookies.get("userName"),
  1390. };
  1391. resetModule(this.data).then((res) => {
  1392. if (res.code == 200) {
  1393. this.showSetting = false;
  1394. this.setRowList = this.tableDate;
  1395. console.log(this.setRowList)
  1396. this.getRowList = this.tableDate;
  1397. }
  1398. });
  1399. },
  1400. //保存列设置
  1401. save() {
  1402. this.showSetting = false;
  1403. this.data = {
  1404. tableName: this.tableName,
  1405. userId: Cookies.get("userName"),
  1406. sysTableSetList: this.setRowList,
  1407. };
  1408. addSet(this.data).then((res) => {
  1409. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1410. });
  1411. },
  1412. //查询列数据
  1413. getRow() {
  1414. let that = this;
  1415. this.data = {
  1416. tableName: this.tableName,
  1417. userId: Cookies.get("userName"),
  1418. };
  1419. select(this.data).then((res) => {
  1420. if (res.data.length != 0) {
  1421. this.getRowList = res.data.filter((e) => e.checked == 0);
  1422. this.setRowList = res.data;
  1423. this.setRowList = this.setRowList.reduce((res, item) => {
  1424. res.push({
  1425. surface: item.surface,
  1426. label: item.label,
  1427. name: item.name,
  1428. checked: item.checked,
  1429. width: item.width,
  1430. fixed: item.fixed,
  1431. });
  1432. return res;
  1433. }, []);
  1434. }
  1435. });
  1436. },
  1437. },
  1438. watch: {
  1439. browseStatus(val) {
  1440. this.browseStatus = val;
  1441. },
  1442. warehouseCrList(val) {
  1443. this.warehouseCrList = val;
  1444. },
  1445. },
  1446. };
  1447. </script>
  1448. <style scoped lang="scss">
  1449. .print_table {
  1450. table {
  1451. border-right: 1px solid #000;
  1452. border-bottom: 1px solid #000;
  1453. font-size: 12px;
  1454. margin-bottom: 5px;
  1455. }
  1456. table td {
  1457. border-left: 1px solid #000;
  1458. border-top: 1px solid #000;
  1459. vertical-align: middle;
  1460. padding: 2px;
  1461. text-align: center;
  1462. }
  1463. }
  1464. .print_form {
  1465. font-size: 12px;
  1466. }
  1467. </style>