collectionContractRecord.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655
  1. <!--付款管理-->
  2. <template>
  3. <div>
  4. <div class="mask" v-show="isShowPrintType"></div>
  5. <div class="print-type" v-show="isShowPrintType">
  6. <div class="print-type-content">
  7. <div class="print-type-title">打印凭证</div>
  8. <div class="print-type-checkbox">
  9. <el-checkbox-group v-model="ruleForm.type">
  10. <el-checkbox label="打印身份证(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
  11. <el-checkbox label="打印银行卡(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
  12. <el-checkbox label="打印结算凭证" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
  13. <el-checkbox label="打印检斤单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
  14. <el-checkbox label="打印回执单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
  15. </el-checkbox-group>
  16. </div>
  17. </div>
  18. <div class="bottom-btn">
  19. <el-button @click="typePrintClick(printType)">确定</el-button>
  20. <el-button @click="typePrintCannelClick">取消</el-button>
  21. </div>
  22. </div>
  23. <div class="top-btn">
  24. <div class="left">
  25. <ws-button :type="searchType == '' ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
  26. <ws-button v-hasPermission="`acquisitionManagement.acquisitionPay.pay`" :type="searchType == 7 ? 'primary' : ''" @click="screen(7)">未付款</ws-button>
  27. <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">已付款</ws-button>
  28. <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">未收款</ws-button>
  29. <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">已收款</ws-button>
  30. <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">待审核</ws-button>
  31. <ws-button :type="searchType == 2 ? 'primary' : ''" @click="screen(2)"
  32. v-hasPermission="`acquisitionManagement.acquisitionPay.add`">待结算</ws-button>
  33. <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开自采发票</ws-button>
  34. <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开销售发票</ws-button>
  35. </div>
  36. <div class="right">
  37. <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="请选择仓库" @change="warehouseChange"
  38. filterable clearable style="margin: 0 10px">
  39. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
  40. </el-option>
  41. </el-select>
  42. <el-date-picker class="date-select" size="small" style="margin: 0 10px 0 0" value-format="yyyy-MM-dd" v-model="value2" @change="datechange"
  43. type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="结算时间起"
  44. end-placeholder="结算时间止">
  45. </el-date-picker>
  46. <div class="serch">
  47. <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号查找"
  48. clearable maxlength="500" type="input">
  49. </ws-input>
  50. <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
  51. <ws-button class="find" type="primary" @click="find()">
  52. <img width="16" height="16" src="../../../public/img/sousuo.png" alt />
  53. </ws-button>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="top-btn-two">
  58. <div class="left">
  59. <ws-button type="primary" @click="reject">结算</ws-button>
  60. <ws-button type="primary" @click="reject">驳回</ws-button>
  61. <ws-button type="primary" @click="adopt">通过</ws-button>
  62. <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
  63. </ws-button>
  64. <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">收款
  65. </ws-button>
  66. <ws-button type="primary" @click="selectPrint(1)"
  67. v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
  68. </ws-button>
  69. <ws-button type="primary" @click="invoicingClick"
  70. v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开自采发票</ws-button>
  71. <ws-button type="primary" @click="invoicingClick"
  72. v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开销售发票</ws-button>
  73. <ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导出
  74. </ws-button>
  75. <ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导入
  76. </ws-button>
  77. <ws-button type="primary" @click="agreementPrint()"
  78. v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">模板下载
  79. </ws-button>
  80. </div>
  81. </div>
  82. <div class="content-top">
  83. <div class="content-top-item">合同编号:1234567</div>
  84. <div class="content-top-item">买方:xxx公司</div>
  85. <div class="content-top-item">货名:玉米</div>
  86. <div class="content-top-item">合同量:10000吨</div>
  87. <div class="content-top-item">已完成量:9000吨</div>
  88. <div class="content-top-item">代收费:10元/吨</div>
  89. </div>
  90. <el-table :data="paymentList" ref="table" style="width: 100%; margin-top: 20px" border height="calc(100% - 190px)"
  91. @row-click="handleRowClick" @selection-change="handleSelectionChange" :summary-method="getSummaries" show-summary>
  92. <el-table-column :selectable="selectInit" type="selection" width="30"></el-table-column>
  93. <el-table-column type="index" label="序号" width="50">
  94. <template scope="scope">
  95. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  96. <span v-else>{{ scope.$index + 1 }}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column class="table_td" prop="customerName" label="客户" sortable>
  100. <template slot-scope="scope">
  101. <div @click.stop="customer(scope.row)">
  102. <span class="text_css">{{ scope.row.customerName }}</span>
  103. </div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
  107. <el-table-column class="table_td" prop="goodsName" width="70" label="货名"></el-table-column>
  108. <el-table-column class="table_td" prop="goodsName" width="70" label="等级"></el-table-column>
  109. <el-table-column class="table_td" prop="netWeight" width="100" label="净重(吨)"></el-table-column>
  110. <el-table-column class="table_td" prop="netWeight" width="100" label="收购单价(元/吨)"></el-table-column>
  111. <el-table-column class="table_td" prop="amountIngPayable" width="80" label="应付(元)"></el-table-column>
  112. <el-table-column class="table_td" prop="amountEdPayable" width="80" label="已付(元)"></el-table-column>
  113. <el-table-column class="table_td" prop="status" width="80" label="自采发票">
  114. <template scope="scope">
  115. <span v-if="scope.row.invoicing == '0'">未开票</span>
  116. <span v-else>已开票</span>
  117. </template>
  118. </el-table-column>
  119. <el-table-column class="table_td" prop="netWeight" width="100" label="销售单价(元/吨)"></el-table-column>
  120. <el-table-column class="table_td" prop="amountIngPayable" width="80" label="应收(元)"></el-table-column>
  121. <el-table-column class="table_td" prop="amountEdPayable" width="80" label="已收(元)"></el-table-column>
  122. <el-table-column class="table_td" prop="status" width="80" label="销售发票">
  123. <template scope="scope">
  124. <span v-if="scope.row.invoicing == '0'">未开票</span>
  125. <span v-else>已开票</span>
  126. </template>
  127. </el-table-column>
  128. <el-table-column class="table_td" prop="updateDate" label="更新时间" width="150" sortable></el-table-column>
  129. <el-table-column class="table_td" prop="status" width="80" label="状态">
  130. <template scope="scope">
  131. <span v-if="scope.row.approveStatus">{{
  132. scope.row.approveStatus
  133. }}</span>
  134. <span v-else>{{ scope.row.status }}</span>
  135. </template>
  136. </el-table-column>
  137. <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="300">
  138. <template scope="scope">
  139. <el-button @click="rowLook(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
  140. </el-button>
  141. <el-button @click="rowEdit(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">编辑</el-button>
  142. <el-button type="danger" v-if="
  143. (!scope.row.approveStatus ||
  144. scope.row.approveStatus == '待结算') &&
  145. scope.row.status == '待结算'
  146. " @click="del(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.delete`">删除</el-button>
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. <!-- 付款弹窗 -->
  151. <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true" title="付款">
  152. <div class="tanchuang">
  153. <ws-form>
  154. <ws-info-table>
  155. <ws-form-item label="未付金额(元)" prop="amountNotPayable">
  156. {{ payments.amountNotPayable }}
  157. </ws-form-item>
  158. <ws-form-item label="本次付款金额(元)" prop="money">
  159. <ws-input type="number" @mousewheel.native.prevent v-model="payments.money" placeholder="请输入本次付款金额(元)"
  160. maxlength="100" size="small" />
  161. </ws-form-item>
  162. <ws-form-item label="付款日期" prop=" paymentDate">
  163. <el-date-picker v-model="payments.paymentDate" type="date" placeholder="选择日期"></el-date-picker>
  164. </ws-form-item>
  165. <ws-form-item label="上传截图" prop=" paymentScreenshot"></ws-form-item>
  166. <div class="upLoad">
  167. <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
  168. :on-success="handleAvatarSuccess">
  169. <img v-if="imageUrl" :src="imageUrl" class="avatar" />
  170. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  171. </el-upload>
  172. </div>
  173. </ws-info-table>
  174. <div style="text-align: center; margin-top: 20px">
  175. <el-button @click="paymentForm = false">取消</el-button>
  176. <el-button @click="paymentSubmit">提交</el-button>
  177. </div>
  178. </ws-form>
  179. </div>
  180. </el-dialog>
  181. <!-- 付款截图 -->
  182. <!-- <el-dialog width="50%" :visible.sync="showPayImgs" :append-to-body="true" title="付款截图">
  183. <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
  184. :on-success="handleAvatarSuccess1" :file-list='payImg' :limit='1'>
  185. <i slot="default" class="el-icon-plus"></i>
  186. <div slot="file" slot-scope="{file}">
  187. <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
  188. <span class="el-upload-list__item-actions">
  189. <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
  190. <i class="el-icon-zoom-in"></i>
  191. </span>
  192. <span v-if="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
  193. <i class="el-icon-delete"></i>
  194. </span>
  195. </span>
  196. </div>
  197. </el-upload>
  198. <div style="text-align: center; margin: 10px auto">
  199. <el-button @click="showPayImgs = false" type="primary">关闭</el-button>
  200. </div>
  201. </el-dialog> -->
  202. <div style="text-align: center">
  203. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  204. :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
  205. :total="deptBudgetTotal"></el-pagination>
  206. <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint"
  207. :title="printData.compName + '结算凭证'">
  208. <paymentPrint :printData="printData" :customerInfo="customerList" :showType="ruleForm.type"></paymentPrint>
  209. <div style="text-align: center">
  210. <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
  211. <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
  212. <el-button type="primary" @click="printBig">打印单据</el-button>
  213. </div>
  214. </el-dialog>
  215. </div>
  216. <el-dialog :visible.sync="dialogVisible">
  217. <img width="100%" :src="dialogImageUrl" alt="">
  218. </el-dialog>
  219. <!--客户信息-->
  220. <el-dialog width="20%" title="客户信息" :visible.sync="customerInfo" :append-to-body="true" :close="customerclose">
  221. <el-form class="customer" label-position="right" label-width="120px">
  222. <el-form-item class="customer-item" label="客户" >
  223. <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="客户姓名" @change="warehouseChange"
  224. filterable clearable style="margin: 0 10px">
  225. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
  226. </el-option>
  227. </el-select>
  228. </el-form-item>
  229. <el-form-item class="customer-item" label="身份证号" >
  230. <el-input v-model="customerlist.customerNumberCard" placeholder="请输入身份证号" maxlength="100"
  231. size="small" />
  232. </el-form-item>
  233. <el-form-item class="customer-item" label="车牌号" >
  234. <el-input v-model="customerlist.customerNumberCard" placeholder="请输入车牌号" maxlength="100"
  235. size="small" />
  236. </el-form-item>
  237. <el-form-item class="customer-item" label="净重(吨)">
  238. <el-input v-model="customerlist.customerNumberCard" placeholder="请输入净重" maxlength="100"
  239. size="small" />
  240. </el-form-item>
  241. <el-form-item class="customer-item" label="等级">
  242. <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="等级" @change="warehouseChange"
  243. filterable clearable style="margin: 0 10px">
  244. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
  245. </el-option>
  246. </el-select>
  247. </el-form-item>
  248. <el-form-item class="customer-item" label="收购单价(元)">
  249. <el-input v-model="customerlist.customerNumberCard" placeholder="收购单价" maxlength="100"
  250. size="small" />
  251. </el-form-item>
  252. <el-form-item class="customer-item" label="入库日期">
  253. </el-date-picker>
  254. <el-date-picker
  255. v-model="value2"
  256. type="datetime"
  257. placeholder="选择日期时间">
  258. </el-date-picker>
  259. </el-form-item>
  260. <el-form-item class="customer-item" label="销售单价(元)">
  261. <el-input v-model="customerlist.customerNumberCard" placeholder="销售单价" maxlength="100"
  262. size="small" />
  263. </el-form-item>
  264. </el-form>
  265. <div slot="footer" class="dialog-footer">
  266. <el-button @click="customerclose">取 消</el-button>
  267. </div>
  268. </el-dialog>
  269. <!-- <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
  270. <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>
  271. <el-image class="my-img" ref="myImg" v-if="paymentReceipt" :src="paymentReceipt"
  272. :preview-src-list="[paymentReceipt]">
  273. </el-image>
  274. </el-dialog>
  275. -->
  276. </div>
  277. </template>
  278. <script>
  279. import {
  280. dayjs,
  281. EventBus
  282. } from 'base-core-lib'
  283. import {
  284. downloadFile
  285. } from '@/utils/batchDown'
  286. import JSZip from 'jszip'
  287. import FileSaver from 'file-saver'
  288. import {
  289. getpayment,
  290. selectWarehouseSelf,
  291. delpayment,
  292. auditpayment,
  293. getpaymentexamine,
  294. getCustomerLook,
  295. paymentCommit,
  296. getJurisdiction,
  297. invoicing,
  298. export1,
  299. settlementEdit,
  300. workflowcontent
  301. } from '@/model/houseSelfCollect/index'
  302. import {
  303. posthandle,
  304. postqueryhandle
  305. } from '@/model/purchasingManagement/index'
  306. import paymentPrint from './component/paymentPrint.vue'
  307. import {
  308. getHp
  309. } from '@/utils/getHasPermission'
  310. import download from '../../components/WsDownload/download'
  311. export default {
  312. components: {
  313. paymentPrint,
  314. },
  315. watch: {},
  316. data() {
  317. return {
  318. viewLock:false,
  319. paymentReceipt: '',
  320. isPreviewPayOrder: false,
  321. printType: 0,
  322. isShowPrintType1: true,
  323. isShowPrintType2: true,
  324. isShowPrintType3: true,
  325. isShowPrintType4: true,
  326. customerInfo: false,
  327. form: {},
  328. formLabelWidth: '300px',
  329. invoicing: '',
  330. deleteshow: false,
  331. customerlist: {
  332. payeeAddressUrls: [],
  333. },
  334. ruleForm: {
  335. type: [
  336. '打印身份证(正反面)',
  337. '打印银行卡(正反面)',
  338. '打印结算凭证',
  339. '打印检斤单',
  340. '打印回执单'
  341. // '打印发票'
  342. ],
  343. },
  344. row: {},
  345. isShowPrintType: false,
  346. customerList: {
  347. customerName: '',
  348. customerNumberCard: '',
  349. bankCard: '',
  350. bankDeposit: '',
  351. },
  352. selectCustomerList: [],
  353. selectPrintList: [],
  354. identity: [],
  355. //分页
  356. currentPage: 1,
  357. pageSize: 10,
  358. paymentList: [],
  359. deptCircularPage: {},
  360. deptBudgetTotal: 0,
  361. paymentForm: false,
  362. searchType: '',
  363. searchTypeText: '',
  364. searchKeyWord: '',
  365. warehouseList: [],
  366. warehouseNameKey: '',
  367. warehouseName: '',
  368. isShowPrint: false,
  369. printData: {},
  370. warehouse: [],
  371. disabled: false,
  372. dialogImageUrl: '',
  373. dialogVisible: false,
  374. value1: '', //付款日期
  375. modification: [],
  376. userJurisdiction: true,
  377. payments: {
  378. amountNotPayable: 0,
  379. paymentDate: '',
  380. },
  381. showPayImgs: false,
  382. isShowAdopt: false,
  383. //上传截图路径
  384. imageUrl: '',
  385. payImg: [],
  386. rowData: {},
  387. value2: [],
  388. date: {
  389. year: dayjs().format('YYYY'),
  390. month: dayjs().format('MM'),
  391. },
  392. }
  393. },
  394. activated() {
  395. this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
  396. this.getPassYearFormatDate()
  397. this.getWarehouse()
  398. // this.getList()
  399. },
  400. updated() {
  401. this.$nextTick(() => {
  402. this.$refs['table'].doLayout()
  403. })
  404. },
  405. methods: {
  406. rowLook(row){
  407. this.customerInfo = true
  408. this.viewLock = true
  409. },
  410. rowEdit(row){
  411. this.customerInfo = true
  412. },
  413. imgshow() {
  414. this.deleteshow = false
  415. console.log(11111)
  416. },
  417. handlePictureCardPreview(file) {
  418. this.dialogImageUrl = file.url;
  419. this.dialogVisible = true;
  420. },
  421. previewPayOrder(val) {
  422. this.paymentReceipt = val.paymentScreenshot
  423. this.isPreviewPayOrder = true
  424. console.log(val.paymentScreenshot)
  425. },
  426. paymentReceiptClose() {},
  427. datechange() {
  428. this.getList()
  429. },
  430. getPassYearFormatDate() {
  431. var nowDate = new Date()
  432. nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
  433. var seperator1 = '-'
  434. var year = nowDate.getFullYear()
  435. var month = nowDate.getMonth() + 1
  436. var strDate = nowDate.getDate()
  437. if (month >= 1 && month <= 9) {
  438. month = '0' + month
  439. }
  440. if (strDate >= 0 && strDate <= 9) {
  441. strDate = '0' + strDate
  442. }
  443. var formatDate = year + seperator1 + month + seperator1 + strDate
  444. this.getNowFormatDate(formatDate)
  445. },
  446. /* 获取现在时间,并接受过去时间的值 */
  447. getNowFormatDate(formatDate) {
  448. var date = new Date()
  449. date.setTime(date.getTime() + 24 * 60 * 60 * 1000)
  450. var seperator1 = '-'
  451. var year = date.getFullYear()
  452. var month = date.getMonth() + 1
  453. var strDate = date.getDate()
  454. if (month >= 1 && month <= 9) {
  455. month = '0' + month
  456. }
  457. if (strDate >= 0 && strDate <= 9) {
  458. strDate = '0' + strDate
  459. }
  460. var nowData = year + seperator1 + month + seperator1 + strDate
  461. this.value2 = [formatDate, nowData] // 默认赋值一年时间
  462. },
  463. selectPrint() {
  464. console.log('批量打印数据', this.modification)
  465. this.printType = 1
  466. this.isShowPrintType = true
  467. },
  468. agreementPrint() {
  469. var arr = []
  470. for (let i = 0; i < this.modification.length; i++) {
  471. if (this.modification[i].pictureAddress) {
  472. arr.push({
  473. fileUrl: this.modification[i].pictureAddress,
  474. renameFileName: '结算单' + i + '.png',
  475. })
  476. }
  477. }
  478. if (arr.length > 0) {
  479. this.filesToRar(arr, '结算单文件')
  480. }
  481. },
  482. async exportlist() {
  483. console.log('导出数据', this.modification)
  484. let _data = {
  485. paymentManagementList: this.modification,
  486. }
  487. const {
  488. data
  489. } = await export1(
  490. _data, {}, {
  491. responseType: 'blob',
  492. }
  493. ).toPromise()
  494. downloadFile({
  495. res: data,
  496. fileName: `${
  497. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  498. }结算凭证`,
  499. type: 'xls',
  500. })
  501. },
  502. filesToRar(arrImages, filename) {
  503. let _this = this
  504. let zip = new JSZip()
  505. let cache = {}
  506. let promises = []
  507. _this.title = '正在加载压缩文件'
  508. for (let item of arrImages) {
  509. const promise = _this.getImgArrayBuffer(item.fileUrl).then((data) => {
  510. // 下载文件, 并存成ArrayBuffer对象(blob)
  511. zip.file(item.renameFileName, data, {
  512. binary: true
  513. }) // 逐个添加文件
  514. cache[item.renameFileName] = data
  515. })
  516. promises.push(promise)
  517. }
  518. Promise.all(promises)
  519. .then(() => {
  520. zip.generateAsync({
  521. type: 'blob'
  522. }).then((content) => {
  523. _this.title = '正在压缩'
  524. // 生成二进制流
  525. FileSaver.saveAs(content, filename) // 利用file-saver保存文件 自定义文件名
  526. _this.title = '压缩完成'
  527. })
  528. })
  529. .catch((res) => {
  530. _this.$message.error('文件压缩失败')
  531. })
  532. },
  533. //获取文件blob
  534. getImgArrayBuffer(url) {
  535. let _this = this
  536. return new Promise((resolve, reject) => {
  537. //通过请求获取文件blob格式
  538. let xmlhttp = new XMLHttpRequest()
  539. xmlhttp.open('GET', url, true)
  540. xmlhttp.responseType = 'blob'
  541. xmlhttp.onload = function() {
  542. if (this.status == 200) {
  543. resolve(this.response)
  544. } else {
  545. reject(this.status)
  546. }
  547. }
  548. xmlhttp.send()
  549. })
  550. },
  551. invoicingClick() {
  552. // let data = JSON.stringify({
  553. // paymentManagementList : this.modification
  554. // })
  555. // //开票
  556. // invoicing(data)
  557. // .toPromise()
  558. // .then(response => {
  559. // console.log(response)
  560. // })
  561. let data = {
  562. paymentManagementList: this.modification,
  563. }
  564. for (let i = 0; i < this.modification.length; i++) {
  565. if (
  566. this.modification[i].status != '全部付款' &&
  567. this.modification[i].status != '部分付款' &&
  568. this.modification[i].status != '已通过'
  569. ) {
  570. this.$message.error('开票只能选择全部付款或部分付款或已通过!')
  571. return
  572. }
  573. }
  574. //开票
  575. invoicing(data)
  576. .toPromise()
  577. .then((response) => {
  578. if (response.length > 0) {
  579. var arr = []
  580. for (let i = 0; i < response.length; i++) {
  581. arr.push({
  582. fileUrl: response[i],
  583. renameFileName: '发票' + i + '.xml',
  584. })
  585. }
  586. this.filesToRar(arr, '开票XML文件')
  587. }
  588. })
  589. .catch(() => {})
  590. },
  591. customer(row) {
  592. getCustomerLook({
  593. id: row.identityId,
  594. authenticationStatusKey: 7,
  595. })
  596. .toPromise()
  597. .then((response) => {
  598. this.customerInfo = true
  599. this.customerlist = response
  600. this.customerlist.cardAddressUrl1 =
  601. this.customerlist.cardAddressUrl.split(',')[0]
  602. this.customerlist.cardAddressUrl2 =
  603. this.customerlist.cardAddressUrl.split(',')[1]
  604. this.customerlist.payeeAddressUrls =
  605. this.customerlist.payeeAddressUrl.split(',')
  606. })
  607. },
  608. customerclose(e) {
  609. // row.textcss = false
  610. this.customerInfo = false
  611. },
  612. //合计
  613. getSummaries(param) {
  614. console.log(param)
  615. const {
  616. columns,
  617. data
  618. } = param
  619. const sums = []
  620. var _number = []
  621. if (this.warehouseName == "鲅鱼圈金信库") {
  622. _number = [11, 12, 16, 17, 18]
  623. } else {
  624. _number = [10, 11, 15, 16, 17]
  625. }
  626. if (this.modification.length > 0) {
  627. columns.forEach((column, index) => {
  628. console.log(column, index)
  629. if (index === 0) {
  630. sums[index] = '合计'
  631. } else if (index === 10 || index === 11 || index === 15 || index === 16) {
  632. const values = this.modification.map((item) => Number(item[column.property]))
  633. if (!values.every((value) => isNaN(value))) {
  634. sums[index] = values.reduce((prev, curr) => {
  635. const value = Number(curr)
  636. if (!isNaN(value)) {
  637. return prev + curr
  638. } else {
  639. return prev
  640. }
  641. }, 0)
  642. sums[index] = sums[index].toFixed(3)
  643. } else {
  644. // sums[index] = '元'
  645. }
  646. } else {
  647. sums[index] = '--'
  648. }
  649. })
  650. } else {
  651. columns.forEach((column, index) => {
  652. if (index === 0) {
  653. sums[index] = '合计'
  654. } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
  655. 3] || index === _number[4]) {
  656. const values = data.map((item) => Number(item[column.property]))
  657. if (!values.every((value) => isNaN(value))) {
  658. sums[index] = values.reduce((prev, curr) => {
  659. const value = Number(curr)
  660. if (!isNaN(value)) {
  661. return prev + curr
  662. } else {
  663. return prev
  664. }
  665. }, 0)
  666. sums[index] = sums[index].toFixed(3)
  667. } else {
  668. // sums[index] = '元'
  669. }
  670. } else {
  671. sums[index] = '--'
  672. }
  673. })
  674. }
  675. // sums[6]=sums[6].toFixed(2)
  676. // sums[sums.length-2]=sums[sums.length-2].toFixed(2)
  677. return sums
  678. },
  679. selectType(val) {
  680. for (let i = 0; i < this.ruleForm.type.length; i++) {
  681. switch (this.ruleForm.type[i]) {
  682. case '打印身份证(正反面)':
  683. this.isShowPrintType1 = !this.isShowPrintType1
  684. break
  685. case '打印银行卡(正反面)':
  686. this.isShowPrintType2 = !this.isShowPrintType2
  687. break
  688. case '打印结算凭证':
  689. this.isShowPrintType3 = !this.isShowPrintType3
  690. case '打印检斤单':
  691. this.isShowPrintType4 = !this.isShowPrintType4
  692. break
  693. }
  694. }
  695. },
  696. typePrintCannelClick() {
  697. this.isShowPrintType = false
  698. },
  699. typePrintClick(type) {
  700. // type 1批量打印 0单个打印
  701. //  this.isShowPrint = true
  702. this.selectCustomerList = []
  703. this.selectPrintList = []
  704. if (type == 1) {
  705. let index1 = 0
  706. let index2 = 0
  707. for (let i = 0; i < this.modification.length; i++) {
  708. getCustomerLook({
  709. id: this.modification[i].identityId,
  710. authenticationStatusKey: 7,
  711. })
  712. .toPromise()
  713. .then((response) => {
  714. this.selectCustomerList.push(response)
  715. index2++
  716. if (
  717. index1 == this.modification.length &&
  718. index2 == this.modification.length
  719. ) {
  720. this.printData.compName = ''
  721. // this.isShowPrint = true
  722. this.printBig()
  723. }
  724. getpaymentexamine({
  725. id: this.modification[i].id,
  726. })
  727. .toPromise()
  728. .then((response) => {
  729. if (response.compName == '黑龙江秋收有限公司') {
  730. response.compName = '黑龙江中天昊元贸易有限公司'
  731. }
  732. index1++
  733. let date = new Date()
  734. response.currentTime =
  735. date.getFullYear() +
  736. '年' +
  737. Number(date.getMonth() + 1) +
  738. '月' +
  739. date.getDate() +
  740. '日'
  741. this.selectPrintList.push(response)
  742. if (
  743. index1 == this.modification.length &&
  744. index2 == this.modification.length
  745. ) {
  746. this.printData.compName = ''
  747. // this.isShowPrint = true
  748. this.printBig()
  749. }
  750. })
  751. })
  752. }
  753. } else {
  754. let _url1 = process.env.VUE_APP_BASE_API + '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo'
  755. let _url2 = process.env.VUE_APP_BASE_API + '/paymentManagement/getInfo'
  756. this.$axios.all([
  757. this.$axios.get(_url1, {
  758. params: {
  759. id: this.rowData.identityId,
  760. authenticationStatusKey: 7,
  761. }
  762. }).then(res => res.data),
  763. this.$axios.get(_url2, {
  764. params: {
  765. id: this.rowData.id
  766. }
  767. }).then(res => res.data)
  768. ]).then(
  769. this.$axios.spread((val1, val2) => {
  770. // val 是数组中每个接口返回的值 res.data
  771. console.log('两个接口全部加载完成', val1, val2);
  772. this.printData = val2.data
  773. if (val2.data.compName == '黑龙江秋收有限公司') {
  774. this.printData.compName = '黑龙江中天昊元贸易有限公司'
  775. }
  776. this.isShowPrint = true
  777. // if(this.printData.solidGrainPrice){
  778. // this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
  779. // }
  780. let date = new Date()
  781. this.printData.currentTime =
  782. date.getFullYear() +
  783. '年' +
  784. Number(date.getMonth() + 1) +
  785. '月' +
  786. date.getDate() +
  787. '日'
  788. })
  789. ).catch(err => {
  790. console.log(err);
  791. })
  792. // getCustomerLook({
  793. // id: this.rowData.identityId,
  794. // authenticationStatusKey: 7,
  795. // })
  796. // .toPromise()
  797. // .then((response) => {
  798. // this.customerList = response
  799. // getpaymentexamine({
  800. // id: this.rowData.id,
  801. // })
  802. // .toPromise()
  803. // .then((response) => {
  804. // this.printData = response
  805. // this.isShowPrint = true
  806. // // if(this.printData.solidGrainPrice){
  807. // // this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
  808. // // }
  809. // let date = new Date()
  810. // this.printData.currentTime =
  811. // date.getFullYear() +
  812. // '年' +
  813. // Number(date.getMonth() + 1) +
  814. // '月' +
  815. // date.getDate() +
  816. // '日'
  817. // })
  818. // })
  819. }
  820. },
  821. handleRowClick(row) {
  822. // if (row.status != '已驳回') {
  823. // if (
  824. // row.taskId == null &&
  825. // row.status != '已通过' &&
  826. // row.status != '部分付款'
  827. // ) {
  828. // return false
  829. // } else {
  830. // this.$refs.paymentList.toggleRowSelection(row)
  831. // return true
  832. // }
  833. // } else {
  834. // this.$refs.paymentList.toggleRowSelection(row)
  835. // return true
  836. // }
  837. return true
  838. },
  839. handlepass() {
  840. var that = this
  841. if (this.modification.length == 0) {
  842. this.$message.warning('请选择要通过的条目')
  843. } else {
  844. this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
  845. cancelButtonText: '取消',
  846. confirmButtonText: '确定',
  847. type: 'warning',
  848. }).then(() => {
  849. that.audit(this.modification[0], 0, true, 2)
  850. })
  851. }
  852. },
  853. //查看付款截图
  854. showPayImg(row) {
  855. // if (!row.paymentScreenshot) {
  856. // this.$message({
  857. // message: '暂无付款截图!',
  858. // type: 'warning',
  859. // })
  860. // return
  861. // } else {
  862. this.showPayImgs = true
  863. this.id = row.id
  864. var arr = row.paymentScreenshot.split('$')
  865. console.log(arr)
  866. this.payImg = []
  867. for (let i = 0; i < arr.length; i++) {
  868. if (arr[i] != '') {
  869. this.payImg.push({
  870. url: arr[i]
  871. })
  872. }
  873. }
  874. // }
  875. },
  876. getWarehouse() {
  877. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  878. _wareHouse = JSON.parse(_wareHouse)
  879. selectWarehouseSelf({
  880. compId: localStorage.getItem('ws-pf_compId'),
  881. })
  882. .toPromise()
  883. .then((response) => {
  884. this.warehouseList = response
  885. if (this.$route.query.warehouseName) {
  886. //判断是否在任务页面进来
  887. this.warehouseName = this.$route.query.warehouseName
  888. this.warehouseNameKey = this.$route.query.warehouseName
  889. this.getList()
  890. } else {
  891. for (let index = 0; index < this.warehouseList.length; index++) {
  892. if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
  893. this.warehouseName = this.warehouseList[index].warehouseName
  894. this.warehouseNameKey = this.warehouseList[index].warehouseName
  895. break
  896. } else {
  897. this.warehouseNameKey = this.warehouseList[0].id
  898. if (this.warehouseName) {
  899. this.warehouseNameKey = this.WAREHOUSE[3].payname
  900. } else {
  901. this.WAREHOUSE[3].payname = this.warehouseList[0].id
  902. this.warehouseName = this.warehouseList[0].warehouseName
  903. }
  904. }
  905. }
  906. }
  907. this.getList()
  908. })
  909. },
  910. //上传付款截图
  911. handleAvatarSuccess(e) {
  912. this.imageUrl = e.url
  913. },
  914. handleAvatarSuccess1(file) {
  915. if (this.payImg[0]) {
  916. this.$set(this.payImg[0], 'url', file.url)
  917. } else {
  918. this.payImg[0] = {
  919. url: file.url
  920. }
  921. }
  922. settlementEdit({
  923. id: this.id,
  924. paymentScreenshot: this.payImg[0].url
  925. }).toPromise()
  926. .then((response) => {
  927. this.showPayImgs = false
  928. this.$message.success('修改成功')
  929. this.getList()
  930. })
  931. },
  932. _handleRemove() {
  933. this.payImg[0].url = ''
  934. settlementEdit({
  935. id: this.id,
  936. paymentScreenshot: this.payImg[0].url
  937. }).toPromise()
  938. .then((response) => {
  939. this.showPayImgs = false
  940. this.$message.success('修改成功')
  941. this.getList()
  942. })
  943. },
  944. printSmall() {
  945. window.open(
  946. '../../../../../static/payprint.html?type=1&dataList=' +
  947. JSON.stringify(this.printData)
  948. )
  949. },
  950. printBig() {
  951. let _list1 = []
  952. let _list2 = []
  953. if (this.printType == 1) {
  954. localStorage.setItem('cwprint', true)
  955. // 财务批量打印数据
  956. localStorage.setItem(
  957. 'selectPrint_selectPrintList',
  958. JSON.stringify(this.selectPrintList)
  959. )
  960. localStorage.setItem(
  961. 'selectPrint_selectCustomerList',
  962. JSON.stringify(this.selectCustomerList)
  963. )
  964. } else if (this.printType == 0) {
  965. localStorage.setItem('cwprint', true)
  966. _list1 = JSON.stringify(this.printData)
  967. _list2 = JSON.stringify(this.customerList)
  968. } else {
  969. _list1 = JSON.stringify(this.printData)
  970. _list2 = JSON.stringify(this.customerList)
  971. }
  972. window.open(
  973. '../../../../../static/payprint.html?type=2&dataList=' +
  974. _list1 +
  975. '&customerList=' +
  976. _list2 +
  977. '&printTypeList=' +
  978. this.ruleForm.type,
  979. '结算凭证'
  980. )
  981. },
  982. getList() {
  983. this.payments = {
  984. amountNotPayable: 0,
  985. paymentDate: '',
  986. }
  987. var searchParam = ''
  988. if (this.searchType != -1) {
  989. searchParam = this.searchType
  990. }
  991. var startDate = ''
  992. var endDate = ''
  993. if (this.value2) {
  994. startDate = this.value2[0] ? this.value2[0] : ''
  995. endDate = this.value2[1] ? this.value2[1] : ''
  996. }
  997. getpayment({
  998. currentPage: this.currentPage,
  999. pageSize: this.pageSize,
  1000. startDate: startDate,
  1001. endDate: endDate,
  1002. searchKeyWord: this.searchKeyWord,
  1003. searchType: searchParam,
  1004. warehouseName: this.warehouseName,
  1005. managementType: 1,
  1006. invoicing: this.invoicing,
  1007. compId: localStorage.getItem('ws-pf_compId'),
  1008. })
  1009. .toPromise()
  1010. .then((response) => {
  1011. this.paymentList = response.records
  1012. this.deptBudgetTotal = response.total
  1013. })
  1014. // getJurisdiction({
  1015. // managementType: 1,
  1016. // warehouseName: this.warehouseName,
  1017. // compId: localStorage.getItem('ws-pf_compId')
  1018. // })
  1019. // .toPromise()
  1020. // .then(response => {
  1021. // this.isShowAdopt = response
  1022. // })
  1023. },
  1024. del(row) {
  1025. this.$confirm(
  1026. '对应的质检和检斤记录将一并删除,是否确定删除操作?',
  1027. '提示', {
  1028. confirmButtonText: '确定',
  1029. cancelButtonText: '取消',
  1030. type: 'warning',
  1031. }
  1032. )
  1033. .then(() => {
  1034. delpayment({
  1035. id: row.id,
  1036. })
  1037. .toPromise()
  1038. .then((response) => {
  1039. this.$message.success('删除成功')
  1040. this.getList()
  1041. })
  1042. })
  1043. .catch(() => {
  1044. return false
  1045. })
  1046. },
  1047. screen(num) {
  1048. if (num == 0) {
  1049. this.searchType = -1
  1050. this.invoicing = num
  1051. } else {
  1052. this.invoicing = ''
  1053. this.searchType = num
  1054. }
  1055. this.currentPage = 1
  1056. this.getList()
  1057. },
  1058. find() {
  1059. this.getList()
  1060. },
  1061. settlement(index, row) {
  1062. if (row.goodsName) {
  1063. localStorage.setItem('paymentManagementReturn', false)
  1064. this.$router.push({
  1065. path: 'settlement',
  1066. query: {
  1067. type: index,
  1068. id: row.id,
  1069. },
  1070. })
  1071. }
  1072. },
  1073. payment() {
  1074. this.imageUrl = ''
  1075. if (this.modification.length == 0) {
  1076. this.$message.warning('请选择要付款的条目')
  1077. } else {
  1078. for (let i = 0; i < this.modification.length; i++) {
  1079. if (this.modification[i].status != '已驳回') {
  1080. if (
  1081. this.modification[i].approveStatus == '待决策人审核' || this.modification[i].approveStatus == '待财务审核' ||
  1082. this.modification[i].status == '全部付款'
  1083. ) {
  1084. this.$message.error(
  1085. '请选择状态为已通过且待结算或者部分付款的条目'
  1086. )
  1087. return false
  1088. } else {}
  1089. } else {
  1090. this.$message.error('状态为已驳回的条目不能付款')
  1091. return false
  1092. }
  1093. }
  1094. let sum = 0
  1095. let count = 0
  1096. for (let i = 0; i < this.modification.length; i++) {
  1097. sum += this.modification[i].amountIngPayable
  1098. count += this.modification[i].amountEdPayable
  1099. }
  1100. this.payments.amountNotPayable = (sum - count).toFixed(2)
  1101. this.paymentForm = true
  1102. }
  1103. },
  1104. paymentSubmit() {
  1105. if (!this.payments.money) {
  1106. this.$message({
  1107. message: '付款金额不能为空',
  1108. type: 'warning',
  1109. })
  1110. return
  1111. }
  1112. if (
  1113. Number(this.payments.money) > Number(this.payments.amountNotPayable)
  1114. ) {
  1115. this.$message({
  1116. message: '付款金额不能超过未付金额',
  1117. type: 'warning',
  1118. })
  1119. return
  1120. }
  1121. if (!this.payments.paymentDate) {
  1122. this.$message({
  1123. message: '付款日期不能为空',
  1124. type: 'warning',
  1125. })
  1126. return
  1127. }
  1128. if (!this.imageUrl) {
  1129. this.$message({
  1130. message: '请上传付款截图 ',
  1131. type: 'warning',
  1132. })
  1133. return
  1134. }
  1135. this.payments.paymentScreenshot = this.imageUrl
  1136. this.payments.cashier = localStorage.getItem('ws-pf_staffName')
  1137. this.payments.paymentManagementList = this.modification
  1138. this.$confirm('确定提交付款信息?', '提示', {
  1139. confirmButtonText: '确定',
  1140. cancelButtonText: '取消',
  1141. type: 'warning',
  1142. })
  1143. .then(() => {
  1144. //付款提交
  1145. paymentCommit(this.payments)
  1146. .toPromise()
  1147. .then((response) => {
  1148. this.$notify.success({
  1149. title: '成功',
  1150. message: '付款成功',
  1151. })
  1152. this.paymentForm = false
  1153. this.getList()
  1154. })
  1155. })
  1156. .catch(() => {
  1157. return false
  1158. })
  1159. },
  1160. reject() {
  1161. if (this.modification.length == 0) {
  1162. this.$message.warning('请选择要驳回的条目')
  1163. } else {
  1164. this.$confirm('是否确定驳回?', '提示', {
  1165. confirmButtonText: '确定',
  1166. cancelButtonText: '取消',
  1167. type: 'warning',
  1168. })
  1169. .then(() => {
  1170. this.audit(this.modification[0], 0, false, '', '')
  1171. })
  1172. .catch(() => {
  1173. return false
  1174. })
  1175. }
  1176. },
  1177. audit(item, index, status, status2, reason) {
  1178. if (index < this.modification.length) {
  1179. if (status == true && item.status == '已驳回') {
  1180. auditpayment({
  1181. compId: localStorage.getItem('ws-pf_compId'),
  1182. id: item.id,
  1183. })
  1184. .toPromise()
  1185. .then((response) => {
  1186. workflowcontent({
  1187. workflowId: item.workflowId,
  1188. businessKey: item.id,
  1189. type: '付款管理'
  1190. }).toPromise()
  1191. .then((response1) => {
  1192. console.log(response1)
  1193. // this.$message.success('审核成功')
  1194. // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
  1195. })
  1196. this.audit(
  1197. this.modification[index + 1],
  1198. index + 1,
  1199. status,
  1200. status2,
  1201. reason
  1202. )
  1203. })
  1204. } else {
  1205. posthandle({
  1206. taskId: item.taskId,
  1207. approved: status,
  1208. auditMind: reason != undefined ? '已驳回' : '34',
  1209. needReapply: status2 != undefined ? true : false,
  1210. })
  1211. .toPromise()
  1212. .then((response) => {
  1213. workflowcontent({
  1214. workflowId: item.workflowId,
  1215. businessKey: item.id,
  1216. type: '付款管理'
  1217. }).toPromise()
  1218. .then((response1) => {
  1219. console.log(response1)
  1220. // this.$message.success('审核成功')
  1221. // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
  1222. })
  1223. // postqueryhandle({workflowId:item.workflowId}).toPromise()
  1224. // .then((response) => {
  1225. this.audit(
  1226. this.modification[index + 1],
  1227. index + 1,
  1228. status,
  1229. status2,
  1230. reason
  1231. )
  1232. // })
  1233. })
  1234. .catch((req) => {
  1235. this.$message.warning(req.message)
  1236. })
  1237. }
  1238. } else {
  1239. if (status == true) {
  1240. this.$message.success('通过成功')
  1241. this.getList()
  1242. } else if (status == false) {
  1243. this.$message.success('驳回成功')
  1244. this.getList()
  1245. }
  1246. }
  1247. },
  1248. adopt() {
  1249. var that = this
  1250. if (this.modification.length == 0) {
  1251. this.$message.warning('请选择要通过的条目')
  1252. } else {
  1253. this.$confirm('是否确定通过?', '提示', {
  1254. confirmButtonText: '确定',
  1255. cancelButtonText: '取消',
  1256. type: 'warning',
  1257. })
  1258. .then(() => {
  1259. this.audit(this.modification[0], 0, true)
  1260. })
  1261. .catch(() => {
  1262. return false
  1263. })
  1264. }
  1265. },
  1266. print1(row) {
  1267. this.printType = 0
  1268. this.isShowPrintType = true
  1269. this.rowData = row
  1270. localStorage.setItem('cwprint', true)
  1271. },
  1272. print(row) {
  1273. this.printType = 2
  1274. localStorage.setItem('cwprint', false)
  1275. getpaymentexamine({
  1276. id: row.id,
  1277. })
  1278. .toPromise()
  1279. .then((response) => {
  1280. this.printData = response
  1281. if (response.compName == '黑龙江秋收有限公司') {
  1282. this.printData.compName = '黑龙江中天昊元贸易有限公司'
  1283. }
  1284. this.isShowPrint = true
  1285. // if(this.printData.solidGrainPrice){
  1286. // this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
  1287. // }
  1288. let date = new Date()
  1289. this.printData.currentTime =
  1290. date.getFullYear() +
  1291. '年' +
  1292. Number(date.getMonth() + 1) +
  1293. '月' +
  1294. date.getDate() +
  1295. '日'
  1296. })
  1297. },
  1298. examine() {
  1299. if (this.modification.length == 0) {
  1300. this.$message.warning('请选择要审核的条目')
  1301. } else {
  1302. this.$confirm('审核通过后,任务将发送给财务,是否确定通过?', '提示', {
  1303. confirmButtonText: '确定',
  1304. cancelButtonText: '取消',
  1305. type: 'warning',
  1306. })
  1307. .then(() => {})
  1308. .catch(() => {
  1309. return false
  1310. })
  1311. }
  1312. },
  1313. selectInit(row) {
  1314. //在这里一定要记得类型匹配的上。
  1315. // if (row.status != '已驳回') {
  1316. // if (
  1317. // row.taskId == null &&
  1318. // row.status != '已通过' &&
  1319. // row.status != '部分付款'
  1320. // ) {
  1321. // return false
  1322. // } else {
  1323. // return true
  1324. // }
  1325. // } else {
  1326. // return true
  1327. // }
  1328. return true
  1329. },
  1330. handleSelectionChange(val) {
  1331. this.modification = val
  1332. },
  1333. warehouseChange(e) {
  1334. for (let i = 0; i < this.warehouseList.length; i++) {
  1335. if (this.warehouseList[i].id == this.warehouseNameKey) {
  1336. this.warehouseName = this.warehouseList[i].warehouseName
  1337. localStorage.setItem('houseSelfCollect_house1',
  1338. JSON.stringify({
  1339. value: this.warehouseList[i].warehouseName,
  1340. warehouseId: this.warehouseList[i].id,
  1341. allowEdit: this.warehouseList[i].allowEdit,
  1342. monitorUrl1: this.warehouseList[i].monitorUrl1,
  1343. monitorUrl2: this.warehouseList[i].monitorUrl2,
  1344. warehouseNo: this.warehouseList[i].commonWarehouseNo,
  1345. compId: localStorage.getItem('ws-pf_compId')
  1346. })
  1347. )
  1348. this.WAREHOUSE[3].payname = this.warehouseList[i].id
  1349. }
  1350. }
  1351. this.getList()
  1352. },
  1353. handleSizeChange(val) {
  1354. console.log(`每页 ${val} 条`)
  1355. this.pageSize = val
  1356. this.getList()
  1357. },
  1358. handleCurrentChange(val) {
  1359. this.currentPage = val
  1360. console.log(`当前页: ${val}`)
  1361. this.getList()
  1362. },
  1363. },
  1364. }
  1365. </script>
  1366. <style lang="scss" scoped>
  1367. .ws-info-table {
  1368. border: none;
  1369. }
  1370. .ws-info-table .el-form-item {
  1371. width: 50%;
  1372. border: none;
  1373. }
  1374. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1375. width: 30%;
  1376. min-width: 125px;
  1377. text-align: center;
  1378. background: #ffffff;
  1379. color: #8890b1;
  1380. }
  1381. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1382. border: none;
  1383. }
  1384. /deep/.el-dialog__title {
  1385. font-size: 24px !important;
  1386. }
  1387. /deep/.el-dialog__header {
  1388. text-align: center !important;
  1389. padding: 10px 0 !important;
  1390. height: auto !important;
  1391. // border-bottom: none !important;
  1392. border-top-left-radius: 3px;
  1393. border-top-right-radius: 3px;
  1394. }
  1395. .title {
  1396. font-size: 16px;
  1397. font-weight: 600;
  1398. }
  1399. table,
  1400. table tr th,
  1401. table tr td {
  1402. border: 2px solid #333333;
  1403. padding: 5px 0;
  1404. }
  1405. table {
  1406. width: 100%;
  1407. min-height: 25px;
  1408. line-height: 25px;
  1409. text-align: center;
  1410. border-collapse: collapse;
  1411. border: 3px solid #333333;
  1412. }
  1413. .formItem {
  1414. width: 70% !important;
  1415. }
  1416. /deep/.el-table .el-table__header .cell,
  1417. /deep/.el-table .cell {
  1418. text-align: center;
  1419. line-height: 15px;
  1420. }
  1421. /deep/.el-table--enable-row-transition .el-table__body td {
  1422. text-align: center;
  1423. }
  1424. .title {
  1425. padding: 10px;
  1426. text-align: center;
  1427. }
  1428. .tanchuang {
  1429. margin: 0 auto;
  1430. }
  1431. .tanchuang .ws-info-table {
  1432. display: initial;
  1433. }
  1434. .tanchuang .ws-info-table .el-form-item {
  1435. margin: 0 auto;
  1436. text-align: center;
  1437. }
  1438. .upLoad {
  1439. width: 40%;
  1440. margin: 0 auto;
  1441. // border: 1px solid #8890b1;
  1442. // border-radius: 3px;
  1443. }
  1444. // .avatar{
  1445. // width: 150px;
  1446. // height: 150px;
  1447. // }
  1448. .avatar-uploader {
  1449. position: relative;
  1450. width: 178px;
  1451. }
  1452. .avatar-uploader .el-upload {
  1453. border: 1px dashed #d9d9d9;
  1454. border-radius: 6px;
  1455. cursor: pointer;
  1456. position: relative;
  1457. overflow: hidden;
  1458. width: 178px;
  1459. }
  1460. .avatar-uploader .el-upload:hover {
  1461. border-color: #409eff;
  1462. }
  1463. .avatar-uploader-icon {
  1464. font-size: 28px;
  1465. color: #8c939d;
  1466. width: 178px;
  1467. height: 178px;
  1468. line-height: 178px;
  1469. text-align: center;
  1470. border: 1px solid #8890b1;
  1471. border-radius: 5px;
  1472. }
  1473. .avatar {
  1474. width: 178px;
  1475. height: 178px;
  1476. border: 1px solid #8890b1;
  1477. border-radius: 5px;
  1478. display: block;
  1479. }
  1480. .pay_img {
  1481. width: 50%;
  1482. // display: flex;
  1483. display: inline-block;
  1484. .img {
  1485. height: 350px;
  1486. width: 100%;
  1487. }
  1488. }
  1489. .print-type {
  1490. position: absolute;
  1491. top: 0;
  1492. bottom: 0;
  1493. left: 0;
  1494. right: 0;
  1495. margin: auto;
  1496. width: 200px;
  1497. height: 250px;
  1498. background: white;
  1499. border-radius: 10px;
  1500. z-index: 999;
  1501. }
  1502. .label-width {
  1503. width: 100%;
  1504. }
  1505. .mask {
  1506. background: black;
  1507. width: 100vw;
  1508. height: 100vh;
  1509. position: fixed;
  1510. top: 0;
  1511. z-index: 99;
  1512. opacity: 0.3;
  1513. }
  1514. .print-type-title {
  1515. text-align: center;
  1516. font-size: 18px;
  1517. margin: 20px;
  1518. }
  1519. .bottom-btn {
  1520. margin: 20px 0;
  1521. text-align: center;
  1522. }
  1523. .print-type-checkbox {
  1524. padding-left: 20px;
  1525. }
  1526. .img_css {
  1527. width: 90%;
  1528. height: 220px;
  1529. }
  1530. .text_css {
  1531. color: #5878e8;
  1532. }
  1533. /deep/.base_header_layout {
  1534. height: 48px;
  1535. }
  1536. .warehouse_select {
  1537. width:150px;
  1538. }
  1539. // .el-button {
  1540. // margin: 5px;
  1541. // }
  1542. .no-messege {
  1543. text-align: center;
  1544. font-size: 30px;
  1545. padding: 50px;
  1546. }
  1547. .my-img {
  1548. width: 200px;
  1549. height: 200px;
  1550. }
  1551. .el-icon-delete {
  1552. font-size: 20px;
  1553. }
  1554. /deep/.base_header_layout .find.el-button--primary {
  1555. width: 30px;
  1556. margin: 0;
  1557. border-top-left-radius: 0px;
  1558. border-bottom-left-radius: 0px;
  1559. }
  1560. .findinput {
  1561. width: 230px;
  1562. }
  1563. /deep/.base_header_layout .findinput input {
  1564. border-top-right-radius: 0px;
  1565. border-bottom-right-radius: 0px;
  1566. }
  1567. .top-btn{
  1568. display:flex;
  1569. justify-content: space-between;
  1570. .right,.serch{
  1571. display: flex;
  1572. .find{
  1573. display: flex;
  1574. align-items: center;
  1575. justify-content: center;
  1576. }
  1577. }
  1578. .date-select{
  1579. width: 240px;
  1580. }
  1581. }
  1582. .top-btn-two{
  1583. margin-top: 20px;
  1584. }
  1585. .content-top{
  1586. display: flex;
  1587. margin-top: 20px;
  1588. }
  1589. .customer-item{
  1590. margin-bottom: 0;
  1591. display: flex;
  1592. }
  1593. .el-form-item__content{
  1594. width: 100%;
  1595. margin-left: 0!important;
  1596. }
  1597. .el-date-editor{
  1598. width: 220px!important;
  1599. }
  1600. </style>