detailsPageEdit.vue 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092
  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
  12. v-if="detailData.seeDisabled"
  13. size="small"
  14. @click="detailData.seeDisabled = false"
  15. type="primary"
  16. style="margin-right: 8px"
  17. >编辑</el-button>
  18. <el-dropdown style="margin-right: 8px;">
  19. <el-button
  20. type="primary"
  21. size="small"
  22. >
  23. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  24. </el-button>
  25. <el-dropdown-menu slot="dropdown">
  26. <el-dropdown-item :disabled="true">请核数据</el-dropdown-item>
  27. <el-dropdown-item v-if="false">审核进度</el-dropdown-item>
  28. <el-dropdown-item v-if="false">撤销请核</el-dropdown-item>
  29. </el-dropdown-menu>
  30. </el-dropdown>
  31. <el-dropdown style="margin-right: 8px;">
  32. <el-button
  33. type="warning"
  34. size="small"
  35. >
  36. 账单处理<i class="el-icon-arrow-down el-icon--right"></i>
  37. </el-button>
  38. <el-dropdown-menu slot="dropdown">
  39. <el-dropdown-item
  40. :disabled="detailData.seeDisabled"
  41. @click.native="applySettlement('收费')">生成账单
  42. </el-dropdown-item>
  43. <!-- <el-dropdown-item-->
  44. <!-- :disabled="detailData.seeDisabled"-->
  45. <!-- @click.native="applySettlement('申请')"-->
  46. <!-- >申请退款</el-dropdown-item>-->
  47. <el-dropdown-item
  48. @click.native="openApplicationDialog"
  49. :disabled="!form.id"
  50. >查看账单
  51. </el-dropdown-item>
  52. </el-dropdown-menu>
  53. </el-dropdown>
  54. <el-dropdown style="margin-right: 8px;">
  55. <el-button
  56. type="success"
  57. size="small"
  58. >
  59. 业务处理<i class="el-icon-arrow-down el-icon--right"></i>
  60. </el-button>
  61. <el-dropdown-menu slot="dropdown">
  62. <el-dropdown-item
  63. :disabled="detailData.seeDisabled"
  64. @click.native="saveSell">生成采购
  65. </el-dropdown-item>
  66. <el-dropdown-item
  67. :disabled="detailData.seeDisabled || !this.form.id"
  68. @click.native="copyOrder"
  69. >复制单据</el-dropdown-item>
  70. </el-dropdown-menu>
  71. </el-dropdown>
  72. <el-button
  73. class="el-button--small-yh"
  74. type="primary"
  75. :disabled="disabled || detailData.seeDisabled"
  76. :loading="saveLoading"
  77. size="small"
  78. @click="editCustomer(false)"
  79. >保 存
  80. </el-button>
  81. </div>
  82. </div>
  83. <div class="customer-main">
  84. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  85. <containerTitle title="基础资料"></containerTitle>
  86. <basic-container style="margin-bottom: 10px">
  87. <el-row>
  88. <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
  89. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  90. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  91. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled"/>
  92. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  93. size="small" type="date" placeholder="选择日期"
  94. value-format="yyyy-MM-dd HH:mm:ss"
  95. :disabled="detailData.seeDisabled"/>
  96. <crop-select
  97. v-else-if="item.prop === 'corpId'"
  98. v-model="form[item.prop]"
  99. @getCorpData="getCorpRow"
  100. corpType="KH"
  101. :disabled="detailData.seeDisabled"
  102. style="width: 100%"
  103. ></crop-select>
  104. <crop-select
  105. v-else-if="item.prop === 'belongToCorpId'"
  106. v-model="form[item.prop]"
  107. @getCorpData="returnBack"
  108. corpType="GS"
  109. :disabled="detailData.seeDisabled"
  110. ></crop-select>
  111. <crop-select
  112. v-else-if="item.prop === 'productionPlant'"
  113. v-model="form[item.prop]"
  114. @getCorpData="getPlantRow"
  115. corpType="GYS"
  116. :disabled="detailData.seeDisabled"
  117. style="width: 100%"
  118. ></crop-select>
  119. <!-- <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"-->
  120. <!-- :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"-->
  121. <!-- @getRow="getCorpRow"-->
  122. <!-- />-->
  123. <!-- 所属公司带出银行信息-->
  124. <!-- <selectComponent v-else-if="item.prop === 'belongToCorpId'"-->
  125. <!-- v-model="form[item.prop]" :configuration="companyConfiguration"-->
  126. <!-- style="width: 100%"-->
  127. <!-- :disabled="detailData.seeDisabled"-->
  128. <!-- typeData="GS"-->
  129. <!-- @returnBack="returnBack"/>-->
  130. <!-- 生产工厂-->
  131. <!-- <selectComponent v-else-if="item.prop === 'productionPlant'"-->
  132. <!-- v-model="form[item.prop]" :configuration="plantConfiguration"-->
  133. <!-- style="width: 100%"-->
  134. <!-- :disabled="detailData.seeDisabled"-->
  135. <!-- typeData="GYS"-->
  136. <!-- @getRow="getPlantRow"/>-->
  137. <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
  138. <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  139. </el-select>
  140. <el-select v-else-if="item.prop === 'arrivalAddress'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled" allow-create default-first-option>
  141. <el-option v-for="(item,index) in arrivalOptions" :key="index" :label="item.label" :value="item.label"></el-option>
  142. </el-select>
  143. <el-select v-else-if="item.prop === 'shippingAddress'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled" allow-create default-first-option>
  144. <el-option v-for="(item,index) in shippingOptions" :key="index" :label="item.label" :value="item.label"></el-option>
  145. </el-select>
  146. <el-select v-else-if="item.prop === 'banks'"
  147. v-model="form[item.prop]" placeholder="请选择"
  148. clearable
  149. filterable
  150. allow-create
  151. default-first-option
  152. size="small"
  153. style="width: 100%;"
  154. @change="banksChange"
  155. :disabled="detailData.seeDisabled">
  156. <el-option v-for="(item,index) in bankList" :key="index" :label="item.accountNo" :value="item.accountNo"></el-option>
  157. </el-select>
  158. <el-input
  159. v-else-if="item.type == 'number'"
  160. placeholder="请输入"
  161. v-input-limit="2"
  162. size="small"
  163. :disabled="item.disabled || detailData.seeDisabled"
  164. v-model.trim="form[item.prop]"
  165. />
  166. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  167. <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled" clearable></el-input>
  168. </el-form-item>
  169. </el-col>
  170. </el-row>
  171. </basic-container>
  172. <containerTitle title="发货信息"></containerTitle>
  173. <basic-container style="margin-bottom: 10px">
  174. <el-row>
  175. <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
  176. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  177. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled || detailData.seeDisabled"/>
  178. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  179. size="small" type="date" placeholder="选择日期"
  180. value-format="yyyy-MM-dd HH:mm:ss"
  181. :disabled="detailData.seeDisabled"/>
  182. <el-input
  183. v-else-if="(item.prop === 'advancePayment') || (item.prop === 'orderAmount') || (item.prop === 'settlmentAmount')"
  184. v-model.trim="form[item.prop]" size="small" autocomplete="off"
  185. @change="computedCost"
  186. :disabled="detailData.seeDisabled || item.disabled"
  187. v-input-limit="2"
  188. ></el-input>
  189. <span v-else-if="item.prop === 'caseOverPayment'">
  190. <el-input
  191. v-model="form['caseOverPayment']"
  192. size="small"
  193. autocomplete="off"
  194. @change="computedCost"
  195. :disabled="detailData.seeDisabled"
  196. v-input-limit="2"></el-input>
  197. </span>
  198. <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || item.disabled">
  199. <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  200. </el-select>
  201. <el-input type="age" v-else-if="item.prop === 'grossProfitRate'" v-model.trim="form[item.prop]" size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled" v-input-limit="2">
  202. <template slot="append">%</template>
  203. </el-input>
  204. <el-input type="age" v-else-if="item.prop === 'specialOfferOf'" v-model.trim="form[item.prop]" size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled" v-input-limit="2">
  205. <template slot="append">%</template>
  206. </el-input>
  207. <el-input
  208. v-else-if="item.type == 'number'"
  209. placeholder="请输入"
  210. v-input-limit="2"
  211. size="small"
  212. :disabled="item.disabled || detailData.seeDisabled"
  213. v-model.trim="form[item.prop]"
  214. />
  215. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  216. <el-input v-else type="age" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  217. </el-form-item>
  218. </el-col>
  219. </el-row>
  220. </basic-container>
  221. <containerTitle title="商品信息"></containerTitle>
  222. <basic-container style="margin-bottom: 10px">
  223. <avue-crud
  224. :option="customerContact"
  225. v-model="contactsForm"
  226. :data="goodsShowData"
  227. ref="crudContact"
  228. @row-save="rowSave"
  229. @row-click="handleRowClick"
  230. @row-update="rowUpdate"
  231. @selection-change="productSelection"
  232. @row-del="rowDel"
  233. @saveColumn="saveColumn('goods')"
  234. :summary-method="summaryMethod"
  235. :table-loading="goodsLoading"
  236. >
  237. <template slot="corpId" slot-scope="{ row, index }">
  238. <crop-select
  239. v-if="row.$cellEdit"
  240. v-model="row.corpId"
  241. :cropIndex="index"
  242. corpType="GYS"
  243. @getCorpData="getcorpId"
  244. :disabled="detailData.seeDisabled"
  245. ></crop-select>
  246. <span v-else>{{ row.corpName }}</span>
  247. </template>
  248. <template slot="code" slot-scope="{row,index}">
  249. <el-button
  250. type="text"
  251. size="mini"
  252. style="padding:4px 10px;float:left"
  253. @click="commodityChoice(row)"
  254. :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
  255. <span>{{ row.code }}</span>
  256. </template>
  257. <template slot="purchaseAmount" slot-scope="{ row }">
  258. <el-select
  259. v-if="row.$cellEdit"
  260. v-model="row.purchaseAmount"
  261. @focus="getPurchasePrice(row)"
  262. allow-create
  263. filterable
  264. v-input-limit="2"
  265. default-first-option
  266. >
  267. <el-option
  268. v-for="(item, index) in purchasePriceOption"
  269. :key="index"
  270. :label="item.purchasePrice"
  271. :value="item.purchasePrice"></el-option>
  272. </el-select>
  273. <span v-else>{{ row.purchaseAmount }}</span>
  274. </template>
  275. <template slot="price" slot-scope="{ row }">
  276. <el-select
  277. v-if="row.$cellEdit"
  278. v-model="row.price"
  279. @focus="getMarketPrice(row)"
  280. @input="priceChange(row)"
  281. allow-create
  282. filterable
  283. v-input-limit="2"
  284. default-first-option
  285. >
  286. <el-option
  287. v-for="(item, index) in salesPriceOtion"
  288. :key="index"
  289. :label="item.salesPrice"
  290. :value="item.salesPrice"></el-option>
  291. </el-select>
  292. <span v-else>{{ row.price }}</span>
  293. </template>
  294. <template slot="orderQuantity" slot-scope="{ row }">
  295. <el-input
  296. v-if="row.$cellEdit"
  297. v-model.trim="row.orderQuantity"
  298. oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
  299. size="small"
  300. @input="quantityChange(row)"
  301. ></el-input>
  302. <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
  303. </template>
  304. <template slot="cname" slot-scope="{ row }">
  305. <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"
  306. :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"/>
  307. <span v-else>
  308. {{row.cname}}
  309. </span>
  310. </template>
  311. <template slot-scope="{row,index}" slot="menu">
  312. <el-button
  313. type="text"
  314. size="small"
  315. @click="rowCell(row,index)"
  316. :disabled="detailData.seeDisabled"
  317. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  318. </el-button>
  319. <el-button
  320. size="small"
  321. icon="el-icon-delete"
  322. type="text"
  323. @click="rowDel(row, index)"
  324. :disabled="detailData.seeDisabled"
  325. v-if="!row.$cellEdit"
  326. >删 除</el-button>
  327. </template>
  328. <template slot="menuLeft" slot-scope="{size}">
  329. <el-tabs v-model="goodsActives" @tab-click="handleClick" :before-leave="beforeLeave">
  330. <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled">
  331. </el-tab-pane>
  332. <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled">
  333. </el-tab-pane>
  334. </el-tabs>
  335. <el-button type="primary"
  336. icon="el-icon-plus"
  337. size="small"
  338. @click="commoditySelection"
  339. :disabled="detailData.seeDisabled">录入明细
  340. </el-button>
  341. <el-button type="primary"
  342. icon="el-icon-plus"
  343. size="small"
  344. @click="policy"
  345. :disabled="detailData.seeDisabled || !form.corpId"
  346. v-show="goodsActives == 'goods'"
  347. >政策
  348. </el-button>
  349. <el-button type="warning"
  350. icon="el-icon-plus"
  351. size="small"
  352. :disabled="selection.length < 1 || detailData.seeDisabled"
  353. @click="getShipmentD"
  354. v-show="goodsActives == 'goods'">生成客户确认
  355. </el-button>
  356. <el-button type="info"
  357. :size="size"
  358. icon="el-icon-printer"
  359. :disabled="detailData.seeDisabled"
  360. @click.stop="openReport()"
  361. v-show="goodsActives == 'goods'"
  362. >报 表</el-button>
  363. <el-button
  364. type="primary"
  365. size="small"
  366. icon="el-icon-download"
  367. @click="downloadHandle"
  368. v-show="goodsActives == 'goods'"
  369. >下载模板</el-button>
  370. <el-upload
  371. :action="baseURL"
  372. :headers="headers"
  373. :disabled="detailData.seeDisabled"
  374. :on-progress="uploading"
  375. :show-file-list=false
  376. accept=".xls,.xlsx"
  377. multiple
  378. :on-success="importTemplate"
  379. style="float: right"
  380. >
  381. <el-button
  382. type="primary"
  383. size="small"
  384. icon="el-icon-upload"
  385. v-show="goodsActives == 'goods'"
  386. >导 入</el-button>
  387. </el-upload>
  388. </template>
  389. </avue-crud>
  390. </basic-container>
  391. <fee-info
  392. ref="feeInfo"
  393. :orderFeesList="advantageProjectData"
  394. :disabled="detailData.seeDisabled"
  395. feeUrl="/blade-purchase-sales/orderfees/update"
  396. optionType="GN"
  397. itemType="销售"
  398. @beforeFinance="beforeFinance"
  399. />
  400. <!-- <containerTitle title="费用明细"></containerTitle>-->
  401. <!-- <basic-container style="margin-bottom: 10px">-->
  402. <!-- <avue-crud-->
  403. <!-- :option="advantageProject"-->
  404. <!-- v-model="advantageProjectForm"-->
  405. <!-- :data="advantageProjectData"-->
  406. <!-- ref="crudProject"-->
  407. <!-- @row-save="rowSaveProject"-->
  408. <!-- @row-update="rowUpdateProject"-->
  409. <!-- @row-del="rowDelProject"-->
  410. <!-- @saveColumn="saveColumn('fees')"-->
  411. <!-- >-->
  412. <!-- <template slot="code" slot-scope="{row,index}">-->
  413. <!-- <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>-->
  414. <!-- <span>{{ row.code }}</span>-->
  415. <!-- </template>-->
  416. <!-- <template slot="corpId" slot-scope="{ row }">-->
  417. <!-- <selectComponent v-if="row.$cellEdit" v-model="row.corpId"-->
  418. <!-- :configuration="configuration" @receiveList="receiveList"/>-->
  419. <!-- <span v-else>-->
  420. <!-- <span v-for="item in configuration.dicData" v-if="item.id == row.corpId">{{ item.cname }}</span>-->
  421. <!-- </span>-->
  422. <!-- </template>-->
  423. <!-- <template slot="amount" slot-scope="{ row }">-->
  424. <!-- <el-input v-if="row.$cellEdit" v-model.trim="row.amount"-->
  425. <!-- size="small" v-input-limit="2"-->
  426. <!-- ></el-input>-->
  427. <!-- <span v-else>{{ row.amount }}</span>-->
  428. <!-- </template>-->
  429. <!-- <template slot="settlmentAmount" slot-scope="{ row }">-->
  430. <!-- <el-input v-if="row.$cellEdit" v-model.trim="row.settlmentAmount"-->
  431. <!-- size="small" v-input-limit="2"-->
  432. <!-- ></el-input>-->
  433. <!-- <span v-else>{{ row.settlmentAmount }}</span>-->
  434. <!-- </template>-->
  435. <!-- <template slot-scope="{row,index}" slot="menu">-->
  436. <!-- <el-button-->
  437. <!-- type="text"-->
  438. <!-- size="small"-->
  439. <!-- @click="rowCellTwo(row,index)"-->
  440. <!-- :disabled="detailData.seeDisabled"-->
  441. <!-- >{{ row.$cellEdit ? '保 存' : '修 改 ' }}-->
  442. <!-- </el-button>-->
  443. <!-- <el-button-->
  444. <!-- size="small"-->
  445. <!-- icon="el-icon-delete"-->
  446. <!-- type="text"-->
  447. <!-- @click="rowDelProject(row, index)"-->
  448. <!-- :disabled="detailData.seeDisabled"-->
  449. <!-- v-if="!row.$cellEdit"-->
  450. <!-- >删 除</el-button>-->
  451. <!-- </template>-->
  452. <!-- <template slot="menuLeft" slot-scope="{size}">-->
  453. <!-- <el-button type="primary"-->
  454. <!-- icon="el-icon-plus"-->
  455. <!-- size="small"-->
  456. <!-- @click="costIncrease"-->
  457. <!-- :disabled="detailData.seeDisabled"-->
  458. <!-- >录入明细-->
  459. <!-- </el-button>-->
  460. <!-- </template>-->
  461. <!-- </avue-crud>-->
  462. <!-- </basic-container>-->
  463. <containerTitle title="附件上传"></containerTitle>
  464. <basic-container style="margin-bottom: 40px">
  465. <avue-crud
  466. :option="bankOfDeposit"
  467. v-model="bankOfDepositForm"
  468. :data="bankOfDepositData"
  469. @row-save="rowSaveBankOfDeposit"
  470. @row-update="rowUpdateBankOfDeposit"
  471. @row-del="rowDelBankOfDeposit"
  472. :upload-after="uploadAfter"
  473. ref="uploadCrud"
  474. >
  475. <template slot="menuLeft">
  476. <el-button
  477. type="primary"
  478. icon="el-icon-plus"
  479. size="small"
  480. @click.stop="$refs.uploadCrud.rowAdd()"
  481. :disabled="detailData.seeDisabled"
  482. >上传</el-button
  483. >
  484. </template>
  485. <template slot="menu" slot-scope="{ row, index }">
  486. <el-button
  487. size="small"
  488. icon="el-icon-edit"
  489. type="text"
  490. @click="$refs.uploadCrud.rowEdit(row, index)"
  491. :disabled="detailData.seeDisabled"
  492. >编 辑</el-button
  493. >
  494. <el-button
  495. size="small"
  496. icon="el-icon-delete"
  497. type="text"
  498. @click="rowDelBankOfDeposit(row, index)"
  499. :disabled="detailData.seeDisabled"
  500. >删 除</el-button
  501. >
  502. </template>
  503. </avue-crud>
  504. </basic-container>
  505. </el-form>
  506. </div>
  507. <el-dialog
  508. title="导入商品"
  509. append-to-body
  510. class="el-dialogDeep"
  511. :visible.sync="dialogVisible"
  512. width="80%"
  513. :close-on-click-modal="false"
  514. :destroy-on-close="true"
  515. :close-on-press-escape="false"
  516. @close="closeGoods">
  517. <el-row :style="{height: rowHeight}">
  518. <el-col :span="5" style="height: 100%;overflow-y: auto">
  519. <div>
  520. <el-scrollbar>
  521. <basic-container>
  522. <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick"/>
  523. </basic-container>
  524. </el-scrollbar>
  525. </div>
  526. </el-col>
  527. <el-col :span="19">
  528. <basic-container>
  529. <avue-crud :option="optionTwo"
  530. :table-loading="loading"
  531. :data="goodsListShow"
  532. ref="crud"
  533. @refresh-change="refreshChange"
  534. @selection-change="selectionChange"
  535. @search-change="goodsSearch"
  536. :page.sync="page"
  537. @on-load="onLoad">
  538. <template slot="menuLeft" slot-scope="{size}">
  539. <el-tabs v-model="activeName" @tab-click="tabHandle">
  540. <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
  541. <el-tab-pane label="已选定数据" name="importStaging"></el-tab-pane>
  542. </el-tabs>
  543. </template>
  544. <template slot-scope="scope" slot="menu">
  545. <el-button
  546. type="text"
  547. icon="el-icon-edit"
  548. size="small"
  549. @click.stop="importStagList(scope.row,scope.index)"
  550. v-if="activeName=='searchList'"
  551. :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1"
  552. >选择
  553. </el-button>
  554. <el-button
  555. type="text"
  556. icon="el-icon-delete"
  557. size="small"
  558. @click.stop="removeStagList(scope.row,scope.index)"
  559. v-else
  560. >移除
  561. </el-button>
  562. </template>
  563. </avue-crud>
  564. </basic-container>
  565. </el-col>
  566. </el-row>
  567. <span slot="footer" class="dialog-footer">
  568. <el-button @click="dialogVisible = false">取 消</el-button>
  569. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  570. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  571. :disabled="tableData.length !== 1">导入</el-button>
  572. </span>
  573. </el-dialog>
  574. <el-dialog
  575. title="导入政策"
  576. append-to-body
  577. class="el-dialogDeep"
  578. :visible.sync="policyDialog"
  579. width="80%"
  580. :close-on-click-modal="false"
  581. :destroy-on-close="true"
  582. :close-on-press-escape="false"
  583. @close="closePolicy">
  584. <el-row :style="{height: rowHeight}">
  585. <el-col :span="5" style="height: 100%;overflow-y: auto">
  586. <div>
  587. <el-scrollbar>
  588. <basic-container>
  589. <avue-tree :option="policyOption" :data="treeDataPolicy" @node-click="policyNodeClick"/>
  590. </basic-container>
  591. </el-scrollbar>
  592. </div>
  593. </el-col>
  594. <el-col :span="19">
  595. <containerTitle title="特价促销"></containerTitle>
  596. <basic-container style="margin-bottom: 10px">
  597. <avue-crud :option="optionPolicy"
  598. :table-loading="loadingPolicy"
  599. :data="dataPolicy"
  600. ref="crud"
  601. @selection-change="selectionChangePolicy"
  602. :page.sync="pagePolicy">
  603. </avue-crud>
  604. </basic-container>
  605. <containerTitle title="买赠促销"></containerTitle>
  606. <basic-container>
  607. <avue-crud
  608. :option="customerBuyFree"
  609. :data="contactsDataBuyFree"
  610. @selection-change="selectionChangePolicyTwo"
  611. ref="crudContactE">
  612. </avue-crud>
  613. </basic-container>
  614. </el-col>
  615. </el-row>
  616. <span slot="footer" class="dialog-footer">
  617. <el-button @click="policyDialog = false">取 消</el-button>
  618. <el-button type="primary" @click="importPolicy">导入</el-button>
  619. </span>
  620. </el-dialog>
  621. <el-dialog
  622. title="导入费用"
  623. append-to-body
  624. class="el-dialogDeep"
  625. :visible.sync="dialogCost"
  626. width="80%"
  627. top="8vh"
  628. :close-on-click-modal="false"
  629. :destroy-on-close="true"
  630. :close-on-press-escape="false"
  631. @close="closeFees">
  632. <el-row :style="{height: rowHeight}">
  633. <el-col :span="5" style="height: 100%;overflow-y: auto">
  634. <div>
  635. <el-scrollbar>
  636. <basic-container>
  637. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
  638. </basic-container>
  639. </el-scrollbar>
  640. </div>
  641. </el-col>
  642. <el-col :span="19">
  643. <basic-container>
  644. <avue-crud :option="optionTwoCost"
  645. :table-loading="loadingCost"
  646. :data="dataCost"
  647. ref="crud"
  648. @refresh-change="refreshChangeCost"
  649. @selection-change="selectionChangeCost"
  650. :page.sync="pageCost"
  651. @search-change="feesSearch"
  652. @on-load="onLoadCost">
  653. </avue-crud>
  654. </basic-container>
  655. </el-col>
  656. </el-row>
  657. <span slot="footer" class="dialog-footer">
  658. <el-button @click="dialogCost = false">取 消</el-button>
  659. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  660. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  661. :disabled="tableDataCost.length !== 1">导入</el-button>
  662. </span>
  663. </el-dialog>
  664. <el-dialog
  665. title="账单"
  666. append-to-body
  667. class="el-dialogDeep"
  668. :visible.sync="applySettlementDialog"
  669. width="60%"
  670. :close-on-click-modal="false"
  671. :destroy-on-close="true"
  672. :close-on-press-escape="false"
  673. v-dialog-drag
  674. >
  675. <apply-payment
  676. :billType="billType"
  677. :billData="billData"
  678. itemType="销售"
  679. @choceFun="choceFun"
  680. >
  681. </apply-payment>
  682. </el-dialog>
  683. <report-dialog
  684. :switchDialog="switchDialog"
  685. :reportId="form.id"
  686. reportName="销售明细(N)"
  687. @onClose="onClose()"
  688. ></report-dialog>
  689. <el-dialog
  690. title="申请记录"
  691. append-to-body
  692. class="el-dialogDeep"
  693. :visible.sync="applicationDialog"
  694. width="60%"
  695. :close-on-click-modal="false"
  696. :destroy-on-close="true"
  697. :close-on-press-escape="false"
  698. v-dialog-drag
  699. >
  700. <bill-application
  701. :billId="form.id"
  702. @choceApplication="choceApplication"
  703. >
  704. </bill-application>
  705. </el-dialog>
  706. </div>
  707. </template>
  708. <script>
  709. import {
  710. typeSave, detail, deleteDetails,
  711. corpstypeTree,
  712. corpsattn,
  713. corpsbank,
  714. corpsfiles,
  715. corpsitem,
  716. getList,
  717. detailList,
  718. generateShipment,
  719. saveSell,
  720. getlistBankBy,
  721. } from "@/api/basicData/configuration"
  722. import {getCorpDetail} from "@/api/maintenance/overpayment"
  723. import {integralDetail} from "@/api/maintenance/integral"
  724. import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
  725. import customerContact from "./configuration/customerContact.json"
  726. import advantageProject from "./configuration/advantageProject.json"
  727. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  728. import commodity from "./configuration/commodity.json"
  729. import optionTwoCost from "./configuration/mainListCost.json"
  730. import optionPolicy from "./configuration/optionPolicy.json"
  731. import BuyFree from "./configuration/BuyFree.json"
  732. import {
  733. getDeptLazyTree,
  734. getDeptLazyTreeTwo,
  735. customerList,
  736. policyList,
  737. policyColumn
  738. } from "@/api/basicData/basicFeesDesc";
  739. import _ from "lodash";
  740. import option from "./configuration/mainList.json";
  741. import { contrastObj, contrastList } from "@/util/contrastData";
  742. import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees"
  743. import customerDialog from "@/components/customer-dialog/main";
  744. //账单组件
  745. import ApplyPayment from "../../../components/finance/applyPayment";
  746. import reportDialog from "@/components/report-dialog/main";
  747. import { getToken } from "@/util/auth";
  748. import Cookies from 'js-cookie'
  749. import feeInfo from "@/components/fee-info/main";
  750. import {corpsAddrSelect} from "@/api/basicData/customerInformation";
  751. import billApplication from "@/components/bill/billApplication";
  752. import {
  753. isDiscount,
  754. isPercentage,
  755. micrometerFormat,
  756. IntegerFormat
  757. } from "@/util/validate";
  758. export default {
  759. name: "detailsPage",
  760. props: {
  761. detailData: {
  762. type: Object
  763. }
  764. },
  765. components:{
  766. customerDialog,
  767. ApplyPayment,
  768. reportDialog,
  769. feeInfo,
  770. billApplication,
  771. },
  772. data() {
  773. return {
  774. saveLoading: false,
  775. disabled: false,
  776. form: {
  777. corpId: null,
  778. },
  779. billType:"收费", //账单类型
  780. billData:{}, //账单需要数据
  781. applySettlementDialog:false,//生成账单组件
  782. configuration: {
  783. multipleChoices: false,
  784. multiple: false,
  785. collapseTags: false,
  786. placeholder: '请点击右边按钮选择',
  787. dicData: []
  788. },
  789. goodsConfiguration: {
  790. multipleChoices: false,
  791. multiple: false,
  792. collapseTags: false,
  793. placeholder: '请点击右边按钮选择',
  794. dicData: []
  795. },
  796. plantConfiguration: {
  797. multipleChoices: false,
  798. multiple: false,
  799. collapseTags: false,
  800. placeholder: '请点击右边按钮选择',
  801. dicData: []
  802. },
  803. companyConfiguration: {
  804. multipleChoices: false,
  805. multiple: false,
  806. collapseTags: false,
  807. placeholder: '请点击右边按钮选择',
  808. dicData: []
  809. },
  810. data: [],
  811. policyForm: {},
  812. dataPolicy: [],
  813. contactsDataBuyFree: [],
  814. loadingCost: false,
  815. customerDivide: '',
  816. choiceData: false,
  817. commodityData: false,
  818. dataCost: [],
  819. treeDataPolicy: [],
  820. treeDataGoods: [],
  821. choiceIndex: '',
  822. dialogCost: false,
  823. treeDeptId: '',
  824. treeDeptIdCost: '',
  825. treePolicyId: '',
  826. pageCost: {
  827. pageSize: 10,
  828. currentPage: 1,
  829. total: 0
  830. },
  831. page: {
  832. pageSize: 10,
  833. currentPage: 1,
  834. total: 0
  835. },
  836. pageList: {
  837. pageSize: 10,
  838. currentPage: 1,
  839. total: 0
  840. },
  841. pagePolicy: {
  842. pageSize: 10,
  843. currentPage: 1,
  844. total: 0
  845. },
  846. loading: false,
  847. loadingPolicy: false,
  848. contactsForm: {},
  849. optionPolicy: optionPolicy,
  850. optionTwo: commodity,
  851. optionTwoCost: optionTwoCost,
  852. customerBuyFree: BuyFree,
  853. policyOption: {
  854. nodeKey: 'id',
  855. lazy: true,
  856. treeLoad: (node, resolve)=> {
  857. const parentId = (node.level === 0) ? 0 : node.data.id;
  858. const newTime = new Date().toLocaleString('chinese',{hour12:false})
  859. policyColumn({newTime: newTime,parentId: parentId,corps: this.form.corpId}).then(res => {
  860. resolve(res.data.data.map(item => {
  861. return {
  862. ...item,
  863. leaf: !item.hasChildren
  864. }
  865. }))
  866. });
  867. },
  868. addBtn: false,
  869. menu: false,
  870. size: 'small',
  871. props: {
  872. labelText: '标题',
  873. label: 'title',
  874. value: 'value',
  875. children: 'children'
  876. }
  877. },
  878. treeOptionCost: {
  879. nodeKey: 'id',
  880. lazy: true,
  881. treeLoad: function (node, resolve) {
  882. const parentId = (node.level === 0) ? 0 : node.data.id;
  883. getDeptLazyTree(parentId).then(res => {
  884. resolve(res.data.data.map(item => {
  885. return {
  886. ...item,
  887. leaf: !item.hasChildren
  888. }
  889. }))
  890. });
  891. },
  892. addBtn: false,
  893. menu: false,
  894. size: 'small',
  895. props: {
  896. labelText: '标题',
  897. label: 'title',
  898. value: 'value',
  899. children: 'children'
  900. }
  901. },
  902. treeOption: {
  903. nodeKey: 'id',
  904. lazy: true,
  905. treeLoad: function (node, resolve) {
  906. const parentId = (node.level === 0) ? 0 : node.data.id;
  907. getDeptLazyTreeTwo(parentId).then(res => {
  908. resolve(res.data.data.map(item => {
  909. return {
  910. ...item,
  911. leaf: !item.hasChildren
  912. }
  913. }))
  914. });
  915. },
  916. addBtn: false,
  917. menu: false,
  918. size: 'small',
  919. props: {
  920. labelText: '标题',
  921. label: 'title',
  922. value: 'value',
  923. children: 'children'
  924. }
  925. },
  926. dialogVisible: false,
  927. policyDialog: false,
  928. advantageProjectForm: {},
  929. selection: [],
  930. bankOfDepositForm: {},
  931. contactsData: [],
  932. advantageProjectData: [],
  933. bankOfDepositData: [],
  934. tableDataCost: [],
  935. dic: [],
  936. tableData: [],
  937. policyData: [],
  938. policyDataTwo: [],
  939. customerContact: {},
  940. advantageProject: {},
  941. bankOfDeposit: bankOfDeposit,
  942. contactInformation: {
  943. column: [
  944. {
  945. label: '销售金额',
  946. prop: 'orderAmount',
  947. type: 'number',
  948. rules: [
  949. {
  950. required: false,
  951. message: ' ',
  952. trigger: 'blur'
  953. }
  954. ]
  955. }, {
  956. label: '本次溢付款',
  957. prop: 'caseOverPayment',
  958. rules: [
  959. {
  960. required: false,
  961. message: ' ',
  962. trigger: 'blur'
  963. }
  964. ]
  965. }, {
  966. label: '总溢付款',
  967. prop: 'overPayment',
  968. disabled: true,
  969. rules: [
  970. {
  971. required: false,
  972. message: ' ',
  973. trigger: 'blur'
  974. }
  975. ]
  976. },{
  977. label: '应收账款',
  978. prop: 'debitAmount',
  979. type: 'number',
  980. disabled: true,
  981. rules: [
  982. {
  983. required: false,
  984. message: ' ',
  985. trigger: 'blur'
  986. }
  987. ]
  988. }, {
  989. label: '已收款',
  990. prop: 'settlmentAmount',
  991. disabled: true,
  992. rules: [
  993. {
  994. required: false,
  995. message: ' ',
  996. trigger: 'blur'
  997. }
  998. ]
  999. }, {
  1000. label: '应收未收款',
  1001. prop: 'balanceAmount',//无
  1002. disabled: true,
  1003. rules: [
  1004. {
  1005. required: false,
  1006. message: ' ',
  1007. trigger: 'blur'
  1008. }
  1009. ]
  1010. },{
  1011. label: '其他费用',
  1012. prop: 'otherAmount',
  1013. type: 'number',
  1014. rules: [
  1015. {
  1016. required: false,
  1017. message: ' ',
  1018. trigger: 'blur'
  1019. }
  1020. ]
  1021. },
  1022. {
  1023. label: '保证金',
  1024. prop: 'deposit',
  1025. type: 'number',
  1026. rules: [
  1027. {
  1028. required: false,
  1029. message: ' ',
  1030. trigger: 'blur'
  1031. }
  1032. ]
  1033. }, {
  1034. label: '逾期账款',
  1035. prop: 'overDueAccounts',
  1036. type: 'number',
  1037. rules: [
  1038. {
  1039. required: false,
  1040. message: ' ',
  1041. trigger: 'blur'
  1042. }
  1043. ]
  1044. }, {
  1045. label: '实际发货日期',
  1046. prop: 'actualDeliveryDate',
  1047. type: 'datetime',
  1048. rules: [
  1049. {
  1050. required: false,
  1051. message: ' ',
  1052. trigger: 'blur'
  1053. }
  1054. ]
  1055. }, {
  1056. label: '合同日期',
  1057. prop: 'businesDate',
  1058. type: 'date',
  1059. rules: [
  1060. {
  1061. required: false,
  1062. message: ' ',
  1063. trigger: 'blur'
  1064. }
  1065. ]
  1066. }, {
  1067. label: '到货日期',
  1068. prop: 'arrivalDate',
  1069. type: 'datetime',
  1070. rules: [
  1071. {
  1072. required: false,
  1073. message: ' ',
  1074. trigger: 'blur'
  1075. }
  1076. ]
  1077. }, {
  1078. label: '毛利率',
  1079. prop: 'grossProfitRate',
  1080. rules: [
  1081. {
  1082. required: false,
  1083. message: ' ',
  1084. trigger: 'blur'
  1085. }
  1086. ]
  1087. }, {
  1088. label: '毛利额',
  1089. prop: 'grossProfit',
  1090. type: 'number',
  1091. rules: [
  1092. {
  1093. required: false,
  1094. message: ' ',
  1095. trigger: 'blur'
  1096. }
  1097. ]
  1098. }, {
  1099. label: '历史运费(元/条)',
  1100. prop: 'freightAmountHistory',
  1101. type: 'number',
  1102. rules: [
  1103. {
  1104. required: false,
  1105. message: ' ',
  1106. trigger: 'blur'
  1107. }
  1108. ]
  1109. }, {
  1110. label: '预收款日期',
  1111. type: 'datetime',
  1112. prop: 'advanceCollectionDate',
  1113. rules: [
  1114. {
  1115. required: false,
  1116. message: ' ',
  1117. trigger: 'blur'
  1118. }
  1119. ]
  1120. }, {
  1121. label: '特价占比',
  1122. prop: 'specialOfferOf',
  1123. disabled: false,
  1124. rules: [
  1125. {
  1126. required: false,
  1127. message: ' ',
  1128. trigger: 'blur'
  1129. }
  1130. ]
  1131. },{
  1132. label: '单据状态',
  1133. prop: 'orderStatus',
  1134. disabled: true,
  1135. rules: [
  1136. {
  1137. required: false,
  1138. message: ' ',
  1139. trigger: 'blur'
  1140. }
  1141. ]
  1142. },{
  1143. label: '积分余额',
  1144. prop: 'pointMutiple',
  1145. disabled: true,
  1146. rules: [
  1147. {
  1148. required: false,
  1149. message: ' ',
  1150. trigger: 'blur'
  1151. }
  1152. ]
  1153. }, {
  1154. label: '赠送积分',
  1155. prop: 'presenterIntegral',
  1156. disabled: true,
  1157. rules: [
  1158. {
  1159. required: false,
  1160. message: ' ',
  1161. trigger: 'blur'
  1162. }
  1163. ]
  1164. },{
  1165. label: '兑换积分',
  1166. prop: 'convertIntegral',
  1167. disabled: true,
  1168. rules: [
  1169. {
  1170. required: false,
  1171. message: ' ',
  1172. trigger: 'blur'
  1173. }
  1174. ]
  1175. }, {
  1176. label: '制单人',
  1177. prop: 'createUserName',
  1178. disabled: true,
  1179. rules: [
  1180. {
  1181. required: false,
  1182. message: ' ',
  1183. trigger: 'blur'
  1184. }
  1185. ]
  1186. },{
  1187. label: '制单日期',
  1188. prop: 'createTime',
  1189. type: 'datetime',
  1190. disabled:true,
  1191. rules: [
  1192. {
  1193. required: false,
  1194. message: ' ',
  1195. trigger: 'blur'
  1196. }
  1197. ]
  1198. }, {
  1199. label: '特别提醒',
  1200. prop: 'specialRemarks',
  1201. type: 'textarea',
  1202. span: 24,
  1203. rules: [
  1204. {
  1205. required: false,
  1206. message: ' ',
  1207. trigger: 'blur'
  1208. }
  1209. ]
  1210. }
  1211. ]
  1212. },
  1213. basicData: {
  1214. column: [
  1215. {
  1216. label: '客户全称',
  1217. prop: 'corpId',
  1218. span: 16,
  1219. rules: [
  1220. {
  1221. required: true,
  1222. message: ' ',
  1223. trigger: 'blur'
  1224. }
  1225. ]
  1226. }, {
  1227. label: '到货地址',
  1228. prop: 'arrivalAddress',
  1229. rules: [
  1230. {
  1231. required: true,
  1232. message: ' ',
  1233. trigger: 'blur'
  1234. }
  1235. ]
  1236. }, {
  1237. label: '生产工厂',
  1238. prop: 'productionPlant',
  1239. span: 16,
  1240. rules: [
  1241. {
  1242. required: true,
  1243. message: ' ',
  1244. trigger: 'blur'
  1245. }
  1246. ]
  1247. },
  1248. {
  1249. label: '发货地址',
  1250. prop: 'shippingAddress',
  1251. disabled: false,
  1252. rules: [
  1253. {
  1254. required: true,
  1255. message: ' ',
  1256. trigger: 'blur'
  1257. }
  1258. ]
  1259. }, {
  1260. label: '所属公司',
  1261. prop: 'belongToCorpId',
  1262. span: 16,
  1263. rules: [
  1264. {
  1265. required: true,
  1266. message: ' ',
  1267. trigger: 'blur'
  1268. }
  1269. ]
  1270. }, {
  1271. label: '银行帐号',
  1272. prop: 'banks',
  1273. type: 'select',
  1274. rules: [
  1275. {
  1276. required: true,
  1277. message: ' ',
  1278. trigger: 'blur'
  1279. }
  1280. ]
  1281. }, {
  1282. label: '公司户头',
  1283. prop: 'banksAccountName',
  1284. rules: [
  1285. {
  1286. required: false,
  1287. message: ' ',
  1288. trigger: 'blur'
  1289. }
  1290. ]
  1291. }, {
  1292. label: '开户银行',
  1293. prop: 'accountBank',
  1294. rules: [
  1295. {
  1296. required: false,
  1297. message: ' ',
  1298. trigger: 'blur'
  1299. }
  1300. ]
  1301. }, {
  1302. label: '付款方式',
  1303. prop: 'paymentType',
  1304. rules: [
  1305. {
  1306. required: true,
  1307. message: ' ',
  1308. trigger: 'blur'
  1309. }
  1310. ]
  1311. }, {
  1312. label: '包装要求',
  1313. prop: 'packageRemarks',
  1314. rules: [
  1315. {
  1316. required: false,
  1317. message: ' ',
  1318. trigger: 'blur'
  1319. }
  1320. ]
  1321. }, {
  1322. label: '销售订单号',
  1323. prop: 'orderNo',
  1324. disabled: true,
  1325. rules: [
  1326. {
  1327. required: false,
  1328. message: ' ',
  1329. trigger: 'blur'
  1330. }
  1331. ]
  1332. }, {
  1333. label: '主订单号',
  1334. prop: 'morderNo',
  1335. rules: [
  1336. {
  1337. required: false,
  1338. message: ' ',
  1339. trigger: 'blur'
  1340. }
  1341. ]
  1342. }, {
  1343. label: '预估运费',
  1344. prop: 'predictOceanFreight',
  1345. type: 'number',
  1346. rules: [
  1347. {
  1348. required: true,
  1349. message: ' ',
  1350. trigger: 'blur'
  1351. }
  1352. ]
  1353. }, {
  1354. label: '要求发货日期',
  1355. prop: 'requiredDeliveryDate',
  1356. type: 'date',
  1357. rules: [
  1358. {
  1359. required: true,
  1360. message: ' ',
  1361. trigger: 'blur'
  1362. }
  1363. ]
  1364. }, {
  1365. label: '要求到货日期',
  1366. prop: 'requiredArrivalDate',
  1367. type: 'date',
  1368. rules: [
  1369. {
  1370. required: true,
  1371. message: ' ',
  1372. trigger: 'blur'
  1373. }
  1374. ]
  1375. }, {
  1376. label: "订单备注",
  1377. type: 'textarea',
  1378. span: 24,
  1379. prop: "orderRemark",
  1380. mock: {
  1381. type: 'county'
  1382. }
  1383. }
  1384. ]
  1385. },
  1386. // 银行账号下拉
  1387. bankList: [],
  1388. paymentOption: [],
  1389. statusOption: [],
  1390. // 费用信息排序的最大值
  1391. maxFeeNum: 0,
  1392. maxGoodsNum: 0,
  1393. oldForm: {
  1394. orderStatus: "录入"
  1395. },
  1396. oldGoodsList: [],
  1397. oldFeesList: [],
  1398. oldUploadList: [],
  1399. // 采购价格
  1400. purchasePriceOption: [],
  1401. // 销售价格
  1402. salesPriceOtion: [],
  1403. // 弹窗高度
  1404. rowHeight: '',
  1405. // 查询时loading页面
  1406. pageLoading: false,
  1407. switchDialog: false,
  1408. // 商品信息表格loading
  1409. goodsLoading: false,
  1410. baseURL: '/api/blade-purchase-sales/orderitems/importPrice',
  1411. headers: { "Blade-Auth": 'Bearer ' + getToken()},
  1412. activeName: 'searchList',
  1413. // 商品列表数据合计
  1414. goodsListShow: [],
  1415. // 商品列表暂存
  1416. goodsListSave: [],
  1417. goodsListTotal: 0,
  1418. goodsListSaveTotal: 0,
  1419. goodsActives: 'goods',
  1420. saveActives: '',
  1421. goodsDisabled: false,
  1422. // 赠品信息数据
  1423. giftData: [],
  1424. // 商品信息展示数据
  1425. goodsShowData: [],
  1426. arrivalOptions: [],
  1427. shippingOptions: [],
  1428. applicationDialog:false,
  1429. itemType: '销售',
  1430. }
  1431. },
  1432. mounted() {
  1433. this.$nextTick(() => {
  1434. // 监听浏览器高度变化,改变表格高度
  1435. window.onresize = () => {
  1436. this.rowHeight = (window.innerHeight - 130) + 'px'
  1437. }
  1438. })
  1439. },
  1440. filters: {
  1441. IntegerFormat(num) {
  1442. return IntegerFormat(num);
  1443. }
  1444. },
  1445. //初始化查询
  1446. async created() {
  1447. this.rowHeight = (window.innerHeight - 130) + 'px'
  1448. // this.customerContact = customerContact
  1449. this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
  1450. this.advantageProject = await this.getColumnData(this.getColumnName(16), advantageProject);
  1451. this.getWorkDicts("payment_term").then(res => {
  1452. this.paymentOption = res.data.data
  1453. })
  1454. this.getWorkDicts("order_status").then(res => {
  1455. this.statusOption = res.data.data
  1456. })
  1457. this.$set(this.form, 'orderStatus', '录入')
  1458. this.$set(this.form, 'caseOverPayment', 0)
  1459. this.$set(this.form, 'overPayment', 0)
  1460. this.$set(this.form, 'orderAmount', 0)
  1461. this.$set(this.form, 'predictOceanFreight', 0)
  1462. this.$set(this.form, 'presenterIntegral' , 0)
  1463. this.$set(this.form, 'convertIntegral' , 0)
  1464. this.$set(this.form, 'paymentType', '预付')
  1465. let date = new Date();
  1466. let year = date.getFullYear();
  1467. let month = date.getMonth() + 1;
  1468. let day = date.getDate();
  1469. if (month < 10) {
  1470. month = "0" + month;
  1471. }
  1472. if (day < 10) {
  1473. day = "0" + day;
  1474. }
  1475. let nowDate = year + "-" + month + "-" + day + ' 00:00:00';
  1476. this.$set(this.form, 'businesDate', nowDate)
  1477. if (this.detailData.id) {
  1478. this.queryData(this.detailData.id)
  1479. }
  1480. if (this.detailData.seeDisabled) {
  1481. // this.bankOfDeposit.column.forEach(item => {
  1482. // item.editDisabled = true
  1483. // item.addDisabled = true
  1484. // })
  1485. }
  1486. if (this.detailData.copyId) {
  1487. this.queryData(this.detailData.copyId, true)
  1488. }
  1489. this.oldForm = Object.assign({}, this.form)
  1490. },
  1491. methods: {
  1492. getGoodsRow(event,row) {
  1493. row.priceCategory = event.goodsTypeName
  1494. row.code = event.code
  1495. row.typeno = event.typeno
  1496. row.itemType = event.typeno
  1497. row.itemId = event.id
  1498. row.corpId = event.corpId
  1499. row.corpName = event.corpName
  1500. selectGoodsNum({
  1501. goodsId: event.id,
  1502. itemType: event.typeno,
  1503. tradeType: 'GN'
  1504. }).then(res => {
  1505. row.storageQuantity = res.data.data
  1506. })
  1507. row.integralMultiples = event.integralMultiples
  1508. this.quantityChange(row)
  1509. },
  1510. queryData(id, isCopy = false){
  1511. this.pageLoading = true
  1512. detail(id).then(res => {
  1513. this.form = res.data.data;
  1514. this.contactsData = this.form.orderItemsList.filter(item => {
  1515. return item.goodType == 0
  1516. })
  1517. this.giftData = this.form.orderItemsList.filter(item => {
  1518. return item.goodType == 1
  1519. })
  1520. this.goodsShowData = this.giftData;
  1521. this.goodsActives = 'goods';
  1522. this.handleClick({name: this.goodsActives})
  1523. // this.contactsData = this.form.orderItemsList
  1524. this.advantageProjectData = this.form.orderFeesList
  1525. this.bankOfDepositData = this.form.orderFilesList
  1526. this.configuration.dicData = this.form.corpName
  1527. if (this.form.belongToCorpList) {
  1528. this.companyConfiguration.dicData = this.form.belongToCorpList
  1529. }
  1530. if (this.form.productionPlantList) {
  1531. this.plantConfiguration.dicData = this.form.productionPlantList
  1532. }
  1533. let feesData = []
  1534. this.form.orderFeesList.forEach(item => {
  1535. let a = {
  1536. cname: item.corpName,
  1537. id: item.corpId
  1538. }
  1539. feesData.push(a)
  1540. })
  1541. this.configuration.dicData = this.configuration.dicData.concat(feesData)
  1542. // 去重
  1543. this.removeRepeat()
  1544. let goodsData = []
  1545. this.form.orderItemsList.forEach(item => {
  1546. let a = {
  1547. cname: item.cname,
  1548. }
  1549. goodsData.push(a)
  1550. })
  1551. this.goodsConfiguration.dicData = [].concat(goodsData)
  1552. this.removeGoodsRepeat()
  1553. delete this.form.orderItemsList
  1554. delete this.form.orderFeesList
  1555. delete this.form.orderFilesList
  1556. // delete this.form.corpName
  1557. delete this.form.belongToCorpList
  1558. // 获取最大值
  1559. let num = []
  1560. this.advantageProjectData.forEach(item => {
  1561. num.push(item.sort)
  1562. })
  1563. if (num.length == 0) {
  1564. this.maxFeeNum = 0;
  1565. } else {
  1566. this.maxFeeNum = num.reduce((a, b) => {
  1567. return b > a? b: a;
  1568. })
  1569. }
  1570. let goodsNum = []
  1571. let purchaseAmount = 0
  1572. this.contactsData.forEach(item => {
  1573. goodsNum.push(item.sort)
  1574. purchaseAmount += Number(item.purchaseAmount)
  1575. })
  1576. if (goodsNum.length == 0) {
  1577. this.maxGoodsNum = 0;
  1578. } else {
  1579. this.maxGoodsNum = goodsNum.reduce((a, b) => {
  1580. return b > a? b: a;
  1581. })
  1582. }
  1583. this.oldForm = Object.assign({}, this.form)
  1584. this.oldGoodsList = []
  1585. this.oldFeesList = []
  1586. this.oldUploadList = []
  1587. this.oldGoodsList = this.deepClone(this.contactsData)
  1588. this.oldFeesList = this.deepClone(this.advantageProjectData)
  1589. this.oldUploadList = this.deepClone(this.bankOfDepositData)
  1590. if (isCopy) {
  1591. this.$set(this.form, 'orderStatus', '录入')
  1592. delete this.form.id
  1593. delete this.form.orgOrderNo
  1594. delete this.form.orderNo
  1595. delete this.form.morderNo
  1596. delete this.form.createUserName
  1597. delete this.form.createTime
  1598. delete this.form.businesDate
  1599. this.contactsData.forEach(item => {
  1600. delete item.id
  1601. delete item.pid
  1602. })
  1603. this.advantageProjectData.forEach(item => {
  1604. delete item.id
  1605. delete item.pid
  1606. })
  1607. this.bankOfDepositData.forEach(item => {
  1608. delete item.id
  1609. delete item.pid
  1610. })
  1611. }
  1612. }).finally(() => {
  1613. this.saveLoading = false
  1614. this.pageLoading = false
  1615. });
  1616. },
  1617. // 复制新单
  1618. copyOrder() {
  1619. this.queryData(this.form.id, true)
  1620. },
  1621. getcorpId(row) {
  1622. this.goodsShowData[row.index].corpId = row.id;
  1623. this.goodsShowData[row.index].corpName = row.cname;
  1624. },
  1625. // 采购金额获取
  1626. getPurchasePrice(row) {
  1627. getPurchasePrice({code: row.code}).then(res => {
  1628. this.purchasePriceOption = res.data.data
  1629. })
  1630. },
  1631. // 销售金额获取
  1632. getMarketPrice(row) {
  1633. getMarketPrice({code: row.code}).then(res => {
  1634. this.salesPriceOtion = res.data.data
  1635. })
  1636. },
  1637. // 生成采购单
  1638. saveSell() {
  1639. let getGoodsList = []
  1640. let getFeeList = this.$refs.feeInfo.submitData()
  1641. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1642. getGoodsList = this.goodsShowData.concat(this.contactsData)
  1643. } else {
  1644. getGoodsList = this.goodsShowData.concat(this.giftData)
  1645. }
  1646. if (contrastObj(this.form, this.oldForm) ||
  1647. contrastList(getGoodsList, this.oldGoodsList) ||
  1648. contrastList(getFeeList, this.oldFeesList) ||
  1649. contrastList(this.bankOfDepositData, this.oldUploadList)
  1650. ) {
  1651. this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
  1652. confirmButtonText: "确定",
  1653. cancelButtonText: "取消",
  1654. type: "warning"
  1655. }).then(async () => {
  1656. await this.editCustomer(false, '采购')
  1657. }).catch(() => {
  1658. this.$message.info('已取消')
  1659. })
  1660. } else {
  1661. this.$confirm("是否生成采购单?", {
  1662. confirmButtonText: "确定",
  1663. cancelButtonText: "取消",
  1664. type: "warning"
  1665. }).then(() => {
  1666. saveSell(this.form.id).then(res => {
  1667. if (res.data.code == 200) {
  1668. this.$message.success("生成成功");
  1669. }
  1670. });
  1671. });
  1672. }
  1673. },
  1674. //点击行可编辑
  1675. handleRowClick(row, event, column) {
  1676. },
  1677. //商品编辑
  1678. rowCell(row, index) {
  1679. if (row.$cellEdit) {
  1680. if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
  1681. return this.$message.error('订货数量不能小于发货数量')
  1682. }
  1683. }
  1684. this.$refs.crudContact.rowCell(row, index)
  1685. },
  1686. //费用编辑
  1687. rowCellTwo(row, index) {
  1688. console.log(row)
  1689. this.$refs.crudProject.rowCell(row, index)
  1690. },
  1691. //费用新增触发
  1692. costIncrease() {
  1693. this.dialogCost = !this.dialogCost
  1694. this.choiceData = false
  1695. },
  1696. //商品新增触发
  1697. commoditySelection() {
  1698. this.dialogVisible = !this.dialogVisible
  1699. this.tableData = []
  1700. this.commodityData = false
  1701. this.goodsListSave = [];
  1702. },
  1703. //政策价格导入
  1704. policy() {
  1705. this.policyDialog = !this.policyDialog
  1706. },
  1707. // 报表
  1708. openReport() {
  1709. this.switchDialog =! this.switchDialog;
  1710. },
  1711. // 下载模板
  1712. downloadHandle() {
  1713. this.$confirm('是否下载模板文件?', '提示', {
  1714. confirmButtonText: '确定',
  1715. cancelButtonText: '取消',
  1716. type: 'warning'
  1717. }).then(() => {
  1718. window.open(
  1719. `/api/blade-purchase-sales/orderitems/exportPrice?${
  1720. this.website.tokenHeader
  1721. }=${getToken()}`
  1722. );
  1723. }).catch(() => {
  1724. this.$message({
  1725. type: 'info',
  1726. message: '已取消'
  1727. });
  1728. })
  1729. },
  1730. //文件上传时
  1731. uploading(event, file, fileList) {
  1732. this.openFullScreen(false, '文件正在解析中');
  1733. },
  1734. importTemplate(res, file) {
  1735. this.openFullScreen(true)
  1736. let goodsData = []
  1737. res.data.forEach(item => {
  1738. getMarketPrice({code: item.code}).then(res => {
  1739. if (res.data.data.length > 0) {
  1740. this.$set(item, 'price', res.data.data[0].salesPrice)
  1741. } else {
  1742. this.$set(item, 'price', '0')
  1743. }
  1744. this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
  1745. })
  1746. getPurchasePrice({code: item.code}).then(res => {
  1747. if (res.data.data.length > 0) {
  1748. this.$set(item, 'purchaseAmount', res.data.data[0].purchasePrice)
  1749. } else {
  1750. this.$set(item, 'purchaseAmount', '0')
  1751. }
  1752. })
  1753. this.$set(item, 'actualQuantity', '0')
  1754. this.$set(item, 'purchaseAmount', '0')
  1755. this.$set(item, 'price', '0')
  1756. this.$set(item, 'amount', '0')
  1757. this.$set(item, 'sort', this.maxFeeNum + 1)
  1758. this.maxFeeNum++
  1759. let a = {
  1760. cname: item.cname,
  1761. }
  1762. goodsData.push(a)
  1763. })
  1764. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(goodsData)
  1765. this.removeGoodsRepeat()
  1766. this.contactsData = this.contactsData.concat(res.data)
  1767. },
  1768. //遮罩层
  1769. openFullScreen(res, text) {
  1770. const loading = this.$loading({
  1771. lock: true,
  1772. text: text,
  1773. spinner: 'el-icon-loading',
  1774. background: 'rgba(0, 0, 0, 0.7)'
  1775. });
  1776. if (res === true) loading.close();
  1777. },
  1778. onClose(val) {
  1779. this.switchDialog = val;
  1780. },
  1781. getShipmentD() {
  1782. for (let item in this.selection) {
  1783. if (!this.selection[item].id) {
  1784. return this.$message.error('选中数据有新数据,请先保存')
  1785. }
  1786. }
  1787. if (this.$store.getters.inStatus) {
  1788. this.$alert("发货单存在,请保存发货单再进行操作", "温馨提示", {
  1789. confirmButtonText: "确定",
  1790. type: "warning",
  1791. callback: action => {
  1792. console.log(action);
  1793. }
  1794. });
  1795. } else {
  1796. this.generateShipmentD();
  1797. }
  1798. },
  1799. //生成发货单
  1800. async generateShipmentD() {
  1801. let getGoodsList = []
  1802. let getFeeList = this.$refs.feeInfo.submitData()
  1803. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1804. getGoodsList = this.goodsShowData.concat(this.contactsData)
  1805. } else {
  1806. getGoodsList = this.goodsShowData.concat(this.giftData)
  1807. }
  1808. if (contrastObj(this.form, this.oldForm) ||
  1809. contrastList(getGoodsList, this.oldGoodsList) ||
  1810. contrastList(getFeeList, this.oldFeesList) ||
  1811. contrastList(this.bankOfDepositData, this.oldUploadList)
  1812. ) {
  1813. this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
  1814. confirmButtonText: "确定",
  1815. cancelButtonText: "取消",
  1816. type: "warning"
  1817. }).then(() => {
  1818. this.editCustomer(false, '发货')
  1819. }).catch(() => {
  1820. this.$message({
  1821. type: 'info',
  1822. message: '已取消'
  1823. });
  1824. })
  1825. } else {
  1826. this.selection = this.selection.concat(this.giftData)
  1827. this.selection.forEach(item => {
  1828. lsit.push(item.id)
  1829. })
  1830. let data = {
  1831. id: this.form.id,
  1832. orderItemIds: lsit
  1833. }
  1834. generateShipment(data).then(res => {
  1835. this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
  1836. this.$router.push({
  1837. path: "/businessManagement/deliveryNotice/index",
  1838. query: {
  1839. form: JSON.stringify(res.data.data),
  1840. pageType: "Generate",
  1841. },
  1842. });
  1843. })
  1844. }
  1845. },
  1846. // 生成结算
  1847. applySettlement(type) {
  1848. let getGoodsList = []
  1849. let getFeeList = this.$refs.feeInfo.submitData()
  1850. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1851. getGoodsList = this.goodsShowData.concat(this.contactsData)
  1852. } else {
  1853. getGoodsList = this.goodsShowData.concat(this.giftData)
  1854. }
  1855. if (contrastObj(this.form, this.oldForm) ||
  1856. contrastList(getGoodsList, this.oldGoodsList) ||
  1857. contrastList(getFeeList, this.oldFeesList) ||
  1858. contrastList(this.bankOfDepositData, this.oldUploadList)
  1859. ) {
  1860. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1861. confirmButtonText: "确定",
  1862. cancelButtonText: "取消",
  1863. type: "warning"
  1864. }).then(() => {
  1865. this.editCustomer(true)
  1866. }).catch(() => {
  1867. })
  1868. } else {
  1869. this.beforeBillData(true,type)
  1870. this.applySettlementDialog = true;
  1871. }
  1872. },
  1873. //生成账单 拿到主表信息
  1874. beforeBillData(bool,type){
  1875. this.billType = type
  1876. this.billData = {
  1877. srcOrderno:this.form.orgOrderNo,
  1878. itemType:"销售",
  1879. corpsName:this.form.corpName,
  1880. corpId:this.form.corpId,
  1881. srcParentId: this.form.id,
  1882. currency: 'CNY',
  1883. exchangeRate: '1',
  1884. taxRate: '0',
  1885. accDate: this.form.businesDate,
  1886. srcType: 1,
  1887. tradeType: 'GN',
  1888. optionType: 'GN'
  1889. }
  1890. if(bool){ //申请货款
  1891. this.billData.srcId = -1
  1892. }
  1893. },
  1894. //关闭账单
  1895. choceFun(){
  1896. this.applySettlementDialog = false
  1897. },
  1898. //商品选中触发
  1899. productSelection(selection) {
  1900. this.selection = selection
  1901. },
  1902. //点击费用明细选择触发
  1903. choice(row) {
  1904. this.dialogCost = !this.dialogCost
  1905. this.choiceData = true
  1906. console.log(row)
  1907. this.choiceIndex = row.$index
  1908. },
  1909. // 去重
  1910. removeRepeat() {
  1911. let obj = []
  1912. this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
  1913. obj[next.id] ? '': obj[next.id] = true && current.push(next)
  1914. return current
  1915. }, [])
  1916. },
  1917. removeGoodsRepeat() {
  1918. let obj = []
  1919. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current,next) => {
  1920. obj[next.cname] ? '': obj[next.cname] = true && current.push(next)
  1921. return current
  1922. }, [])
  1923. },
  1924. //
  1925. receiveList(data){
  1926. this.configuration.dicData = this.configuration.dicData.concat(data)
  1927. this.removeRepeat()
  1928. },
  1929. receiveGoodList(data) {
  1930. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(data)
  1931. this.removeGoodsRepeat()
  1932. },
  1933. async getCorpRow(data) {
  1934. getCorpDetail({corpId:data.id}).then(res => {
  1935. this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
  1936. })
  1937. integralDetail({corpId:data.id}).then(res => {
  1938. this.form.pointMutiple = res.data.data? res.data.data.balancePoints: 0
  1939. })
  1940. this.arrivalOptions = [];
  1941. this.arrivalOptions = await this.corpAddr(data.id)
  1942. this.$set(this.form, 'paymentType', data.paymentType)
  1943. this.$set(this.form, 'packageRemarks', data.packageRemarks)
  1944. if (this.arrivalOptions.length > 0) {
  1945. this.$set(this.form, 'arrivalAddress', this.arrivalOptions[0].label)
  1946. } else {
  1947. this.$set(this.form, 'arrivalAddress', null)
  1948. }
  1949. // if (data.storageAddr) {
  1950. // this.arrivalOptions.push({
  1951. // label: data.storageAddr
  1952. // })
  1953. // }
  1954. // corpsAddrSelect({pid: data.id}).then(res => {
  1955. // if (res.data.data.records.length > 0) {
  1956. // res.data.data.records.forEach(item => {
  1957. // this.arrivalOptions.push({
  1958. // label: item.addr
  1959. // })
  1960. // })
  1961. // }
  1962. // this.$set(this.form, 'paymentType', data.paymentType)
  1963. // this.$set(this.form, 'packageRemarks', data.packageRemarks)
  1964. // if (this.arrivalOptions.length > 0) {
  1965. // this.$set(this.form, 'arrivalAddress', this.arrivalOptions[0].label)
  1966. // } else {
  1967. // this.$set(this.form, 'arrivalAddress', null)
  1968. // }
  1969. // })
  1970. },
  1971. async getPlantRow(data) {
  1972. this.shippingOptions = [];
  1973. this.shippingOptions = await this.corpAddr(data.id)
  1974. if (this.shippingOptions.length > 0) {
  1975. this.$set(this.form, 'shippingAddress', this.shippingOptions[0].label)
  1976. } else {
  1977. this.$set(this.form, 'shippingAddress', null)
  1978. }
  1979. },
  1980. getRow(event,row) {
  1981. row.priceCategory = event[0].goodsTypeName
  1982. row.code = event[0].code
  1983. row.typeno = event[0].typeno
  1984. row.itemType = event[0].typeno
  1985. row.itemId = event[0].id
  1986. row.corpId = event[0].corpId
  1987. row.corpName = event[0].corpName
  1988. selectGoodsNum({
  1989. goodsId: event[0].id,
  1990. itemType: event[0].typeno,
  1991. tradeType: 'GN'
  1992. }).then(res => {
  1993. row.storageQuantity = res.data.data
  1994. })
  1995. row.integralMultiples = event[0].integralMultiples
  1996. this.quantityChange(row)
  1997. },
  1998. //点击商品明细选择触发
  1999. commodityChoice(row) {
  2000. this.dialogVisible = !this.dialogVisible
  2001. this.commodityData = true
  2002. console.log(row)
  2003. this.choiceIndexT = row.$index
  2004. },
  2005. //导入商品触发
  2006. importChoice() {
  2007. // this.contactsData = this.contactsData.concat(this.tableData)
  2008. if (this.tableData.length === 1) {
  2009. this.goodsShowData[this.choiceIndexT].cname = this.tableData[0].cname
  2010. this.goodsShowData[this.choiceIndexT].code = this.tableData[0].code
  2011. this.goodsShowData[this.choiceIndexT].typeno = this.tableData[0].typeno
  2012. this.goodsShowData[this.choiceIndexT].itemType = this.tableData[0].typeno
  2013. this.goodsShowData[this.choiceIndexT].itemId = this.tableData[0].id
  2014. this.goodsShowData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
  2015. this.goodsShowData[this.choiceIndexT].integralMultiples = this.tableData[0].integralMultiples
  2016. this.goodsShowData[this.choiceIndexT].corpId = this.tableData[0].corpId
  2017. this.goodsShowData[this.choiceIndexT].corpName = this.tableData[0].corpName
  2018. this.quantityChange(this.goodsShowData[this.choiceIndexT])
  2019. selectGoodsNum({
  2020. goodsId: this.tableData[0].id,
  2021. itemType: this.tableData[0].typeno,
  2022. tradeType: 'GN'
  2023. }).then(res => {
  2024. this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data
  2025. })
  2026. }
  2027. this.dialogVisible = !this.dialogVisible
  2028. this.commodityData = false
  2029. },
  2030. //费用编辑导入触发
  2031. choiceCost() {
  2032. if (this.tableDataCost.length === 1) {
  2033. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  2034. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  2035. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  2036. }
  2037. this.dialogCost = !this.dialogCost
  2038. this.choiceData = false
  2039. },
  2040. //费用导入触发
  2041. importCost() {
  2042. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  2043. if (this.tableDataCost.length > 0) {
  2044. for (let item in this.tableDataCost) {
  2045. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  2046. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  2047. this.$set(this.tableDataCost[item], 'amount', 0)
  2048. this.$set(this.tableDataCost[item], 'settlmentAmount', 0)
  2049. this.$set(this.tableDataCost[item], 'corpId', this.form.corpId)
  2050. this.tableDataCost[item].sort = this.maxFeeNum + 1
  2051. this.maxFeeNum++
  2052. delete this.tableDataCost[item].id
  2053. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  2054. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  2055. }
  2056. }
  2057. this.tableDataCost = []
  2058. this.dialogCost = false
  2059. },
  2060. //确认导入触发
  2061. async importGoods() {
  2062. if (this.goodsListSave.length > 0) {
  2063. this.goodsListSaveHandle()
  2064. } else {
  2065. if (this.tableData.length > 0) {
  2066. this.tableDataHandle()
  2067. }
  2068. }
  2069. },
  2070. goodsListSaveHandle() {
  2071. for (let item in this.goodsListSave) {
  2072. getMarketPrice({code: this.goodsListSave[item].code}).then(res => {
  2073. if (res.data.data.length > 0) {
  2074. this.$set(this.goodsListSave[item], 'price', res.data.data[0].salesPrice)
  2075. } else {
  2076. this.$set(this.goodsListSave[item], 'price', '0')
  2077. }
  2078. this.priceChange(this.goodsListSave[item])
  2079. })
  2080. getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
  2081. if (res.data.data.length > 0) {
  2082. this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
  2083. } else {
  2084. this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
  2085. }
  2086. })
  2087. selectGoodsNum({
  2088. goodsId: this.goodsListSave[item].id,
  2089. itemType: this.goodsListSave[item].typeno,
  2090. tradeType: 'GN'
  2091. }).then(res => {
  2092. this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data)
  2093. // this.goodsListSave[item].storageQuantity = res.data.data
  2094. this.$set(this.goodsListSave[item], 'priceCategory', this.goodsListSave[item].goodsTypeName)
  2095. // this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
  2096. delete this.goodsListSave[item].goodsTypeName
  2097. this.goodsListSave[item].itemId = this.goodsListSave[item].id
  2098. // this.$set(this.goodsListSave[item], 'corpName', this.goodsListSave[item].cname)
  2099. this.$set(this.goodsListSave[item], 'itemType', this.goodsListSave[item].typeno)
  2100. this.$set(this.goodsListSave[item], 'orderQuantity', 1)
  2101. this.$set(this.goodsListSave[item], 'actualQuantity', 0)
  2102. this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
  2103. this.goodsListSave[item].amount = 0
  2104. if (this.goodsActives == "goods") {
  2105. this.$set(this.goodsListSave[item], 'goodType', 0)
  2106. } else {
  2107. this.$set(this.goodsListSave[item], 'goodType', 1)
  2108. this.$set(this.goodsListSave[item], 'integralMultiples', this.goodsListSave[item].integral)
  2109. }
  2110. this.$set(this.goodsListSave[item], 'integral', '0')
  2111. this.goodsListSave[item].sort = this.maxGoodsNum + 1
  2112. if (this.form.packageRemarks) {
  2113. this.goodsListSave[item].packageRemarks = this.form.packageRemarks
  2114. }
  2115. delete this.goodsListSave[item].id
  2116. delete this.goodsListSave[item].pid
  2117. delete this.goodsListSave[item].isDeleted
  2118. delete this.goodsListSave[item].status
  2119. delete this.goodsListSave[item].tenantId
  2120. delete this.goodsListSave[item].updateTime
  2121. delete this.goodsListSave[item].updateUser
  2122. delete this.goodsListSave[item].updateUserName
  2123. this.maxGoodsNum++
  2124. this.quantityChange(this.goodsListSave[item])
  2125. this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
  2126. this.$nextTick(() => {
  2127. this.quantityChange(this.goodsListSave[item])
  2128. })
  2129. // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
  2130. })
  2131. }
  2132. this.dialogVisible = false
  2133. },
  2134. tableDataHandle() {
  2135. for (let item=0;item<this.tableData.length;item++) {
  2136. getMarketPrice({code: this.tableData[item].code}).then(res => {
  2137. if (res.data.data.length > 0) {
  2138. this.$set(this.tableData[item], 'price', res.data.data[0].salesPrice)
  2139. } else {
  2140. this.$set(this.tableData[item], 'price', '0')
  2141. }
  2142. this.priceChange(this.tableData[item])
  2143. })
  2144. getPurchasePrice({code: this.tableData[item].code}).then(res => {
  2145. if (res.data.data.length > 0) {
  2146. this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
  2147. } else {
  2148. this.$set(this.tableData[item], 'purchaseAmount', '0')
  2149. }
  2150. })
  2151. // debugger
  2152. selectGoodsNum({
  2153. goodsId: this.tableData[item].id,
  2154. itemType: this.tableData[item].typeno,
  2155. tradeType: 'GN'
  2156. }).then(res => {
  2157. this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
  2158. this.tableData[item].storageQuantity = res.data.data
  2159. delete this.tableData[item].goodsTypeName
  2160. this.tableData[item].itemId = this.tableData[item].id
  2161. // this.$set(this.tableData[item], 'corpName', this.tableData[item].cname)
  2162. this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
  2163. this.$set(this.tableData[item], 'orderQuantity', 1)
  2164. this.$set(this.tableData[item], 'actualQuantity', 0)
  2165. this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
  2166. this.tableData[item].amount = 0
  2167. if (this.goodsActives == "goods") {
  2168. this.$set(this.tableData[item], 'goodType', 0)
  2169. } else {
  2170. this.$set(this.tableData[item], 'goodType', 1)
  2171. this.$set(this.tableData[item], 'integralMultiples', this.tableData[item].integral)
  2172. }
  2173. this.$set(this.tableData[item], 'integral', '0')
  2174. this.tableData[item].sort = this.maxGoodsNum + 1
  2175. if (this.form.packageRemarks) {
  2176. this.tableData[item].packageRemarks = this.form.packageRemarks
  2177. }
  2178. delete this.tableData[item].id
  2179. delete this.tableData[item].pid
  2180. delete this.tableData[item].isDeleted
  2181. delete this.tableData[item].status
  2182. delete this.tableData[item].tenantId
  2183. delete this.tableData[item].updateTime
  2184. delete this.tableData[item].updateUser
  2185. delete this.tableData[item].updateUserName
  2186. this.maxGoodsNum++
  2187. this.quantityChange(this.tableData[item])
  2188. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  2189. this.$nextTick(() => {
  2190. this.quantityChange(this.tableData[item])
  2191. })
  2192. // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
  2193. })
  2194. }
  2195. this.dialogVisible = false
  2196. },
  2197. closeGoods() {
  2198. this.treeDataGoods = [];
  2199. this.treeDeptId = "";
  2200. this.activeName = "searchList";
  2201. },
  2202. closeFees() {
  2203. this.treeDeptIdCost = "";
  2204. this.treeData = [];
  2205. },
  2206. closePolicy() {
  2207. this.treePolicyId = '';
  2208. this.dataPolicy = [];
  2209. this.contactsDataBuyFree = [];
  2210. this.policyData = []
  2211. this.policyDataTwo = []
  2212. },
  2213. //选中触发
  2214. selectionChange(list) {
  2215. this.tableData = list
  2216. },
  2217. //费用选中触发
  2218. selectionChangeCost(list) {
  2219. this.tableDataCost = list
  2220. },
  2221. //导入页左商品类型查询
  2222. nodeClick(data) {
  2223. this.treeDeptId = data.id;
  2224. this.page.currentPage = 1;
  2225. this.onLoad(this.page);
  2226. },
  2227. //导入页销售政策查询
  2228. policyNodeClick(data) {
  2229. this.treePolicyId = data.id
  2230. // detailList(data.id).then(res => {
  2231. // //特价促销
  2232. // this.dataPolicy = res.data.data.specialItemList
  2233. // //买赠促销
  2234. // this.contactsDataBuyFree = res.data.data.presentItemList
  2235. // })
  2236. this.policyOnLoad()
  2237. },
  2238. //导入页左费用类型查询
  2239. nodeClickCost(data) {
  2240. this.treeDeptIdCost = data.id;
  2241. this.pageCost.currentPage = 1;
  2242. this.onLoadCost(this.pageCost);
  2243. },
  2244. //刷新触发
  2245. refreshChange() {
  2246. this.treeDeptId = ''
  2247. this.page.currentPage = 1;
  2248. this.onLoad(this.page);
  2249. },
  2250. //销售政策特价促销选中触发
  2251. selectionChangePolicy(list) {
  2252. this.policyData = list
  2253. // this.policyData.forEach(item => {
  2254. // this.$set(item, 'price', item.specialOffer)
  2255. // })
  2256. if (this.policyData.length > 0) {
  2257. this.customerBuyFree.selection = false
  2258. } else {
  2259. this.customerBuyFree.selection = true
  2260. }
  2261. },
  2262. //销售政策买赠促销选中触发
  2263. selectionChangePolicyTwo(list) {
  2264. this.policyDataTwo = list
  2265. // this.policyDataTwo.forEach(item => {
  2266. // this.$set(item, 'price', item.salesPrice)
  2267. // })
  2268. if (this.policyDataTwo.length > 0) {
  2269. this.optionPolicy.selection = false
  2270. } else {
  2271. this.optionPolicy.selection = true
  2272. }
  2273. },
  2274. //导入商品政策
  2275. importPolicy() {
  2276. let list = this.deepClone(this.policyData.concat(this.policyDataTwo))
  2277. let listLength = this.policyDataTwo.length
  2278. // 买赠额外加一条
  2279. let buyFree = []
  2280. if (this.policyDataTwo.length > 0) {
  2281. buyFree = this.deepClone(this.policyDataTwo)
  2282. }
  2283. for (let item in list) {
  2284. if (this.policyData.length > 0) {
  2285. if (!list[item].specialOffer) {
  2286. getMarketPrice({code: list[item].code}).then(response => {
  2287. if (response.data.data.length > 0) {
  2288. this.$set(list[item], 'price', response.data.data[0].salesPrice)
  2289. } else {
  2290. this.$set(list[item], 'price', '0')
  2291. }
  2292. })
  2293. } else {
  2294. this.$set(list[item], 'price', list[item].specialOffer)
  2295. }
  2296. } else {
  2297. if (!list[item].salesPrice) {
  2298. getMarketPrice({code: list[item].code}).then(response => {
  2299. if (response.data.data.length > 0) {
  2300. this.$set(list[item], 'price', response.data.data[0].salesPrice)
  2301. } else {
  2302. this.$set(list[item], 'price', '0')
  2303. }
  2304. })
  2305. } else {
  2306. this.$set(list[item], 'price', list[item].salesPrice)
  2307. }
  2308. this.$set(buyFree[item], 'price', '0')
  2309. this.$set(buyFree[item], 'orderQuantity', list[item].salesVolume)
  2310. this.$set(buyFree[item], 'itemType', list[item].typeno)
  2311. }
  2312. selectGoodsNum({
  2313. goodsId: list[item].itemId,
  2314. itemType: list[item].typeno,
  2315. tradeType: 'GN'
  2316. }).then(res => {
  2317. this.$set(list[item], 'storageQuantity', res.data.data)
  2318. if (listLength != 0) {
  2319. this.$set(buyFree[item], 'storageQuantity', res.data.data)
  2320. }
  2321. this.$set(list[item], 'itemType', list[item].typeno)
  2322. this.$set(list[item], 'actualQuantity', 0)
  2323. this.$set(list[item], 'orderQuantity', 0)
  2324. this.$set(list[item], 'amount', 0)
  2325. this.$set(list[item], 'priceCategory', list[item].productCategory)
  2326. this.$set(list[item], 'priceType', this.policyForm.cname)
  2327. this.$set(list[item], 'cname', list[item].productCategory)
  2328. this.$set(list[item], 'sort', this.maxGoodsNum + 1)
  2329. this.$set(list[item], 'purchaseAmount', list[item].purchasePrice)
  2330. // 积分
  2331. this.$set(list[item], 'integralMultiples', 0)
  2332. this.$set(list[item], 'integral', 0)
  2333. if (listLength != 0) {
  2334. this.$set(buyFree[item], 'actualQuantity', 0)
  2335. this.$set(buyFree[item], 'orderQuantity', 0)
  2336. this.$set(buyFree[item], 'amount', 0)
  2337. this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
  2338. this.$set(buyFree[item], 'priceType', this.policyForm.cname)
  2339. this.$set(buyFree[item], 'cname', list[item].productCategory)
  2340. this.$set(buyFree[item], 'sort', this.maxGoodsNum + 2)
  2341. this.$set(buyFree[item], 'purchaseAmount', list[item].purchasePrice)
  2342. // 积分
  2343. this.$set(buyFree[item], 'integralMultiples', 0)
  2344. this.$set(buyFree[item], 'integral', 0)
  2345. this.maxGoodsNum++
  2346. }
  2347. delete list[item].id
  2348. delete list[item].pid
  2349. delete list[item].isDeleted
  2350. delete list[item].status
  2351. delete list[item].tenantId
  2352. delete list[item].updateTime
  2353. delete list[item].updateUser
  2354. delete list[item].updateUserName
  2355. this.maxGoodsNum++
  2356. this.$refs.crudContact.rowCellAdd(list[item]);
  2357. // this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
  2358. if (listLength != 0) {
  2359. this.$refs.crudContact.rowCellAdd(buyFree[item]);
  2360. }
  2361. // this.$refs.crudContact.rowCell(buyFree[item], this.contactsData.length - 1)
  2362. })
  2363. }
  2364. this.policyDialog = false
  2365. },
  2366. //费用刷新触发
  2367. refreshChangeCost() {
  2368. this.treeDeptIdCost = '';
  2369. this.pageCost.currentPage = 1;
  2370. this.onLoadCost(this.pageCost);
  2371. },
  2372. //新增商品信息保存触发
  2373. rowSave(row, done, loading) {
  2374. // this.contactsData.push(row)
  2375. done()
  2376. },
  2377. //修改商品信息触发
  2378. rowUpdate(row, index, done, loading) {
  2379. done(row);
  2380. },
  2381. //删除商品信息触发
  2382. rowDel(row, index, donerowDel) {
  2383. this.$confirm("确定将选择数据删除?", {
  2384. confirmButtonText: "确定",
  2385. cancelButtonText: "取消",
  2386. type: "warning"
  2387. }).then(() => {
  2388. //商品判断是否需要调用删除接口
  2389. if (row.id) {
  2390. corpsattn(row.id).then(res => {
  2391. this.$message({
  2392. type: "success",
  2393. message: "操作成功!"
  2394. });
  2395. this.goodsShowData.splice(index, 1);
  2396. if (this.goodsActives == 'goods') {
  2397. this.form.presenterIntegral = 0;
  2398. this.form.orderAmount = 0;
  2399. this.goodsShowData.forEach(item => {
  2400. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  2401. this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
  2402. })
  2403. this.computedCost()
  2404. } else {
  2405. this.form.convertIntegral = 0;
  2406. this.goodsShowData.forEach(item => {
  2407. this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
  2408. })
  2409. }
  2410. })
  2411. } else {
  2412. this.$message({
  2413. type: "success",
  2414. message: "操作成功!"
  2415. });
  2416. this.goodsShowData.splice(index, 1);
  2417. if (this.goodsActives == 'goods') {
  2418. this.form.presenterIntegral = 0;
  2419. this.form.orderAmount = 0;
  2420. this.goodsShowData.forEach(item => {
  2421. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  2422. this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
  2423. })
  2424. this.computedCost()
  2425. } else {
  2426. this.form.convertIntegral = 0;
  2427. this.goodsShowData.forEach(item => {
  2428. this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
  2429. })
  2430. }
  2431. }
  2432. })
  2433. },
  2434. //新增费用明细保存触发
  2435. rowSaveProject(row, done, loading) {
  2436. // this.advantageProjectData.push(row)
  2437. done()
  2438. },
  2439. //修改费用明细触发
  2440. rowUpdateProject(row, index, done, loading) {
  2441. done(row);
  2442. },
  2443. policyOnLoad(params = {}) {
  2444. // this.policyLoading = true;
  2445. this.policyForm = {};
  2446. detailList(this.treePolicyId).then(res => {
  2447. this.policyForm = res.data.data
  2448. //特价促销
  2449. if(res.data.data.specialItemList) {
  2450. this.dataPolicy = res.data.data.specialItemList
  2451. } else {
  2452. this.dataPolicy = []
  2453. }
  2454. //买赠促销
  2455. if (res.data.data.presentItemList) {
  2456. this.contactsDataBuyFree = res.data.data.presentItemList
  2457. } else {
  2458. this.contactsDataBuyFree = []
  2459. }
  2460. })
  2461. },
  2462. //
  2463. goodsSearch(params, done) {
  2464. this.treeDeptId = ''
  2465. this.onLoad(this.page, params);
  2466. done()
  2467. },
  2468. //商品列表查询
  2469. onLoad(page, params = {}) {
  2470. this.loading = true;
  2471. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  2472. const data = res.data.data;
  2473. this.page.total = data.total;
  2474. this.pageList.total = data.total
  2475. this.data = data.records;
  2476. this.goodsListShow = data.records;
  2477. this.loading = false;
  2478. });
  2479. },
  2480. // 费用查询按钮
  2481. feesSearch(params, done) {
  2482. this.treeDeptIdCost = '';
  2483. this.onLoadCost(this.pageCost, params)
  2484. done()
  2485. },
  2486. //费用查询
  2487. onLoadCost(page, params = {}) {
  2488. this.loadingCost = true;
  2489. let queryParams = Object.assign({}, params, {
  2490. pageSize: page.pageSize,
  2491. pageNum: page.currentPage,
  2492. parentId: 0,
  2493. feesTypeId: this.treeDeptIdCost
  2494. })
  2495. customerList(queryParams).then(res => {
  2496. console.log(res)
  2497. const data = res.data.data;
  2498. this.pageCost.total = data.total;
  2499. this.dataCost = data.records;
  2500. this.loadingCost = false;
  2501. });
  2502. },
  2503. //删除费用明细触发
  2504. rowDelProject(row, index, donerowDel) {
  2505. this.$confirm("确定将选择数据删除?", {
  2506. confirmButtonText: "确定",
  2507. cancelButtonText: "取消",
  2508. type: "warning"
  2509. }).then(() => {
  2510. //费用判断是否需要调用删除接口
  2511. if (row.id) {
  2512. corpsitem(row.id).then(res => {
  2513. this.$message({
  2514. type: "success",
  2515. message: "操作成功!"
  2516. });
  2517. this.advantageProjectData.splice(index, 1);
  2518. })
  2519. } else {
  2520. this.$message({
  2521. type: "success",
  2522. message: "操作成功!"
  2523. });
  2524. this.advantageProjectData.splice(index, 1);
  2525. }
  2526. })
  2527. },
  2528. //新增附件上传保存触发
  2529. rowSaveBankOfDeposit(row, done, loading) {
  2530. this.bankOfDepositData.push(row)
  2531. done()
  2532. },
  2533. //修改附件上传触发
  2534. rowUpdateBankOfDeposit(row, index, done, loading) {
  2535. done(row);
  2536. },
  2537. //删除附件上传触发
  2538. rowDelBankOfDeposit(row, index, donerowDel) {
  2539. this.$confirm("确定将选择数据删除?", {
  2540. confirmButtonText: "确定",
  2541. cancelButtonText: "取消",
  2542. type: "warning"
  2543. }).then(() => {
  2544. //附件判断是否需要调用删除接口
  2545. if (row.id) {
  2546. corpsbank(row.id).then(res => {
  2547. this.$message({
  2548. type: "success",
  2549. message: "操作成功!"
  2550. });
  2551. this.bankOfDepositData.splice(index, 1);
  2552. })
  2553. } else {
  2554. this.$message({
  2555. type: "success",
  2556. message: "操作成功!"
  2557. });
  2558. this.bankOfDepositData.splice(index, 1);
  2559. }
  2560. })
  2561. },
  2562. uploadAfter(res, done) {
  2563. if (res.originalName) {
  2564. this.bankOfDepositForm.fileName = this.bankOfDepositForm.fileName
  2565. ? this.bankOfDepositForm.fileName
  2566. : res.originalName;
  2567. }
  2568. done();
  2569. },
  2570. //修改提交触发
  2571. editCustomer(isBack = false, type) {
  2572. this.$refs["form"].validate((valid) => {
  2573. if (valid) {
  2574. for (let item in this.contactsData) {
  2575. if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
  2576. return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
  2577. }
  2578. }
  2579. this.form.orderFeesList = this.$refs.feeInfo.submitData()
  2580. let packFee;
  2581. if (this.form.packageRemarks) {
  2582. let arr = this.form.orderFeesList.filter(item => item.feesType == 1)
  2583. packFee = arr.findIndex(item => item.feeName == '包装费')
  2584. }
  2585. if (packFee == -1) {
  2586. return this.$message.error('费用明细未有包装费')
  2587. }
  2588. // 计算毛利额
  2589. this.$set(this.form, 'orderAmount', 0)
  2590. // 成本价
  2591. let purchaseAmount = 0
  2592. if (this.form.orderAmount && this.form.settlmentAmount) {
  2593. this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
  2594. }
  2595. //商品信息
  2596. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  2597. this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)
  2598. } else {
  2599. this.form.orderItemsList = this.goodsShowData.concat(this.giftData)
  2600. }
  2601. // 销售金额
  2602. this.form.orderAmount = 0;
  2603. // 计算销售金额
  2604. this.goodsShowData.forEach(item => {
  2605. if (item.goodType == 0) {
  2606. if (item.purchaseAmount) {
  2607. purchaseAmount += (Number(item.purchaseAmount) * Number(item.orderQuantity)).toFixed(2)
  2608. }
  2609. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  2610. }
  2611. })
  2612. this.computedCost()
  2613. // 判断订货数量不能小于等于0
  2614. for (let item in this.form.orderItemsList) {
  2615. if (Number(this.form.orderItemsList[item].orderQuantity) <= 0) {
  2616. return this.$message.error('订货数量不能小于等于0')
  2617. }
  2618. }
  2619. // this.form.orderFeesList = this.advantageProjectData
  2620. this.form.orderFilesList = this.bankOfDepositData
  2621. if (typeof this.form.corpsTypeId == 'object') {
  2622. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  2623. }
  2624. this.form.billType = 'XS'
  2625. this.saveLoading = true
  2626. typeSave(this.form).then(res => {
  2627. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  2628. if (isBack) {
  2629. //成功关闭此页面回到列表页
  2630. this.$emit("goBack");
  2631. } else {
  2632. this.saveActives = ''
  2633. this.queryData(res.data.data.id)
  2634. }
  2635. if (type == '发货') {
  2636. let lsit = []
  2637. this.selection = this.selection.concat(this.giftData)
  2638. this.selection.forEach(item => {
  2639. lsit.push(item.id)
  2640. })
  2641. let data = {
  2642. id: this.form.id,
  2643. orderItemIds: lsit
  2644. }
  2645. generateShipment(data).then(res => {
  2646. this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
  2647. this.$router.push({
  2648. path: "/businessManagement/deliveryNotice/index",
  2649. query: {form: JSON.stringify(res.data.data),pageType: "Generate",},
  2650. });
  2651. })
  2652. } else if (type == '采购') {
  2653. this.$confirm("是否生成采购单?", {
  2654. confirmButtonText: "确定",
  2655. cancelButtonText: "取消",
  2656. type: "warning"
  2657. }).then(() => {
  2658. saveSell(this.form.id).then(res => {
  2659. if (res.data.code == 200) {
  2660. this.$message.success("生成成功");
  2661. }
  2662. });
  2663. });
  2664. }
  2665. }).finally(() => {
  2666. this.saveLoading = false
  2667. })
  2668. } else {
  2669. return false;
  2670. }
  2671. });
  2672. },
  2673. // 计算应收未收款
  2674. computedCost() {
  2675. if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
  2676. this.$message.error('本次使用的溢付款不能超过总溢付款')
  2677. this.form.caseOverPayment = 0;
  2678. }
  2679. // 销售金额
  2680. let orderAmount = 0;
  2681. // 已收款
  2682. let settlmentAmount = 0;
  2683. // 本次溢付款
  2684. let caseOverPayment = 0
  2685. if (this.form.orderAmount) {
  2686. orderAmount = this.form.orderAmount
  2687. }
  2688. if (this.form.settlmentAmount) {
  2689. settlmentAmount = this.form.settlmentAmount
  2690. }
  2691. if (this.form.caseOverPayment) {
  2692. caseOverPayment = this.form.caseOverPayment
  2693. }
  2694. this.$set(this.form, "balanceAmount", (Number(orderAmount) - Number(caseOverPayment) - Number(settlmentAmount)).toFixed(2));
  2695. this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(caseOverPayment)).toFixed(2)))
  2696. },
  2697. quantityChange(row) {
  2698. if (!row.orderQuantity) {
  2699. row.orderQuantity = 0;
  2700. } else {
  2701. // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  2702. row.amount = (row.price * row.orderQuantity).toFixed(2)
  2703. }
  2704. if (!row.integralMultiples) {
  2705. row.integralMultiples = 0
  2706. }
  2707. row.integral = (Number(row.orderQuantity) * Number(row.integralMultiples)).toFixed(2)
  2708. if (this.goodsActives == 'goods') {
  2709. // 计算销售金额
  2710. this.form.orderAmount = 0
  2711. // 计算赠送积分
  2712. this.form.presenterIntegral = 0;
  2713. this.goodsShowData.forEach(item => {
  2714. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  2715. this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
  2716. })
  2717. this.computedCost()
  2718. } else {
  2719. this.form.convertIntegral = 0;
  2720. this.goodsShowData.forEach(item => {
  2721. this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
  2722. })
  2723. }
  2724. },
  2725. priceChange(row) {
  2726. if (!row.price) {
  2727. row.price = 0;
  2728. } else {
  2729. row.amount = (row.price * row.orderQuantity).toFixed(2)
  2730. }
  2731. if (this.goodsActives == 'goods') {
  2732. // 计算销售金额
  2733. this.form.orderAmount = 0
  2734. this.goodsShowData.forEach(item => {
  2735. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  2736. })
  2737. this.computedCost()
  2738. }
  2739. },
  2740. //返回列表
  2741. backToList() {
  2742. let getGoodsList = []
  2743. let getFeeList = this.$refs.feeInfo.submitData()
  2744. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  2745. getGoodsList = this.goodsShowData.concat(this.contactsData)
  2746. } else {
  2747. getGoodsList = this.goodsShowData.concat(this.giftData)
  2748. }
  2749. if (contrastObj(this.form, this.oldForm) ||
  2750. contrastList(getGoodsList, this.oldGoodsList) ||
  2751. contrastList(getFeeList, this.oldFeesList) ||
  2752. contrastList(this.bankOfDepositData, this.oldUploadList)
  2753. ) {
  2754. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  2755. confirmButtonText: "确定",
  2756. cancelButtonText: "取消",
  2757. type: "warning"
  2758. }).then(() => {
  2759. this.editCustomer(true)
  2760. }).catch(() => {
  2761. this.$emit("goBack");
  2762. })
  2763. } else {
  2764. this.$emit("goBack");
  2765. }
  2766. },
  2767. // 保存列设置
  2768. async saveColumn(name) {
  2769. /**
  2770. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  2771. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  2772. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  2773. */
  2774. if (name == 'goods') {
  2775. const inSave = await this.saveColumnData(
  2776. this.getColumnName(15),
  2777. this.customerContact
  2778. );
  2779. if (inSave) {
  2780. this.$message.success("保存成功");
  2781. //关闭窗口
  2782. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  2783. }
  2784. } else if (name === 'fees') {
  2785. const inSave = await this.saveColumnData(
  2786. this.getColumnName(16),
  2787. this.advantageProject
  2788. );
  2789. if (inSave) {
  2790. this.$message.success("保存成功");
  2791. //关闭窗口
  2792. this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
  2793. }
  2794. }
  2795. },
  2796. async resetColumn() {
  2797. const inSave = await this.delColumnData(
  2798. this.getColumnName(15),
  2799. customerContact
  2800. );
  2801. if (inSave) {
  2802. this.$message.success("重置成功");
  2803. this.option = option;
  2804. //关闭窗口
  2805. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  2806. }
  2807. },
  2808. returnBack(row) {
  2809. getlistBankBy(row.id).then(res =>{
  2810. this.$set(this.form, 'banks', null)
  2811. this.$set(this.form, 'banksAccountName', null)
  2812. this.$set(this.form, 'accountBank', null)
  2813. this.bankList = res.data
  2814. if (this.bankList.length > 0) {
  2815. this.form.banks = this.bankList[0].accountNo
  2816. this.form.banksAccountName = this.bankList[0].accountName
  2817. this.form.accountBank = this.bankList[0].accountBank
  2818. }
  2819. })
  2820. },
  2821. // 银行账号变化
  2822. banksChange(val) {
  2823. let isTrue = false
  2824. this.bankList.forEach(item => {
  2825. if (val == item.accountNo) {
  2826. this.$set(this.form, 'banksAccountName', item.accountName)
  2827. this.$set(this.form, 'accountBank', item.accountBank)
  2828. isTrue = true
  2829. }
  2830. })
  2831. if (!isTrue) {
  2832. this.$set(this.form, 'banksAccountName', null)
  2833. this.$set(this.form, 'accountBank', null)
  2834. }
  2835. },
  2836. // 合计计算
  2837. summaryMethod({ columns, data }) {
  2838. const sums = [];
  2839. if (columns.length > 0) {
  2840. columns.forEach((item, index) => {
  2841. sums[0] = '合计'
  2842. if (
  2843. item.property == "amount" ||
  2844. item.property == "orderQuantity" ||
  2845. item.property == "actualQuantity" ||
  2846. item.property == "integral"
  2847. ) {
  2848. let amountSum = 0;
  2849. let orderQuantitySum = 0;
  2850. let actualQuantitySum = 0;
  2851. let integralSum = 0;
  2852. if (this.selection.length > 0) {
  2853. this.selection.forEach(e => {
  2854. amountSum = _.add(amountSum, Number(e.amount));
  2855. orderQuantitySum = _.add(orderQuantitySum, Number(e.orderQuantity));
  2856. actualQuantitySum = _.add(actualQuantitySum, Number(e.actualQuantity));
  2857. integralSum = _.add(integralSum, Number(e.integral));
  2858. })
  2859. };
  2860. // 订货数量合计
  2861. if (item.property == "orderQuantity") {
  2862. sums[index] = orderQuantitySum ? orderQuantitySum.toFixed(2) : "0.00";
  2863. }
  2864. // 发货数量合计
  2865. if (item.property == "actualQuantity") {
  2866. sums[index] = actualQuantitySum ? actualQuantitySum.toFixed(2) : "0.00";
  2867. }
  2868. // 金额合计
  2869. if (item.property == "amount") {
  2870. sums[index] = amountSum ? amountSum.toFixed(2) : "0.00";
  2871. }
  2872. // 积分合计
  2873. if (item.property == "integral") {
  2874. sums[index] = integralSum ? integralSum.toFixed(2) : "0.00";
  2875. }
  2876. }
  2877. })
  2878. }
  2879. return sums;
  2880. },
  2881. // 标签页切换
  2882. tabHandle(data) {
  2883. if (data.name == 'searchList') {
  2884. this.goodsListShow = this.data;
  2885. this.page.total = this.pageList.total
  2886. } else if (data.name == 'importStaging') {
  2887. this.goodsListShow = this.goodsListSave;
  2888. this.page.total = 0
  2889. }
  2890. },
  2891. removeStagList(row, index) {
  2892. this.goodsListSave.splice(index, 1)
  2893. },
  2894. importStagList(row, index) {
  2895. this.goodsListSave.push(row);
  2896. },
  2897. // 商品信息标签页切换
  2898. handleClick(data) {
  2899. if (this.saveActives == data.name) return
  2900. this.saveActives = data.name
  2901. this.goodsDisabled = true
  2902. if (data.name == 'goods') {
  2903. this.giftData = this.goodsShowData.filter(item => item.goodType == 1)
  2904. // 显示
  2905. this.customerContact.column.forEach(item => {
  2906. if (item.prop == 'integralMultiples') item.label = '积分倍数'
  2907. if (item.prop == 'integral') item.label = '赠送积分'
  2908. if (item.prop == 'orderQuantity') item.label = '订货数量'
  2909. if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
  2910. || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
  2911. || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
  2912. ) {
  2913. item.hide = false;
  2914. item.showColumn = true;
  2915. }
  2916. })
  2917. // contactsData它是商品的数组 giftData它是赠品的数组 goodsShowData它是展示页面的数组一共三个
  2918. this.goodsShowData = this.deepClone(this.contactsData);
  2919. setTimeout(() => {
  2920. this.goodsDisabled = false
  2921. },500)
  2922. } else {
  2923. // 隐藏字段
  2924. this.contactsData = this.goodsShowData.filter(item => item.goodType == 0)
  2925. this.customerContact.column.forEach(item => {
  2926. if (item.prop == 'deliveryAmount') item.label = '积分'
  2927. if (item.prop == 'actualQuantity') item.label = '数量'
  2928. if (item.prop == 'integralMultiples') item.label = '积分'
  2929. if (item.prop == 'integral') item.label = '兑换积分'
  2930. if (item.prop == 'orderQuantity') item.label = '数量'
  2931. if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
  2932. || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
  2933. || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
  2934. ) {
  2935. item.hide = true;
  2936. item.showColumn = false;
  2937. }
  2938. })
  2939. // this.giftData=this.goodsShowData.filter(e=>e.typegood==1)
  2940. this.goodsShowData = this.deepClone(this.giftData);
  2941. setTimeout(() => {
  2942. this.goodsDisabled = false
  2943. },500)
  2944. }
  2945. },
  2946. // 切换之前
  2947. beforeLeave(activeName, oldActiveName) {
  2948. },
  2949. // 查看账单
  2950. // 查看申请记录
  2951. openApplicationDialog(){
  2952. this.applicationDialog = true
  2953. },
  2954. //关闭记录
  2955. choceApplication(){
  2956. this.applicationDialog = false
  2957. },
  2958. //费用明细回调
  2959. beforeFinance(feesData,callback){
  2960. this.advantageProjectData = feesData;
  2961. let params = {}
  2962. //暂时默认通过 之后优化
  2963. params.valid = true
  2964. params.parentId = this.form.id
  2965. params.srcOrderno = this.form.orderNo
  2966. callback(params)
  2967. },
  2968. },
  2969. }
  2970. </script>
  2971. <style lang="scss" scoped>
  2972. //.customer-head {
  2973. // position: fixed;
  2974. // top: 105px;
  2975. // width: 100%;
  2976. // margin-left: -10px;
  2977. // height: 62px;
  2978. // background: #ffffff;
  2979. // box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  2980. // z-index: 999;
  2981. // /* display: flex;
  2982. // justify-content: left; */
  2983. //}
  2984. //
  2985. //.customer-back {
  2986. // cursor: pointer;
  2987. // line-height: 62px;
  2988. // font-size: 16px;
  2989. // color: #323233;
  2990. // font-weight: 400;
  2991. //}
  2992. .back-icon {
  2993. line-height: 64px;
  2994. font-size: 20px;
  2995. margin-right: 8px;
  2996. }
  2997. //.add-customer-btn {
  2998. // position: fixed;
  2999. // right: 36px;
  3000. // top: 115px;
  3001. //}
  3002. ::v-deep .el-form-item {
  3003. margin-bottom: 0;
  3004. }
  3005. .el-dialogDeep {
  3006. ::v-deep .el-dialog {
  3007. margin: 1vh auto 0 !important;
  3008. padding-bottom: 10px !important;
  3009. .el-dialog__body, .el-dialog__footer {
  3010. padding-bottom: 0 !important;
  3011. padding-top: 0 !important;
  3012. }
  3013. }
  3014. }
  3015. .print-div {
  3016. color: #000;
  3017. }
  3018. .print_table {
  3019. table {
  3020. border-right: 1px solid #000;
  3021. border-bottom: 1px solid #000;
  3022. font-size: 12px;
  3023. margin-bottom: 5px;
  3024. }
  3025. table td {
  3026. border-left: 1px solid #000;
  3027. border-top: 1px solid #000;
  3028. vertical-align: middle;
  3029. padding: 2px;
  3030. text-align: center;
  3031. }
  3032. }
  3033. .table {
  3034. border-collapse: collapse;
  3035. border-spacing: 0;
  3036. background-color: transparent;
  3037. display: table;
  3038. width: 99%;
  3039. max-width: 100%;
  3040. margin: 0 auto;
  3041. }
  3042. .table td {
  3043. text-align: left;
  3044. vertical-align: middle;
  3045. font-size: 14px;
  3046. color: #000000;
  3047. padding: 10.5px 0 10.5px 30px;
  3048. //border: 1px solid #000;
  3049. }
  3050. ::v-deep .el-form-item {
  3051. margin-bottom: 0;
  3052. }
  3053. ::v-deep .el-form-item__content{
  3054. line-height: 32px;
  3055. }
  3056. ///deep/ .avue-tree {
  3057. // display: flex;
  3058. // flex-direction: column;
  3059. // overflow-y: hidden;
  3060. // height: 100%;
  3061. //}
  3062. ///deep/ .avue-tree__filter {
  3063. // flex-shrink: 1;
  3064. //}
  3065. ///deep/ .avue-tree__content {
  3066. // height: calc(100% - 32px);
  3067. // overflow-y: auto;
  3068. //}
  3069. </style>