detailsPageEdit.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <div class="add-customer-btn">
  11. <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary" style="margin-right: 8px"
  12. :loading="saveLoading">编 辑</el-button>
  13. <el-dropdown style="margin-right: 8px;">
  14. <el-button type="warning" size="small" :loading="saveLoading">
  15. 账单处理<i class="el-icon-arrow-down el-icon--right"></i>
  16. </el-button>
  17. <el-dropdown-menu slot="dropdown">
  18. <!-- <el-dropdown-item :disabled="detailData.seeDisabled || !form.id" @click.native="applyPayment('申请')">
  19. 申请货款
  20. </el-dropdown-item> -->
  21. <!-- <el-dropdown-item-->
  22. <!-- @click.stop.native="applyPayment('收费')"-->
  23. <!-- :disabled="!this.form.id"-->
  24. <!-- >申请退款-->
  25. <!-- </el-dropdown-item>-->
  26. <el-dropdown-item @click.native="openApplicationDialog" :disabled="!form.id">查看账单
  27. </el-dropdown-item>
  28. </el-dropdown-menu>
  29. </el-dropdown>
  30. <el-button type="primary" size="small" :loading="saveLoading" :disabled="detailData.seeDisabled || !form.id"
  31. @click="postMessage">发送消息</el-button>
  32. <el-button size="small" class="el-button--small-yh" type="success" @click="copyOrder" :loading="saveLoading"
  33. :disabled="detailData.seeDisabled || !this.form.id">
  34. 复制单据
  35. </el-button>
  36. <el-button size="small" class="el-button--small-yh" type="primary" :disabled="disabled || detailData.seeDisabled"
  37. @click="editCustomer(false)" :loading="saveLoading">保 存
  38. </el-button>
  39. <div v-if="checkDisabled" style="float: right;margin-left: 8px">
  40. <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openCheckDialog">
  41. 审批
  42. </el-button>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="customer-main">
  47. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  48. <containerTitle title="基础资料"></containerTitle>
  49. <basic-container :showBtn="true">
  50. <el-row>
  51. <el-col v-for="(item, index) in basicData.column" :key="index" :span="item.span ? item.span : 8">
  52. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  53. <!-- <avue-input-tree v-if="item.prop === 'corpsTypeId'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"-->
  54. <!-- ></avue-input-tree>-->
  55. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  56. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"
  57. :disabled="detailData.seeDisabled" />
  58. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  59. size="small" type="date" placeholder="选择日期" :disabled="detailData.seeDisabled" />
  60. <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable
  61. filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
  62. <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue"
  63. :value="item.dictValue"></el-option>
  64. </el-select>
  65. <crop-select v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" corpType="GYS"
  66. @getCorpData="returnBack" :disabled="detailData.seeDisabled"></crop-select>
  67. <crop-select v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" corpType="GS"
  68. :disabled="detailData.seeDisabled" @getCorpData="getGSName"></crop-select>
  69. <el-select v-else-if="item.prop === 'banks'" v-model="form[item.prop]" placeholder="请选择" clearable
  70. filterable allow-create default-first-option size="small" style="width: 100%;" @change="banksChange"
  71. :disabled="detailData.seeDisabled">
  72. <el-option v-for="(item, index) in bankList" :key="index" :label="item.accountNo"
  73. :value="item.accountNo"></el-option>
  74. </el-select>
  75. <el-input v-else-if="item.type == 'number'" placeholder="请输入" v-input-limit="2" size="small"
  76. :disabled="item.disabled || detailData.seeDisabled" v-model.trim="form[item.prop]" />
  77. <el-select v-else-if="item.prop === 'packageRemarks'" v-model="form[item.prop]" placeholder="请选择"
  78. clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
  79. <el-option v-for="(item, index) in packageOptions" :key="index" :label="item.dictValue"
  80. :value="item.dictValue"></el-option>
  81. </el-select>
  82. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small"
  83. autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  84. <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off"
  85. :disabled="item.disabled || detailData.seeDisabled" placeholder="请输入"></el-input>
  86. </el-form-item>
  87. </el-col>
  88. </el-row>
  89. </basic-container>
  90. <containerTitle title="商品信息"></containerTitle>
  91. <basic-container>
  92. <avue-crud :option="customerContact" v-model="contactsForm" :data="contactsData" ref="crudContact"
  93. @row-save="rowSave" @row-click="handleRowClick" @row-update="rowUpdate" @row-del="rowDel"
  94. @selection-change="productSelection" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn"
  95. :key="crudIndex">
  96. <template slot="headerSerial" slot-scope="{column}">
  97. <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
  98. @click="$refs.crudContact.rowCellAdd()"></el-button>
  99. </template>
  100. <template slot="cname" slot-scope="{ row }">
  101. <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"
  102. :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)" />
  103. <span v-else>
  104. {{ row.cname }}
  105. <!-- <span v-for="item in goodsConfiguration.dicData" v-if="item.cname == row.cname">{{ item.cname }}</span>-->
  106. </span>
  107. </template>
  108. <template slot="orderQuantity" slot-scope="{ row }">
  109. <el-input v-if="row.$cellEdit" v-model.trim="row.orderQuantity"
  110. oninput='this.value=this.value.replace(/[^(\d)]/g,"")' size="small"
  111. @input="changeContractAmt(row)"></el-input>
  112. <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
  113. </template>
  114. <!-- <template slot="purchaseAmount" slot-scope="{ row }">
  115. <el-select
  116. v-if="row.$cellEdit"
  117. v-model="row.purchaseAmount"
  118. @change="changeContractAmt(row)"
  119. allow-create
  120. filterable
  121. v-input-limit="2"
  122. default-first-option
  123. >
  124. <el-option
  125. v-for="(item, index) in purchasePriceOption"
  126. :key="index"
  127. :label="item.purchasePrice"
  128. :value="item.purchasePrice"></el-option>
  129. </el-select>
  130. <span v-else>{{ row.purchaseAmount | decimalFormat }}</span>
  131. </template> -->
  132. <template slot="purchaseAmount" slot-scope="{ row }">
  133. <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" @change="changeContractAmt(row)"
  134. v-input-limit="4"></el-input>
  135. <span v-else>{{ row.purchaseAmount | decimalFormat }}</span>
  136. </template>
  137. <template slot="amount" slot-scope="{ row }">
  138. <span>{{ row.amount | decimalFormat }}</span>
  139. </template>
  140. <template slot="actualQuantity" slot-scope="{ row }">
  141. <span>{{ row.actualQuantity | IntegerFormat }}</span>
  142. </template>
  143. <template slot="storageQuantity" slot-scope="{ row }">
  144. <span>{{ row.storageQuantity | IntegerFormat }}</span>
  145. </template>
  146. <template slot="code" slot-scope="{row,index}">
  147. <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)"
  148. :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
  149. <span>{{ row.code }}</span>
  150. </template>
  151. <template slot-scope="{row,index}" slot="menu">
  152. <el-button type="text" size="small" @click="rowCell(row, index)" :disabled="detailData.seeDisabled">{{
  153. row.$cellEdit ? '保存' : '修改' }}
  154. </el-button>
  155. <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
  156. :disabled="detailData.seeDisabled" v-if="!row.$cellEdit">删 除</el-button>
  157. </template>
  158. <template slot="menuLeft" slot-scope="{size}">
  159. <el-button type="primary" icon="el-icon-plus" size="small" @click="commoditySelection"
  160. :disabled="detailData.seeDisabled">录入明细
  161. </el-button>
  162. <!-- <el-button type="warning" icon="el-icon-plus" size="small"
  163. :disabled="selection.length !== contactsData.length || detailData.seeDisabled || form.createFreight == 1 || contactsData.length == 0"
  164. @click="getShipmentC">生成工厂发货
  165. </el-button> -->
  166. <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()">报 表</el-button>
  167. </template>
  168. </avue-crud>
  169. </basic-container>
  170. <!-- 注释,怕再次需要-->
  171. <!-- <fee-info-->
  172. <!-- ref="feeInfo"-->
  173. <!-- :orderFeesList="advantageProjectData"-->
  174. <!-- :disabled="detailData.seeDisabled"-->
  175. <!-- feeUrl="/trade-purchase/purchase-order/removeByFees"-->
  176. <!-- optionType="GN"-->
  177. <!-- itemType="采购"-->
  178. <!-- @beforeFinance="beforeFinance"-->
  179. <!-- :corpId="form.corpId"-->
  180. <!-- :tabShow="3"-->
  181. <!-- />-->
  182. <containerTitle title="附件上传"></containerTitle>
  183. <c-upload :data="bankOfDepositData" deleteUrl="/api/trade-purchase/purchase-order/removeByFiles"
  184. :enumerationValue="77" display />
  185. </el-form>
  186. </div>
  187. <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
  188. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
  189. <el-row :style="{ height: rowHeight }">
  190. <el-col :span="5" style="height: 100%;overflow-y: auto">
  191. <div>
  192. <el-scrollbar>
  193. <basic-container>
  194. <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick" />
  195. </basic-container>
  196. </el-scrollbar>
  197. </div>
  198. </el-col>
  199. <el-col :span="19">
  200. <basic-container>
  201. <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
  202. @refresh-change="refreshChange" @selection-change="selectionChange" :page.sync="page"
  203. @search-change="goodsSearch" @on-load="onLoad">
  204. <template slot="menuLeft" slot-scope="{size}">
  205. <el-tabs v-model="activeName" @tab-click="tabHandle">
  206. <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
  207. <el-tab-pane label="已选定数据" name="importStaging"></el-tab-pane>
  208. </el-tabs>
  209. </template>
  210. <template slot-scope="scope" slot="menu">
  211. <el-button type="text" icon="el-icon-edit" size="small"
  212. @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
  213. :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
  214. </el-button>
  215. <el-button type="text" icon="el-icon-delete" size="small"
  216. @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
  217. </el-button>
  218. </template>
  219. </avue-crud>
  220. </basic-container>
  221. </el-col>
  222. </el-row>
  223. <span slot="footer" class="dialog-footer">
  224. <el-button @click="dialogVisible = false">取 消</el-button>
  225. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  226. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  227. :disabled="tableData.length !== 1">导入</el-button>
  228. </span>
  229. </el-dialog>
  230. <el-dialog title="导入费用" append-to-body class="el-dialogDeep" :visible.sync="dialogCost" width="80%"
  231. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeFees">
  232. <el-row :style="{ height: rowHeight }">
  233. <el-col :span="5" style="height: 100%;overflow-y: auto">
  234. <div>
  235. <el-scrollbar>
  236. <basic-container>
  237. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost" />
  238. </basic-container>
  239. </el-scrollbar>
  240. </div>
  241. </el-col>
  242. <el-col :span="19">
  243. <basic-container>
  244. <avue-crud :option="optionTwoCost" :table-loading="loadingCost" :data="dataCost" ref="crud"
  245. @refresh-change="refreshChangeCost" @selection-change="selectionChangeCost" :page.sync="pageCost"
  246. @searchChange="feesSearch" @on-load="onLoadCost">
  247. </avue-crud>
  248. </basic-container>
  249. </el-col>
  250. </el-row>
  251. <span slot="footer" class="dialog-footer">
  252. <el-button @click="dialogCost = false">取 消</el-button>
  253. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  254. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  255. :disabled="tableDataCost.length !== 1">导入</el-button>
  256. </span>
  257. </el-dialog>
  258. <el-dialog append-to-body title="账单" class="el-dialogDeep" :visible.sync="financialAccountDialog" width="70%"
  259. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  260. <financial-account v-if="financialAccountDialog" :srcBillId="form.id" :billType="billType" :billData="billData"
  261. :arrList="applyPaymentList" :checkData="financeData" tradeType="GN" @choceFun="choceFun" @submit="feeSubmit"
  262. :debitAmount="form.debitAmount">
  263. </financial-account>
  264. </el-dialog>
  265. <el-dialog title="申请记录" append-to-body class="el-dialogDeep" :visible.sync="applicationDialog" width="60%"
  266. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  267. <bill-application :billId="form.id" @choceApplication="choceApplication">
  268. </bill-application>
  269. </el-dialog>
  270. <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="国内贸易-发货通知单"
  271. @onClose="onClose()"></report-dialog>
  272. <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
  273. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  274. <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
  275. </check>
  276. </el-dialog>
  277. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  278. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  279. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
  280. </check-schedule>
  281. </el-dialog>
  282. <messagePost v-if="messageVisble" ref="messagePost" @closeDialog="closeDialog"></messagePost>
  283. </div>
  284. </template>
  285. <script>
  286. import {
  287. typeSave,
  288. detail,
  289. corpsattn,
  290. corpsbank,
  291. corpsitem,
  292. // getList,
  293. getDeptLazyTreeS,
  294. getSysNo,
  295. generateShipment
  296. } from "@/api/basicData/purchaseOrder"
  297. import { getList } from "@/api/basicData/commodityType";
  298. import customerContact from "./configuration/customerContact.json"
  299. import advantageProject from "./configuration/advantageProject.json"
  300. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  301. import commodity from "./configuration/commodity.json"
  302. import optionTwoCost from "./configuration/mainListCost.json"
  303. import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
  304. import { selectGoodsNum } from "@/api/basicData/inventoryAccount"
  305. import { contrastObj, contrastList } from "@/util/contrastData";
  306. //账单组件
  307. import ApplyPayment from "../../../components/finance/applyPayment";
  308. import billApplication from "@/components/bill/billApplication";
  309. import { getlistBankBy, pleaseCheck, } from "@/api/basicData/configuration"
  310. import feeInfo from "@/components/fee-info/main";
  311. import {
  312. isDiscount,
  313. isPercentage,
  314. micrometerFormat,
  315. IntegerFormat
  316. } from "@/util/validate";
  317. import financialAccount from "../../../components/finance/financialAccount";
  318. import reportDialog from "@/components/report-dialog/main";
  319. import check from "@/components/check/check";
  320. import checkSchedule from "@/components/check/checkSchedule";
  321. import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
  322. import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
  323. export default {
  324. name: "detailsPage",
  325. props: {
  326. detailData: {
  327. type: Object,
  328. default: {
  329. seeDisabled: false
  330. }
  331. }
  332. },
  333. components: {
  334. ApplyPayment,
  335. billApplication,
  336. feeInfo,
  337. financialAccount,
  338. reportDialog,
  339. check,
  340. checkSchedule,
  341. },
  342. data() {
  343. return {
  344. configuration: {
  345. multipleChoices: false,
  346. multiple: false,
  347. collapseTags: false,
  348. placeholder: '请点击右边按钮选择',
  349. dicData: []
  350. },
  351. goodsConfiguration: {
  352. multipleChoices: false,
  353. multiple: false,
  354. collapseTags: false,
  355. placeholder: '请点击右边按钮选择',
  356. dicData: []
  357. },
  358. form: {},
  359. data: [],
  360. loadingCost: false,
  361. choiceData: false,
  362. commodityData: false,
  363. financialAccountDialog: false,
  364. dataCost: [],
  365. choiceIndex: '',
  366. dialogCost: false,
  367. treeDeptId: '',
  368. treeDeptIdCost: '',
  369. pageCost: {
  370. pageSize: 10,
  371. currentPage: 1,
  372. total: 0
  373. },
  374. page: {
  375. pageSize: 10,
  376. currentPage: 1,
  377. total: 0
  378. },
  379. loading: false,
  380. contactsForm: {},
  381. optionTwo: commodity,
  382. optionTwoCost: optionTwoCost,
  383. treeDataGoods: [],
  384. treeData: [],
  385. treeOptionCost: {
  386. nodeKey: 'id',
  387. lazy: true,
  388. treeLoad: function (node, resolve) {
  389. const parentId = (node.level === 0) ? 0 : node.data.id;
  390. getDeptLazyTree(parentId).then(res => {
  391. resolve(res.data.data.map(item => {
  392. return {
  393. ...item,
  394. leaf: !item.hasChildren
  395. }
  396. }))
  397. });
  398. },
  399. addBtn: false,
  400. menu: false,
  401. size: 'small',
  402. props: {
  403. labelText: '标题',
  404. label: 'title',
  405. value: 'value',
  406. children: 'children'
  407. }
  408. },
  409. treeOption: {
  410. nodeKey: 'id',
  411. lazy: true,
  412. treeLoad: function (node, resolve) {
  413. const parentId = (node.level === 0) ? 0 : node.data.id;
  414. getDeptLazyTreeS(parentId).then(res => {
  415. resolve(res.data.data.map(item => {
  416. return {
  417. ...item,
  418. leaf: !item.hasChildren
  419. }
  420. }))
  421. });
  422. },
  423. addBtn: false,
  424. menu: false,
  425. size: 'small',
  426. props: {
  427. labelText: '标题',
  428. label: 'title',
  429. value: 'value',
  430. children: 'children'
  431. }
  432. },
  433. billType: "申请", //账单类型
  434. billData: {}, //账单需要数据
  435. financeData: {
  436. url: "/financialManagement/paymentRequest/index",
  437. pageStatus: "this.$store.getters.pqStatus",
  438. pageLabel: "付费申请",
  439. checkType: 'ffsq'
  440. }, // 账单请核需要的路由
  441. applyPaymentDialog: false,//生成账单组件
  442. applicationDialog: false,// 申请记录
  443. dialogVisible: false,
  444. advantageProjectForm: {},
  445. bankOfDepositForm: {},
  446. contactsData: [],
  447. advantageProjectData: [],
  448. saveLoading: false,
  449. disabled: false,
  450. bankOfDepositData: [],
  451. tableDataCost: [],
  452. dic: [],
  453. tableData: [],
  454. customerContact: {},
  455. advantageProject: {},
  456. bankOfDeposit: bankOfDeposit,
  457. basicData: {
  458. column: [
  459. {
  460. label: '供应商',
  461. prop: 'corpId',
  462. span: 16,
  463. rules: [
  464. {
  465. required: true,
  466. message: ' ',
  467. trigger: 'blur'
  468. }
  469. ]
  470. }, {
  471. label: '付款方式',
  472. prop: 'paymentType',
  473. rules: [
  474. {
  475. required: true,
  476. message: ' ',
  477. trigger: 'blur'
  478. }
  479. ]
  480. }, {
  481. label: '所属公司',
  482. prop: 'belongToCorpId',
  483. span: 16,
  484. rules: [
  485. {
  486. required: true,
  487. message: ' ',
  488. trigger: 'blur'
  489. }
  490. ]
  491. }, {
  492. label: '要求到货日期',
  493. prop: 'requiredArrivalDate',
  494. type: 'datetime',
  495. rules: [
  496. {
  497. required: true,
  498. message: ' ',
  499. trigger: 'blur'
  500. }
  501. ]
  502. }, {
  503. label: '银行账号',
  504. prop: 'banks',
  505. rules: [
  506. {
  507. required: true,
  508. message: ' ',
  509. trigger: 'blur'
  510. }
  511. ]
  512. }, {
  513. label: '公司户头',
  514. prop: 'banksAccountName',
  515. rules: [
  516. {
  517. required: false,
  518. message: ' ',
  519. trigger: 'blur'
  520. }
  521. ]
  522. }, {
  523. label: '包装要求',
  524. prop: 'packageRemarks',
  525. rules: [
  526. {
  527. required: false,
  528. message: ' ',
  529. trigger: 'blur'
  530. }
  531. ]
  532. },
  533. {
  534. label: '系统编号',
  535. prop: 'sysNo',
  536. disabled: true,
  537. rules: [
  538. {
  539. required: false,
  540. message: ' ',
  541. trigger: 'blur'
  542. }
  543. ]
  544. }, {
  545. label: '来源单号',
  546. prop: 'orgOrderNo',
  547. disabled: true,
  548. rules: [
  549. {
  550. required: false,
  551. message: ' ',
  552. trigger: 'blur'
  553. }
  554. ]
  555. },
  556. // {
  557. // label: '预估运费',
  558. // prop: 'predictOceanFreight',
  559. // type: 'number',
  560. // rules: [
  561. // {
  562. // required: false,
  563. // message: ' ',
  564. // trigger: 'blur'
  565. // }
  566. // ]
  567. // },
  568. {
  569. label: '应付金额',
  570. prop: 'debitAmount',
  571. type: 'number',
  572. disabled: true,
  573. rules: [
  574. {
  575. required: false,
  576. message: ' ',
  577. trigger: 'blur'
  578. }
  579. ]
  580. },
  581. {
  582. label: '已付金额',
  583. prop: 'settlmentAmount',
  584. type: 'number',
  585. disabled: true,
  586. rules: [
  587. {
  588. required: false,
  589. message: ' ',
  590. trigger: 'blur'
  591. }
  592. ]
  593. }, {
  594. label: '重量合计',
  595. prop: 'cartonWeight',
  596. disabled: true,
  597. rules: [
  598. {
  599. required: false,
  600. message: ' ',
  601. trigger: 'blur'
  602. }
  603. ]
  604. }, {
  605. label: '体积合计',
  606. prop: 'cntrVolumn',
  607. disabled: true,
  608. rules: [
  609. {
  610. required: false,
  611. message: ' ',
  612. trigger: 'blur'
  613. }
  614. ]
  615. }, {
  616. label: "备注",
  617. span: 24,
  618. prop: "orderRemark",
  619. type: 'textarea',
  620. mock: {
  621. type: 'county'
  622. }
  623. }
  624. ]
  625. },
  626. paymentOption: [],
  627. maxFeeNum: 0,
  628. maxGoodsNum: 0,
  629. selection: [],
  630. oldForm: {
  631. orderStatus: "录入"
  632. },
  633. oldGoodsList: [],
  634. oldFeesList: [],
  635. oldUploadList: [],
  636. // 弹窗高度
  637. rowHeight: '',
  638. // 查询时loading页面
  639. pageLoading: false,
  640. // 银行账号下拉
  641. bankList: [],
  642. activeName: 'searchList',
  643. // 商品列表数据合计
  644. goodsListShow: [],
  645. // 商品列表暂存
  646. goodsListSave: [],
  647. goodsListTotal: 0,
  648. goodsListSaveTotal: 0,
  649. pageList: {
  650. pageSize: 10,
  651. currentPage: 1,
  652. total: 0
  653. },
  654. itemType: '采购',
  655. packageOptions: [],
  656. switchDialog: false,
  657. // 请核状态禁用
  658. browse: false,
  659. checkDisabled: false,
  660. checkData: {},
  661. checkDialog: false,
  662. checkScheduleDialog: false,
  663. checkId: '',
  664. batchNo: '',
  665. feesOption: [],
  666. applyPaymentList: [],
  667. messageVisble: false,
  668. purchasePriceOption: [],
  669. crudIndex: 0,
  670. }
  671. },
  672. mounted() {
  673. this.$nextTick(() => {
  674. // 监听浏览器高度变化,改变表格高度
  675. window.onresize = () => {
  676. this.rowHeight = (window.innerHeight - 130) + 'px'
  677. }
  678. })
  679. },
  680. filters: {
  681. IntegerFormat(num) {
  682. return IntegerFormat(num);
  683. },
  684. decimalFormat(num) {
  685. return num ? Number(num).toFixed(2) : "0.00";
  686. },
  687. },
  688. //初始化查询
  689. async created() {
  690. this.rowHeight = (window.innerHeight - 130) + 'px'
  691. this.customerContact = customerContact
  692. // this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
  693. this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
  694. this.getWorkDicts("payment_term").then(res => {
  695. this.paymentOption = res.data.data
  696. })
  697. this.getWorkDicts("packageRemarks").then(res => {
  698. this.packageOptions = res.data.data;
  699. });
  700. feeList().then(res => {
  701. this.feesOption = res.data.data.records
  702. })
  703. this.getDefault()
  704. if (this.detailData.check) {
  705. this.checkDisabled = true
  706. this.batchNo = this.detailData.check.batchNo
  707. }
  708. if (this.detailData.id) {
  709. this.queryData(this.detailData.id)
  710. } else if (this.detailData.copyId) {
  711. this.queryData(this.detailData.copyId, true)
  712. } else {
  713. }
  714. this.customerContact.height = window.innerHeight - 240;
  715. this.crudIndex++;
  716. },
  717. updated() {
  718. this.$nextTick(() => {
  719. this.$refs.crudContact.doLayout();
  720. })
  721. },
  722. watch: {
  723. },
  724. methods: {
  725. // 明细查询
  726. queryData(id, isCopy = false) {
  727. this.pageLoading = true
  728. this.saveLoading = true
  729. detail(id).then(res => {
  730. this.form = res.data.data;
  731. this.browse = this.form.status > 0 ? true : false
  732. this.contactsData = this.form.orderItemsList ? this.form.orderItemsList : []
  733. this.advantageProjectData = this.form.orderFeesList ? this.form.orderFeesList : []
  734. this.bankOfDepositData = this.form.orderFilesList ? this.form.orderFilesList : []
  735. if (!this.form.orderItemsList) {
  736. this.contactsData = []
  737. } else {
  738. this.contactsData = this.form.orderItemsList
  739. }
  740. // if (!this.form.orderFeesList) {
  741. // this.advantageProjectData = []
  742. // } else {
  743. // this.advantageProjectData = this.form.orderFeesList
  744. // }
  745. // if (!this.form.orderFilesList) {
  746. // this.bankOfDepositData = []
  747. // } else {
  748. // this.bankOfDepositData = this.form.orderFilesList
  749. // }
  750. if (this.form.corpsName) {
  751. this.configuration.dicData = this.form.corpsName
  752. }
  753. let feesData = []
  754. this.advantageProjectData.forEach(item => {
  755. let a = {
  756. cname: item.corpName,
  757. id: item.corpId
  758. }
  759. feesData.push(a)
  760. })
  761. this.configuration.dicData = this.configuration.dicData.concat(feesData)
  762. // 去重
  763. this.removeRepeat()
  764. let goodsData = []
  765. this.form.orderItemsList = this.form.orderItemsList ? this.form.orderItemsList : []
  766. this.form.orderItemsList.forEach(item => {
  767. let a = {
  768. cname: item.cname,
  769. }
  770. goodsData.push(a)
  771. })
  772. this.goodsConfiguration.dicData = [].concat(goodsData)
  773. this.removeGoodsRepeat()
  774. delete this.form.orderItemsList
  775. delete this.form.orderFeesList
  776. delete this.form.orderFilesList
  777. // delete this.form.corpsName
  778. // 获取最大值
  779. let num = []
  780. this.advantageProjectData.forEach(item => {
  781. num.push(item.sort)
  782. })
  783. if (num.length == 0) {
  784. this.maxFeeNum = 0;
  785. } else {
  786. this.maxFeeNum = num.reduce((a, b) => {
  787. return b > a ? b : a;
  788. })
  789. }
  790. let goodsNum = []
  791. this.contactsData.forEach(item => {
  792. goodsNum.push(item.sort)
  793. })
  794. if (goodsNum.length == 0) {
  795. this.maxGoodsNum = 0;
  796. } else {
  797. this.maxGoodsNum = goodsNum.reduce((a, b) => {
  798. return b > a ? b : a;
  799. })
  800. }
  801. this.oldGoodsList = []
  802. this.oldFeesList = []
  803. this.oldUploadList = []
  804. this.oldForm = Object.assign({}, this.form)
  805. this.oldGoodsList = this.deepClone(this.contactsData)
  806. this.oldFeesList = this.deepClone(this.advantageProjectData)
  807. this.oldUploadList = this.deepClone(this.bankOfDepositData)
  808. if (isCopy) {
  809. delete this.form.sysNo;
  810. delete this.form.id
  811. this.form.status = 0
  812. this.browse = false
  813. this.contactsData.forEach(item => {
  814. delete item.id
  815. delete item.pid
  816. delete item.itemId
  817. })
  818. this.advantageProjectData.forEach(item => {
  819. delete item.id
  820. delete item.pid
  821. })
  822. this.bankOfDepositData.forEach(item => {
  823. delete item.id
  824. delete item.pid
  825. })
  826. }
  827. }).finally(() => {
  828. this.saveLoading = false
  829. this.pageLoading = false
  830. });
  831. },
  832. getDefault() {
  833. let date = new Date();
  834. let year = date.getFullYear();
  835. let month = date.getMonth() + 1;
  836. let day = date.getDate();
  837. if (month < 10) {
  838. month = "0" + month;
  839. }
  840. if (day < 10) {
  841. day = "0" + day;
  842. }
  843. let hours = String(date.getHours()).padStart(2, '0');
  844. let minutes = String(date.getMinutes()).padStart(2, '0');
  845. let seconds = String(date.getSeconds()).padStart(2, '0');
  846. let nowDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  847. this.$set(this.form, 'paymentType', '预付')
  848. this.$set(this.form, 'requiredArrivalDate', nowDate)
  849. this.$set(this.form, 'packageRemarks', '无包装')
  850. },
  851. copyOrder() {
  852. this.queryData(this.form.id, true)
  853. },
  854. getGoodsRow(event, row) {
  855. row.priceCategory = event.goodsTypeName
  856. row.code = event.code
  857. row.typeno = event.typeno
  858. row.itemType = event.typeno
  859. row.itemId = event.id
  860. },
  861. receiveGoodList(data) {
  862. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(data)
  863. this.removeGoodsRepeat()
  864. },
  865. getRow(event, row) {
  866. row.priceCategory = event[0].goodsTypeName
  867. row.code = event[0].code
  868. row.typeno = event[0].typeno
  869. row.itemType = event[0].typeno
  870. row.itemId = event[0].id
  871. },
  872. removeGoodsRepeat() {
  873. let obj = []
  874. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current, next) => {
  875. obj[next.cname] ? '' : obj[next.cname] = true && current.push(next)
  876. return current
  877. }, [])
  878. },
  879. getShipmentC() {
  880. for (let item in this.selection) {
  881. if (!this.selection[item].id) {
  882. return this.$message.error('选中数据有新数据,请先保存')
  883. }
  884. }
  885. if (this.$store.getters.domTakeStatus) {
  886. this.$alert("收货单存在,请保存发货单再进行操作", "温馨提示", {
  887. confirmButtonText: "确定",
  888. type: "warning",
  889. callback: action => {
  890. console.log(action);
  891. }
  892. });
  893. } else {
  894. this.generateShipmentC();
  895. }
  896. },
  897. //生成收货单
  898. generateShipmentC() {
  899. let lsit = []
  900. if (contrastObj(this.form, this.oldForm) ||
  901. contrastList(this.contactsData, this.oldGoodsList) ||
  902. contrastList(this.advantageProjectData, this.oldFeesList) ||
  903. contrastList(this.bankOfDepositData, this.oldUploadList)
  904. ) {
  905. this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
  906. confirmButtonText: "确定",
  907. cancelButtonText: "取消",
  908. type: "warning"
  909. }).then(async () => {
  910. await this.editCustomer(false, '收货')
  911. }).catch(() => {
  912. this.$message({
  913. type: 'info',
  914. message: '已取消'
  915. });
  916. })
  917. } else {
  918. this.selection.forEach(item => {
  919. lsit.push(item.id)
  920. })
  921. let data = {
  922. id: this.form.id,
  923. orderItemIds: lsit
  924. }
  925. generateShipment(data).then(res => {
  926. this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
  927. this.$router.push({
  928. path: "/businessManagement/receipt/index",
  929. query: { form: JSON.stringify(res.data.data) },
  930. });
  931. })
  932. }
  933. },
  934. //点击行可编辑
  935. handleRowClick(row, event, column) {
  936. },
  937. //商品编辑
  938. rowCell(row, index) {
  939. if (row.$cellEdit) {
  940. if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
  941. return this.$message.error('订货数量不能小于发货数量')
  942. }
  943. }
  944. this.$refs.crudContact.rowCell(row, row.$index)
  945. },
  946. //费用编辑
  947. rowCellTwo(row, index) {
  948. this.$refs.crudProject.rowCell(row, row.$index)
  949. },
  950. //商品选中触发
  951. productSelection(selection) {
  952. console.log(selection);
  953. this.selection = selection
  954. },
  955. //费用新增触发
  956. costIncrease() {
  957. this.dialogCost = !this.dialogCost
  958. this.choiceData = false
  959. },
  960. //商品新增触发
  961. commoditySelection() {
  962. this.dialogVisible = !this.dialogVisible
  963. this.tableData = []
  964. this.commodityData = false
  965. this.goodsListSave = [];
  966. },
  967. //点击费用明细选择触发
  968. choice(row) {
  969. this.dialogCost = !this.dialogCost
  970. this.choiceData = true
  971. this.choiceIndex = row.$index
  972. },
  973. //点击商品明细选择触发
  974. commodityChoice(row) {
  975. this.dialogVisible = !this.dialogVisible
  976. this.commodityData = true
  977. this.choiceIndexT = row.$index
  978. },
  979. //导入商品触发
  980. importChoice() {
  981. if (this.tableData.length === 1) {
  982. this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
  983. this.contactsData[this.choiceIndexT].code = this.tableData[0].code
  984. this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
  985. this.contactsData[this.choiceIndexT].itemType = this.tableData[0].typeno
  986. this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
  987. this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
  988. this.contactsData[this.choiceIndexT].orderQuantity = 0
  989. this.contactsData[this.choiceIndexT].price = 0
  990. this.contactsData[this.choiceIndexT].amount = 0
  991. getPurchasePrice({ code: this.contactsData[this.choiceIndexT].code }).then(res => {
  992. if (res.data.data.length > 0) {
  993. this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', res.data.data[0].purchasePrice)
  994. } else {
  995. this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', '0')
  996. }
  997. })
  998. selectGoodsNum({
  999. goodsId: this.tableData[0].id,
  1000. itemType: this.tableData[0].typeno
  1001. }).then(res => {
  1002. // this.contactsData[this.choiceIndexT].storageQuantity = res.data.data[0].purchasePrice
  1003. if (res.data.data.length > 0) {
  1004. this.contactsData[this.choiceIndexT].storageQuantity = res.data.data[0].surplusRouteQuantity
  1005. } else {
  1006. this.contactsData[this.choiceIndexT].storageQuantity = 0
  1007. }
  1008. })
  1009. }
  1010. this.dialogVisible = !this.dialogVisible
  1011. this.commodityData = false
  1012. },
  1013. //费用编辑导入触发
  1014. choiceCost() {
  1015. if (this.tableDataCost.length === 1) {
  1016. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  1017. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  1018. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  1019. }
  1020. this.dialogCost = !this.dialogCost
  1021. this.choiceData = false
  1022. },
  1023. //费用导入触发
  1024. importCost() {
  1025. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  1026. if (this.tableDataCost.length > 0) {
  1027. for (let item in this.tableDataCost) {
  1028. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  1029. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  1030. this.tableDataCost[item].sort = this.maxFeeNum + 1
  1031. this.maxFeeNum++
  1032. delete this.tableDataCost[item].id
  1033. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  1034. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  1035. }
  1036. }
  1037. this.tableDataCost = []
  1038. this.dialogCost = false
  1039. },
  1040. //确认导入触发
  1041. importGoods() {
  1042. if (this.goodsListSave.length > 0) {
  1043. for (let item in this.goodsListSave) {
  1044. getPurchasePrice({ code: this.goodsListSave[item].code }).then(res => {
  1045. if (res.data.data.length > 0) {
  1046. this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
  1047. } else {
  1048. this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
  1049. }
  1050. })
  1051. selectGoodsNum({
  1052. goodsId: this.goodsListSave[item].id,
  1053. itemType: this.goodsListSave[item].typeno
  1054. }).then(res => {
  1055. // this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data)
  1056. if (res.data.data.length > 0) {
  1057. this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
  1058. } else {
  1059. this.$set(this.goodsListSave[item], 'storageQuantity', '0')
  1060. }
  1061. this.goodsListSave[item].itemId = this.goodsListSave[item].id
  1062. this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
  1063. delete this.goodsListSave[item].id
  1064. this.$set(this.goodsListSave[item], 'itemType', this.goodsListSave[item].typeno)
  1065. this.$set(this.goodsListSave[item], 'specificationAndModel', this.goodsListSave[item].typeno)
  1066. this.$set(this.goodsListSave[item], 'priceType', '一般')
  1067. this.$set(this.goodsListSave[item], 'orderQuantity', 0)
  1068. this.$set(this.goodsListSave[item], 'actualQuantity', 0)
  1069. this.goodsListSave[item].price = 0
  1070. this.goodsListSave[item].amount = 0
  1071. this.goodsListSave[item].sort = this.maxGoodsNum + 1
  1072. this.maxGoodsNum++
  1073. this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
  1074. // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
  1075. })
  1076. }
  1077. } else {
  1078. for (let item in this.tableData) {
  1079. getPurchasePrice({ code: this.tableData[item].code }).then(res => {
  1080. if (res.data.data.length > 0) {
  1081. this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
  1082. } else {
  1083. this.$set(this.tableData[item], 'purchaseAmount', '0')
  1084. }
  1085. })
  1086. selectGoodsNum({
  1087. goodsId: this.tableData[item].id,
  1088. itemType: this.tableData[item].typeno
  1089. }).then(res => {
  1090. // this.$set(this.tableData[item], 'storageQuantity', res.data.data)
  1091. if (res.data.data.length > 0) {
  1092. this.$set(this.tableData[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
  1093. } else {
  1094. this.$set(this.tableData[item], 'storageQuantity', '0')
  1095. }
  1096. this.tableData[item].itemId = this.tableData[item].id
  1097. this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
  1098. delete this.tableData[item].id
  1099. this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
  1100. this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].typeno)
  1101. this.$set(this.tableData[item], 'priceType', '一般')
  1102. this.$set(this.tableData[item], 'orderQuantity', 0)
  1103. this.$set(this.tableData[item], 'actualQuantity', 0)
  1104. this.tableData[item].price = 0
  1105. this.tableData[item].amount = 0
  1106. this.tableData[item].sort = this.maxGoodsNum + 1
  1107. this.maxGoodsNum++
  1108. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  1109. // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
  1110. })
  1111. }
  1112. }
  1113. if (this.tableData.length > 0) {
  1114. }
  1115. this.dialogVisible = false
  1116. },
  1117. closeGoods() {
  1118. this.treeDataGoods = [];
  1119. this.treeDeptId = "";
  1120. this.activeName = "searchList";
  1121. },
  1122. closeFees() {
  1123. this.treeDeptIdCost = "";
  1124. this.treeData = [];
  1125. },
  1126. //选中触发
  1127. selectionChange(list) {
  1128. this.tableData = list
  1129. },
  1130. //费用选中触发
  1131. selectionChangeCost(list) {
  1132. this.tableDataCost = list
  1133. },
  1134. //导入页左商品类型查询
  1135. nodeClick(data) {
  1136. this.treeDeptId = data.id;
  1137. this.page.currentPage = 1;
  1138. this.onLoad(this.page);
  1139. },
  1140. //导入页左费用类型查询
  1141. nodeClickCost(data) {
  1142. this.treeDeptIdCost = data.id;
  1143. this.pageCost.currentPage = 1;
  1144. this.onLoadCost(this.pageCost);
  1145. },
  1146. //刷新触发
  1147. refreshChange() {
  1148. this.treeDeptId = '';
  1149. this.page.currentPage = 1;
  1150. this.onLoad(this.page);
  1151. },
  1152. //费用刷新触发
  1153. refreshChangeCost() {
  1154. this.treeDeptIdCost = '';
  1155. this.pageCost.currentPage = 1;
  1156. this.onLoadCost(this.pageCost);
  1157. },
  1158. //新增商品信息保存触发
  1159. rowSave(row, done, loading) {
  1160. // this.contactsData.push(row)
  1161. done()
  1162. },
  1163. //修改商品信息触发
  1164. rowUpdate(row, index, done, loading) {
  1165. done(row);
  1166. },
  1167. //删除商品信息触发
  1168. rowDel(row, index, donerowDel) {
  1169. this.$confirm("确定将选择数据删除?", {
  1170. confirmButtonText: "确定",
  1171. cancelButtonText: "取消",
  1172. type: "warning"
  1173. }).then(() => {
  1174. //商品判断是否需要调用删除接口
  1175. if (row.id) {
  1176. corpsattn(row.id).then(res => {
  1177. this.$message({
  1178. type: "success",
  1179. message: "操作成功!"
  1180. });
  1181. this.contactsData.splice(row.$index, 1);
  1182. })
  1183. } else {
  1184. this.$message({
  1185. type: "success",
  1186. message: "操作成功!"
  1187. });
  1188. this.contactsData.splice(row.$index, 1);
  1189. }
  1190. })
  1191. },
  1192. //新增费用明细保存触发
  1193. rowSaveProject(row, done, loading) {
  1194. // this.advantageProjectData.push(row)
  1195. done()
  1196. },
  1197. //修改费用明细触发
  1198. rowUpdateProject(row, index, done, loading) {
  1199. done(row);
  1200. },
  1201. goodsSearch(params, done) {
  1202. this.treeDeptId = '';
  1203. this.onLoad(this.page, params);
  1204. done()
  1205. },
  1206. //商品列表查询
  1207. onLoad(page, params = {}) {
  1208. this.loading = true;
  1209. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  1210. const data = res.data.data;
  1211. this.page.total = data.total;
  1212. this.data = data.records;
  1213. this.goodsListShow = data.records;
  1214. this.loading = false;
  1215. });
  1216. },
  1217. // 费用查询按钮
  1218. feesSearch(params, done) {
  1219. this.treeDeptIdCost = '';
  1220. this.onLoadCost(this.pageCost, params)
  1221. done()
  1222. },
  1223. //费用查询
  1224. onLoadCost(page, params = {}) {
  1225. this.loadingCost = true;
  1226. let queryParams = Object.assign({}, params, {
  1227. pageSize: page.pageSize,
  1228. pageNum: page.currentPage,
  1229. parentId: 0,
  1230. feesTypeId: this.treeDeptIdCost
  1231. })
  1232. customerList(queryParams).then(res => {
  1233. const data = res.data.data;
  1234. this.pageCost.total = data.total;
  1235. this.dataCost = data.records;
  1236. this.loadingCost = false;
  1237. });
  1238. },
  1239. //删除费用明细触发
  1240. rowDelProject(row, index, donerowDel) {
  1241. this.$confirm("确定将选择数据删除?", {
  1242. confirmButtonText: "确定",
  1243. cancelButtonText: "取消",
  1244. type: "warning"
  1245. }).then(() => {
  1246. //费用判断是否需要调用删除接口
  1247. if (row.id) {
  1248. corpsitem(row.id).then(res => {
  1249. this.$message({
  1250. type: "success",
  1251. message: "操作成功!"
  1252. });
  1253. this.advantageProjectData.splice(row.$index, 1);
  1254. })
  1255. } else {
  1256. this.$message({
  1257. type: "success",
  1258. message: "操作成功!"
  1259. });
  1260. this.advantageProjectData.splice(row.$index, 1);
  1261. }
  1262. })
  1263. },
  1264. // 计算费用
  1265. changeContractAmt(row) {
  1266. getPurchasePrice({ code: row.code }).then(res => {
  1267. this.purchasePriceOption = res.data.data
  1268. })
  1269. let orderQuantity = 0;
  1270. let purchaseAmount = 0;
  1271. if (row.purchaseAmount) {
  1272. purchaseAmount = row.purchaseAmount;
  1273. }
  1274. if (row.orderQuantity) {
  1275. orderQuantity = row.orderQuantity;
  1276. }
  1277. this.$set(row, "amount", Number(orderQuantity) * Number(purchaseAmount)).toFixed(2);
  1278. },
  1279. // 去重
  1280. removeRepeat() {
  1281. let obj = []
  1282. this.configuration.dicData = this.configuration.dicData.reduce((current, next) => {
  1283. obj[next.id] ? '' : obj[next.id] = true && current.push(next)
  1284. return current
  1285. }, [])
  1286. },
  1287. receiveList(data) {
  1288. this.configuration.dicData = this.configuration.dicData.concat(data)
  1289. this.removeRepeat()
  1290. },
  1291. //修改提交触发
  1292. editCustomer(isBack = false, type) {
  1293. this.$refs["form"].validate((valid) => {
  1294. if (valid) {
  1295. for (let item in this.contactsData) {
  1296. if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
  1297. return this.$message.error('商品信息第' + (parseInt(item) + 1) + '行订货数量不能小于发货数量')
  1298. }
  1299. }
  1300. this.form.orderAmount = 0;
  1301. this.$set(this.form, 'debitAmount', 0)
  1302. this.contactsData.forEach(item => {
  1303. this.form.orderAmount = Number(this.form.orderAmount) + Number(item.amount)
  1304. this.form.debitAmount = Number(this.form.debitAmount) + Number(item.amount)
  1305. })
  1306. //商品信息
  1307. this.form.itemsVOList = this.contactsData
  1308. // this.form.orderFeesList = this.advantageProjectData
  1309. // this.form.orderFeesList = this.$refs.feeInfo.submitData()
  1310. this.form.orderFilesList = this.bankOfDepositData
  1311. if (typeof this.form.corpsTypeId == 'object') {
  1312. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1313. }
  1314. this.saveLoading = true
  1315. this.form.billType = 'CG'
  1316. this.$set(this.form, 'tradeType', 'GN')
  1317. // 如果有id解锁,没有跳过
  1318. // this.form.id && this.unLock({moduleName: 'cg',tableName: 'business_order', billId: this.form.id})
  1319. typeSave(this.form).then(res => {
  1320. this.$message({ type: "success", message: this.form.id ? "修改成功!" : "新增成功!" });
  1321. // this.$set(this.detailData, 'seeDisabled', true);
  1322. if (isBack) {
  1323. //成功关闭此页面回到列表页
  1324. this.$emit("goBack");
  1325. this.leaveDetailsKey(this.$route.name)
  1326. } else {
  1327. this.queryData(res.data.data)
  1328. }
  1329. if (type == '收货') {
  1330. let lsit = []
  1331. this.selection.forEach(item => {
  1332. lsit.push(item.id)
  1333. })
  1334. let data = {
  1335. id: this.form.id,
  1336. orderItemIds: lsit
  1337. }
  1338. generateShipment(data).then(res => {
  1339. this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
  1340. this.$router.push({
  1341. path: "/businessManagement/receipt/index",
  1342. query: { form: JSON.stringify(res.data.data) },
  1343. });
  1344. })
  1345. }
  1346. }).catch(() => {
  1347. this.pageLoading = false
  1348. this.saveLoading = false
  1349. })
  1350. } else {
  1351. return false;
  1352. }
  1353. });
  1354. },
  1355. beforeBillData(bool, type) {
  1356. this.applyPaymentList = [];
  1357. let arr = [];
  1358. this.billType = type
  1359. this.financeData = {
  1360. url: "/financialManagement/paymentRequest/index",
  1361. pageStatus: "this.$store.getters.pqStatus",
  1362. pageLabel: "付费申请",
  1363. checkType: 'ffsq'
  1364. }
  1365. let amount = 0;
  1366. let quantity = 0;
  1367. console.log(this.contactsData)
  1368. this.contactsData.map(e => {
  1369. amount += Number(e.amount)
  1370. quantity += Number(e.orderQuantity)
  1371. })
  1372. const price = quantity === 0 ? 0 : Number(amount) / Number(quantity)
  1373. this.billData = {
  1374. belongCompany: this.form.belongCompany,
  1375. srcOrderno: this.form.orderNo,
  1376. itemType: "采购",
  1377. corpsName: this.form.corpsName,
  1378. corpId: this.form.corpId,
  1379. srcParentId: this.form.id,
  1380. currency: 'CNY',
  1381. exchangeRate: '1',
  1382. taxRate: '0',
  1383. accDate: this.form.businesDate,
  1384. srcType: 1,
  1385. tradeType: 'GN',
  1386. optionType: 'GN',
  1387. costType: this.feesOption.find(e => e.cname == '货款') ? this.feesOption.find(e => e.cname == '货款').id : null,
  1388. amount,
  1389. quantity,
  1390. price,
  1391. unit: '条',
  1392. remarks: this.form.orderRemark,
  1393. }
  1394. // this.contactsData.map(e => {
  1395. // if (e.submitPay != 1) {
  1396. // const form = {
  1397. // belongCompany: this.form.belongCompany,
  1398. // srcOrderno:this.form.orderNo,
  1399. // itemType:"采购",
  1400. // corpsName:this.form.corpsName,
  1401. // corpId:this.form.corpId,
  1402. // srcParentId: this.form.id,
  1403. // currency: 'CNY',
  1404. // exchangeRate: '1',
  1405. // taxRate: '0',
  1406. // accDate: this.form.businesDate,
  1407. // srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请 3.收发货-费用明细
  1408. // tradeType: 'GN',
  1409. // optionType: 'GN',
  1410. // amount: e.amount,
  1411. // goodName: e.cname,
  1412. // price: e.purchaseAmount,
  1413. // unit: e.unit,
  1414. // quantity: e.orderQuantity,
  1415. // srcFeesId: e.id,
  1416. // costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
  1417. // }
  1418. // arr.push(form)
  1419. // }
  1420. // })
  1421. // let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2 && item.submitPay != 1)
  1422. // getFeeList.forEach(item => {
  1423. // let form = {
  1424. // srcOrderno:this.form.orderNo,
  1425. // itemType:"采购",
  1426. // corpsName:item.corpName,
  1427. // corpId: item.corpId,
  1428. // srcParentId: this.form.id,
  1429. // currency: 'CNY',
  1430. // exchangeRate: '1',
  1431. // taxRate: '0',
  1432. // accDate: this.form.businesDate,
  1433. // srcType: 2,
  1434. // tradeType: 'GN',
  1435. // optionType: 'GN',
  1436. // chargeMember: this.form.chargeMember,
  1437. // parentId: this.form.id,
  1438. // amount: item.amount,
  1439. // costType: item.itemId,
  1440. // srcFeesId: item.id,
  1441. // quantity: item.quantity, // 数量
  1442. // price: item.price,
  1443. // }
  1444. // arr.push(form)
  1445. // })
  1446. // this.applyPaymentList = [...arr]
  1447. if (bool) { //申请货款
  1448. // this.billData.srcId = -1
  1449. }
  1450. },
  1451. // 查看申请记录
  1452. openApplicationDialog() {
  1453. this.applicationDialog = true
  1454. },
  1455. //关闭申记录
  1456. choceApplication() {
  1457. this.applicationDialog = false
  1458. },
  1459. //申请货款
  1460. applyPayment(type) {
  1461. this.beforeBillData(true, type);
  1462. this.financialAccountDialog = true;
  1463. },
  1464. //关闭账单
  1465. choceFun() {
  1466. this.financialAccountDialog = false
  1467. },
  1468. feeSubmit() {
  1469. this.queryData(this.form.id);
  1470. },
  1471. //返回列表
  1472. backToList() {
  1473. if (contrastObj(this.form, this.oldForm) ||
  1474. contrastList(this.contactsData, this.oldGoodsList) ||
  1475. contrastList(this.advantageProjectData, this.oldFeesList) ||
  1476. contrastList(this.bankOfDepositData, this.oldUploadList)
  1477. ) {
  1478. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1479. confirmButtonText: "确定",
  1480. cancelButtonText: "取消",
  1481. type: "warning"
  1482. }).then(() => {
  1483. this.editCustomer(true)
  1484. }).catch(() => {
  1485. !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'cg', tableName: 'business_order', billId: this.form.id })
  1486. this.$emit("goBack");
  1487. this.leaveDetailsKey(this.$route.name)
  1488. })
  1489. } else {
  1490. !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'cg', tableName: 'business_order', billId: this.form.id })
  1491. this.$emit("goBack");
  1492. this.leaveDetailsKey(this.$route.name)
  1493. }
  1494. },
  1495. // 保存列设置
  1496. async saveColumn(name) {
  1497. if (name == 'goods') {
  1498. const inSave = await this.saveColumnData(
  1499. this.getColumnName(18),
  1500. this.customerContact
  1501. );
  1502. if (inSave) {
  1503. this.$message.success("保存成功");
  1504. //关闭窗口
  1505. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1506. this.$nextTick(() => {
  1507. this.$refs.crudContact.doLayout()
  1508. })
  1509. }
  1510. } else if (name === 'fees') {
  1511. const inSave = await this.saveColumnData(
  1512. this.getColumnName(19),
  1513. this.advantageProject
  1514. );
  1515. if (inSave) {
  1516. this.$message.success("保存成功");
  1517. //关闭窗口
  1518. this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
  1519. }
  1520. }
  1521. },
  1522. async resetColumn() {
  1523. this.customerContact = customerContact
  1524. const inSave = await this.delColumnData(
  1525. this.getColumnName(18),
  1526. customerContact
  1527. );
  1528. if (inSave) {
  1529. this.$nextTick(() => {
  1530. this.$refs.crudContact.doLayout()
  1531. })
  1532. this.$message.success("重置成功");
  1533. //关闭窗口
  1534. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1535. }
  1536. },
  1537. returnBack(row) {
  1538. if (row.belongtocompany) {
  1539. // this.form.belongToCorpId = row.belongtocompany
  1540. }
  1541. // this.$set(this.form, 'paymentType', row.paymentType)
  1542. // this.$set(this.form, 'packageRemarks', row.packageRemarks)
  1543. getlistBankBy(row.id).then(res => {
  1544. this.$set(this.form, 'banks', null)
  1545. this.$set(this.form, 'banksAccountName', null)
  1546. this.$set(this.form, 'accountBank', null)
  1547. this.bankList = res.data
  1548. if (this.bankList.length > 0) {
  1549. this.form.banks = this.bankList[0].accountNo
  1550. this.form.banksAccountName = this.bankList[0].accountName
  1551. this.form.accountBank = this.bankList[0].accountBank
  1552. }
  1553. })
  1554. },
  1555. // 银行账号变化
  1556. banksChange(val) {
  1557. let isTrue = false
  1558. this.bankList.forEach(item => {
  1559. if (val == item.accountNo) {
  1560. this.$set(this.form, 'banksAccountName', item.accountName)
  1561. this.$set(this.form, 'accountBank', item.accountBank)
  1562. isTrue = true
  1563. }
  1564. })
  1565. if (!isTrue) {
  1566. this.$set(this.form, 'banksAccountName', null)
  1567. this.$set(this.form, 'accountBank', null)
  1568. }
  1569. },
  1570. // 标签页切换
  1571. tabHandle(data) {
  1572. if (data.name == 'searchList') {
  1573. this.goodsListShow = this.data;
  1574. this.page.total = this.pageList.total
  1575. } else if (data.name == 'importStaging') {
  1576. this.goodsListShow = this.goodsListSave;
  1577. this.page.total = 0
  1578. }
  1579. },
  1580. removeStagList(row, index) {
  1581. this.goodsListSave.splice(row.$index, 1)
  1582. },
  1583. importStagList(row, index) {
  1584. this.goodsListSave.push(row);
  1585. },
  1586. beforeFinance(feesData, callback) {
  1587. this.advantageProjectData = feesData;
  1588. let params = {}
  1589. params.valid = true
  1590. params.parentId = this.form.id
  1591. params.srcOrderno = this.form.orderNo
  1592. callback(params)
  1593. },
  1594. // 报表
  1595. openReport() {
  1596. this.switchDialog = !this.switchDialog;
  1597. },
  1598. onClose(val) {
  1599. this.switchDialog = val;
  1600. },
  1601. //请核
  1602. pleaseCheck() {
  1603. // this.verification()
  1604. if (this.verification()) {
  1605. this.$confirm("您确定提交此次申请吗?", {
  1606. confirmButtonText: "确定",
  1607. cancelButtonText: "取消",
  1608. type: "warning"
  1609. }).then(() => {
  1610. const data = {
  1611. id: this.form.id,
  1612. checkType: 'cgqh',
  1613. url: '/businessManagement/purchaseOrder/index',
  1614. pageStatus: "this.$store.getters.domPurStatus",
  1615. pageLabel: "采购订单(N)",
  1616. checkFlag: 1,
  1617. }
  1618. this.pageLoading = true
  1619. this.saveLoading = true
  1620. pleaseCheck(data).then(res => {
  1621. this.$message.success('请核成功')
  1622. // this.pageLoading = false
  1623. this.saveActives = ''
  1624. this.queryData(this.form.id)
  1625. }).finally(() => {
  1626. this.pageLoading = false
  1627. this.saveLoading = false
  1628. })
  1629. })
  1630. } else {
  1631. }
  1632. },
  1633. verification() {
  1634. let getFeeList = this.$refs.feeInfo.submitData()
  1635. if (contrastObj(this.form, this.oldForm) ||
  1636. contrastList(this.contactsData, this.oldGoodsList) ||
  1637. // contrastList(getFeeList, this.oldFeesList) ||
  1638. contrastList(this.bankOfDepositData, this.oldUploadList)
  1639. ) {
  1640. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1641. confirmButtonText: "确定",
  1642. cancelButtonText: "取消",
  1643. type: "warning"
  1644. }).then(() => {
  1645. this.editCustomer(false)
  1646. }).catch(() => {
  1647. return false; //取消改动数据
  1648. })
  1649. } else {
  1650. return true; //没有动过数据
  1651. }
  1652. },
  1653. //打开审核
  1654. openCheckDialog() {
  1655. this.checkData = this.detailData.check
  1656. this.checkDialog = true;
  1657. },
  1658. //关闭审核
  1659. choceCheckFun() {
  1660. this.checkDialog = false;
  1661. },
  1662. choceScheduleFun() {
  1663. this.checkScheduleDialog = false
  1664. },
  1665. editHandle() {
  1666. const data = {
  1667. moduleName: 'cg',
  1668. tableName: 'business_order',
  1669. billId: this.form.id,
  1670. no: localStorage.getItem('browserID'),
  1671. billNo: this.form.orderNo
  1672. }
  1673. this.saveLoading = true
  1674. this.checkLock(data).then(res => {
  1675. if (res.data.code == 200) {
  1676. this.onLock(data).then(response => {
  1677. this.queryData(this.form.id)
  1678. })
  1679. this.inDetailsKey(this.$route.name, {
  1680. moduleName: 'cg',
  1681. tableName: 'business_order',
  1682. billId: this.form.id,
  1683. })
  1684. this.detailData.seeDisabled = false;
  1685. }
  1686. }).catch(error => {
  1687. }).finally(() => {
  1688. this.saveLoading = false
  1689. })
  1690. },
  1691. getGSName(row) {
  1692. this.form.belongCompany = row.cname
  1693. },
  1694. // 发送消息
  1695. postMessage() {
  1696. this.messageVisble = true
  1697. this.$nextTick(() => {
  1698. this.$refs.messagePost.init()
  1699. })
  1700. },
  1701. closeDialog() {
  1702. this.messageVisble = false
  1703. },
  1704. }
  1705. }
  1706. </script>
  1707. <style lang="scss" scoped>
  1708. .back-icon {
  1709. line-height: 64px;
  1710. font-size: 20px;
  1711. margin-right: 8px;
  1712. }
  1713. //.add-customer-btn {
  1714. // position: fixed;
  1715. // right: 36px;
  1716. // top: 115px;
  1717. //}
  1718. ::v-deep .el-form-item {
  1719. margin-bottom: 0;
  1720. }
  1721. .el-dialogDeep {
  1722. ::v-deep .el-dialog {
  1723. margin: 1vh auto 0 !important;
  1724. padding-bottom: 10px !important;
  1725. .el-dialog__body,
  1726. .el-dialog__footer {
  1727. padding-bottom: 0 !important;
  1728. padding-top: 0 !important;
  1729. }
  1730. }
  1731. }
  1732. .print-div {
  1733. color: #000;
  1734. }
  1735. .print_table {
  1736. table {
  1737. border-right: 1px solid #000;
  1738. border-bottom: 1px solid #000;
  1739. font-size: 12px;
  1740. margin-bottom: 5px;
  1741. }
  1742. table td {
  1743. border-left: 1px solid #000;
  1744. border-top: 1px solid #000;
  1745. vertical-align: middle;
  1746. padding: 2px;
  1747. text-align: center;
  1748. }
  1749. }
  1750. .table {
  1751. border-collapse: collapse;
  1752. border-spacing: 0;
  1753. background-color: transparent;
  1754. display: table;
  1755. width: 99%;
  1756. max-width: 100%;
  1757. margin: 0 auto;
  1758. }
  1759. .table td {
  1760. text-align: left;
  1761. vertical-align: middle;
  1762. font-size: 14px;
  1763. color: #000000;
  1764. padding: 10.5px 0 10.5px 30px;
  1765. //border: 1px solid #000;
  1766. }
  1767. ::v-deep .el-form-item {
  1768. margin-bottom: 0;
  1769. }
  1770. ::v-deep .el-form-item__content {
  1771. line-height: 32px;
  1772. }
  1773. </style>