detailsPageEdit.vue 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList">返回列表 </el-button>
  6. </div>
  7. <!-- <div class="add-customer-btn">
  8. <el-button class="el-button&#45;&#45;small-yh" type="primary" :loading="saveLoading" size="small" @click="calculateInterest()">利息计算
  9. </el-button>
  10. </div>-->
  11. </div>
  12. <div class="customer-main">
  13. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  14. <containerTitle title="基础资料"></containerTitle>
  15. <basic-container :showBtn="true">
  16. <el-row>
  17. <el-col v-for="(item, index) in basicData.column" :key="index" :span="item.span ? item.span : 8" :class="{ isShow: item.display }">
  18. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  19. <el-date-picker
  20. v-if="item.type === 'datetime'"
  21. style="width: 100%;"
  22. v-model="form[item.prop]"
  23. size="small"
  24. type="datetime"
  25. placeholder="选择日期"
  26. value-format="yyyy-MM-dd HH:mm:ss"
  27. :disabled="detailData.seeDisabled || browse"
  28. />
  29. <el-date-picker
  30. v-else-if="item.type === 'date'"
  31. style="width: 100%;"
  32. v-model="form[item.prop]"
  33. size="small"
  34. type="date"
  35. placeholder="选择日期"
  36. value-format="yyyy-MM-dd HH:mm:ss"
  37. :disabled="detailData.seeDisabled || browse"
  38. />
  39. <crop-select
  40. v-else-if="item.prop === 'corpId'"
  41. v-model="form[item.prop]"
  42. @getCorpData="getCorpRow"
  43. corpType="KH"
  44. :disabled="detailData.seeDisabled || browse || !form.belongToCorpId"
  45. style="width: 100%"
  46. ref="KHSelect"
  47. :belongtocompany="form.belongToCorpId"
  48. ></crop-select>
  49. <crop-select
  50. v-else-if="item.prop === 'belongToCorpId'"
  51. v-model="form[item.prop]"
  52. @getCorpData="returnBack"
  53. corpType="GS"
  54. :disabled="detailData.seeDisabled || browse"
  55. ></crop-select>
  56. <crop-select
  57. v-else-if="item.prop === 'productionPlant'"
  58. v-model="form[item.prop]"
  59. @getCorpData="getPlantRow"
  60. corpType="GYS"
  61. :disabled="detailData.seeDisabled || browse"
  62. style="width: 100%"
  63. ></crop-select>
  64. <el-select
  65. v-else-if="item.prop === 'paymentType'"
  66. v-model="form[item.prop]"
  67. placeholder="请选择"
  68. clearable
  69. filterable
  70. style="width: 100%"
  71. size="small"
  72. :disabled="detailData.seeDisabled || browse"
  73. >
  74. <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  75. </el-select>
  76. <el-select
  77. v-else-if="item.prop === 'packageRemarks'"
  78. v-model="form[item.prop]"
  79. placeholder="请选择"
  80. clearable
  81. filterable
  82. allow-create
  83. default-first-option
  84. style="width: 100%"
  85. size="small"
  86. :disabled="detailData.seeDisabled || browse"
  87. >
  88. <el-option v-for="(item, index) in packageOptions" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  89. </el-select>
  90. <el-select
  91. v-else-if="item.prop === 'arrivalAddress'"
  92. v-model="form[item.prop]"
  93. placeholder="请选择"
  94. clearable
  95. filterable
  96. style="width: 100%"
  97. size="small"
  98. :disabled="detailData.seeDisabled || browse"
  99. allow-create
  100. default-first-option
  101. >
  102. <el-option v-for="(item, index) in arrivalOptions" :key="index" :label="item.label" :value="item.label"></el-option>
  103. </el-select>
  104. <el-select
  105. v-else-if="item.prop === 'shippingAddress'"
  106. v-model="form[item.prop]"
  107. placeholder="请选择"
  108. clearable
  109. filterable
  110. style="width: 100%"
  111. size="small"
  112. :disabled="detailData.seeDisabled || browse"
  113. allow-create
  114. default-first-option
  115. >
  116. <el-option v-for="(item, index) in shippingOptions" :key="index" :label="item.label" :value="item.label"></el-option>
  117. </el-select>
  118. <el-select
  119. v-else-if="item.prop === 'storageId'"
  120. v-model="form[item.prop]"
  121. placeholder="请选择仓库"
  122. clearable
  123. filterable
  124. style="width: 100%"
  125. size="small"
  126. default-first-option
  127. :disabled="detailData.seeDisabled || item.disabled || browse"
  128. >
  129. <el-option v-for="(item, index) in storageIdOption" :key="index" :label="item.cname" :value="item.id"></el-option>
  130. </el-select>
  131. <el-select
  132. v-else-if="item.prop === 'banks'"
  133. v-model="form[item.prop]"
  134. placeholder="请选择"
  135. clearable
  136. filterable
  137. allow-create
  138. default-first-option
  139. size="small"
  140. style="width: 100%;"
  141. :disabled="detailData.seeDisabled || browse"
  142. >
  143. <el-option v-for="(item, index) in bankList" :key="index" :label="item.accountNo" :value="item.accountNo"></el-option>
  144. </el-select>
  145. <el-select
  146. v-else-if="item.prop === 'corpAttn'"
  147. v-model="form[item.prop]"
  148. placeholder="请选择"
  149. clearable
  150. filterable
  151. allow-create
  152. default-first-option
  153. size="small"
  154. style="width: 100%;"
  155. :disabled="detailData.seeDisabled || browse"
  156. >
  157. <el-option v-for="(item, index) in khInfoList" :key="index" :label="item.cname" :value="item.id"></el-option>
  158. </el-select>
  159. <el-input
  160. v-else-if="item.type == 'number'"
  161. placeholder="请输入"
  162. v-input-limit="2"
  163. size="small"
  164. :disabled="item.disabled || detailData.seeDisabled || browse"
  165. v-model.trim="form[item.prop]"
  166. />
  167. <span v-else-if="item.type == 'radio'">
  168. <el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" :label="1"
  169. >是</el-radio
  170. >
  171. <el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" :label="0"
  172. >否</el-radio
  173. >
  174. </span>
  175. <el-select
  176. v-else-if="item.prop === 'chargeMember'"
  177. v-model="form[item.prop]"
  178. placeholder="请选择"
  179. filterable
  180. size="small"
  181. style="width: 100%;"
  182. :disabled="detailData.seeDisabled || browse"
  183. >
  184. <el-option v-for="(item, index) in userList" :key="index" :label="item.cname" :value="item.cname"></el-option>
  185. </el-select>
  186. <el-input
  187. type="textarea"
  188. v-else-if="item.type === 'textarea'"
  189. v-model.trim="form[item.prop]"
  190. size="small"
  191. autocomplete="off"
  192. :disabled="item.disabled || detailData.seeDisabled || browse"
  193. ></el-input>
  194. <el-input
  195. type="age"
  196. v-else
  197. v-model.trim="form[item.prop]"
  198. size="small"
  199. autocomplete="off"
  200. :disabled="item.disabled || detailData.seeDisabled || browse"
  201. clearable
  202. ></el-input>
  203. </el-form-item>
  204. </el-col>
  205. </el-row>
  206. </basic-container>
  207. <containerTitle title="利息信息" />
  208. <basic-container>
  209. <el-row>
  210. <el-col span="8">
  211. <el-form-item label="资方" prop="investor">
  212. <crop-select v-model="form.investor" @getCorpData="getInvestor" corpType="GYS" style="width: 100%"></crop-select>
  213. </el-form-item>
  214. </el-col>
  215. <el-col span="6">
  216. <el-form-item label="年利率" prop="interestRate">
  217. <el-input type="age" v-model="form.interestRate" size="small" autocomplete="off" placeholder="请输入年利率" v-input-limit="2">
  218. <template slot="append">%</template>
  219. </el-input>
  220. </el-form-item>
  221. </el-col>
  222. <el-col span="4">
  223. <el-form-item label="配资天数" prop="days">
  224. <el-input type="number" v-model.trim="form.days" size="small" autocomplete="off" placeholder="请输入天数" v-input-limit="2">
  225. </el-input>
  226. </el-form-item>
  227. </el-col>
  228. <el-col span="6">
  229. <el-form-item label="配资比例" prop="fundingRatio">
  230. <el-input
  231. type="age"
  232. v-model.trim="form.fundingRatio"
  233. size="small"
  234. autocomplete="off"
  235. placeholder="请输入多多配资比例"
  236. v-input-limit="2"
  237. >
  238. <template slot="append">%</template>
  239. </el-input>
  240. </el-form-item>
  241. </el-col>
  242. <el-col span="6">
  243. <el-form-item label="税率" prop="taxRate">
  244. <el-input type="age" v-model.trim="form.taxRate" size="small" autocomplete="off" placeholder="请输入税率" v-input-limit="2">
  245. <template slot="append">%</template>
  246. </el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col span="6">
  250. <el-form-item label="利息金额" prop="interestAmount">
  251. <el-input type="age" v-model.trim="form.interestAmount" size="small" autocomplete="off" disabled v-input-limit="2"> </el-input>
  252. </el-form-item>
  253. </el-col>
  254. <el-col span="11" :offset="1">
  255. <el-button class="el-button--small-yh" type="primary" :loading="saveLoading" size="small" @click="calculateInterest()"
  256. >利息计算
  257. </el-button>
  258. <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport('订货合同.ureport.xml')">订货合同</el-button>
  259. <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport('配资合同.ureport.xml')">配资合同</el-button>
  260. </el-col>
  261. </el-row>
  262. </basic-container>
  263. <containerTitle title="发货信息"></containerTitle>
  264. <basic-container :showBtn="true" :block="true" ref="shipmentRef">
  265. <el-row>
  266. <el-col
  267. v-for="(item, index) in contactInformation.column"
  268. :key="index"
  269. :span="item.span ? item.span : 8"
  270. :class="{ isShow: item.display == false }"
  271. >
  272. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  273. <el-date-picker
  274. v-if="item.type === 'datetime'"
  275. style="width: 100%;"
  276. v-model="form[item.prop]"
  277. size="small"
  278. type="datetime"
  279. placeholder="选择日期"
  280. value-format="yyyy-MM-dd HH:mm:ss"
  281. :disabled="item.disabled || detailData.seeDisabled || browse"
  282. />
  283. <el-date-picker
  284. v-else-if="item.type === 'date'"
  285. style="width: 100%;"
  286. v-model="form[item.prop]"
  287. size="small"
  288. type="date"
  289. placeholder="选择日期"
  290. value-format="yyyy-MM-dd HH:mm:ss"
  291. :disabled="detailData.seeDisabled || browse"
  292. />
  293. <el-input
  294. v-else-if="
  295. item.prop === 'advancePayment' ||
  296. item.prop === 'orderAmount' ||
  297. item.prop === 'settlmentAmount' ||
  298. item.prop === 'caseOverPayment' ||
  299. item.prop === 'thisUsedProfit' ||
  300. item.prop === 'createProfit'
  301. "
  302. v-model.trim="form[item.prop]"
  303. size="small"
  304. autocomplete="off"
  305. :disabled="detailData.seeDisabled || item.disabled || browse"
  306. v-input-limit="2"
  307. ></el-input>
  308. <el-select
  309. v-else-if="item.prop === 'orderStatus'"
  310. v-model="form[item.prop]"
  311. placeholder="请选择"
  312. clearable
  313. filterable
  314. style="width: 100%"
  315. size="small"
  316. :disabled="detailData.seeDisabled || item.disabled || browse"
  317. >
  318. <el-option v-for="(item, index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  319. </el-select>
  320. <el-input
  321. type="age"
  322. v-else-if="item.prop === 'grossProfitRate'"
  323. v-model.trim="form[item.prop]"
  324. size="small"
  325. autocomplete="off"
  326. placeholder="请输入"
  327. :disabled="detailData.seeDisabled || browse"
  328. v-input-limit="2"
  329. >
  330. <template slot="append">%</template>
  331. </el-input>
  332. <el-input
  333. type="age"
  334. v-else-if="item.prop === 'specialOfferOf'"
  335. v-model.trim="form[item.prop]"
  336. size="small"
  337. autocomplete="off"
  338. placeholder="请输入"
  339. :disabled="detailData.seeDisabled || browse"
  340. v-input-limit="2"
  341. >
  342. <template slot="append">%</template>
  343. </el-input>
  344. <el-input
  345. type="age"
  346. v-else-if="item.prop === 'largeScale'"
  347. v-model.trim="form[item.prop]"
  348. size="small"
  349. autocomplete="off"
  350. placeholder="请输入"
  351. :disabled="detailData.seeDisabled || browse"
  352. v-input-limit="2"
  353. >
  354. <template slot="append">%</template>
  355. </el-input>
  356. <el-input
  357. v-else-if="item.type == 'number'"
  358. placeholder="请输入"
  359. v-input-limit="2"
  360. size="small"
  361. :disabled="item.disabled || detailData.seeDisabled || browse"
  362. v-model.trim="form[item.prop]"
  363. />
  364. <el-input
  365. type="textarea"
  366. v-else-if="item.type === 'textarea'"
  367. v-model.trim="form[item.prop]"
  368. size="small"
  369. autocomplete="off"
  370. :disabled="item.disabled || detailData.seeDisabled || browse"
  371. ></el-input>
  372. <el-input
  373. v-else
  374. type="age"
  375. v-model.trim="form[item.prop]"
  376. size="small"
  377. autocomplete="off"
  378. :disabled="item.disabled || detailData.seeDisabled || browse"
  379. ></el-input>
  380. </el-form-item>
  381. </el-col>
  382. </el-row>
  383. </basic-container>
  384. <containerTitle title="商品信息"></containerTitle>
  385. <basic-container style="margin-bottom: 10px">
  386. <avue-crud
  387. :option="customerContact"
  388. v-model="contactsForm"
  389. :data="goodsShowData"
  390. ref="crudContact"
  391. @saveColumn="saveColumn('goods')"
  392. @resetColumn="resetColumn"
  393. :summary-method="summaryMethod"
  394. :cell-style="goodsRowClassName"
  395. :table-loading="goodsLoading"
  396. :key="index"
  397. >
  398. <template slot="headerSerial">
  399. <span class="order_number">序号</span>
  400. <el-button
  401. class="number_button"
  402. type="primary"
  403. icon="el-icon-circle-plus-outline"
  404. circle
  405. size="mini"
  406. @click="$refs.crudContact.rowCellAdd()"
  407. ></el-button>
  408. </template>
  409. <template slot="cntrVolumn" slot-scope="{ row }">
  410. <span>{{ row.cntrVolumn ? parseFloat(row.cntrVolumn) : row.cntrVolumn }}</span>
  411. </template>
  412. <template slot="storageId" slot-scope="{ row }">
  413. <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
  414. <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable default-first-option>
  415. <el-option
  416. v-for="(item, index) in row.storageQuantityList"
  417. :key="index"
  418. :label="item.storageName + '-' + item.corpName"
  419. :value="item.storageId"
  420. ></el-option>
  421. </el-select>
  422. <span v-else>{{ row.storageName }}</span>
  423. </template>
  424. <template slot="storageQuantity" slot-scope="{ row }">
  425. <span>{{ row.storageQuantity | decimalFormat }}</span>
  426. </template>
  427. <template slot="purchaseRebatePrice" slot-scope="{ row }">
  428. <el-input v-if="false" v-model="row.purchaseRebatePrice" allow-create filterable v-input-limit="2" default-first-option>
  429. <el-option
  430. v-for="(item, index) in purchasePriceOption"
  431. :key="index"
  432. :label="item.purchaseRebatePrice"
  433. :value="item.purchaseRebatePrice"
  434. ></el-option>
  435. </el-input>
  436. <span v-else>{{ row.purchaseRebatePrice }}</span>
  437. </template>
  438. <template slot="purchaseAmount" slot-scope="{ row }">
  439. <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" allow-create filterable v-input-limit="2" default-first-option>
  440. <el-option
  441. v-for="(item, index) in purchasePriceOption"
  442. :key="index"
  443. :label="item.purchasePrice"
  444. :value="item.purchasePrice"
  445. ></el-option>
  446. </el-input>
  447. <span v-else>{{ row.purchaseAmount }}</span>
  448. </template>
  449. <template slot="price" slot-scope="{ row }">
  450. <el-select v-if="false" v-model="row.price" @focus="getMarketPrice(row)" allow-create filterable v-input-limit="2" default-first-option>
  451. <el-option v-for="(item, index) in salesPriceOtion" :key="index" :label="item.salePrice" :value="item.salePrice"></el-option>
  452. </el-select>
  453. <span v-else>{{ row.price }}</span>
  454. </template>
  455. <template slot="amount" slot-scope="{ row }">
  456. <span>{{ row.amount | decimalFormat }}</span>
  457. </template>
  458. <template slot="actualQuantity" slot-scope="{ row }">
  459. <span>{{ row.actualQuantity | IntegerFormat }}</span>
  460. </template>
  461. <template slot="orderQuantity" slot-scope="{ row }">
  462. <span>{{ row.orderQuantity | IntegerFormat }}</span>
  463. </template>
  464. <template slot="shopQuality" slot-scope="{ row }">
  465. <el-switch v-model="row.shopQuality" :disabled="!row.$cellEdit || shopQualityDisable" :active-value="1" :inactive-value="0"></el-switch>
  466. </template>
  467. <template slot="menuLeft" slot-scope="{ size }">
  468. <el-tabs v-model="goodsActives" @tab-click="handleClick" :before-leave="beforeLeave">
  469. <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled"> </el-tab-pane>
  470. <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled"> </el-tab-pane>
  471. </el-tabs>
  472. <!-- <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()" v-show="goodsActives == 'goods'"
  473. >报表打印</el-button
  474. > -->
  475. </template>
  476. </avue-crud>
  477. </basic-container>
  478. <fee-info
  479. ref="feeInfo"
  480. :orderFeesList="advantageProjectData"
  481. :disabled="true"
  482. feeUrl="/blade-purchase-sales/orderfees/update"
  483. optionType="GN"
  484. itemType="销售"
  485. @beforeFinance="beforeFinance"
  486. :corpId="form.corpId"
  487. :financeDisabled="false"
  488. :tabShow="2"
  489. />
  490. <containerTitle title="上传附件"></containerTitle>
  491. <c-upload :data="bankOfDepositData" deleteUrl="/api/blade-client/corpsbank/update" :disabled="true" :enumerationValue="77" display />
  492. </el-form>
  493. </div>
  494. <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="订货合同" @onClose="onClose()" />
  495. <report-dialog :switchDialog="switchDialog2" :reportId="form.id" reportName="配资合同" @onClose="onClose()" />
  496. </div>
  497. </template>
  498. <script>
  499. import { detail, getlistBankBy, getProfit, calculateInterestAmount } from "@/api/basicData/configuration";
  500. import { getCorpDetail } from "@/api/maintenance/overpayment";
  501. import { integralDetail } from "@/api/maintenance/integral";
  502. import customerContact from "./configuration/customerContact.json";
  503. import optionPolicy from "./configuration/optionPolicy.json";
  504. import BuyFree from "./configuration/BuyFree.json";
  505. import { customerList as feeList, getDeptLazyTree, getDeptLazyTreeTwo, policyColumn } from "@/api/basicData/basicFeesDesc";
  506. import _ from "lodash";
  507. import reportDialog from "@/components/report-dialog/main";
  508. import { getToken } from "@/util/auth";
  509. import feeInfo from "@/components/fee-info/main";
  510. import { customerList as getKHList, detail as khDetail } from "@/api/basicData/customerInformation";
  511. import { IntegerFormat } from "@/util/validate";
  512. import { getCharge } from "@/api/basicData/customerInquiry";
  513. import { mapGetters } from "vuex";
  514. import { customerList as storageType } from "@/api/basicData/basicStorageType";
  515. export default {
  516. name: "detailsPage",
  517. props: {
  518. isProcurements: {
  519. type: Boolean
  520. },
  521. detailData: {
  522. type: Object
  523. }
  524. },
  525. components: {
  526. reportDialog,
  527. feeInfo
  528. },
  529. data() {
  530. return {
  531. policyList: [],
  532. selectionDList: [],
  533. searchDL: {},
  534. policyType: null,
  535. dataDL: [],
  536. optionThree: {
  537. header: false,
  538. menu: true,
  539. editBtn: false,
  540. delBtn: false,
  541. menuWidth: "80",
  542. searchSpan: 12,
  543. column: [
  544. {
  545. label: "商品名称",
  546. prop: "cname",
  547. search: true,
  548. overHidden: true
  549. },
  550. {
  551. label: "编码",
  552. prop: "code",
  553. search: true,
  554. overHidden: true
  555. },
  556. {
  557. label: "规格型号",
  558. prop: "typeno",
  559. overHidden: true
  560. },
  561. {
  562. label: "花纹",
  563. prop: "brandItem",
  564. overHidden: true
  565. },
  566. {
  567. label: "订货数量",
  568. prop: "orderQuantity",
  569. overHidden: true
  570. },
  571. {
  572. label: "供应商",
  573. prop: "corpName",
  574. overHidden: true
  575. }
  576. ]
  577. },
  578. optionFour: {
  579. header: false,
  580. menu: false,
  581. editBtn: false,
  582. delBtn: false,
  583. menuWidth: "80",
  584. column: [
  585. {
  586. label: "商品名称",
  587. prop: "cname",
  588. overHidden: true
  589. },
  590. {
  591. label: "编码",
  592. prop: "code",
  593. overHidden: true
  594. },
  595. {
  596. label: "规格型号",
  597. prop: "typeno",
  598. overHidden: true
  599. },
  600. {
  601. label: "花纹",
  602. prop: "brandItem",
  603. overHidden: true
  604. },
  605. {
  606. label: "订货数量",
  607. prop: "orderQuantity",
  608. overHidden: true
  609. },
  610. {
  611. label: "供应商",
  612. prop: "corpName",
  613. overHidden: true
  614. }
  615. ]
  616. },
  617. optionDL: {
  618. header: false,
  619. menu: false,
  620. selection: true,
  621. tip: false,
  622. column: [
  623. {
  624. label: "订单号",
  625. prop: "orgOrderNo",
  626. overHidden: true
  627. },
  628. {
  629. label: "订单日期",
  630. prop: "businesDate",
  631. overHidden: true
  632. },
  633. {
  634. label: "收货地址",
  635. prop: "arrivalAddress",
  636. overHidden: true
  637. },
  638. {
  639. label: "品牌",
  640. prop: "brand",
  641. overHidden: true
  642. }
  643. ]
  644. },
  645. storageNameList: [],
  646. surplusRouteQuantityOption: [],
  647. saveLoading: false,
  648. userInfo: null,
  649. disabled: false,
  650. form: {
  651. corpId: null
  652. },
  653. billType: "收费", //账单类型
  654. billData: {}, //账单需要数据
  655. applySettlementDialog: false, //生成账单组件
  656. financialAccountDialog: false,
  657. configuration: {
  658. multipleChoices: false,
  659. multiple: false,
  660. collapseTags: false,
  661. placeholder: "请点击右边按钮选择",
  662. dicData: []
  663. },
  664. goodsConfiguration: {
  665. multipleChoices: false,
  666. multiple: false,
  667. collapseTags: false,
  668. placeholder: "请点击右边按钮选择",
  669. dicData: []
  670. },
  671. plantConfiguration: {
  672. multipleChoices: false,
  673. multiple: false,
  674. collapseTags: false,
  675. placeholder: "请点击右边按钮选择",
  676. dicData: []
  677. },
  678. companyConfiguration: {
  679. multipleChoices: false,
  680. multiple: false,
  681. collapseTags: false,
  682. placeholder: "请点击右边按钮选择",
  683. dicData: []
  684. },
  685. data: [],
  686. policyForm: {},
  687. dataPolicy: [],
  688. contactsDataBuyFree: [],
  689. loadingCost: false,
  690. customerDivide: "",
  691. choiceData: false,
  692. commodityData: false,
  693. dataCost: [],
  694. treeDataDL: [],
  695. treeDataPolicy: [],
  696. treeDataGoods: [],
  697. choiceIndex: "",
  698. dialogCost: false,
  699. treeDeptId: "",
  700. treeDeptIdCost: "",
  701. treePolicyId: "",
  702. pageCost: {
  703. pageSize: 10,
  704. currentPage: 1,
  705. total: 0
  706. },
  707. page: {
  708. pageSize: 10,
  709. currentPage: 1,
  710. total: 0,
  711. pageSizes: [10, 50, 100, 300, 500]
  712. },
  713. pageList: {
  714. pageSize: 10,
  715. currentPage: 1,
  716. total: 0
  717. },
  718. pagePolicy: {
  719. pageSize: 10,
  720. currentPage: 1,
  721. total: 0
  722. },
  723. loading: false,
  724. loadingPolicy: false,
  725. contactsForm: {},
  726. optionPolicy: optionPolicy,
  727. customerBuyFree: BuyFree,
  728. nowDate: new Date().toLocaleString("chinese", { hour12: false }).replaceAll("/", "-"),
  729. policyOption: {
  730. nodeKey: "id",
  731. lazy: true,
  732. treeLoad: (node, resolve) => {
  733. const parentId = node.level === 0 ? 0 : node.data.id;
  734. const newTime = new Date().toLocaleString("chinese", { hour12: false }).replaceAll("/", "-");
  735. policyColumn({ newTime: newTime, parentId: parentId, corps: this.form.corpId }).then(res => {
  736. resolve(
  737. res.data.data.map(item => {
  738. return {
  739. ...item,
  740. leaf: !item.hasChildren
  741. };
  742. })
  743. );
  744. });
  745. },
  746. addBtn: false,
  747. menu: false,
  748. size: "small",
  749. props: {
  750. labelText: "标题",
  751. label: "title",
  752. value: "value",
  753. children: "children"
  754. }
  755. },
  756. treeOptionCost: {
  757. nodeKey: "id",
  758. lazy: true,
  759. treeLoad: function(node, resolve) {
  760. const parentId = node.level === 0 ? 0 : node.data.id;
  761. getDeptLazyTree(parentId).then(res => {
  762. resolve(
  763. res.data.data.map(item => {
  764. return {
  765. ...item,
  766. leaf: !item.hasChildren
  767. };
  768. })
  769. );
  770. });
  771. },
  772. addBtn: false,
  773. menu: false,
  774. size: "small",
  775. props: {
  776. labelText: "标题",
  777. label: "title",
  778. value: "value",
  779. children: "children"
  780. }
  781. },
  782. treeOption: {
  783. nodeKey: "id",
  784. lazy: true,
  785. treeLoad: function(node, resolve) {
  786. const parentId = node.level === 0 ? 0 : node.data.id;
  787. getDeptLazyTreeTwo(parentId).then(res => {
  788. resolve(
  789. res.data.data.map(item => {
  790. return {
  791. ...item,
  792. leaf: !item.hasChildren
  793. };
  794. })
  795. );
  796. });
  797. },
  798. addBtn: false,
  799. menu: false,
  800. size: "small",
  801. props: {
  802. labelText: "标题",
  803. label: "title",
  804. value: "value",
  805. children: "children"
  806. }
  807. },
  808. dialogVisible: false,
  809. policyDialog: false,
  810. advantageProjectForm: {},
  811. selection: [],
  812. bankOfDepositForm: {},
  813. contactsData: [],
  814. advantageProjectData: [],
  815. bankOfDepositData: [],
  816. tableDataCost: [],
  817. dic: [],
  818. storageId: [],
  819. tableData: [],
  820. policyData: [],
  821. policyDataTwo: [],
  822. customerContact: {},
  823. advantageProject: {},
  824. contactInformation: {
  825. column: [
  826. {
  827. label: "销售金额",
  828. prop: "orderAmount",
  829. type: "number",
  830. rules: [
  831. {
  832. required: false,
  833. message: " ",
  834. trigger: "blur"
  835. }
  836. ]
  837. },
  838. {
  839. label: "其他费用",
  840. prop: "otherAmount",
  841. type: "number",
  842. rules: [
  843. {
  844. required: false,
  845. message: " ",
  846. trigger: "blur"
  847. }
  848. ]
  849. },
  850. {
  851. label: "总溢付款",
  852. prop: "overPayment",
  853. disabled: true,
  854. rules: [
  855. {
  856. required: false,
  857. message: " ",
  858. trigger: "blur"
  859. }
  860. ]
  861. },
  862. {
  863. label: "返利余额",
  864. prop: "profit",
  865. disabled: true,
  866. rules: [
  867. {
  868. required: false,
  869. message: " ",
  870. trigger: "blur"
  871. }
  872. ]
  873. },
  874. {
  875. label: "产生返利",
  876. prop: "createProfit",
  877. disabled: false,
  878. rules: [
  879. {
  880. required: false,
  881. message: " ",
  882. trigger: "blur"
  883. }
  884. ]
  885. },
  886. {
  887. label: "本次使用返利",
  888. prop: "thisUsedProfit",
  889. disabled: false,
  890. rules: [
  891. {
  892. required: false,
  893. message: " ",
  894. trigger: "blur"
  895. }
  896. ]
  897. },
  898. {
  899. label: "应收账款",
  900. prop: "debitAmount",
  901. type: "number",
  902. disabled: true,
  903. rules: [
  904. {
  905. required: false,
  906. message: " ",
  907. trigger: "blur"
  908. }
  909. ]
  910. },
  911. {
  912. label: "已收款",
  913. prop: "settlmentAmount",
  914. disabled: true,
  915. rules: [
  916. {
  917. required: false,
  918. message: " ",
  919. trigger: "blur"
  920. }
  921. ]
  922. },
  923. {
  924. label: "应收未收款",
  925. prop: "balanceAmount", //无
  926. disabled: true,
  927. rules: [
  928. {
  929. required: false,
  930. message: " ",
  931. trigger: "blur"
  932. }
  933. ]
  934. },
  935. {
  936. label: "保证金",
  937. prop: "deposit",
  938. type: "number",
  939. rules: [
  940. {
  941. required: false,
  942. message: " ",
  943. trigger: "blur"
  944. }
  945. ]
  946. },
  947. {
  948. label: "逾期账款",
  949. prop: "overDueAccounts",
  950. type: "number",
  951. rules: [
  952. {
  953. required: false,
  954. message: " ",
  955. trigger: "blur"
  956. }
  957. ]
  958. },
  959. {
  960. label: "实际发货日期",
  961. prop: "actualDeliveryDate",
  962. type: "datetime",
  963. rules: [
  964. {
  965. required: false,
  966. message: " ",
  967. trigger: "blur"
  968. }
  969. ]
  970. },
  971. {
  972. label: "合同日期",
  973. prop: "businesDate",
  974. type: "date",
  975. rules: [
  976. {
  977. required: false,
  978. message: " ",
  979. trigger: "blur"
  980. }
  981. ]
  982. },
  983. {
  984. label: "到货日期",
  985. prop: "arrivalDate",
  986. type: "datetime",
  987. rules: [
  988. {
  989. required: false,
  990. message: " ",
  991. trigger: "blur"
  992. }
  993. ]
  994. },
  995. {
  996. label: "毛利率",
  997. prop: "grossProfitRate",
  998. display: true,
  999. rules: [
  1000. {
  1001. required: false,
  1002. message: " ",
  1003. trigger: "blur"
  1004. }
  1005. ]
  1006. },
  1007. {
  1008. label: "毛利额",
  1009. prop: "grossProfit",
  1010. type: "number",
  1011. display: true,
  1012. rules: [
  1013. {
  1014. required: false,
  1015. message: " ",
  1016. trigger: "blur"
  1017. }
  1018. ]
  1019. },
  1020. {
  1021. label: "历史运费(元/条)",
  1022. prop: "freightAmountHistory",
  1023. type: "number",
  1024. rules: [
  1025. {
  1026. required: false,
  1027. message: " ",
  1028. trigger: "blur"
  1029. }
  1030. ]
  1031. },
  1032. {
  1033. label: "预收款日期",
  1034. type: "datetime",
  1035. prop: "advanceCollectionDate",
  1036. rules: [
  1037. {
  1038. required: false,
  1039. message: " ",
  1040. trigger: "blur"
  1041. }
  1042. ]
  1043. },
  1044. {
  1045. label: "特价占比",
  1046. prop: "specialOfferOf",
  1047. disabled: false,
  1048. rules: [
  1049. {
  1050. required: false,
  1051. message: " ",
  1052. trigger: "blur"
  1053. }
  1054. ]
  1055. },
  1056. {
  1057. label: "大尺寸占比",
  1058. prop: "largeScale",
  1059. disabled: false
  1060. },
  1061. {
  1062. label: "单据状态",
  1063. prop: "orderStatus",
  1064. disabled: true,
  1065. rules: [
  1066. {
  1067. required: false,
  1068. message: " ",
  1069. trigger: "blur"
  1070. }
  1071. ]
  1072. },
  1073. {
  1074. label: "积分余额",
  1075. prop: "pointMutiple",
  1076. disabled: true,
  1077. rules: [
  1078. {
  1079. required: false,
  1080. message: " ",
  1081. trigger: "blur"
  1082. }
  1083. ]
  1084. },
  1085. {
  1086. label: "赠送积分",
  1087. prop: "presenterIntegral",
  1088. disabled: true,
  1089. rules: [
  1090. {
  1091. required: false,
  1092. message: " ",
  1093. trigger: "blur"
  1094. }
  1095. ]
  1096. },
  1097. {
  1098. label: "兑换积分",
  1099. prop: "convertIntegral",
  1100. disabled: true,
  1101. rules: [
  1102. {
  1103. required: false,
  1104. message: " ",
  1105. trigger: "blur"
  1106. }
  1107. ]
  1108. },
  1109. {
  1110. label: "重量合计",
  1111. prop: "cartonWeight",
  1112. disabled: true,
  1113. rules: [
  1114. {
  1115. required: false,
  1116. message: " ",
  1117. trigger: "blur"
  1118. }
  1119. ]
  1120. },
  1121. {
  1122. label: "体积合计",
  1123. prop: "cntrVolumn",
  1124. disabled: true,
  1125. rules: [
  1126. {
  1127. required: false,
  1128. message: " ",
  1129. trigger: "blur"
  1130. }
  1131. ]
  1132. },
  1133. {
  1134. label: "制单人",
  1135. prop: "createUserName",
  1136. disabled: true,
  1137. rules: [
  1138. {
  1139. required: false,
  1140. message: " ",
  1141. trigger: "blur"
  1142. }
  1143. ]
  1144. },
  1145. {
  1146. label: "制单日期",
  1147. prop: "createTime",
  1148. type: "datetime",
  1149. disabled: true,
  1150. rules: [
  1151. {
  1152. required: false,
  1153. message: " ",
  1154. trigger: "blur"
  1155. }
  1156. ]
  1157. },
  1158. {
  1159. label: "特别提醒",
  1160. prop: "specialRemarks",
  1161. type: "textarea",
  1162. span: 24,
  1163. rules: [
  1164. {
  1165. required: false,
  1166. message: " ",
  1167. trigger: "blur"
  1168. }
  1169. ]
  1170. }
  1171. ]
  1172. },
  1173. basicData: {
  1174. column: [
  1175. {
  1176. label: "所属公司",
  1177. prop: "belongToCorpId",
  1178. span: 8,
  1179. rules: [
  1180. {
  1181. required: true,
  1182. message: " ",
  1183. trigger: "change"
  1184. }
  1185. ]
  1186. },
  1187. {
  1188. label: "付款方式",
  1189. prop: "paymentType",
  1190. rules: [
  1191. {
  1192. required: true,
  1193. message: " ",
  1194. trigger: "change"
  1195. }
  1196. ]
  1197. },
  1198. {
  1199. label: "包装要求",
  1200. prop: "packageRemarks",
  1201. rules: [
  1202. {
  1203. required: true,
  1204. message: " ",
  1205. trigger: "change"
  1206. }
  1207. ]
  1208. },
  1209. {
  1210. label: "银行帐号",
  1211. prop: "banks",
  1212. type: "select",
  1213. rules: [
  1214. {
  1215. required: true,
  1216. message: " ",
  1217. trigger: "change"
  1218. }
  1219. ]
  1220. },
  1221. {
  1222. label: "公司户头",
  1223. prop: "banksAccountName",
  1224. rules: [
  1225. {
  1226. required: false,
  1227. message: " ",
  1228. trigger: "blur"
  1229. }
  1230. ]
  1231. },
  1232. {
  1233. label: "开户银行",
  1234. prop: "accountBank",
  1235. rules: [
  1236. {
  1237. required: false,
  1238. message: " ",
  1239. trigger: "blur"
  1240. }
  1241. ]
  1242. },
  1243. {
  1244. label: "客户全称",
  1245. prop: "corpId",
  1246. span: 8,
  1247. rules: [
  1248. {
  1249. required: true,
  1250. message: " ",
  1251. trigger: "change"
  1252. }
  1253. ]
  1254. },
  1255. {
  1256. label: "到货地址",
  1257. prop: "arrivalAddress",
  1258. span: 16,
  1259. rules: [
  1260. {
  1261. required: true,
  1262. message: " ",
  1263. trigger: "change"
  1264. }
  1265. ]
  1266. },
  1267. {
  1268. label: "生产工厂",
  1269. prop: "productionPlant",
  1270. span: 8,
  1271. rules: [
  1272. {
  1273. required: true,
  1274. message: " ",
  1275. trigger: "change"
  1276. }
  1277. ]
  1278. },
  1279. {
  1280. label: "发货地址",
  1281. prop: "shippingAddress",
  1282. disabled: false,
  1283. span: 16,
  1284. rules: [
  1285. {
  1286. required: true,
  1287. message: " ",
  1288. trigger: "change"
  1289. }
  1290. ]
  1291. },
  1292. {
  1293. label: "销售订单号",
  1294. prop: "orderNo",
  1295. disabled: true,
  1296. rules: [
  1297. {
  1298. required: false,
  1299. message: " ",
  1300. trigger: "blur"
  1301. }
  1302. ]
  1303. },
  1304. {
  1305. label: "主订单号",
  1306. prop: "morderNo",
  1307. rules: [
  1308. {
  1309. required: false,
  1310. message: " ",
  1311. trigger: "blur"
  1312. }
  1313. ]
  1314. },
  1315. {
  1316. label: "是否收取标签费",
  1317. prop: "isLabel",
  1318. type: "radio"
  1319. },
  1320. {
  1321. label: "是否包运费",
  1322. prop: "isFreight",
  1323. type: "radio"
  1324. },
  1325. {
  1326. label: "预估运费",
  1327. prop: "predictOceanFreight",
  1328. type: "number",
  1329. rules: [
  1330. {
  1331. required: true,
  1332. message: " ",
  1333. trigger: "blur"
  1334. }
  1335. ]
  1336. },
  1337. {
  1338. label: "要求发货日期",
  1339. prop: "requiredDeliveryDate",
  1340. type: "date",
  1341. rules: [
  1342. {
  1343. required: false,
  1344. message: " ",
  1345. trigger: "blur"
  1346. }
  1347. ]
  1348. },
  1349. {
  1350. label: "要求到货日期",
  1351. prop: "requiredArrivalDate",
  1352. type: "date",
  1353. rules: [
  1354. {
  1355. required: false,
  1356. message: " ",
  1357. trigger: "blur"
  1358. }
  1359. ]
  1360. },
  1361. {
  1362. label: "业务员",
  1363. prop: "chargeMember",
  1364. rules: [
  1365. {
  1366. required: true,
  1367. message: " ",
  1368. trigger: "change"
  1369. }
  1370. ]
  1371. },
  1372. {
  1373. label: "联系人",
  1374. prop: "corpAttn",
  1375. rules: [
  1376. {
  1377. required: false,
  1378. message: " ",
  1379. trigger: "change"
  1380. }
  1381. ]
  1382. },
  1383. {
  1384. label: "联系电话",
  1385. prop: "corpTel",
  1386. rules: [
  1387. {
  1388. required: false,
  1389. message: " ",
  1390. trigger: "change"
  1391. }
  1392. ]
  1393. },
  1394. {
  1395. label: "仓库",
  1396. prop: "storageId",
  1397. dicData: [],
  1398. overHidden: true,
  1399. rules: [
  1400. {
  1401. required: false,
  1402. message: " ",
  1403. trigger: "blur"
  1404. }
  1405. ]
  1406. },
  1407. {
  1408. label: "订单备注",
  1409. type: "textarea",
  1410. span: 24,
  1411. prop: "orderRemark",
  1412. mock: {
  1413. type: "county"
  1414. }
  1415. }
  1416. ]
  1417. },
  1418. // 银行账号下拉
  1419. bankList: [],
  1420. paymentOption: [],
  1421. statusOption: [],
  1422. // 费用信息排序的最大值
  1423. maxFeeNum: 0,
  1424. maxGoodsNum: 0,
  1425. oldForm: {
  1426. orderStatus: "录入"
  1427. },
  1428. oldGoodsList: [],
  1429. oldGiftList: [],
  1430. oldFeesList: [],
  1431. oldUploadList: [],
  1432. // 采购价格
  1433. purchasePriceOption: [],
  1434. // 销售价格
  1435. salesPriceOtion: [],
  1436. // 弹窗高度
  1437. rowHeight: "",
  1438. // 查询时loading页面
  1439. pageLoading: false,
  1440. switchDialog: false,
  1441. switchDialog2: false,
  1442. // 商品信息表格loading
  1443. goodsLoading: false,
  1444. dialogVisibleDL: false,
  1445. // 上传时带的参数
  1446. uploadPolicy: {
  1447. policyName: "",
  1448. salesType: 1
  1449. },
  1450. baseURL: "/api/blade-purchase-sales/orderitems/importPrice", // 商品明细上传路径
  1451. headers: { "Blade-Auth": "Bearer " + getToken() },
  1452. activeName: "searchList",
  1453. // 商品列表数据合计
  1454. goodsListShow: [],
  1455. DLListShow: [],
  1456. dataTwo: [],
  1457. dataThree: [],
  1458. // 商品列表暂存
  1459. goodsListSave: [],
  1460. DLListSave: [],
  1461. goodsListPolicy: [],
  1462. buyAndGiveList: [],
  1463. goodsListTotal: 0,
  1464. goodsListSaveTotal: 0,
  1465. goodsActives: "goods",
  1466. saveActives: "",
  1467. goodsDisabled: false,
  1468. // 赠品信息数据
  1469. giftData: [],
  1470. // 商品信息展示数据
  1471. goodsShowData: [],
  1472. arrivalOptions: [],
  1473. shippingOptions: [],
  1474. storageOptions: [],
  1475. applicationDialog: false,
  1476. itemType: "销售",
  1477. packageOptions: [],
  1478. // 请核状态禁用
  1479. browse: false,
  1480. roleName: "",
  1481. userList: [],
  1482. storageIdOption: [],
  1483. feesOption: [],
  1484. checkDisabled: false,
  1485. checkData: {},
  1486. checkDialog: false,
  1487. checkScheduleDialog: false,
  1488. checkId: "",
  1489. batchNo: "",
  1490. applyPaymentList: [],
  1491. khInfoList: [],
  1492. messageVisble: false, //消息弹窗开关
  1493. changeApproveVis: false, // 更换审批人弹窗
  1494. arrearsCheck: false, // 是否欠款发货审批
  1495. shopQualityDisable: false, //质量胎切换禁用
  1496. index: 0,
  1497. policyIndex: 0,
  1498. routerTag: "",
  1499. handId: null,
  1500. mockData: []
  1501. };
  1502. },
  1503. mounted() {
  1504. this.$nextTick(() => {
  1505. // 监听浏览器高度变化,改变表格高度
  1506. window.onresize = () => {
  1507. this.rowHeight = window.innerHeight - 130 + "px";
  1508. };
  1509. this.routerTag = window.location.hash.slice(1);
  1510. });
  1511. this.userInfo =
  1512. localStorage.getItem("saber-userInfo") &&
  1513. JSON.parse(localStorage.getItem("saber-userInfo"))
  1514. .content.role_name.split(",")
  1515. .includes("admin");
  1516. },
  1517. filters: {
  1518. IntegerFormat(num) {
  1519. return IntegerFormat(num);
  1520. },
  1521. decimalFormat(num) {
  1522. return num ? Number(num).toFixed(2) : "0.00";
  1523. }
  1524. },
  1525. //初始化查询
  1526. async created() {
  1527. this.rowHeight = window.innerHeight - 130 + "px";
  1528. this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
  1529. this.getWorkDicts("payment_term").then(res => {
  1530. this.paymentOption = res.data.data;
  1531. });
  1532. storageType().then(res => {
  1533. this.storageIdOption = res.data.data.records;
  1534. this.form.storageId = res.data.data.records[0].id;
  1535. this.form.storageName = res.data.data.records[0].cname;
  1536. });
  1537. this.getWorkDicts("order_status").then(res => {
  1538. this.statusOption = res.data.data;
  1539. });
  1540. this.getWorkDicts("packageRemarks").then(res => {
  1541. this.packageOptions = res.data.data;
  1542. });
  1543. // this.getDefault()
  1544. if (this.detailData.id) {
  1545. // 详情进入
  1546. this.queryData(this.detailData.id);
  1547. }
  1548. feeList().then(res => {
  1549. this.feesOption = res.data.data.records;
  1550. });
  1551. this.oldForm = Object.assign({}, this.form);
  1552. this.customerBuyFree.height = (window.innerHeight - 330) / 2;
  1553. this.optionPolicy.height = (window.innerHeight - 330) / 2;
  1554. this.customerContact.height = window.innerHeight - 240;
  1555. this.index++;
  1556. this.$refs.shipmentRef.show = false;
  1557. },
  1558. updated() {
  1559. this.$nextTick(() => {
  1560. this.$refs.crudContact.doLayout();
  1561. });
  1562. },
  1563. methods: {
  1564. getInvestor(data) {
  1565. console.info("data-------", data);
  1566. if (!data) {
  1567. this.form.investor = "";
  1568. this.form.investorName = "";
  1569. return false;
  1570. }
  1571. this.form.investor = data.id;
  1572. this.form.investorName = data.cname;
  1573. },
  1574. calculateInterest() {
  1575. if (!this.form.investor) {
  1576. this.$message.error("请选择资方");
  1577. return false;
  1578. }
  1579. if (!this.form.interestRate) {
  1580. this.$message.error("请输入利率");
  1581. return false;
  1582. }
  1583. if (!this.form.days) {
  1584. this.$message.error("请输入天数");
  1585. return false;
  1586. }
  1587. calculateInterestAmount(this.form).then(res => {
  1588. this.$message.success(res.data.msg);
  1589. this.queryData(this.form.id);
  1590. });
  1591. },
  1592. queryData(id) {
  1593. this.pageLoading = true;
  1594. this.saveLoading = true;
  1595. detail(id)
  1596. .then(async res => {
  1597. this.form = res.data.data;
  1598. this.$set(this.form, "interestRate", res.data.data.interestRate ? res.data.data.interestRate : 9);
  1599. this.$set(this.form, "days", res.data.data.days ? res.data.data.days : 90);
  1600. this.$set(this.form, "fundingRatio", res.data.data.fundingRatio ? res.data.data.fundingRatio : 80);
  1601. this.$set(this.form, "taxRate", res.data.data.taxRate ? res.data.data.taxRate : 13);
  1602. this.browse = this.form.status > 0 ? true : false;
  1603. this.arrearsCheck = this.form.specialCheckStatus == 3 ? true : false;
  1604. await getProfit({ Id: this.form.corpId }).then(res => {
  1605. this.$set(this.form, "profit", res.data.data.surplusProfit ? res.data.data.surplusProfit : "0.00");
  1606. });
  1607. this.contactsData = this.form.orderItemsList.filter(item => {
  1608. return item.goodType == 0;
  1609. });
  1610. for (let item of this.contactsData) {
  1611. item.storageId = item.storageId + "-" + item.corpId;
  1612. }
  1613. console.log(this.contactsData, 1598);
  1614. this.giftData = this.form.orderItemsList.filter(item => {
  1615. return item.goodType == 1;
  1616. });
  1617. for (let item of this.giftData) {
  1618. item.storageId = item.storageId + "-" + item.corpId;
  1619. }
  1620. this.goodsShowData = this.giftData;
  1621. this.saveActives = "gift";
  1622. this.goodsActives = "goods";
  1623. this.handleClick({ name: this.goodsActives });
  1624. this.advantageProjectData = this.form.orderFeesList;
  1625. this.bankOfDepositData = this.form.orderFilesList;
  1626. this.configuration.dicData = this.form.corpName;
  1627. let feesData = [];
  1628. this.form.orderFeesList.forEach(item => {
  1629. let a = {
  1630. cname: item.corpName,
  1631. id: item.corpId
  1632. };
  1633. feesData.push(a);
  1634. });
  1635. this.configuration.dicData = this.configuration.dicData.concat(feesData);
  1636. // 去重
  1637. this.removeRepeat();
  1638. let goodsData = [];
  1639. this.form.orderItemsList.forEach(item => {
  1640. let a = {
  1641. cname: item.cname
  1642. };
  1643. goodsData.push(a);
  1644. });
  1645. this.goodsConfiguration.dicData = [].concat(goodsData);
  1646. this.removeGoodsRepeat();
  1647. delete this.form.orderItemsList;
  1648. delete this.form.orderFeesList;
  1649. delete this.form.orderFilesList;
  1650. // 获取最大值
  1651. let numList = this.advantageProjectData.map(item => item.sort);
  1652. this.maxFeeNum = numList.length === 0 ? 0 : Math.max.apply(null, numList);
  1653. let goodsNum = [];
  1654. let purchaseAmount = 0;
  1655. this.contactsData.forEach(item => {
  1656. goodsNum.push(item.sort);
  1657. purchaseAmount += Number(item.purchaseAmount);
  1658. });
  1659. if (goodsNum.length == 0) {
  1660. this.maxGoodsNum = 0;
  1661. } else {
  1662. this.maxGoodsNum = goodsNum.reduce((a, b) => {
  1663. return b > a ? b : a;
  1664. });
  1665. }
  1666. this.oldForm = Object.assign({}, this.form);
  1667. this.oldGoodsList = [];
  1668. this.oldGiftList = [];
  1669. this.oldFeesList = [];
  1670. this.oldUploadList = [];
  1671. this.storageNameList = [];
  1672. this.oldGoodsList = this.deepClone(this.contactsData);
  1673. this.oldGiftList = this.deepClone(this.giftData);
  1674. this.oldFeesList = this.deepClone(this.advantageProjectData);
  1675. this.oldUploadList = this.deepClone(this.bankOfDepositData);
  1676. })
  1677. .finally(() => {
  1678. this.saveLoading = false;
  1679. this.pageLoading = false;
  1680. });
  1681. },
  1682. getDefault() {
  1683. let date = new Date();
  1684. let year = date.getFullYear();
  1685. let month = date.getMonth() + 1;
  1686. let day = date.getDate();
  1687. if (month < 10) {
  1688. month = "0" + month;
  1689. }
  1690. if (day < 10) {
  1691. day = "0" + day;
  1692. }
  1693. let nowDate = year + "-" + month + "-" + day + " 00:00:00";
  1694. this.$set(this.form, "businesDate", nowDate);
  1695. this.$set(this.form, "orderStatus", "录入");
  1696. this.$set(this.form, "caseOverPayment", 0);
  1697. this.$set(this.form, "overPayment", 0);
  1698. this.$set(this.form, "orderAmount", 0);
  1699. this.$set(this.form, "predictOceanFreight", 0);
  1700. this.$set(this.form, "presenterIntegral", 0);
  1701. this.$set(this.form, "convertIntegral", 0);
  1702. this.$set(this.form, "profit", 0);
  1703. this.$set(this.form, "paymentType", "预付");
  1704. this.$set(this.form, "thisUsedProfit", 0);
  1705. this.$set(this.form, "createProfit", 0);
  1706. this.$set(this.form, "isFreight", 0);
  1707. this.$set(this.form, "isLabel", 0);
  1708. },
  1709. // 报表
  1710. openReport(name) {
  1711. // this.switchDialog = !this.switchDialog;
  1712. let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id;
  1713. let tenantId = this.$store.getters.userInfo.tenant_id;
  1714. this.$router.push({
  1715. path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
  1716. query: {
  1717. id: this.form.id,
  1718. userId: userId,
  1719. tenantId: tenantId
  1720. }
  1721. });
  1722. },
  1723. // 报表
  1724. // openReport2() {
  1725. // this.switchDialog2 = !this.switchDialog2;
  1726. // },
  1727. // 导出
  1728. exportHandle() {
  1729. this.$confirm("是否导出产品信息?", "提示", {
  1730. confirmButtonText: "确定",
  1731. cancelButtonText: "取消",
  1732. type: "warning"
  1733. })
  1734. .then(() => {
  1735. window.open(`/api/blade-client/goodsdesc/export-out-info?${this.website.tokenHeader}=${getToken()}`);
  1736. })
  1737. .catch(() => {
  1738. this.$message({
  1739. type: "info",
  1740. message: "已取消"
  1741. });
  1742. });
  1743. },
  1744. onClose(val) {
  1745. this.switchDialog = val;
  1746. },
  1747. // 去重
  1748. removeRepeat() {
  1749. let obj = [];
  1750. this.configuration.dicData = this.configuration.dicData.reduce((current, next) => {
  1751. obj[next.id] ? "" : (obj[next.id] = true && current.push(next));
  1752. return current;
  1753. }, []);
  1754. },
  1755. removeGoodsRepeat() {
  1756. let obj = [];
  1757. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current, next) => {
  1758. obj[next.cname] ? "" : (obj[next.cname] = true && current.push(next));
  1759. return current;
  1760. }, []);
  1761. },
  1762. async getCorpRow(data) {
  1763. getCharge("KH", data.id).then(res => {
  1764. this.userList = res.data.data;
  1765. });
  1766. khDetail(data.id).then(res => {
  1767. this.$set(this.form, "packageRemarks", res.data.data.packageRemarks ? res.data.data.packageRemarks : "透明包装");
  1768. if (res.data.data.adminProfiles) {
  1769. res.data.data.adminProfiles = res.data.data.adminProfiles.split(",");
  1770. let arr = [];
  1771. res.data.data.adminProfiles.forEach(e => {
  1772. arr.push(this.userList.find(item => item.id == e).cname);
  1773. });
  1774. this.$set(this.form, "chargeMember", arr[0]);
  1775. }
  1776. if (res.data.data.corpsAttnList.length > 0) {
  1777. this.khInfoList = res.data.data.corpsAttnList;
  1778. this.$set(this.form, "corpAttn", res.data.data.corpsAttnList[0].cname);
  1779. this.$set(this.form, "corpTel", res.data.data.corpsAttnList[0].tel);
  1780. } else {
  1781. this.khInfoList = [];
  1782. this.$set(this.form, "corpAttn", null);
  1783. this.$set(this.form, "corpTel", null);
  1784. }
  1785. });
  1786. getCorpDetail({ corpId: data.id }).then(res => {
  1787. this.form.overPayment = res.data.data ? res.data.data.balanceOverpaymen : 0;
  1788. });
  1789. integralDetail({ corpId: data.id }).then(res => {
  1790. this.form.pointMutiple = res.data.data ? res.data.data.balancePoints : 0;
  1791. });
  1792. getProfit({ Id: data.id }).then(res => {
  1793. this.form.profit = res.data.data.surplusProfit ? res.data.data.surplusProfit : "0.00";
  1794. });
  1795. this.arrivalOptions = [];
  1796. this.arrivalOptions = await this.corpAddr(data.id);
  1797. this.$set(this.form, "paymentType", data.paymentType ? data.paymentType : "预付");
  1798. if (this.arrivalOptions.length > 0) {
  1799. this.$set(this.form, "arrivalAddress", this.arrivalOptions[0].label);
  1800. } else {
  1801. this.$set(this.form, "arrivalAddress", null);
  1802. }
  1803. },
  1804. async getPlantRow(data) {
  1805. this.shippingOptions = [];
  1806. this.shippingOptions = await this.corpAddr(data.id);
  1807. if (this.shippingOptions.length > 0) {
  1808. this.$set(this.form, "shippingAddress", this.shippingOptions[0].label);
  1809. } else {
  1810. this.$set(this.form, "shippingAddress", null);
  1811. }
  1812. },
  1813. //返回列表
  1814. backToList() {
  1815. this.$emit("goBack");
  1816. this.leaveDetailsKey(this.$route.name);
  1817. },
  1818. // 保存列设置
  1819. async saveColumn(name) {
  1820. if (name == "goods") {
  1821. const inSave = await this.saveColumnData(this.getColumnName(15), this.customerContact);
  1822. if (inSave) {
  1823. this.$message.success("保存成功");
  1824. //关闭窗口
  1825. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1826. this.$nextTick(() => {
  1827. this.$refs.crudContact.doLayout();
  1828. });
  1829. }
  1830. } else if (name === "fees") {
  1831. const inSave = await this.saveColumnData(this.getColumnName(16), this.advantageProject);
  1832. if (inSave) {
  1833. this.$message.success("保存成功");
  1834. //关闭窗口
  1835. this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
  1836. }
  1837. }
  1838. },
  1839. async resetColumn() {
  1840. this.customerContact = customerContact;
  1841. const inSave = await this.delColumnData(this.getColumnName(15), customerContact);
  1842. if (inSave) {
  1843. this.$nextTick(() => {
  1844. this.$refs.crudContact.doLayout();
  1845. });
  1846. this.$message.success("重置成功");
  1847. //关闭窗口
  1848. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1849. }
  1850. },
  1851. returnBack(row) {
  1852. console.log(row);
  1853. this.$refs.KHSelect[0].updateData(row.id);
  1854. getKHList({ corpType: "KH", belongtocompany: row.id }).then(res => {});
  1855. getKHList({ corpType: "GYS", belongtocompany: row.id }).then(res => {
  1856. this.form.productionPlant = res.data.data.records.length > 0 ? res.data.data.records[0].id : null;
  1857. if (this.form.productionPlant) {
  1858. this.getPlantRow({ id: this.form.productionPlant });
  1859. }
  1860. });
  1861. this.form.belongCompany = row.cname;
  1862. getlistBankBy(row.id).then(res => {
  1863. this.$set(this.form, "banks", null);
  1864. this.$set(this.form, "banksAccountName", null);
  1865. this.$set(this.form, "accountBank", null);
  1866. this.bankList = res.data;
  1867. if (this.bankList.length > 0) {
  1868. this.form.banks = this.bankList[0].accountNo;
  1869. this.form.banksAccountName = this.bankList[0].accountName;
  1870. this.form.accountBank = this.bankList[0].accountBank;
  1871. }
  1872. });
  1873. },
  1874. // 商品表格加色
  1875. goodsRowClassName({ row, column, rowIndex, columnIndex }) {
  1876. if (Number(row.orderQuantity) > Number(row.storageQuantity) && column.property == "storageQuantity") {
  1877. return "color: #fff;background:#a4cf57";
  1878. }
  1879. return "";
  1880. },
  1881. // 合计计算
  1882. summaryMethod({ columns, data }) {
  1883. const sums = [];
  1884. if (columns.length > 0) {
  1885. columns.forEach((item, index) => {
  1886. sums[0] = "合计";
  1887. if (
  1888. item.property == "amount" ||
  1889. item.property == "orderQuantity" ||
  1890. item.property == "actualQuantity" ||
  1891. item.property == "integral" ||
  1892. item.property == "cartonWeight" ||
  1893. item.property == "cntrVolumn"
  1894. ) {
  1895. let amountSum = 0;
  1896. let orderQuantitySum = 0;
  1897. let actualQuantitySum = 0;
  1898. let integralSum = 0;
  1899. let cartonWeight = 0;
  1900. let cntrVolumn = 0;
  1901. if (this.selection.length > 0) {
  1902. this.selection.forEach(e => {
  1903. amountSum = _.add(amountSum, Number(e.amount));
  1904. orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
  1905. actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
  1906. integralSum = _.add(integralSum, Number(e.integral));
  1907. cartonWeight = _.add(cartonWeight, Number(e.cartonWeight));
  1908. cntrVolumn = _.add(cntrVolumn, Number(e.cntrVolumn));
  1909. });
  1910. } else {
  1911. {
  1912. this.goodsShowData.forEach(e => {
  1913. amountSum = _.add(amountSum, Number(e.amount));
  1914. orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
  1915. actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
  1916. integralSum = _.add(integralSum, Number(e.integral));
  1917. cartonWeight = _.add(cartonWeight, Number(e.cartonWeight));
  1918. cntrVolumn = _.add(cntrVolumn, Number(e.cntrVolumn));
  1919. });
  1920. }
  1921. }
  1922. // 订货数量合计
  1923. if (item.property == "orderQuantity") {
  1924. sums[index] = orderQuantitySum ? orderQuantitySum.toFixed(0) : "0";
  1925. }
  1926. // 发货数量合计
  1927. if (item.property == "actualQuantity") {
  1928. sums[index] = actualQuantitySum ? actualQuantitySum.toFixed(0) : "0";
  1929. }
  1930. // 金额合计
  1931. if (item.property == "amount") {
  1932. sums[index] = amountSum ? amountSum.toFixed(2) : "0.00";
  1933. }
  1934. // 积分合计
  1935. if (item.property == "integral") {
  1936. sums[index] = integralSum ? integralSum.toFixed(2) : "0.00";
  1937. }
  1938. // 重量合计
  1939. if (item.property == "cartonWeight") {
  1940. sums[index] = cartonWeight ? cartonWeight.toFixed(2) : "0.00";
  1941. }
  1942. // 体积合计
  1943. if (item.property == "cntrVolumn") {
  1944. sums[index] = cntrVolumn ? cntrVolumn.toFixed(5) : "0.00000";
  1945. }
  1946. }
  1947. });
  1948. }
  1949. return sums;
  1950. },
  1951. // 标签页切换
  1952. tabHandle(data) {
  1953. if (data.name == "searchList") {
  1954. this.goodsListShow = this.data;
  1955. this.page.total = this.pageList.total;
  1956. } else if (data.name == "importStaging") {
  1957. this.goodsListShow = this.goodsListSave;
  1958. this.page.total = 0;
  1959. }
  1960. },
  1961. // 商品信息标签页切换
  1962. handleClick(data) {
  1963. console.info("datata---", data);
  1964. console.info("this.saveActives---", this.saveActives);
  1965. if (this.saveActives == data.name) return;
  1966. this.saveActives = data.name;
  1967. this.goodsDisabled = true;
  1968. if (data.name == "goods") {
  1969. this.giftData = this.goodsShowData.filter(item => item.goodType == 1);
  1970. // 显示
  1971. this.customerContact.column.forEach(item => {
  1972. if (item.prop == "integralMultiples") item.label = "积分倍数";
  1973. if (item.prop == "integral") item.label = "赠送积分";
  1974. if (item.prop == "orderQuantity") item.label = "订货数量";
  1975. if (
  1976. item.prop == "priceType" ||
  1977. item.prop == "code" ||
  1978. item.prop == "typeno" ||
  1979. item.prop == "corpId" ||
  1980. item.prop == "actualQuantity" ||
  1981. item.prop == "storageQuantity" ||
  1982. item.prop == "purchaseAmount" ||
  1983. item.prop == "price" ||
  1984. item.prop == "amount" ||
  1985. item.prop == "shopQuality"
  1986. ) {
  1987. item.hide = false;
  1988. item.showColumn = true;
  1989. if (!this.permission.show_purPrice) {
  1990. if (item.prop == "purchaseAmount") {
  1991. item.hide = true;
  1992. item.showColumn = false;
  1993. }
  1994. }
  1995. }
  1996. });
  1997. // contactsData它是商品的数组 giftData它是赠品的数组 goodsShowData它是展示页面的数组一共三个
  1998. this.goodsShowData = this.deepClone(this.contactsData);
  1999. setTimeout(() => {
  2000. this.goodsDisabled = false;
  2001. }, 500);
  2002. } else {
  2003. // 隐藏字段
  2004. this.contactsData = this.goodsShowData.filter(item => item.goodType == 0);
  2005. this.customerContact.column.forEach(item => {
  2006. if (item.prop == "deliveryAmount") item.label = "积分";
  2007. if (item.prop == "actualQuantity") item.label = "数量";
  2008. if (item.prop == "integralMultiples") item.label = "积分";
  2009. if (item.prop == "integral") item.label = "兑换积分";
  2010. if (item.prop == "orderQuantity") item.label = "数量";
  2011. if (
  2012. item.prop == "priceType" ||
  2013. item.prop == "code" ||
  2014. item.prop == "typeno" ||
  2015. item.prop == "corpId" ||
  2016. item.prop == "actualQuantity" ||
  2017. item.prop == "storageQuantity" ||
  2018. item.prop == "purchaseAmount" ||
  2019. item.prop == "price" ||
  2020. item.prop == "amount" ||
  2021. item.prop == "shopQuality"
  2022. ) {
  2023. item.hide = true;
  2024. item.showColumn = false;
  2025. }
  2026. });
  2027. // this.giftData=this.goodsShowData.filter(e=>e.typegood==1)
  2028. this.goodsShowData = this.deepClone(this.giftData);
  2029. setTimeout(() => {
  2030. this.goodsDisabled = false;
  2031. }, 500);
  2032. }
  2033. },
  2034. // 切换之前
  2035. beforeLeave(activeName, oldActiveName) {},
  2036. //费用明细回调
  2037. beforeFinance(feesData, callback) {
  2038. this.advantageProjectData = feesData;
  2039. let params = {};
  2040. //暂时默认通过 之后优化
  2041. params.valid = true;
  2042. params.parentId = this.form.id;
  2043. params.srcOrderno = this.form.orderNo;
  2044. callback(params);
  2045. }
  2046. },
  2047. computed: {
  2048. ...mapGetters(["userInfo", "permission"])
  2049. },
  2050. watch: {
  2051. customerContact(oldVal, newVal) {
  2052. if (!this.permission.show_purPrice) {
  2053. oldVal.column.forEach(item => {
  2054. if (item.prop == "purchaseAmount") {
  2055. item.hide = true;
  2056. item.showColumn = false;
  2057. }
  2058. });
  2059. }
  2060. if (this.roleName.includes("业务员")) {
  2061. oldVal.column.forEach(item => {
  2062. if (item.prop == "purchaseAmount") {
  2063. item.hide = true;
  2064. item.showColumn = false;
  2065. }
  2066. });
  2067. } else {
  2068. oldVal.column.forEach(item => {
  2069. if (item.prop == "purchaseAmount") {
  2070. item.hide = false;
  2071. item.showColumn = true;
  2072. }
  2073. });
  2074. }
  2075. }
  2076. }
  2077. };
  2078. </script>
  2079. <style lang="scss" scoped>
  2080. .back-icon {
  2081. line-height: 64px;
  2082. font-size: 20px;
  2083. margin-right: 8px;
  2084. }
  2085. ::v-deep .el-form-item {
  2086. margin-bottom: 0;
  2087. }
  2088. .el-dialogDeep {
  2089. ::v-deep .el-dialog {
  2090. margin: 1vh auto 0 !important;
  2091. padding-bottom: 10px !important;
  2092. .el-dialog__body,
  2093. .el-dialog__footer {
  2094. padding-bottom: 0 !important;
  2095. padding-top: 0 !important;
  2096. }
  2097. }
  2098. }
  2099. .print-div {
  2100. color: #000;
  2101. }
  2102. .print_table {
  2103. table {
  2104. border-right: 1px solid #000;
  2105. border-bottom: 1px solid #000;
  2106. font-size: 12px;
  2107. margin-bottom: 5px;
  2108. }
  2109. table td {
  2110. border-left: 1px solid #000;
  2111. border-top: 1px solid #000;
  2112. vertical-align: middle;
  2113. padding: 2px;
  2114. text-align: center;
  2115. }
  2116. }
  2117. .table {
  2118. border-collapse: collapse;
  2119. border-spacing: 0;
  2120. background-color: transparent;
  2121. display: table;
  2122. width: 99%;
  2123. max-width: 100%;
  2124. margin: 0 auto;
  2125. }
  2126. .table td {
  2127. text-align: left;
  2128. vertical-align: middle;
  2129. font-size: 14px;
  2130. color: #000000;
  2131. padding: 10.5px 0 10.5px 30px;
  2132. //border: 1px solid #000;
  2133. }
  2134. ::v-deep .el-form-item {
  2135. margin-bottom: 0;
  2136. }
  2137. ::v-deep .el-form-item__content {
  2138. line-height: 32px;
  2139. }
  2140. .isShow {
  2141. display: none;
  2142. }
  2143. .order_number:hover {
  2144. display: none;
  2145. }
  2146. .number_button {
  2147. display: none;
  2148. }
  2149. .order_number:hover + .number_button {
  2150. display: block;
  2151. }
  2152. </style>