detailsPageEdit.vue 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004
  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. class="el-button--small-yh"
  13. style="right: 245px;"
  14. type="primary"
  15. :disabled="detailData.seeDisabled"
  16. @click="saveSell"
  17. >生成采购单</el-button>
  18. <el-button
  19. class="el-button--small-yh"
  20. type="success" style="right: 140px;" @click="copyOrder"
  21. :disabled="detailData.seeDisabled || !this.form.id">
  22. 复制新单
  23. </el-button>
  24. <el-button
  25. class="el-button--small-yh"
  26. type="primary"
  27. :disabled="disabled || detailData.seeDisabled"
  28. :loading="saveLoading"
  29. @click="editCustomer(false)"
  30. >{{ form.id ? '确认修改' : '确认新增' }}
  31. </el-button>
  32. </div>
  33. </div>
  34. <div style="margin-top: 60px">
  35. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  36. <containerTitle title="基础资料"></containerTitle>
  37. <basic-container style="margin-bottom: 10px">
  38. <el-row>
  39. <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
  40. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  41. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  42. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled"/>
  43. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  44. size="small" type="date" placeholder="选择日期"
  45. value-format="yyyy-MM-dd HH:mm:ss"
  46. :disabled="detailData.seeDisabled"/>
  47. <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
  48. :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>
  49. <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
  50. <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  51. </el-select>
  52. <el-input
  53. v-else-if="item.type == 'number'"
  54. placeholder="请输入"
  55. v-input-limit="2"
  56. size="small"
  57. :disabled="item.disabled || detailData.seeDisabled"
  58. v-model="form[item.prop]"
  59. />
  60. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  61. <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  62. </el-form-item>
  63. </el-col>
  64. </el-row>
  65. </basic-container>
  66. <containerTitle title="发货信息"></containerTitle>
  67. <basic-container style="margin-bottom: 10px">
  68. <el-row>
  69. <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
  70. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  71. <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"/>
  72. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  73. size="small" type="date" placeholder="选择日期"
  74. value-format="yyyy-MM-dd HH:mm:ss"
  75. :disabled="detailData.seeDisabled"/>
  76. <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>
  77. <el-input
  78. v-else-if="(item.prop === 'advancePayment') || (item.prop === 'settlmentAmount') || (item.prop === 'overPayment')"
  79. v-model="form[item.prop]" size="small" autocomplete="off"
  80. @change="computedCost"
  81. :disabled="detailData.seeDisabled"
  82. v-input-limit="2"
  83. ></el-input>
  84. <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
  85. <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  86. </el-select>
  87. <el-input type="age" v-else-if="item.prop === 'grossProfitRate'" v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled" v-input-limit="2">
  88. <template slot="append">%</template>
  89. </el-input>
  90. <el-input
  91. v-else-if="item.type == 'number'"
  92. placeholder="请输入"
  93. v-input-limit="2"
  94. size="small"
  95. :disabled="item.disabled || detailData.seeDisabled"
  96. v-model="form[item.prop]"
  97. />
  98. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  99. <el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. </basic-container>
  104. <containerTitle title="商品信息"></containerTitle>
  105. <basic-container style="margin-bottom: 10px">
  106. <avue-crud
  107. :option="customerContact"
  108. v-model="contactsForm"
  109. :data="contactsData"
  110. ref="crudContact"
  111. @row-save="rowSave"
  112. @row-click="handleRowClick"
  113. @row-update="rowUpdate"
  114. @selection-change="productSelection"
  115. @row-del="rowDel"
  116. @saveColumn="saveColumn('goods')"
  117. >
  118. <template slot="code" slot-scope="{row,index}">
  119. <el-button
  120. type="text"
  121. size="mini"
  122. style="padding:4px 10px;float:left"
  123. @click="commodityChoice(row)"
  124. :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
  125. <span>{{ row.code }}</span>
  126. </template>
  127. <template slot="purchaseAmount" slot-scope="{ row }">
  128. <el-select
  129. v-if="row.$cellEdit"
  130. v-model="row.purchaseAmount"
  131. @focus="getPurchasePrice(row)"
  132. allow-create
  133. filterable
  134. v-input-limit="2"
  135. >
  136. <el-option
  137. v-for="(item, index) in purchasePriceOption"
  138. :key="index"
  139. :label="item.purchasePrice"
  140. :value="item.purchasePrice"></el-option>
  141. </el-select>
  142. <span v-else>{{ row.purchaseAmount }}</span>
  143. </template>
  144. <template slot="price" slot-scope="{ row }">
  145. <el-select
  146. v-if="row.$cellEdit"
  147. v-model="row.price"
  148. @focus="getMarketPrice(row)"
  149. @input="priceChange(row)"
  150. allow-create
  151. filterable
  152. v-input-limit="2"
  153. >
  154. <el-option
  155. v-for="(item, index) in salesPriceOtion"
  156. :key="index"
  157. :label="item.salesPrice"
  158. :value="item.salesPrice"></el-option>
  159. </el-select>
  160. <span v-else>{{ row.price }}</span>
  161. </template>
  162. <template slot="orderQuantity" slot-scope="{ row }">
  163. <el-input
  164. v-if="row.$cellEdit"
  165. v-model="row.orderQuantity"
  166. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  167. size="small"
  168. @input="quantityChange(row)"
  169. ></el-input>
  170. <span v-else>{{ row.orderQuantity }}</span>
  171. </template>
  172. <template slot="cname" slot-scope="{ row }">
  173. <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"
  174. :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"/>
  175. <span v-else>
  176. <span v-for="item in goodsConfiguration.dicData" v-if="item.cname == row.cname">{{ item.cname }}</span>
  177. </span>
  178. </template>
  179. <template slot-scope="{row,index}" slot="menu">
  180. <el-button
  181. type="text"
  182. size="small"
  183. @click="rowCell(row,index)"
  184. :disabled="detailData.seeDisabled"
  185. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  186. </el-button>
  187. <el-button
  188. size="small"
  189. icon="el-icon-delete"
  190. type="text"
  191. @click="rowDel(row, index)"
  192. :disabled="detailData.seeDisabled"
  193. v-if="!row.$cellEdit"
  194. >删 除</el-button>
  195. </template>
  196. <template slot="menuLeft" slot-scope="{size}">
  197. <el-button type="primary"
  198. icon="el-icon-plus"
  199. size="small"
  200. @click="commoditySelection"
  201. :disabled="detailData.seeDisabled">录入明细
  202. </el-button>
  203. <el-button type="primary"
  204. icon="el-icon-plus"
  205. size="small"
  206. @click="policy"
  207. :disabled="detailData.seeDisabled">政策
  208. </el-button>
  209. <el-button type="warning"
  210. icon="el-icon-plus"
  211. size="small"
  212. :disabled="selection.length < 1 || detailData.seeDisabled"
  213. @click="getShipmentD">生成发货单
  214. </el-button>
  215. <el-button type="info" :size="size" icon="el-icon-printer" :disabled="detailData.seeDisabled">报 表</el-button>
  216. </template>
  217. </avue-crud>
  218. </basic-container>
  219. <containerTitle title="费用明细"></containerTitle>
  220. <basic-container style="margin-bottom: 10px">
  221. <avue-crud
  222. :option="advantageProject"
  223. v-model="advantageProjectForm"
  224. :data="advantageProjectData"
  225. ref="crudProject"
  226. @row-save="rowSaveProject"
  227. @row-update="rowUpdateProject"
  228. @row-del="rowDelProject"
  229. @saveColumn="saveColumn('fees')"
  230. >
  231. <template slot="code" slot-scope="{row,index}">
  232. <span>{{ row.code }}</span>
  233. <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
  234. </template>
  235. <template slot="corpId" slot-scope="{ row }">
  236. <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
  237. :configuration="configuration" @receiveList="receiveList"/>
  238. <span v-else>
  239. <span v-for="item in configuration.dicData" v-if="item.id == row.corpId">{{ item.cname }}</span>
  240. </span>
  241. </template>
  242. <template slot="amount" slot-scope="{ row }">
  243. <el-input v-if="row.$cellEdit" v-model="row.amount"
  244. size="small" v-input-limit="2"
  245. ></el-input>
  246. <span v-else>{{ row.amount }}</span>
  247. </template>
  248. <template slot="settlmentAmount" slot-scope="{ row }">
  249. <el-input v-if="row.$cellEdit" v-model="row.settlmentAmount"
  250. size="small" v-input-limit="2"
  251. ></el-input>
  252. <span v-else>{{ row.settlmentAmount }}</span>
  253. </template>
  254. <template slot-scope="{row,index}" slot="menu">
  255. <el-button
  256. type="text"
  257. size="small"
  258. @click="rowCellTwo(row,index)"
  259. :disabled="detailData.seeDisabled"
  260. >{{ row.$cellEdit ? '保 存' : '修 改 ' }}
  261. </el-button>
  262. <el-button
  263. size="small"
  264. icon="el-icon-delete"
  265. type="text"
  266. @click="rowDelProject(row, index)"
  267. :disabled="detailData.seeDisabled"
  268. v-if="!row.$cellEdit"
  269. >删 除</el-button>
  270. </template>
  271. <template slot="menuLeft" slot-scope="{size}">
  272. <el-button type="primary"
  273. icon="el-icon-plus"
  274. size="small"
  275. @click="costIncrease"
  276. :disabled="detailData.seeDisabled"
  277. >录入明细
  278. </el-button>
  279. </template>
  280. </avue-crud>
  281. </basic-container>
  282. <containerTitle title="附件上传"></containerTitle>
  283. <basic-container style="margin-bottom: 40px">
  284. <avue-crud
  285. :option="bankOfDeposit"
  286. v-model="bankOfDepositForm"
  287. :data="bankOfDepositData"
  288. @row-save="rowSaveBankOfDeposit"
  289. @row-update="rowUpdateBankOfDeposit"
  290. @row-del="rowDelBankOfDeposit"
  291. :upload-after="uploadAfter"
  292. ref="uploadCrud"
  293. >
  294. <template slot="menuLeft">
  295. <el-button
  296. type="primary"
  297. icon="el-icon-plus"
  298. size="small"
  299. @click.stop="$refs.uploadCrud.rowAdd()"
  300. :disabled="detailData.seeDisabled"
  301. >上传</el-button
  302. >
  303. </template>
  304. <template slot="menu" slot-scope="{ row, index }">
  305. <el-button
  306. size="small"
  307. icon="el-icon-edit"
  308. type="text"
  309. @click="$refs.uploadCrud.rowEdit(row, index)"
  310. :disabled="detailData.seeDisabled"
  311. >编 辑</el-button
  312. >
  313. <el-button
  314. size="small"
  315. icon="el-icon-delete"
  316. type="text"
  317. @click="rowDelBankOfDeposit(row, index)"
  318. :disabled="detailData.seeDisabled"
  319. >删 除</el-button
  320. >
  321. </template>
  322. </avue-crud>
  323. </basic-container>
  324. </el-form>
  325. </div>
  326. <el-dialog
  327. title="导入商品"
  328. append-to-body
  329. class="el-dialogDeep"
  330. :visible.sync="dialogVisible"
  331. width="80%"
  332. :close-on-click-modal="false"
  333. :destroy-on-close="true"
  334. :close-on-press-escape="false"
  335. @close="closeGoods">
  336. <el-row :style="{height: rowHeight}">
  337. <el-col :span="5" style="height: 100%;overflow-y: auto">
  338. <div>
  339. <el-scrollbar>
  340. <basic-container>
  341. <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick"/>
  342. </basic-container>
  343. </el-scrollbar>
  344. </div>
  345. </el-col>
  346. <el-col :span="19">
  347. <basic-container>
  348. <avue-crud :option="optionTwo"
  349. :table-loading="loading"
  350. :data="data"
  351. ref="crud"
  352. @refresh-change="refreshChange"
  353. @selection-change="selectionChange"
  354. @search-change="goodsSearch"
  355. :page.sync="page"
  356. @on-load="onLoad"></avue-crud>
  357. </basic-container>
  358. </el-col>
  359. </el-row>
  360. <span slot="footer" class="dialog-footer">
  361. <el-button @click="dialogVisible = false">取 消</el-button>
  362. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  363. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  364. :disabled="tableData.length !== 1">导入</el-button>
  365. </span>
  366. </el-dialog>
  367. <el-dialog
  368. title="导入政策"
  369. append-to-body
  370. class="el-dialogDeep"
  371. :visible.sync="policyDialog"
  372. width="80%"
  373. :close-on-click-modal="false"
  374. :destroy-on-close="true"
  375. :close-on-press-escape="false"
  376. @close="closePolicy">
  377. <el-row :style="{height: rowHeight}">
  378. <el-col :span="5" style="height: 100%;overflow-y: auto">
  379. <div>
  380. <el-scrollbar>
  381. <basic-container>
  382. <avue-tree :option="policyOption" :data="treeDataPolicy" @node-click="policyNodeClick"/>
  383. </basic-container>
  384. </el-scrollbar>
  385. </div>
  386. </el-col>
  387. <el-col :span="19">
  388. <containerTitle title="特价促销"></containerTitle>
  389. <basic-container style="margin-bottom: 10px">
  390. <avue-crud :option="optionPolicy"
  391. :table-loading="loadingPolicy"
  392. :data="dataPolicy"
  393. ref="crud"
  394. @selection-change="selectionChangePolicy"
  395. :page.sync="pagePolicy">
  396. </avue-crud>
  397. </basic-container>
  398. <containerTitle title="买赠促销"></containerTitle>
  399. <basic-container>
  400. <avue-crud
  401. :option="customerBuyFree"
  402. :data="contactsDataBuyFree"
  403. @selection-change="selectionChangePolicyTwo"
  404. ref="crudContactE">
  405. </avue-crud>
  406. </basic-container>
  407. </el-col>
  408. </el-row>
  409. <span slot="footer" class="dialog-footer">
  410. <el-button @click="policyDialog = false">取 消</el-button>
  411. <el-button type="primary" @click="importPolicy">导入</el-button>
  412. </span>
  413. </el-dialog>
  414. <el-dialog
  415. title="导入费用"
  416. append-to-body
  417. class="el-dialogDeep"
  418. :visible.sync="dialogCost"
  419. width="80%"
  420. top="8vh"
  421. :close-on-click-modal="false"
  422. :destroy-on-close="true"
  423. :close-on-press-escape="false"
  424. @close="closeFees">
  425. <el-row :style="{height: rowHeight}">
  426. <el-col :span="5" style="height: 100%;overflow-y: auto">
  427. <div>
  428. <el-scrollbar>
  429. <basic-container>
  430. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
  431. </basic-container>
  432. </el-scrollbar>
  433. </div>
  434. </el-col>
  435. <el-col :span="19">
  436. <basic-container>
  437. <avue-crud :option="optionTwoCost"
  438. :table-loading="loadingCost"
  439. :data="dataCost"
  440. ref="crud"
  441. @refresh-change="refreshChangeCost"
  442. @selection-change="selectionChangeCost"
  443. :page.sync="pageCost"
  444. @search-change="feesSearch"
  445. @on-load="onLoadCost">
  446. </avue-crud>
  447. </basic-container>
  448. </el-col>
  449. </el-row>
  450. <span slot="footer" class="dialog-footer">
  451. <el-button @click="dialogCost = false">取 消</el-button>
  452. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  453. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  454. :disabled="tableDataCost.length !== 1">导入</el-button>
  455. </span>
  456. </el-dialog>
  457. </div>
  458. </template>
  459. <script>
  460. import {
  461. typeSave, detail, deleteDetails,
  462. corpstypeTree,
  463. corpsattn,
  464. corpsbank,
  465. corpsfiles,
  466. corpsitem,
  467. getList,
  468. detailList,
  469. generateShipment,
  470. saveSell,
  471. } from "@/api/basicData/configuration"
  472. import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
  473. import customerContact from "./configuration/customerContact.json"
  474. import advantageProject from "./configuration/advantageProject.json"
  475. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  476. import commodity from "./configuration/commodity.json"
  477. import optionTwoCost from "./configuration/mainListCost.json"
  478. import optionPolicy from "./configuration/optionPolicy.json"
  479. import BuyFree from "./configuration/BuyFree.json"
  480. import {
  481. getDeptLazyTree,
  482. getDeptLazyTreeTwo,
  483. customerList,
  484. policyList,
  485. policyColumn
  486. } from "@/api/basicData/basicFeesDesc";
  487. import _ from "lodash";
  488. import option from "./configuration/mainList.json";
  489. import { contrastObj, contrastList } from "@/util/contrastData";
  490. import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees"
  491. export default {
  492. name: "detailsPage",
  493. props: {
  494. detailData: {
  495. type: Object
  496. }
  497. },
  498. data() {
  499. return {
  500. saveLoading: false,
  501. disabled: false,
  502. form: {},
  503. configuration: {
  504. multipleChoices: false,
  505. multiple: false,
  506. collapseTags: false,
  507. placeholder: '请点击右边按钮选择',
  508. dicData: []
  509. },
  510. goodsConfiguration: {
  511. multipleChoices: false,
  512. multiple: false,
  513. collapseTags: false,
  514. placeholder: '请点击右边按钮选择',
  515. dicData: []
  516. },
  517. data: [],
  518. policyForm: {},
  519. dataPolicy: [],
  520. contactsDataBuyFree: [],
  521. loadingCost: false,
  522. customerDivide: '',
  523. choiceData: false,
  524. commodityData: false,
  525. dataCost: [],
  526. treeDataPolicy: [],
  527. treeDataGoods: [],
  528. choiceIndex: '',
  529. dialogCost: false,
  530. treeDeptId: '',
  531. treeDeptIdCost: '',
  532. treePolicyId: '',
  533. pageCost: {
  534. pageSize: 10,
  535. currentPage: 1,
  536. total: 0
  537. },
  538. page: {
  539. pageSize: 10,
  540. currentPage: 1,
  541. total: 0
  542. },
  543. pagePolicy: {
  544. pageSize: 10,
  545. currentPage: 1,
  546. total: 0
  547. },
  548. loading: false,
  549. loadingPolicy: false,
  550. contactsForm: {},
  551. optionPolicy: optionPolicy,
  552. optionTwo: commodity,
  553. optionTwoCost: optionTwoCost,
  554. customerBuyFree: BuyFree,
  555. policyOption: {
  556. nodeKey: 'id',
  557. lazy: true,
  558. treeLoad: function (node, resolve) {
  559. const parentId = (node.level === 0) ? 0 : node.data.id;
  560. const newTime = new Date().toLocaleString('chinese',{hour12:false})
  561. policyColumn({newTime: newTime,parentId: parentId}).then(res => {
  562. resolve(res.data.data.map(item => {
  563. return {
  564. ...item,
  565. leaf: !item.hasChildren
  566. }
  567. }))
  568. });
  569. },
  570. addBtn: false,
  571. menu: false,
  572. size: 'small',
  573. props: {
  574. labelText: '标题',
  575. label: 'title',
  576. value: 'value',
  577. children: 'children'
  578. }
  579. },
  580. treeOptionCost: {
  581. nodeKey: 'id',
  582. lazy: true,
  583. treeLoad: function (node, resolve) {
  584. const parentId = (node.level === 0) ? 0 : node.data.id;
  585. getDeptLazyTree(parentId).then(res => {
  586. resolve(res.data.data.map(item => {
  587. return {
  588. ...item,
  589. leaf: !item.hasChildren
  590. }
  591. }))
  592. });
  593. },
  594. addBtn: false,
  595. menu: false,
  596. size: 'small',
  597. props: {
  598. labelText: '标题',
  599. label: 'title',
  600. value: 'value',
  601. children: 'children'
  602. }
  603. },
  604. treeOption: {
  605. nodeKey: 'id',
  606. lazy: true,
  607. treeLoad: function (node, resolve) {
  608. const parentId = (node.level === 0) ? 0 : node.data.id;
  609. getDeptLazyTreeTwo(parentId).then(res => {
  610. resolve(res.data.data.map(item => {
  611. return {
  612. ...item,
  613. leaf: !item.hasChildren
  614. }
  615. }))
  616. });
  617. },
  618. addBtn: false,
  619. menu: false,
  620. size: 'small',
  621. props: {
  622. labelText: '标题',
  623. label: 'title',
  624. value: 'value',
  625. children: 'children'
  626. }
  627. },
  628. dialogVisible: false,
  629. policyDialog: false,
  630. advantageProjectForm: {},
  631. selection: [],
  632. bankOfDepositForm: {},
  633. contactsData: [],
  634. advantageProjectData: [],
  635. bankOfDepositData: [],
  636. tableDataCost: [],
  637. dic: [],
  638. tableData: [],
  639. policyData: [],
  640. policyDataTwo: [],
  641. customerContact: {},
  642. advantageProject: {},
  643. bankOfDeposit: bankOfDeposit,
  644. contactInformation: {
  645. column: [
  646. {
  647. label: '销售金额',
  648. prop: 'orderAmount',
  649. type: 'number',
  650. rules: [
  651. {
  652. required: false,
  653. message: ' ',
  654. trigger: 'blur'
  655. }
  656. ]
  657. }, {
  658. label: '其他费用',
  659. prop: 'otherAmount',
  660. type: 'number',
  661. rules: [
  662. {
  663. required: false,
  664. message: ' ',
  665. trigger: 'blur'
  666. }
  667. ]
  668. }, {
  669. label: '溢付款',
  670. prop: 'overPayment',
  671. rules: [
  672. {
  673. required: false,
  674. message: ' ',
  675. trigger: 'blur'
  676. }
  677. ]
  678. },{
  679. label: '应收账款',
  680. prop: 'debitAmount',
  681. type: 'number',
  682. rules: [
  683. {
  684. required: false,
  685. message: ' ',
  686. trigger: 'blur'
  687. }
  688. ]
  689. }, {
  690. label: '已收款',
  691. prop: 'settlmentAmount',
  692. rules: [
  693. {
  694. required: false,
  695. message: ' ',
  696. trigger: 'blur'
  697. }
  698. ]
  699. }, {
  700. label: '应收未收款',
  701. prop: 'balanceAmount',//无
  702. disabled: true,
  703. rules: [
  704. {
  705. required: false,
  706. message: ' ',
  707. trigger: 'blur'
  708. }
  709. ]
  710. },
  711. // {
  712. // label: '应收预付款',
  713. // prop: 'advancePayment',
  714. // rules: [
  715. // {
  716. // required: false,
  717. // message: ' ',
  718. // trigger: 'blur'
  719. // }
  720. // ]
  721. // },
  722. {
  723. label: '保证金',
  724. prop: 'deposit',
  725. type: 'number',
  726. rules: [
  727. {
  728. required: false,
  729. message: ' ',
  730. trigger: 'blur'
  731. }
  732. ]
  733. }, {
  734. label: '逾期账款',
  735. prop: 'overDueAccounts',
  736. type: 'number',
  737. rules: [
  738. {
  739. required: false,
  740. message: ' ',
  741. trigger: 'blur'
  742. }
  743. ]
  744. }, {
  745. label: '实际发货日期',
  746. prop: 'actualDeliveryDate',
  747. type: 'datetime',
  748. rules: [
  749. {
  750. required: false,
  751. message: ' ',
  752. trigger: 'blur'
  753. }
  754. ]
  755. }, {
  756. label: '所属公司',
  757. prop: 'belongToCorpId',
  758. span: 16,
  759. rules: [
  760. {
  761. required: false,
  762. message: ' ',
  763. trigger: 'blur'
  764. }
  765. ]
  766. }, {
  767. label: '合同日期',
  768. prop: 'businesDate',
  769. type: 'date',
  770. rules: [
  771. {
  772. required: false,
  773. message: ' ',
  774. trigger: 'blur'
  775. }
  776. ]
  777. }, {
  778. label: '毛利率',
  779. prop: 'grossProfitRate',
  780. rules: [
  781. {
  782. required: false,
  783. message: ' ',
  784. trigger: 'blur'
  785. }
  786. ]
  787. }, {
  788. label: '毛利额',
  789. prop: 'grossProfit',
  790. type: 'number',
  791. rules: [
  792. {
  793. required: false,
  794. message: ' ',
  795. trigger: 'blur'
  796. }
  797. ]
  798. }, {
  799. label: '历史运费(元/条)',
  800. prop: 'freightAmountHistory',
  801. type: 'number',
  802. rules: [
  803. {
  804. required: false,
  805. message: ' ',
  806. trigger: 'blur'
  807. }
  808. ]
  809. }, {
  810. label: '到货日期',
  811. prop: 'arrivalDate',
  812. type: 'datetime',
  813. rules: [
  814. {
  815. required: false,
  816. message: ' ',
  817. trigger: 'blur'
  818. }
  819. ]
  820. }, {
  821. label: '预收款日期',
  822. type: 'datetime',
  823. prop: 'advanceCollectionDate',
  824. rules: [
  825. {
  826. required: false,
  827. message: ' ',
  828. trigger: 'blur'
  829. }
  830. ]
  831. }, {
  832. label: '积分倍数',
  833. prop: 'pointMutiple',
  834. rules: [
  835. {
  836. required: false,
  837. message: ' ',
  838. trigger: 'blur'
  839. }
  840. ]
  841. }, {
  842. label: '单据状态',
  843. prop: 'orderStatus',
  844. rules: [
  845. {
  846. required: false,
  847. message: ' ',
  848. trigger: 'blur'
  849. }
  850. ]
  851. },{
  852. label: '制单日期',
  853. prop: 'createTime',
  854. type: 'datetime',
  855. disabled:true,
  856. rules: [
  857. {
  858. required: false,
  859. message: ' ',
  860. trigger: 'blur'
  861. }
  862. ]
  863. }, {
  864. label: '制单人',
  865. prop: 'createUserName',
  866. disabled: true,
  867. span: 24,
  868. rules: [
  869. {
  870. required: false,
  871. message: ' ',
  872. trigger: 'blur'
  873. }
  874. ]
  875. },{
  876. label: '特别提醒',
  877. prop: 'specialRemarks',
  878. type: 'textarea',
  879. span: 24,
  880. rules: [
  881. {
  882. required: false,
  883. message: ' ',
  884. trigger: 'blur'
  885. }
  886. ]
  887. }
  888. ]
  889. },
  890. basicData: {
  891. column: [
  892. {
  893. label: '销售订单号',
  894. prop: 'orgOrderNo',
  895. disabled: true,
  896. rules: [
  897. {
  898. required: false,
  899. message: ' ',
  900. trigger: 'blur'
  901. }
  902. ]
  903. }, {
  904. label: '主订单号',
  905. prop: 'morderNo',
  906. rules: [
  907. {
  908. required: true,
  909. message: ' ',
  910. trigger: 'blur'
  911. }
  912. ]
  913. }, {
  914. label: '发货地址',
  915. prop: 'shippingAddress',
  916. rules: [
  917. {
  918. required: true,
  919. message: ' ',
  920. trigger: 'blur'
  921. }
  922. ]
  923. }, {
  924. label: '客户全称',
  925. prop: 'corpId',
  926. span: 16,
  927. rules: [
  928. {
  929. required: true,
  930. message: ' ',
  931. trigger: 'blur'
  932. }
  933. ]
  934. }, {
  935. label: '付款方式',
  936. prop: 'paymentType',
  937. rules: [
  938. {
  939. required: true,
  940. message: ' ',
  941. trigger: 'blur'
  942. }
  943. ]
  944. }, {
  945. label: '到货地址',
  946. prop: 'arrivalAddress',
  947. rules: [
  948. {
  949. required: true,
  950. message: ' ',
  951. trigger: 'blur'
  952. }
  953. ]
  954. }, {
  955. label: '包装要求',
  956. prop: 'packageRemarks',
  957. rules: [
  958. {
  959. required: true,
  960. message: ' ',
  961. trigger: 'blur'
  962. }
  963. ]
  964. }, {
  965. label: '运费',
  966. prop: 'oceanFreight',
  967. type: 'number',
  968. rules: [
  969. {
  970. required: true,
  971. message: ' ',
  972. trigger: 'blur'
  973. }
  974. ]
  975. }, {
  976. label: '银行帐号',
  977. prop: 'banks',
  978. rules: [
  979. {
  980. required: true,
  981. message: ' ',
  982. trigger: 'blur'
  983. }
  984. ]
  985. }, {
  986. label: '要求发货日期',
  987. prop: 'requiredDeliveryDate',
  988. type: 'date',
  989. rules: [
  990. {
  991. required: true,
  992. message: ' ',
  993. trigger: 'blur'
  994. }
  995. ]
  996. }, {
  997. label: '要求到货日期',
  998. prop: 'requiredArrivalDate',
  999. type: 'date',
  1000. rules: [
  1001. {
  1002. required: true,
  1003. message: ' ',
  1004. trigger: 'blur'
  1005. }
  1006. ]
  1007. }, {
  1008. label: '公司户头',
  1009. prop: 'banksAccountName',
  1010. rules: [
  1011. {
  1012. required: false,
  1013. message: ' ',
  1014. trigger: 'blur'
  1015. }
  1016. ]
  1017. }, {
  1018. label: "订单备注",
  1019. type: 'textarea',
  1020. span: 24,
  1021. prop: "orderRemark",
  1022. mock: {
  1023. type: 'county'
  1024. }
  1025. }
  1026. ]
  1027. },
  1028. paymentOption: [],
  1029. statusOption: [],
  1030. // 费用信息排序的最大值
  1031. maxFeeNum: 0,
  1032. maxGoodsNum: 0,
  1033. oldForm: {
  1034. orderStatus: "录入"
  1035. },
  1036. oldGoodsList: [],
  1037. oldFeesList: [],
  1038. oldUploadList: [],
  1039. // 采购价格
  1040. purchasePriceOption: [],
  1041. // 销售价格
  1042. salesPriceOtion: [],
  1043. // 弹窗高度
  1044. rowHeight: '',
  1045. // 查询时loading页面
  1046. pageLoading: false,
  1047. }
  1048. },
  1049. mounted() {
  1050. this.$nextTick(() => {
  1051. // 监听浏览器高度变化,改变表格高度
  1052. window.onresize = () => {
  1053. this.rowHeight = (window.innerHeight - 130) + 'px'
  1054. }
  1055. })
  1056. },
  1057. //初始化查询
  1058. async created() {
  1059. this.rowHeight = (window.innerHeight - 130) + 'px'
  1060. this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
  1061. this.advantageProject = await this.getColumnData(this.getColumnName(16), advantageProject);
  1062. this.getWorkDicts("payment_term").then(res => {
  1063. this.paymentOption = res.data.data
  1064. })
  1065. this.getWorkDicts("order_status").then(res => {
  1066. this.statusOption = res.data.data
  1067. })
  1068. this.$set(this.form, 'orderStatus', '录入')
  1069. this.$set(this.form, 'overPayment', 0)
  1070. if (this.detailData.id) {
  1071. this.queryData(this.detailData.id)
  1072. }
  1073. if (this.detailData.seeDisabled) {
  1074. // this.bankOfDeposit.column.forEach(item => {
  1075. // item.editDisabled = true
  1076. // item.addDisabled = true
  1077. // })
  1078. }
  1079. if (this.detailData.copyId) {
  1080. this.queryData(this.detailData.copyId, true)
  1081. }
  1082. },
  1083. watch: {
  1084. },
  1085. methods: {
  1086. getGoodsRow(event,row) {
  1087. row.priceCategory = event.goodsTypeName
  1088. this.$set(row, 'priceType', '一般')
  1089. row.code = event.code
  1090. row.typeno = event.typeno
  1091. row.itemId = event.id
  1092. },
  1093. queryData(id, isCopy = false){
  1094. this.pageLoading = true
  1095. detail(id).then(res => {
  1096. this.form = res.data.data;
  1097. this.contactsData = this.form.orderItemsList
  1098. this.advantageProjectData = this.form.orderFeesList
  1099. this.bankOfDepositData = this.form.orderFilesList
  1100. this.configuration.dicData = this.form.corpName
  1101. if (this.form.belongToCorpList) {
  1102. this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
  1103. }
  1104. let feesData = []
  1105. this.form.orderFeesList.forEach(item => {
  1106. let a = {
  1107. cname: item.corpName,
  1108. id: item.corpId
  1109. }
  1110. feesData.push(a)
  1111. })
  1112. this.configuration.dicData = this.configuration.dicData.concat(feesData)
  1113. // 去重
  1114. this.removeRepeat()
  1115. let goodsData = []
  1116. this.form.orderItemsList.forEach(item => {
  1117. let a = {
  1118. cname: item.cname,
  1119. }
  1120. goodsData.push(a)
  1121. })
  1122. this.goodsConfiguration.dicData = [].concat(goodsData)
  1123. this.removeGoodsRepeat()
  1124. delete this.form.orderItemsList
  1125. delete this.form.orderFeesList
  1126. delete this.form.orderFilesList
  1127. delete this.form.corpName
  1128. delete this.form.belongToCorpList
  1129. // 获取最大值
  1130. let num = []
  1131. this.advantageProjectData.forEach(item => {
  1132. num.push(item.sort)
  1133. })
  1134. if (num.length == 0) {
  1135. this.maxFeeNum = 0;
  1136. } else {
  1137. this.maxFeeNum = num.reduce((a, b) => {
  1138. return b > a? b: a;
  1139. })
  1140. }
  1141. let goodsNum = []
  1142. let purchaseAmount = 0
  1143. this.contactsData.forEach(item => {
  1144. goodsNum.push(item.sort)
  1145. purchaseAmount += Number(item.purchaseAmount)
  1146. })
  1147. if (goodsNum.length == 0) {
  1148. this.maxGoodsNum = 0;
  1149. } else {
  1150. this.maxGoodsNum = goodsNum.reduce((a, b) => {
  1151. return b > a? b: a;
  1152. })
  1153. }
  1154. this.oldForm = Object.assign({}, this.form)
  1155. this.oldGoodsList = []
  1156. this.oldFeesList = []
  1157. this.oldUploadList = []
  1158. this.oldGoodsList = this.deepClone(this.contactsData)
  1159. this.oldFeesList = this.deepClone(this.advantageProjectData)
  1160. this.oldUploadList = this.deepClone(this.bankOfDepositData)
  1161. if (isCopy) {
  1162. this.$set(this.form, 'orderStatus', '录入')
  1163. delete this.form.id
  1164. delete this.form.orgOrderNo
  1165. delete this.form.morderNo
  1166. delete this.form.createUserName
  1167. delete this.form.createTime
  1168. this.contactsData.forEach(item => {
  1169. delete item.id
  1170. delete item.pid
  1171. })
  1172. this.advantageProjectData.forEach(item => {
  1173. delete item.id
  1174. delete item.pid
  1175. })
  1176. this.bankOfDepositData.forEach(item => {
  1177. delete item.id
  1178. delete item.pid
  1179. })
  1180. }
  1181. }).finally(() => {
  1182. this.saveLoading = false
  1183. this.pageLoading = false
  1184. });
  1185. },
  1186. // 复制新单
  1187. copyOrder() {
  1188. this.queryData(this.form.id, true)
  1189. },
  1190. // 采购金额获取
  1191. getPurchasePrice(row) {
  1192. getPurchasePrice({code: row.code}).then(res => {
  1193. this.purchasePriceOption = res.data.data
  1194. })
  1195. },
  1196. // 销售金额获取
  1197. getMarketPrice(row) {
  1198. getMarketPrice({code: row.code}).then(res => {
  1199. this.salesPriceOtion = res.data.data
  1200. })
  1201. },
  1202. // 生成采购单
  1203. saveSell() {
  1204. if (!this.form.id) {
  1205. return this.$message.error("此单据没有提交记录,请先提交");
  1206. }
  1207. this.$confirm("是否生成采购单?", {
  1208. confirmButtonText: "确定",
  1209. cancelButtonText: "取消",
  1210. type: "warning"
  1211. }).then(() => {
  1212. saveSell(this.form.id).then(res => {
  1213. if (res.data.code == 200) {
  1214. this.$message.success("生成成功");
  1215. }
  1216. });
  1217. });
  1218. },
  1219. //点击行可编辑
  1220. handleRowClick(row, event, column) {
  1221. },
  1222. //商品编辑
  1223. rowCell(row, index) {
  1224. if (row.$cellEdit) {
  1225. if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
  1226. return this.$message.error('订货数量不能小于发货数量')
  1227. }
  1228. }
  1229. this.$refs.crudContact.rowCell(row, index)
  1230. },
  1231. //费用编辑
  1232. rowCellTwo(row, index) {
  1233. console.log(row)
  1234. this.$refs.crudProject.rowCell(row, index)
  1235. },
  1236. //费用新增触发
  1237. costIncrease() {
  1238. this.dialogCost = !this.dialogCost
  1239. this.choiceData = false
  1240. },
  1241. //商品新增触发
  1242. commoditySelection() {
  1243. this.dialogVisible = !this.dialogVisible
  1244. this.tableData = []
  1245. this.commodityData = false
  1246. },
  1247. //政策价格导入
  1248. policy() {
  1249. this.policyDialog = !this.policyDialog
  1250. },
  1251. getShipmentD() {
  1252. if (this.$store.getters.inStatus) {
  1253. this.$alert("发货单存在,请保存发货单再进行操作", "温馨提示", {
  1254. confirmButtonText: "确定",
  1255. type: "warning",
  1256. callback: action => {
  1257. console.log(action);
  1258. }
  1259. });
  1260. } else {
  1261. this.generateShipmentD();
  1262. }
  1263. },
  1264. //生成发货单
  1265. generateShipmentD() {
  1266. let lsit = []
  1267. for (let item in this.selection) {
  1268. if (!this.selection[item].id) {
  1269. return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
  1270. confirmButtonText: '确定',
  1271. cancelButtonText: '取消',
  1272. type: 'warning'
  1273. }).then(() => {
  1274. this.editCustomer(false)
  1275. }).catch(() => {
  1276. this.$message({
  1277. type: 'info',
  1278. message: '已取消'
  1279. });
  1280. });
  1281. } else {
  1282. lsit.push(this.selection[item].id)
  1283. }
  1284. }
  1285. let data = {
  1286. id: this.form.id,
  1287. orderItemIds: lsit
  1288. }
  1289. generateShipment(data).then(res => {
  1290. this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
  1291. this.$router.push({
  1292. path: "/businessManagement/deliveryNotice/index",
  1293. query: {form: JSON.stringify(res.data.data)},
  1294. });
  1295. })
  1296. },
  1297. //商品选中触发
  1298. productSelection(selection) {
  1299. this.selection = selection
  1300. },
  1301. //点击费用明细选择触发
  1302. choice(row) {
  1303. this.dialogCost = !this.dialogCost
  1304. this.choiceData = true
  1305. console.log(row)
  1306. this.choiceIndex = row.$index
  1307. },
  1308. // 去重
  1309. removeRepeat() {
  1310. let obj = []
  1311. this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
  1312. obj[next.id] ? '': obj[next.id] = true && current.push(next)
  1313. return current
  1314. }, [])
  1315. },
  1316. removeGoodsRepeat() {
  1317. let obj = []
  1318. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current,next) => {
  1319. obj[next.id] ? '': obj[next.id] = true && current.push(next)
  1320. return current
  1321. }, [])
  1322. },
  1323. //
  1324. receiveList(data){
  1325. this.configuration.dicData = this.configuration.dicData.concat(data)
  1326. this.removeRepeat()
  1327. },
  1328. receiveGoodList(data) {
  1329. console.log(data)
  1330. this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(data)
  1331. this.removeGoodsRepeat()
  1332. },
  1333. getRow(event,row) {
  1334. console.log(event,row)
  1335. row.priceCategory = event[0].goodsTypeName
  1336. this.$set(row, 'priceType', '一般')
  1337. row.code = event[0].code
  1338. row.typeno = event[0].typeno
  1339. row.itemId = event[0].id
  1340. },
  1341. //点击商品明细选择触发
  1342. commodityChoice(row) {
  1343. this.dialogVisible = !this.dialogVisible
  1344. this.commodityData = true
  1345. console.log(row)
  1346. this.choiceIndexT = row.$index
  1347. },
  1348. //导入商品触发
  1349. importChoice() {
  1350. // this.contactsData = this.contactsData.concat(this.tableData)
  1351. if (this.tableData.length === 1) {
  1352. this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
  1353. this.contactsData[this.choiceIndexT].code = this.tableData[0].code
  1354. this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
  1355. this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
  1356. this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
  1357. this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
  1358. selectGoodsNum({
  1359. goodsId: this.tableData[0].id,
  1360. typeno: this.tableData[0].typeno
  1361. }).then(res => {
  1362. this.contactsData[this.choiceIndexT].storageQuantity = res.data.data
  1363. })
  1364. }
  1365. this.dialogVisible = !this.dialogVisible
  1366. this.commodityData = false
  1367. },
  1368. //费用编辑导入触发
  1369. choiceCost() {
  1370. if (this.tableDataCost.length === 1) {
  1371. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  1372. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  1373. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  1374. }
  1375. this.dialogCost = !this.dialogCost
  1376. this.choiceData = false
  1377. },
  1378. //费用导入触发
  1379. importCost() {
  1380. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  1381. if (this.tableDataCost.length > 0) {
  1382. for (let item in this.tableDataCost) {
  1383. console.log(this.tableDataCost[item])
  1384. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  1385. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  1386. this.$set(this.tableDataCost[item], 'amount', 0)
  1387. this.$set(this.tableDataCost[item], 'settlmentAmount', 0)
  1388. this.tableDataCost[item].sort = this.maxFeeNum + 1
  1389. this.maxFeeNum++
  1390. delete this.tableDataCost[item].id
  1391. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  1392. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  1393. }
  1394. }
  1395. this.tableDataCost = []
  1396. this.dialogCost = false
  1397. },
  1398. //确认导入触发
  1399. importGoods() {
  1400. // this.contactsData = this.contactsData.concat(this.tableData)
  1401. if (this.tableData.length > 0) {
  1402. for (let item in this.tableData) {
  1403. // this.$set(this.tableData[item], 'storageQuantity', 0)
  1404. selectGoodsNum({
  1405. goodsId: this.tableData[item].id,
  1406. typeno: this.tableData[item].typeno
  1407. }).then(res => {
  1408. this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
  1409. this.tableData[item].storageQuantity = res.data.data
  1410. delete this.tableData[item].goodsTypeName
  1411. this.tableData[item].itemId = this.tableData[item].id
  1412. this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
  1413. this.$set(this.tableData[item], 'priceType', '一般')
  1414. this.$set(this.tableData[item], 'orderQuantity', 0)
  1415. this.$set(this.tableData[item], 'actualQuantity', 0)
  1416. this.$set(this.tableData[item], 'purchaseAmount', 0)
  1417. this.tableData[item].price = '0'
  1418. this.tableData[item].amount = 0
  1419. this.tableData[item].sort = this.maxGoodsNum + 1
  1420. delete this.tableData[item].id
  1421. delete this.tableData[item].pid
  1422. delete this.tableData[item].isDeleted
  1423. delete this.tableData[item].status
  1424. delete this.tableData[item].tenantId
  1425. delete this.tableData[item].updateTime
  1426. delete this.tableData[item].updateUser
  1427. delete this.tableData[item].updateUserName
  1428. this.maxGoodsNum++
  1429. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  1430. this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
  1431. })
  1432. }
  1433. this.dialogVisible = false
  1434. }
  1435. },
  1436. closeGoods() {
  1437. this.treeDataGoods = [];
  1438. this.treeDeptId = "";
  1439. },
  1440. closeFees() {
  1441. this.treeDeptIdCost = "";
  1442. this.treeData = [];
  1443. },
  1444. closePolicy() {
  1445. this.treePolicyId = '';
  1446. this.dataPolicy = [];
  1447. this.policyForm = {};
  1448. this.contactsDataBuyFree = [];
  1449. this.policyData = []
  1450. this.policyDataTwo = []
  1451. },
  1452. //选中触发
  1453. selectionChange(list) {
  1454. this.tableData = list
  1455. },
  1456. //费用选中触发
  1457. selectionChangeCost(list) {
  1458. this.tableDataCost = list
  1459. },
  1460. //导入页左商品类型查询
  1461. nodeClick(data) {
  1462. this.treeDeptId = data.id;
  1463. this.page.currentPage = 1;
  1464. this.onLoad(this.page);
  1465. },
  1466. //导入页销售政策查询
  1467. policyNodeClick(data) {
  1468. this.treePolicyId = data.id
  1469. // detailList(data.id).then(res => {
  1470. // //特价促销
  1471. // this.dataPolicy = res.data.data.specialItemList
  1472. // //买赠促销
  1473. // this.contactsDataBuyFree = res.data.data.presentItemList
  1474. // })
  1475. this.policyOnLoad()
  1476. },
  1477. //导入页左费用类型查询
  1478. nodeClickCost(data) {
  1479. this.treeDeptIdCost = data.id;
  1480. this.pageCost.currentPage = 1;
  1481. this.onLoadCost(this.pageCost);
  1482. },
  1483. //刷新触发
  1484. refreshChange() {
  1485. this.page.currentPage = 1;
  1486. this.onLoad(this.page);
  1487. },
  1488. //销售政策特价促销选中触发
  1489. selectionChangePolicy(list) {
  1490. this.policyData = list
  1491. // this.policyData.forEach(item => {
  1492. // this.$set(item, 'price', item.specialOffer)
  1493. // })
  1494. if (this.policyData.length > 0) {
  1495. this.customerBuyFree.selection = false
  1496. } else {
  1497. this.customerBuyFree.selection = true
  1498. }
  1499. },
  1500. //销售政策买赠促销选中触发
  1501. selectionChangePolicyTwo(list) {
  1502. this.policyDataTwo = list
  1503. // this.policyDataTwo.forEach(item => {
  1504. // this.$set(item, 'price', item.salesPrice)
  1505. // })
  1506. if (this.policyDataTwo.length > 0) {
  1507. this.optionPolicy.selection = false
  1508. } else {
  1509. this.optionPolicy.selection = true
  1510. }
  1511. },
  1512. //导入商品政策
  1513. importPolicy() {
  1514. let list = this.deepClone(this.policyData.concat(this.policyDataTwo))
  1515. // 买赠额外加一条
  1516. let buyFree = []
  1517. if (this.policyDataTwo.length > 0) {
  1518. buyFree = this.deepClone(this.policyDataTwo)
  1519. }
  1520. for (let item in list) {
  1521. selectGoodsNum({
  1522. goodsId: list[item].itemId,
  1523. typeno: list[item].typeno
  1524. }).then(res => {
  1525. this.$set(list[item], 'storageQuantity', res.data.data)
  1526. this.$set(buyFree[item], 'storageQuantity', res.data.data)
  1527. })
  1528. if (this.policyData.length > 0) {
  1529. this.$set(list[item], 'price', list[item].specialOffer)
  1530. } else {
  1531. this.$set(list[item], 'price', list[item].salesPrice)
  1532. this.$set(buyFree[item], 'price', '0')
  1533. this.$set(buyFree[item], 'orderQuantity', list[item].salesVolume)
  1534. }
  1535. this.$set(list[item], 'actualQuantity', 0)
  1536. this.$set(list[item], 'orderQuantity', 0)
  1537. this.$set(list[item], 'amount', 0)
  1538. this.$set(list[item], 'priceCategory', list[item].productCategory)
  1539. this.$set(list[item], 'priceType', this.policyForm.cname)
  1540. this.$set(list[item], 'cname', list[item].productCategory)
  1541. this.$set(list[item], 'sort', this.maxGoodsNum + 1)
  1542. this.$set(list[item], 'purchaseAmount', list[item].purchasePrice)
  1543. this.$set(buyFree[item], 'actualQuantity', 0)
  1544. this.$set(buyFree[item], 'amount', 0)
  1545. this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
  1546. this.$set(buyFree[item], 'priceType', this.policyForm.cname)
  1547. this.$set(buyFree[item], 'cname', list[item].productCategory)
  1548. this.$set(buyFree[item], 'sort', this.maxGoodsNum + 1)
  1549. this.$set(buyFree[item], 'purchaseAmount', list[item].purchasePrice)
  1550. delete list[item].id
  1551. delete list[item].pid
  1552. delete list[item].isDeleted
  1553. delete list[item].status
  1554. delete list[item].tenantId
  1555. delete list[item].updateTime
  1556. delete list[item].updateUser
  1557. delete list[item].updateUserName
  1558. this.maxGoodsNum++
  1559. this.$refs.crudContact.rowCellAdd(list[item]);
  1560. // this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
  1561. this.$refs.crudContact.rowCellAdd(buyFree[item]);
  1562. // this.$refs.crudContact.rowCell(buyFree[item], this.contactsData.length - 1)
  1563. }
  1564. this.policyDialog = false
  1565. },
  1566. //费用刷新触发
  1567. refreshChangeCost() {
  1568. this.treeDeptIdCost = '';
  1569. this.pageCost.currentPage = 1;
  1570. this.onLoadCost(this.pageCost);
  1571. },
  1572. //新增商品信息保存触发
  1573. rowSave(row, done, loading) {
  1574. console.log(row)
  1575. console.log(this.contactsData)
  1576. // this.contactsData.push(row)
  1577. done()
  1578. },
  1579. //修改商品信息触发
  1580. rowUpdate(row, index, done, loading) {
  1581. done(row);
  1582. },
  1583. //删除商品信息触发
  1584. rowDel(row, index, donerowDel) {
  1585. this.$confirm("确定将选择数据删除?", {
  1586. confirmButtonText: "确定",
  1587. cancelButtonText: "取消",
  1588. type: "warning"
  1589. }).then(() => {
  1590. //商品判断是否需要调用删除接口
  1591. if (row.id) {
  1592. corpsattn(row.id).then(res => {
  1593. this.$message({
  1594. type: "success",
  1595. message: "操作成功!"
  1596. });
  1597. this.contactsData.splice(index, 1);
  1598. })
  1599. } else {
  1600. this.$message({
  1601. type: "success",
  1602. message: "操作成功!"
  1603. });
  1604. this.contactsData.splice(index, 1);
  1605. }
  1606. })
  1607. },
  1608. //新增费用明细保存触发
  1609. rowSaveProject(row, done, loading) {
  1610. // this.advantageProjectData.push(row)
  1611. done()
  1612. },
  1613. //修改费用明细触发
  1614. rowUpdateProject(row, index, done, loading) {
  1615. done(row);
  1616. },
  1617. policyOnLoad(params = {}) {
  1618. // this.policyLoading = true;
  1619. detailList(this.treePolicyId).then(res => {
  1620. this.policyForm = res.data.data
  1621. //特价促销
  1622. if(res.data.data.specialItemList) {
  1623. this.dataPolicy = res.data.data.specialItemList
  1624. } else {
  1625. this.dataPolicy = []
  1626. }
  1627. //买赠促销
  1628. if (res.data.data.presentItemList) {
  1629. this.contactsDataBuyFree = res.data.data.presentItemList
  1630. } else {
  1631. this.contactsDataBuyFree = []
  1632. }
  1633. })
  1634. },
  1635. //
  1636. goodsSearch(params, done) {
  1637. this.onLoad(this.page, params);
  1638. done()
  1639. },
  1640. //商品列表查询
  1641. onLoad(page, params = {}) {
  1642. console.log(params)
  1643. this.loading = true;
  1644. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  1645. console.log(res)
  1646. const data = res.data.data;
  1647. this.page.total = data.total;
  1648. this.data = data.records;
  1649. this.loading = false;
  1650. });
  1651. },
  1652. // 费用查询按钮
  1653. feesSearch(params, done) {
  1654. this.onLoadCost(this.pageCost, params)
  1655. done()
  1656. },
  1657. //费用查询
  1658. onLoadCost(page, params = {}) {
  1659. this.loadingCost = true;
  1660. let queryParams = Object.assign({}, params, {
  1661. pageSize: page.pageSize,
  1662. pageNum: page.currentPage,
  1663. parentId: 0,
  1664. feesTypeId: this.treeDeptIdCost
  1665. })
  1666. customerList(queryParams).then(res => {
  1667. console.log(res)
  1668. const data = res.data.data;
  1669. this.pageCost.total = data.total;
  1670. this.dataCost = data.records;
  1671. this.loadingCost = false;
  1672. });
  1673. },
  1674. //删除费用明细触发
  1675. rowDelProject(row, index, donerowDel) {
  1676. this.$confirm("确定将选择数据删除?", {
  1677. confirmButtonText: "确定",
  1678. cancelButtonText: "取消",
  1679. type: "warning"
  1680. }).then(() => {
  1681. //费用判断是否需要调用删除接口
  1682. if (row.id) {
  1683. corpsitem(row.id).then(res => {
  1684. this.$message({
  1685. type: "success",
  1686. message: "操作成功!"
  1687. });
  1688. this.advantageProjectData.splice(index, 1);
  1689. })
  1690. } else {
  1691. this.$message({
  1692. type: "success",
  1693. message: "操作成功!"
  1694. });
  1695. this.advantageProjectData.splice(index, 1);
  1696. }
  1697. })
  1698. },
  1699. //新增附件上传保存触发
  1700. rowSaveBankOfDeposit(row, done, loading) {
  1701. this.bankOfDepositData.push(row)
  1702. done()
  1703. },
  1704. //修改附件上传触发
  1705. rowUpdateBankOfDeposit(row, index, done, loading) {
  1706. done(row);
  1707. },
  1708. //删除附件上传触发
  1709. rowDelBankOfDeposit(row, index, donerowDel) {
  1710. this.$confirm("确定将选择数据删除?", {
  1711. confirmButtonText: "确定",
  1712. cancelButtonText: "取消",
  1713. type: "warning"
  1714. }).then(() => {
  1715. //附件判断是否需要调用删除接口
  1716. if (row.id) {
  1717. corpsbank(row.id).then(res => {
  1718. this.$message({
  1719. type: "success",
  1720. message: "操作成功!"
  1721. });
  1722. this.bankOfDepositData.splice(index, 1);
  1723. })
  1724. } else {
  1725. this.$message({
  1726. type: "success",
  1727. message: "操作成功!"
  1728. });
  1729. this.bankOfDepositData.splice(index, 1);
  1730. }
  1731. })
  1732. },
  1733. uploadAfter(res, done) {
  1734. if (res.originalName) {
  1735. this.bankOfDepositForm.fileName = this.bankOfDepositForm.fileName
  1736. ? this.bankOfDepositForm.fileName
  1737. : res.originalName;
  1738. }
  1739. done();
  1740. },
  1741. //修改提交触发
  1742. editCustomer(isBack = false) {
  1743. this.$refs["form"].validate((valid) => {
  1744. if (valid) {
  1745. for (let item in this.contactsData) {
  1746. if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
  1747. return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
  1748. }
  1749. }
  1750. // 计算毛利额
  1751. // this.$set(this.form, 'grossProfit', 0)
  1752. this.$set(this.form, 'orderAmount', 0)
  1753. // 成本价
  1754. let purchaseAmount = 0
  1755. // 计算销售金额
  1756. this.contactsData.forEach(item => {
  1757. if (item.purchaseAmount) {
  1758. purchaseAmount += (Number(item.purchaseAmount) * Number(item.orderQuantity)).toFixed(2)
  1759. }
  1760. // this.form.grossProfit += Number(item.amount)
  1761. this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
  1762. })
  1763. // this.form.grossProfit = (Number(this.form.orderAmount) - Number(purchaseAmount)).toFixed(2)
  1764. // if (this.form.orderAmount && this.form.overPayment) {
  1765. // this.form.debitAmount = Number(this.form.orderAmount) - Number(this.form.overPayment)
  1766. // }
  1767. if (this.form.orderAmount && this.form.settlmentAmount) {
  1768. this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
  1769. }
  1770. // 计算毛利率
  1771. // if (this.form.orderAmount) {
  1772. // this.form.grossProfitRate = ((Number(this.form.grossProfit) / Number(this.form.orderAmount)) * 100).toFixed(2)
  1773. // }
  1774. // 计算应收账款
  1775. // this.$set(this.form, 'debitAmount', 0)
  1776. // this.contactsData.forEach(item => {
  1777. // this.form.debitAmount += Number(item.amount)
  1778. // })
  1779. //商品信息
  1780. this.form.orderItemsList = this.contactsData
  1781. this.form.orderFeesList = this.advantageProjectData
  1782. this.form.orderFilesList = this.bankOfDepositData
  1783. if (typeof this.form.corpsTypeId == 'object') {
  1784. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1785. }
  1786. this.form.billType = 'XS'
  1787. this.saveLoading = true
  1788. typeSave(this.form).then(res => {
  1789. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  1790. if (isBack) {
  1791. //成功关闭此页面回到列表页
  1792. this.$emit("goBack");
  1793. } else {
  1794. this.queryData(res.data.data.id)
  1795. }
  1796. })
  1797. } else {
  1798. return false;
  1799. }
  1800. });
  1801. },
  1802. // 计算应收未收款
  1803. computedCost() {
  1804. // 销售金额
  1805. let orderAmount = 0;
  1806. // 已收款
  1807. let settlmentAmount = 0;
  1808. // 溢付款
  1809. let overPayment = 0
  1810. if (this.form.orderAmount) {
  1811. orderAmount = this.form.orderAmount
  1812. }
  1813. if (this.form.settlmentAmount) {
  1814. settlmentAmount = this.form.settlmentAmount
  1815. }
  1816. if (this.form.overPayment) {
  1817. overPayment = this.form.overPayment
  1818. }
  1819. this.$set(this.form, "balanceAmount", (Number(orderAmount) - Number(overPayment) - Number(settlmentAmount)).toFixed(2));
  1820. },
  1821. quantityChange(row) {
  1822. if (!row.orderQuantity) {
  1823. row.orderQuantity = 0;
  1824. } else {
  1825. // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  1826. row.amount = (row.price * row.orderQuantity).toFixed(2)
  1827. }
  1828. },
  1829. priceChange(row) {
  1830. if (!row.price) {
  1831. row.price = 0;
  1832. } else {
  1833. row.amount = (row.price * row.orderQuantity).toFixed(2)
  1834. }
  1835. },
  1836. //返回列表
  1837. backToList() {
  1838. if (contrastObj(this.form, this.oldForm) ||
  1839. contrastList(this.contactsData, this.oldGoodsList) ||
  1840. contrastList(this.advantageProjectData, this.oldFeesList) ||
  1841. contrastList(this.bankOfDepositData, this.oldUploadList)
  1842. ) {
  1843. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1844. confirmButtonText: "确定",
  1845. cancelButtonText: "取消",
  1846. type: "warning"
  1847. }).then(() => {
  1848. this.editCustomer(true)
  1849. }).catch(() => {
  1850. this.$emit("goBack");
  1851. })
  1852. } else {
  1853. this.$emit("goBack");
  1854. }
  1855. },
  1856. // 保存列设置
  1857. async saveColumn(name) {
  1858. /**
  1859. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1860. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1861. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1862. */
  1863. if (name == 'goods') {
  1864. const inSave = await this.saveColumnData(
  1865. this.getColumnName(15),
  1866. this.customerContact
  1867. );
  1868. if (inSave) {
  1869. this.$message.success("保存成功");
  1870. //关闭窗口
  1871. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1872. }
  1873. } else if (name === 'fees') {
  1874. const inSave = await this.saveColumnData(
  1875. this.getColumnName(16),
  1876. this.advantageProject
  1877. );
  1878. if (inSave) {
  1879. this.$message.success("保存成功");
  1880. //关闭窗口
  1881. this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
  1882. }
  1883. }
  1884. },
  1885. }
  1886. }
  1887. </script>
  1888. <style lang="scss" scoped>
  1889. .customer-head {
  1890. position: fixed;
  1891. top: 105px;
  1892. width: 100%;
  1893. margin-left: -10px;
  1894. height: 62px;
  1895. background: #ffffff;
  1896. box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  1897. z-index: 999;
  1898. /* display: flex;
  1899. justify-content: left; */
  1900. }
  1901. .customer-back {
  1902. cursor: pointer;
  1903. line-height: 62px;
  1904. font-size: 16px;
  1905. color: #323233;
  1906. font-weight: 400;
  1907. }
  1908. .back-icon {
  1909. line-height: 64px;
  1910. font-size: 20px;
  1911. margin-right: 8px;
  1912. }
  1913. .add-customer-btn {
  1914. position: fixed;
  1915. right: 36px;
  1916. top: 115px;
  1917. }
  1918. ::v-deep .el-form-item {
  1919. margin-bottom: 0;
  1920. }
  1921. .el-dialogDeep {
  1922. ::v-deep .el-dialog {
  1923. margin: 1vh auto 0 !important;
  1924. padding-bottom: 10px !important;
  1925. .el-dialog__body, .el-dialog__footer {
  1926. padding-bottom: 0 !important;
  1927. padding-top: 0 !important;
  1928. }
  1929. }
  1930. }
  1931. .print-div {
  1932. color: #000;
  1933. }
  1934. .print_table {
  1935. table {
  1936. border-right: 1px solid #000;
  1937. border-bottom: 1px solid #000;
  1938. font-size: 12px;
  1939. margin-bottom: 5px;
  1940. }
  1941. table td {
  1942. border-left: 1px solid #000;
  1943. border-top: 1px solid #000;
  1944. vertical-align: middle;
  1945. padding: 2px;
  1946. text-align: center;
  1947. }
  1948. }
  1949. .table {
  1950. border-collapse: collapse;
  1951. border-spacing: 0;
  1952. background-color: transparent;
  1953. display: table;
  1954. width: 99%;
  1955. max-width: 100%;
  1956. margin: 0 auto;
  1957. }
  1958. .table td {
  1959. text-align: left;
  1960. vertical-align: middle;
  1961. font-size: 14px;
  1962. color: #000000;
  1963. padding: 10.5px 0 10.5px 30px;
  1964. //border: 1px solid #000;
  1965. }
  1966. ::v-deep .el-form-item {
  1967. margin-bottom: 0;
  1968. }
  1969. ::v-deep .el-form-item__content{
  1970. line-height: 32px;
  1971. }
  1972. ///deep/ .avue-tree {
  1973. // display: flex;
  1974. // flex-direction: column;
  1975. // overflow-y: hidden;
  1976. // height: 100%;
  1977. //}
  1978. ///deep/ .avue-tree__filter {
  1979. // flex-shrink: 1;
  1980. //}
  1981. ///deep/ .avue-tree__content {
  1982. // height: calc(100% - 32px);
  1983. // overflow-y: auto;
  1984. //}
  1985. </style>