home_form.vue 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
  4. <div class="main-title">
  5. <div class="title">工程订单</div>
  6. </div>
  7. <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="125px" size="small" label-position="right">
  8. <el-row :gutter="20">
  9. <el-col :xs="24" :sm="12" :lg="8">
  10. <el-form-item label="工程订单" prop="orderNum">
  11. <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled></el-input>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
  15. <el-form-item label="单据日期" prop="orderDate">
  16. <el-date-picker
  17. v-model="mainForm.orderDate"
  18. disabled
  19. type="date"
  20. value-format="yyyy-MM-dd"
  21. style="width: 100%;"
  22. placeholder="系统自动生成">
  23. </el-date-picker>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :xs="24" :sm="12" :lg="8">
  27. <el-form-item label="销售类型" prop="saleType">
  28. <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable @change="changeSaleType">
  29. <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
  30. </el-select>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :xs="24" :sm="12" :lg="8">
  34. <el-form-item label="经销商编码" prop="jxsNum">
  35. <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :xs="24" :sm="12" :lg="16">
  39. <el-form-item label="经销商名称" prop="jxsName">
  40. <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" disabled></el-input>
  41. </el-form-item>
  42. </el-col>
  43. <el-col :xs="24" :sm="12" :lg="8">
  44. <el-form-item label="工程登录编号" prop="loginNum">
  45. <div style="display: flex;">
  46. <el-input v-model="mainForm.loginNum" placeholder="请引用工程登录" disabled></el-input>
  47. <el-button style="margin-left: 10px;" @click="openShareDetail">引用</el-button>
  48. </div>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :xs="24" :sm="12" :lg="8">
  52. <el-form-item label="项目类别" prop="enginName">
  53. <el-input v-model="mainForm.enginName" placeholder="请输入项目类别" :disabled="isDealer"></el-input>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :xs="24" :sm="12" :lg="8">
  57. <el-form-item label="行业类别" prop="loginType">
  58. <el-input v-model="mainForm.loginType" placeholder="请输入行业类别"></el-input>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :xs="24" :sm="12" :lg="8">
  62. <el-form-item label="跨区厂编号" prop="factoryNum">
  63. <el-input v-model="mainForm.factoryNum" placeholder="请输入跨区厂编号" :disabled="isDealer"></el-input>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :xs="24" :sm="12" :lg="8">
  67. <el-form-item label="使用单位" prop="company">
  68. <el-input v-model="mainForm.company" placeholder="请输入使用单位" :disabled="isDealer"></el-input>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :xs="24" :sm="12" :lg="8">
  72. <el-form-item label="业务员" prop="salesMan">
  73. <el-select v-model="mainForm.salesMan" placeholder="选择业务员" size="small" filterable clearable style="width: 100%">
  74. <el-option
  75. v-for="item in salesmanList"
  76. :key="item.adminUserId"
  77. :label="item.nickName"
  78. :value="item.adminUserId">
  79. </el-option>
  80. </el-select>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :xs="24" :sm="12" :lg="8">
  84. <el-form-item label="引用记录" prop="refCount">
  85. <el-input v-model="mainForm.refCount" placeholder="请输入引用记录" :disabled="isDealer"></el-input>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :xs="24" :sm="12" :lg="8">
  89. <el-form-item label="第几次申报" prop="declareNo">
  90. <el-input v-model="mainForm.declareNo" placeholder="请输入第几次申报" :disabled="isDealer"></el-input>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :xs="24" :sm="12" :lg="8">
  94. <el-form-item label="项目类型" prop="projectType">
  95. <el-input v-model="mainForm.projectType" placeholder="请输入项目类型" :disabled="isDealer"></el-input>
  96. </el-form-item>
  97. </el-col>
  98. <el-col :xs="24" :sm="12" :lg="8">
  99. <el-form-item label="区域" prop="regionWork">
  100. <el-input v-model="mainForm.regionWork" placeholder="请输入区域" :disabled="isDealer"></el-input>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :xs="24" :sm="12" :lg="8">
  104. <el-form-item label="文件编号" prop="fileNum">
  105. <el-input v-model="mainForm.fileNum" placeholder="请输入文件编号" :disabled="isDealer"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :xs="24" :sm="12" :lg="8">
  109. <el-form-item label="购买单位" prop="refBuyUnitName">
  110. <el-input v-model="mainForm.refBuyUnitName" placeholder="请输入购买单位" :disabled="isDealer"></el-input>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :xs="24" :sm="12" :lg="8">
  114. <el-form-item label="联系人" prop="contactMan">
  115. <el-input v-model="mainForm.contactMan" placeholder="请输入联系人"></el-input>
  116. </el-form-item>
  117. </el-col>
  118. <el-col :xs="24" :sm="12" :lg="8">
  119. <el-form-item label="固定电话" prop="tel">
  120. <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :xs="24" :sm="12" :lg="8">
  124. <el-form-item label="移动电话" prop="phone">
  125. <el-input v-model="mainForm.phone" placeholder="请输入移动电话"></el-input>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :xs="24" :sm="16" :lg="16">
  129. <el-form-item label="安装地址" prop="address">
  130. <el-input v-model="mainForm.address" placeholder="请输入安装地址" :disabled="isDealer"></el-input>
  131. </el-form-item>
  132. </el-col>
  133. <el-col :xs="24" :sm="8" :lg="8">
  134. <el-form-item label="保证函" prop="refPromiseProvide">
  135. <el-select v-model="mainForm.refPromiseProvide" placeholder="选择保证函状态" :disabled="isDealer?true:false" size="small" clearable style="width: 100%">
  136. <el-option label="未保证" value="未保证"></el-option>
  137. <el-option label="已保证" value="已保证"></el-option>
  138. </el-select>
  139. </el-form-item>
  140. </el-col>
  141. <el-col :xs="24" :sm="24" :lg="24">
  142. <el-form-item label="项目说明" prop="projectRemark">
  143. <el-input v-model="mainForm.projectRemark" placeholder="请输入项目说明" :disabled="isDealer"></el-input>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :xs="24" :sm="24" :lg="24">
  147. <el-form-item label="其他附件审批意见" prop="refOtherAnnexIdea">
  148. <el-input v-model="mainForm.refOtherAnnexIdea" placeholder="请输入其他附件审批意见" disabled></el-input>
  149. </el-form-item>
  150. </el-col>
  151. <el-col :xs="24" :sm="24" :lg="24" v-if="!isDealer">
  152. <el-form-item label="格力内部备注" prop="greeRemark">
  153. <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注"></el-input>
  154. </el-form-item>
  155. </el-col>
  156. <!-- <el-col :xs="24" :sm="24" :lg="24">
  157. <el-form-item label="格力回复" prop="greeReply">
  158. <el-input v-model="mainForm.greeReply" placeholder="请输入格力回复"></el-input>
  159. </el-form-item>
  160. </el-col> -->
  161. <el-col :xs="24" :sm="24" :lg="24">
  162. <el-form-item label="备注" prop="remark">
  163. <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :xs="24" :sm="12" :lg="8">
  167. <el-form-item label="制单人" prop="createMan">
  168. <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled></el-input>
  169. </el-form-item>
  170. </el-col>
  171. <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
  172. <el-form-item label="制单日期" prop="createDate">
  173. <el-date-picker
  174. v-model="mainForm.createDate"
  175. disabled
  176. type="date"
  177. :default-value="getDate()"
  178. value-format="yyyy-MM-dd"
  179. style="width: 100%;"
  180. placeholder="选择日期">
  181. </el-date-picker>
  182. </el-form-item>
  183. </el-col>
  184. <el-col :xs="24" :sm="24" :lg="24" v-if="mainForm.examineRemark">
  185. <el-form-item label="审批说明" prop="examineRemark">
  186. <el-input v-model="mainForm.examineRemark" placeholder="请输入审批说明" disabled></el-input>
  187. </el-form-item>
  188. </el-col>
  189. </el-row>
  190. </el-form>
  191. <div class="main-title">
  192. <div class="title">货品信息</div>
  193. <div>
  194. <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px">
  195. <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
  196. </el-select>
  197. <el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
  198. <el-divider direction="vertical"></el-divider>
  199. <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
  200. </div>
  201. </div>
  202. <div class="table" style="margin-top: 20px">
  203. <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400" show-summary
  204. :summary-method="$getSummaries">
  205. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  206. <!-- <el-table-column align="center" label="引用记录" prop="useRefCount" min-width="160" show-overflow-tooltip></el-table-column> -->
  207. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
  208. <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
  209. <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
  210. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  211. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  212. <template slot-scope="scope">
  213. <el-input v-model="scope.row.specification" size="small" v-if="listItem"></el-input>
  214. <div v-else>{{scope.row.specification}}</div>
  215. </template>
  216. </el-table-column>
  217. <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
  218. <template slot-scope="scope">
  219. <el-input v-model="scope.row.realMaterialNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)" ></el-input>
  220. </template>
  221. </el-table-column>
  222. <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
  223. <template slot-scope="scope">
  224. <el-input v-model="scope.row.realMaterialOldNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)"></el-input>
  225. </template>
  226. </el-table-column>
  227. <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
  228. <template slot-scope="scope">
  229. <el-input v-model="scope.row.realSpecification" size="small" readonly @click.native="getRealMaterData(scope.$index)" ></el-input>
  230. </template>
  231. </el-table-column>
  232. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  233. <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  234. <template slot-scope="scope">
  235. <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent></el-input>
  236. </template>
  237. </el-table-column>
  238. <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
  239. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
  240. <template slot-scope="scope">
  241. <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent></el-input>
  242. </template>
  243. </el-table-column>
  244. <el-table-column align="center" label="订单金额" prop="dida" min-width="100" show-overflow-tooltip>
  245. <template slot-scope="scope">
  246. {{scope.row.price * scope.row.qty}}
  247. </template>
  248. </el-table-column>
  249. <el-table-column align="center" label="返利类型" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
  250. <template slot-scope="scope">
  251. <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
  252. <el-option
  253. v-for="item in scope.row.rebateWallets"
  254. :key="item.customerWalletId"
  255. :label="item.customerWalletName"
  256. :value="item.customerWalletId">
  257. </el-option>
  258. </el-select>
  259. </template>
  260. </el-table-column>
  261. <el-table-column align="center" label="返利金额" min-width="100" show-overflow-tooltip prop="compute_flAmount">
  262. <template slot-scope="scope">
  263. {{(scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100}}
  264. </template>
  265. </el-table-column>
  266. <el-table-column align="center" label="格力折扣" prop="ko" min-width="100" show-overflow-tooltip>
  267. <template slot-scope="scope">
  268. {{scope.row.qty * scope.row.discAmount}}
  269. </template>
  270. </el-table-column>
  271. <el-table-column align="center" label="现金钱包" prop="customerWalletId" min-width="160" show-overflow-tooltip>
  272. <template slot-scope="scope">
  273. <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
  274. <el-option
  275. v-for="item in scope.row.wallets"
  276. :key="item.customerWalletId"
  277. :label="item.customerWalletName"
  278. :value="item.customerWalletId">
  279. </el-option>
  280. </el-select>
  281. </template>
  282. </el-table-column>
  283. <el-table-column align="center" label="实付金额" min-width="100" show-overflow-tooltip prop="compute_sfAmount">
  284. <template slot-scope="scope">
  285. {{((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100}}
  286. </template>
  287. </el-table-column>
  288. <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100">
  289. <template slot-scope="scope">
  290. <el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
  291. </template>
  292. </el-table-column>
  293. <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100"></el-table-column>
  294. <el-table-column align="center" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
  295. <el-table-column align="center" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip></el-table-column>
  296. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
  297. <template slot-scope="scope">
  298. <el-input v-model="scope.row.remark" size="small"></el-input>
  299. </template>
  300. </el-table-column>
  301. <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  302. <!-- <el-table-column align="center" label="总仓库" prop="status1" min-width="100" show-overflow-tooltip>
  303. <template slot-scope="scope">
  304. <div>{{ scope.row.status1 | status1Filter }}</div>
  305. </template>
  306. </el-table-column> -->
  307. <el-table-column align="center" label="仓库状态" prop="status2" min-width="100" show-overflow-tooltip>
  308. <template slot-scope="scope">
  309. <div>{{ status2Filter(scope.row) }}</div>
  310. </template>
  311. </el-table-column>
  312. <!-- <el-table-column align="center" label="业务员" prop="serviceId" min-width="160" show-overflow-tooltip>
  313. <template slot-scope="scope">
  314. <el-select v-model="scope.row.serviceId" placeholder="选择业务员" size="small" clearable disabled>
  315. <el-option
  316. v-for="item in salesmanList"
  317. :key="item.adminUserId"
  318. :label="item.nickName"
  319. :value="item.adminUserId">
  320. </el-option>
  321. </el-select>
  322. </template>
  323. </el-table-column> -->
  324. <el-table-column align="center" label="操作" width="100" fixed="right">
  325. <template slot-scope="scope">
  326. <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
  327. </template>
  328. </el-table-column>
  329. </el-table>
  330. </div>
  331. <div class="page-footer">
  332. <div class="footer">
  333. <el-button type="primary" @click="clickSubmitForm(1)" :loading="formLoading">保 存</el-button>
  334. <el-button type="primary" @click="clickSubmitForm(2)" :loading="formLoading">提交审核</el-button>
  335. <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;" v-if=" !isDealer">
  336. <el-button slot="reference">返回列表</el-button>
  337. </el-popconfirm>
  338. </div>
  339. </div>
  340. <!-- 工程登录列表 -->
  341. <el-dialog title="工程登录列表" :visible.sync="isShowDialog" width="70%" :close-on-click-modal="false">
  342. <el-form ref="screenForm" :model="screenForm" label-width="0" size="small" label-position="left">
  343. <el-row :gutter="20">
  344. <el-col :xs="24" :sm="12" :lg="6">
  345. <el-form-item prop="loginNum">
  346. <el-input v-model="screenForm.loginNum" placeholder="工程登录编号"></el-input>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :xs="24" :sm="12" :lg="6">
  350. <el-form-item prop="enginName">
  351. <el-input v-model="screenForm.enginName" placeholder="工程类别"></el-input>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :xs="24" :sm="12" :lg="6">
  355. <el-form-item prop="company">
  356. <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :xs="24" :sm="12" :lg="6" class="tr">
  360. <el-form-item label="">
  361. <el-button size="small" @click="resetScreenForm">清空</el-button>
  362. <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
  363. </el-form-item>
  364. </el-col>
  365. </el-row>
  366. </el-form>
  367. <div class="table" style="margin: 10px 0 20px;">
  368. <el-table
  369. v-loading="dialogTable_listLoading"
  370. :data="dialogTable_dataList"
  371. element-loading-text="Loading"
  372. tooltip-effect="dark"
  373. style="width: 100%"
  374. max-height="270">
  375. <el-table-column align="center" label="" width="100">
  376. <template slot-scope="scope">
  377. <el-button type="primary" size="small" @click="chooseItem(scope.row.recordNo, scope.row.userid)">选择</el-button>
  378. </template>
  379. </el-table-column>
  380. <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip></el-table-column>
  381. <el-table-column align="center" prop="recordNo" label="工程登录编号" show-overflow-tooltip></el-table-column>
  382. <el-table-column align="center" prop="projectName" label="项目类别" show-overflow-tooltip></el-table-column>
  383. <el-table-column align="center" prop="useUnit" label="使用单位" show-overflow-tooltip></el-table-column>
  384. <el-table-column align="center" prop="organizationName" label="经销商" show-overflow-tooltip></el-table-column>
  385. </el-table>
  386. </div>
  387. <div class="pagination clearfix">
  388. <div class="fr">
  389. <el-pagination
  390. @current-change="dialogTableCurrentChange"
  391. :current-page="dialogTable_currentPage"
  392. :page-size="dialogTable_pageSize"
  393. background
  394. layout="prev, pager, next"
  395. :total="dialogTable_listTotal">
  396. </el-pagination>
  397. </div>
  398. </div>
  399. <div slot="footer" class="dialog-footer">
  400. <el-button @click="isShowDialog = false">关 闭</el-button>
  401. </div>
  402. </el-dialog>
  403. <el-dialog title="添加产品" :visible.sync="isShowGoodsDialog" width="80%">
  404. <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
  405. <el-row :gutter="20">
  406. <el-col :xs="12" :sm="6" :lg="6">
  407. <el-form-item prop="proNum">
  408. <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :xs="12" :sm="6" :lg="6">
  412. <el-form-item prop="proName">
  413. <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称"></el-input>
  414. </el-form-item>
  415. </el-col>
  416. <el-col :xs="12" :sm="6" :lg="6">
  417. <el-form-item prop="proModel">
  418. <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号"></el-input>
  419. </el-form-item>
  420. </el-col>
  421. <el-col :xs="12" :sm="6" :lg="6">
  422. <el-form-item prop="price1" style="display: flex">
  423. <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%"></el-input>
  424. <span> - </span>
  425. <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :xs="24" :sm="24" :lg="24" class="tr">
  429. <el-form-item label="">
  430. <el-button size="small" @click="resetGoodsScreenForm">清空</el-button>
  431. <el-button size="small" type="primary" @click="submitGoodsScreenForm">搜索</el-button>
  432. </el-form-item>
  433. </el-col>
  434. </el-row>
  435. </el-form>
  436. <div class="tables">
  437. <div class="table">
  438. <el-table :data="leftGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="leftSelectionChange">
  439. <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
  440. <el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip></el-table-column>
  441. <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
  442. <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
  443. <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  444. <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
  445. </el-table>
  446. <div class="pagination clearfix" style="margin-top: 10px">
  447. <div class="fr">
  448. <el-pagination
  449. @current-change="handleTableCurrentChange"
  450. :current-page="currentPage"
  451. :page-size="10"
  452. background
  453. layout="prev, pager, next"
  454. :total="listTotal">
  455. </el-pagination>
  456. </div>
  457. </div>
  458. </div>
  459. <div class="buttons">
  460. <el-button size="small" type="primary" @click="addAllGoods">全部添加</el-button>
  461. <el-button size="small" type="primary" @click="addGoods">添&emsp;加</el-button>
  462. <el-button size="small" type="danger" @click="deleteGoods">删&emsp;除</el-button>
  463. <el-button size="small" type="danger" @click="deleteAllGoods">全部删除</el-button>
  464. </div>
  465. <div class="table">
  466. <el-table :data="rightGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="rightSelectionChange">
  467. <el-table-column align="center" type="selection" width="55"></el-table-column>
  468. <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
  469. <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
  470. <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  471. <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
  472. </el-table>
  473. </div>
  474. </div>
  475. <span slot="footer" class="dialog-footer">
  476. <el-button @click="closeDialog">取 消</el-button>
  477. <el-button type="primary" @click="submitAddGoods">确 定</el-button>
  478. </span>
  479. </el-dialog>
  480. <el-dialog title="添加产品" :visible.sync="isSetMaterial" width="80%">
  481. <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
  482. <el-row :gutter="20">
  483. <el-col :xs="12" :sm="6" :lg="6">
  484. <el-form-item prop="proNum">
  485. <el-input v-model="goodsScreenForm.proNum" placeholder="请输入物料编码"></el-input>
  486. </el-form-item>
  487. </el-col>
  488. <el-col :xs="12" :sm="6" :lg="6">
  489. <el-form-item prop="proName">
  490. <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称"></el-input>
  491. </el-form-item>
  492. </el-col>
  493. <el-col :xs="12" :sm="6" :lg="6">
  494. <el-form-item prop="proModel">
  495. <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号"></el-input>
  496. </el-form-item>
  497. </el-col>
  498. <el-col :xs="12" :sm="6" :lg="6">
  499. <el-form-item prop="price1" style="display: flex">
  500. <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%"></el-input>
  501. <span> - </span>
  502. <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
  503. </el-form-item>
  504. </el-col>
  505. <el-col :xs="24" :sm="24" :lg="24" class="tr">
  506. <el-form-item label="">
  507. <el-button size="small" @click="resetGoodsScreenForm">清空</el-button>
  508. <el-button size="small" type="primary" @click="submitGoodsScreenForm">搜索</el-button>
  509. </el-form-item>
  510. </el-col>
  511. </el-row>
  512. </el-form>
  513. <div >
  514. <el-table :data="leftGoodsList" element-loading-text="Loading" border fit stripe height="400" >
  515. <el-table-column align="center" width="55" >
  516. <template slot-scope="scope">
  517. <el-radio v-model="currentRadio" :label="scope.row.id">{{''}}</el-radio>
  518. </template>
  519. </el-table-column>
  520. <el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip></el-table-column>
  521. <el-table-column align="center" label="物料编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
  522. <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="100" show-overflow-tooltip></el-table-column>
  523. <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
  524. <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  525. <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
  526. </el-table>
  527. <div class="pagination clearfix" style="margin-top: 10px">
  528. <div class="fr">
  529. <el-pagination
  530. @current-change="handleTableCurrentChange"
  531. :current-page="currentPage"
  532. :page-size="10"
  533. background
  534. layout="prev, pager, next"
  535. :total="listTotal">
  536. </el-pagination>
  537. </div>
  538. </div>
  539. </div>
  540. <span slot="footer" class="dialog-footer">
  541. <el-button @click="closeDialog">取 消</el-button>
  542. <el-button type="primary" @click="submitPushGoods">确 定</el-button>
  543. </span>
  544. </el-dialog>
  545. </div>
  546. </template>
  547. <script>
  548. import { getOrderDetail, getHomeLoginList, getHomeLoginDetail, getWarehouseList, addHome, editHome, submitHome, checkStock, getRetailProductList } from "@/api/supply/engin";
  549. import { getDictList, getTypeList, getSalesmanList } from '@/api/common'
  550. import { findElem } from '@/utils/util'
  551. import ret from "bluebird/js/release/util";
  552. let that
  553. export default {
  554. name: 'HomeForm',
  555. componentName: 'HomeForm',
  556. props: ['listItem'],
  557. filters: {
  558. status1Filter(val) {
  559. let STOCK_ORDER_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_START').dictValue;
  560. let STOCK_ORDER_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_END').dictValue;
  561. let STOCK_ORDER_HAVE_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_START').dictValue;
  562. let STOCK_ORDER_HAVE_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_END').dictValue;
  563. let STOCK_ORDER_ALL_NUM = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_ALL_NUM').dictValue;
  564. if (val === '' || val === null || val === undefined) return '未检查';
  565. else if (val <= 0) return '无货';
  566. else if (val > STOCK_ORDER_START && val <= STOCK_ORDER_END) return val;
  567. else if (val >= STOCK_ORDER_HAVE_START && val <= STOCK_ORDER_HAVE_END) return '有货';
  568. else if (val > STOCK_ORDER_ALL_NUM) return '充足';
  569. },
  570. },
  571. data() {
  572. return {
  573. editId: '',
  574. mainForm: {
  575. customerId: '',
  576. orderNum: '',
  577. orderDate: '',
  578. type: '',
  579. jxsNum: '',
  580. jxsName: '',
  581. loginNum: '',
  582. enginName: '',
  583. loginType: '',
  584. promiseStatus: '',
  585. factoryNum: '',
  586. company: '',
  587. saleType: '',
  588. contactMan: '',
  589. tel: '',
  590. phone: '',
  591. address: '',
  592. declareNo: '',
  593. greeRemark: '',
  594. greeReply: '',
  595. remark: '',
  596. createMan: '',
  597. createDate: '',
  598. fileNum: '',
  599. loginUserId: '',
  600. salesMan: '',
  601. projectRemark: '',
  602. projectType: '',
  603. examineRemark: '',
  604. refCount: '',
  605. regionWork: '',
  606. examineStatus: '',
  607. refBuyUnitName: '',
  608. refPromiseProvide: '',
  609. refOtherAnnexIdea: '',
  610. },
  611. mainFormRules: {
  612. // orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
  613. jxsNum: [{ required: true, message: '请输入经销商编码', trigger: 'blur' }],
  614. jxsName: [{ required: true, message: '请输入经销商名称', trigger: 'blur' }],
  615. loginNum: [{ required: true, message: '请输入工程登录编号', trigger: 'blur' }],
  616. // enginName: [{ required: true, message: '请输入项目类别', trigger: 'blur' }],
  617. // loginType: [{ required: true, message: '请输入行业类别', trigger: 'blur' }],
  618. company: [{ required: true, message: '请输入使用单位', trigger: 'blur' }],
  619. saleType: [{ required: true, message: '请选择销售类型', trigger: 'change' }],
  620. // contactMan: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
  621. // tel: [{ required: true, message: '请输入固定电话', trigger: 'blur' }],
  622. // phone: [{ required: true, message: '请输入移动电话', trigger: 'blur' }],
  623. address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
  624. },
  625. salesTypeList: [],
  626. // typeList: [],
  627. stockList: [],
  628. goodsList: [],
  629. isShowDialog: false, // 工程登录列表 - 弹窗
  630. screenForm: {
  631. loginNum: '',
  632. enginName: '',
  633. company: '',
  634. },
  635. dialogTable_dataList: null, // 工程登录列表 - 列表数据
  636. dialogTable_listLoading: true, // 工程登录列表 - 列表加载loading
  637. dialogTable_currentPage: 1, // 工程登录列表 - 当前页码
  638. dialogTable_pageSize: 10, // 工程登录列表 - 每页数量
  639. dialogTable_listTotal: 0, // 工程登录列表 - 列表总数
  640. warehouseList: [],
  641. warehouseValue: '',
  642. isShowGoodsDialog: false,
  643. goodsScreenForm: {
  644. proNum: '',
  645. proName: '',
  646. proModel: '',
  647. price1: '',
  648. price2: '',
  649. },
  650. currentPage: 1,
  651. listTotal: 0,
  652. leftGoodsList: [],
  653. rightGoodsList: [],
  654. leftSelection: [],
  655. rightSelection: [],
  656. formLoading: false,
  657. isFirst: false,
  658. salesmanList: [],
  659. oldSaleType: '',
  660. notInRefQueryGoodsList: '',
  661. isSetMaterial:false,
  662. currentId:'',
  663. currentRadio:''
  664. }
  665. },
  666. computed: {
  667. isDealer() {
  668. return JSON.parse(localStorage.getItem("supply_user")).isCustomer
  669. },
  670. outSalesmanList() {
  671. let list = [];
  672. if(this.goodsList && this.goodsList.length) {
  673. this.goodsList.forEach(item => {
  674. if(item.serviceId) {
  675. let hasItem = findElem(list, 'adminUserId', item.serviceId);
  676. if(hasItem < 0) {
  677. let obj = this.salesmanList.find(o => o.adminUserId == item.serviceId);
  678. if(obj) {
  679. list.push(obj);
  680. }
  681. }
  682. }
  683. })
  684. if(this.isFirst) {
  685. this.isFirst = false;
  686. }else {
  687. this.mainForm.salesMan = this.goodsList[0].serviceId;
  688. }
  689. }
  690. return list
  691. }
  692. },
  693. watch: {
  694. goodsList: {
  695. handler(newValue, oldValue) {
  696. if(newValue && newValue.length) {
  697. newValue.forEach((item, index) => {
  698. this.goodsList[index].compute_sfAmount = (((item.price * item.qty) * 100 - ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 - ((item.qty * (item.discAmount * 100)) / 100) * 100) / 100);
  699. this.goodsList[index].compute_flAmount = (item.price * item.qty * (item.rebateRate * 100)) / 100
  700. this.goodsList[index].ko = item.qty * item.discAmount
  701. this.goodsList[index].dida = item.price * item.qty
  702. })
  703. }
  704. if(this.goodsList && this.goodsList.length) {
  705. if(this.isFirst) {
  706. this.isFirst = false;
  707. }else {
  708. // this.mainForm.salesMan = this.goodsList[0].serviceId;
  709. }
  710. }else {
  711. this.mainForm.salesMan = '';
  712. }
  713. },
  714. immediate: true,
  715. deep: true
  716. },
  717. 'mainForm.saleType': function (newValue, oldValue) {
  718. this.oldSaleType = oldValue
  719. }
  720. },
  721. beforeCreate() {
  722. that = this;
  723. },
  724. async created() {
  725. await this.getSalesmanList();
  726. this.getDictList();
  727. this.getSalesTypeList();
  728. this.getWarehouseList();
  729. if(this.listItem) {
  730. this.isFirst = true;
  731. this.editId = this.listItem.parentId;
  732. this.getDetail();
  733. }else {
  734. this.mainForm.jxsNum = JSON.parse(localStorage.getItem("supply_user")).customerNumber;
  735. this.mainForm.jxsName = JSON.parse(localStorage.getItem("supply_user")).customerName;
  736. this.mainForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
  737. this.mainForm.createDate = this.getDate();
  738. }
  739. },
  740. methods: {
  741. // 返回列表
  742. goBack() {
  743. this.$emit('backListFormDetail');
  744. },
  745. getDate() {
  746. var date = new Date();
  747. var seperator1 = "-";
  748. var year = date.getFullYear();
  749. var month = date.getMonth() + 1;
  750. var strDate = date.getDate();
  751. if (month >= 1 && month <= 9) {
  752. month = "0" + month;
  753. }
  754. if (strDate >= 0 && strDate <= 9) {
  755. strDate = "0" + strDate;
  756. }
  757. var currentdate = year + seperator1 + month + seperator1 + strDate;
  758. return currentdate;
  759. },
  760. // 获取产品大类列表
  761. getDictList() {
  762. // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
  763. // this.typeList = res.data;
  764. // })
  765. getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
  766. this.stockList = res.data;
  767. })
  768. },
  769. // 获取销售类型列表
  770. getSalesTypeList() {
  771. getTypeList({
  772. pageNum: 1,
  773. pageSize: -1
  774. }).then((res) => {
  775. this.salesTypeList = res.data.records;
  776. })
  777. },
  778. // 获取仓库列表
  779. getWarehouseList() {
  780. getWarehouseList({
  781. pageNum: 1,
  782. pageSize: -1
  783. }).then((res) => {
  784. this.warehouseList = res.data.records;
  785. })
  786. },
  787. async getSalesmanList() {
  788. const res = await getSalesmanList({
  789. pageNum: 1,
  790. pageSize: -1,
  791. isCustomer: 0,
  792. status: true,
  793. });
  794. this.salesmanList = res.data.records;
  795. },
  796. // 工程登录列表 - 获取列表
  797. getHomeLoginList() {
  798. getHomeLoginList({
  799. pageNum: this.dialogTable_currentPage,
  800. pageSize: this.dialogTable_pageSize,
  801. recordNo: this.screenForm.loginNum,
  802. projectName: this.screenForm.enginName,
  803. useUnit: this.screenForm.company,
  804. examineStatus: 'OK'
  805. }).then(res => {
  806. this.dialogTable_dataList = res.data.records;
  807. this.dialogTable_listTotal = res.data.total;
  808. this.dialogTable_listLoading = false;
  809. })
  810. },
  811. // 工程登录列表 - 打开弹窗
  812. openShareDetail() {
  813. if(!this.mainForm.saleType) {
  814. return this.$errorMsg('请先选择销售类型');
  815. }
  816. this.isShowDialog = true;
  817. this.dialogTable_currentPage = 1;
  818. this.screenForm.loginNum = this.mainForm.loginNum;
  819. this.getHomeLoginList();
  820. },
  821. // 工程登录列表 - 更改列表当前页
  822. dialogTableCurrentChange(val) {
  823. this.dialogTable_currentPage = val;
  824. this.getHomeLoginList();
  825. },
  826. // 提交筛选表单
  827. submitScreenForm() {
  828. this.dialogTable_currentPage = 1;
  829. this.getHomeLoginList();
  830. },
  831. // 重置筛选表单
  832. resetScreenForm() {
  833. this.$refs.screenForm.resetFields();
  834. this.dialogTable_currentPage = 1;
  835. this.getHomeLoginList();
  836. },
  837. // 选择工程登录
  838. async chooseItem(id, uid, isChangeSaleType = false) {
  839. let isCustomer = JSON.parse(localStorage.getItem("supply_user")).isCustomer
  840. let customerId = JSON.parse(localStorage.getItem("supply_user")).customerId
  841. if (!isCustomer) {
  842. customerId = this.mainForm.customerId
  843. }
  844. getHomeLoginDetail({
  845. recordNo: id,
  846. saleTypeId: this.mainForm.saleType,
  847. userId: uid,
  848. enginOrderId: this.mainForm.orderNum,
  849. customerId: customerId
  850. }).then(async res => {
  851. // 复制当前明细数据
  852. let copyGoodsList = JSON.parse(JSON.stringify(this.goodsList));
  853. console.log('未刷新前', copyGoodsList)
  854. if (!isChangeSaleType) {
  855. this.setMainAndItem(res.data)
  856. } else {
  857. // 找出不属于引用单上的产品
  858. if (copyGoodsList && copyGoodsList.length > 0) {
  859. let notInRefGoodsList = []
  860. for (let i = 0; i < copyGoodsList.length; i++) {
  861. let goods = copyGoodsList[i]
  862. let index = res.data.items.findIndex(v => v.materialOldNumber === goods.materialOldNumber)
  863. if (index < 0) {
  864. notInRefGoodsList.push(goods)
  865. }
  866. }
  867. if (notInRefGoodsList && notInRefGoodsList.length > 0) {
  868. let oldNumbers = []
  869. notInRefGoodsList.forEach(v => oldNumbers.push(v.materialOldNumber))
  870. console.log('请求前可选机型接口', notInRefGoodsList, oldNumbers)
  871. // 请求可选机型接口
  872. await this.querySaleTypeGoods(oldNumbers)
  873. console.log('返回新加明细', this.notInRefQueryGoodsList)
  874. if (!this.notInRefQueryGoodsList) {
  875. console.log('结束执行下去')
  876. return
  877. }
  878. this.addRefItems(res.data.items, notInRefGoodsList)
  879. }
  880. // 数量和价格不变更
  881. console.log('执行下去,数量和价格不变更')
  882. }
  883. console.log('替换前', res.data.items)
  884. res.data.items = this.replaceHistoryItems(res.data.items, copyGoodsList)
  885. console.log('替换后', res.data.items)
  886. this.setMainAndItem(res.data)
  887. }
  888. }).catch(() => {
  889. this.mainForm.saleType = this.oldSaleType
  890. })
  891. },
  892. // 选择销售类型
  893. changeSaleType() {
  894. if(this.mainForm.loginNum) {
  895. this.chooseItem(this.mainForm.loginNum, this.mainForm.loginUserId, true);
  896. }
  897. },
  898. // 删除产品
  899. deleteItem(index) {
  900. this.goodsList.splice(index, 1);
  901. },
  902. // 修改返利钱包
  903. changeFlWallet(index) {
  904. if(this.goodsList[index].customerWalletId2) {
  905. let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
  906. this.goodsList[index].rebateRate = obj.rebateRate;
  907. this.goodsList[index].customerWalletName2 = obj.customerWalletName;
  908. }else {
  909. this.goodsList[index].rebateRate = '';
  910. this.goodsList[index].customerWalletName2 = '';
  911. }
  912. },
  913. // 修改现金钱包
  914. changeXjWallet(index) {
  915. if(this.goodsList[index].customerWalletId) {
  916. let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
  917. this.goodsList[index].customerWalletName = obj.customerWalletName;
  918. this.goodsList[index].serviceId = obj.serviceId;
  919. this.goodsList[index].serviceName = obj.serviceName;
  920. }else {
  921. this.goodsList[index].customerWalletName = '';
  922. this.goodsList[index].serviceId = '';
  923. this.goodsList[index].serviceName = '';
  924. }
  925. },
  926. // 获取详情
  927. getDetail() {
  928. getOrderDetail({id: this.editId}).then(res => {
  929. let data = res.data;
  930. this.mainForm.customerId = data.customerId
  931. this.mainForm.orderNum = data.enginOrderId;
  932. this.mainForm.orderDate = data.orderDate;
  933. this.mainForm.type = data.mainId;
  934. this.mainForm.jxsNum = data.customerNumber;
  935. this.mainForm.jxsName = data.customerName;
  936. this.mainForm.loginNum = data.refEnginRecordNo;
  937. this.mainForm.enginName = data.refProjectCategory;
  938. this.mainForm.loginType = data.refTradeCategory;
  939. this.mainForm.promiseStatus = data.refPromiseStatus;
  940. this.mainForm.factoryNum = data.refFactoryNo;
  941. this.mainForm.company = data.refUseUnit;
  942. this.mainForm.saleType = data.saleTypeId;
  943. this.mainForm.contactMan = data.refLinkman;
  944. this.mainForm.tel = data.refTel;
  945. this.mainForm.phone = data.refPhone;
  946. this.mainForm.address = data.refInstallAddress;
  947. this.mainForm.declareNo = data.refDeclareNo;
  948. this.mainForm.refCount = data.refCount;
  949. this.mainForm.greeRemark = data.geLiInerNote;
  950. this.mainForm.greeReply = data.note1;
  951. this.mainForm.remark = data.remark;
  952. this.mainForm.createMan = data.createName;
  953. this.mainForm.createDate = data.createTime;
  954. this.mainForm.fileNum = data.fileNo;
  955. this.mainForm.salesMan = data.serviceId;
  956. this.mainForm.projectRemark = data.refProjectNote;
  957. this.mainForm.projectType = data.refProjectType;
  958. this.mainForm.examineRemark = data.examineNote;
  959. this.mainForm.loginUserId = data.loginUserId;
  960. this.mainForm.regionWork = data.refRegionWork;
  961. this.mainForm.examineStatus = data.examineStatus;
  962. this.mainForm.refBuyUnitName = data.refBuyUnitName;
  963. this.mainForm.refPromiseProvide = data.refPromiseProvide;
  964. data.items.forEach(item => {
  965. item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty', 'hasSendQty','retiredQty','ko'];
  966. item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'payRebateAmount', 'compute_sfAmount', 'compute_flAmount','dida'];
  967. })
  968. data.items.forEach(item => {
  969. item.status1 = '';
  970. item.status2 = '';
  971. item.rebateWallets = item.customerWalletList.filter(item => {
  972. return item.type === 'REBATE';
  973. });
  974. item.wallets = item.customerWalletList.filter(item => {
  975. return item.type === 'COMMONLY';
  976. });
  977. })
  978. this.goodsList = data.items;
  979. })
  980. },
  981. // 获取商品列表
  982. getGoodsList() {
  983. getRetailProductList({
  984. pageNum: this.currentPage,
  985. pageSize: 10,
  986. saleId: this.mainForm.saleType,
  987. billType: 'HOME',
  988. materialCode: this.goodsScreenForm.proNum,
  989. materialName: this.goodsScreenForm.proName,
  990. specification: this.goodsScreenForm.proModel,
  991. price1: this.goodsScreenForm.price1,
  992. price2: this.goodsScreenForm.price2,
  993. customerId:this.listItem ?this.listItem.customerId :'' ,
  994. }).then(res => {
  995. let oldGoodsList = this.goodsList;
  996. let newGoodsList = res.data.records;
  997. for(let i = 0; i < oldGoodsList.length; i++) {
  998. let oldItem = oldGoodsList[i]
  999. for(let j = 0; j < newGoodsList.length; j++) {
  1000. let newItem = newGoodsList[j]
  1001. if(newItem.id === oldItem.id){
  1002. newGoodsList[j].selected = true;
  1003. break;
  1004. }
  1005. }
  1006. }
  1007. res.data.records.forEach(item => {
  1008. item.materialName = item.name;
  1009. item.materialCode = item.number;
  1010. item.saleTypeName = item.saleName;
  1011. item.unit = item.baseUnit;
  1012. item.enginNum = 0;
  1013. item.qty = 0;
  1014. item.price = item.batchPrice;
  1015. item.tax = item.taxRate;
  1016. item.isDirectTransfer = false;
  1017. item.directTransferQty = '';
  1018. item.status1 = '';
  1019. item.status2 = '';
  1020. item.rebateAmount = '';
  1021. item.rebateRate = '';
  1022. item.productPriceId = item.id;
  1023. item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
  1024. });
  1025. this.leftGoodsList = res.data.records;
  1026. this.listTotal = res.data.total;
  1027. })
  1028. },
  1029. // 查询重复值并禁选
  1030. checkboxSelect(row, rowIndex) {
  1031. if (row.selected) {
  1032. return false // 禁用
  1033. }else{
  1034. return true // 不禁用
  1035. }
  1036. },
  1037. // 点击 选择商品
  1038. openDialog() {
  1039. if(!this.mainForm.saleType) {
  1040. return this.$errorMsg('请先选择销售类型');
  1041. }
  1042. this.isShowGoodsDialog = true;
  1043. this.getGoodsList();
  1044. },
  1045. // 提交筛选表单
  1046. submitGoodsScreenForm() {
  1047. this.currentPage = 1;
  1048. this.getGoodsList();
  1049. },
  1050. // 重置筛选表单
  1051. resetGoodsScreenForm() {
  1052. this.$refs.goodsScreenForm.resetFields();
  1053. this.currentRadio = ''
  1054. this.currentPage = 1;
  1055. this.getGoodsList();
  1056. },
  1057. // 更改列表当前页
  1058. handleTableCurrentChange(val) {
  1059. this.currentPage = val;
  1060. this.getGoodsList();
  1061. },
  1062. // 关闭 弹窗
  1063. closeDialog() {
  1064. this.isShowGoodsDialog = false;
  1065. this.isSetMaterial = false
  1066. },
  1067. // 左侧列表选择
  1068. leftSelectionChange(val) {
  1069. this.leftSelection = val;
  1070. },
  1071. // 右侧列表选择
  1072. rightSelectionChange(val) {
  1073. this.rightSelection = val;
  1074. },
  1075. // 数组去重
  1076. delRepeat(arr1, arr2) {
  1077. let allArr = arr1.concat(arr2); // 两个数组对象合并
  1078. let newArr = []; // 存放去重后数据的新数组
  1079. for(let i=0; i<allArr.length; i++){ // 循环allArr数组对象的内容
  1080. let flag = true; // 建立标记,判断数据是否重复,true为不重复
  1081. for(let j=0; j<newArr.length; j++){ // 循环新数组的内容
  1082. if(allArr[i].id == newArr[j].id){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
  1083. flag = false;
  1084. }
  1085. }
  1086. if(flag){ // 判断是否重复
  1087. newArr.push(allArr[i]); // 不重复的放入新数组。 新数组的内容会继续进行上边的循环。
  1088. }
  1089. }
  1090. return newArr;
  1091. },
  1092. // 全部添加
  1093. addAllGoods() {
  1094. this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList);
  1095. },
  1096. // 添加
  1097. addGoods() {
  1098. this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList);
  1099. },
  1100. // 删除
  1101. deleteGoods() {
  1102. let rightGoodsList = this.rightGoodsList;
  1103. let rightSelection = this.rightSelection;
  1104. for(let i = 0; i < rightGoodsList.length; i++) {
  1105. for(let j = 0; j < rightSelection.length; j++) {
  1106. if(rightSelection[j].materialId == rightGoodsList[i].materialId){
  1107. this.rightGoodsList.splice(i, 1);
  1108. }
  1109. }
  1110. }
  1111. },
  1112. // 全部删除
  1113. deleteAllGoods() {
  1114. this.rightGoodsList = [];
  1115. },
  1116. // 确定 添加产品
  1117. submitAddGoods() {
  1118. // this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
  1119. this.goodsList = this.goodsList.concat(this.rightGoodsList);
  1120. this.goodsList.forEach((k,i)=>{
  1121. this.$set(this.goodsList[i],'realMaterialId',k.materialId)
  1122. this.$set(this.goodsList[i],'realMaterialName',k.materialName)
  1123. this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
  1124. this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
  1125. this.$set(this.goodsList[i],'realSpecification',k.specification)
  1126. if(!this.listItem){
  1127. let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
  1128. let remark
  1129. if (!this.goodsList[i].remark) {
  1130. remark = str
  1131. }else{
  1132. remark = this.goodsList[i].remark.replace(/str/g,str)
  1133. }
  1134. this.$set(this.goodsList[i],'remark',remark)
  1135. }
  1136. })
  1137. this.isShowGoodsDialog = false;
  1138. this.leftGoodsList = [];
  1139. this.rightGoodsList = [];
  1140. },
  1141. getRealMaterData(id){
  1142. this.currentId = id
  1143. this.isSetMaterial = true
  1144. this.getGoodsList();
  1145. },
  1146. submitPushGoods(){
  1147. // realMaterialId
  1148. // 实装金蝶物料id
  1149. // realMaterialName
  1150. // 实装金蝶物料名称
  1151. // realMaterialNumber
  1152. // 实装金蝶物料编码
  1153. // realMaterialOldNumber
  1154. // 实装金蝶物料旧编码
  1155. // realSpecification
  1156. // 实装规格型号
  1157. const currentData = this.leftGoodsList.find(e=>e.id===this.currentRadio)
  1158. this.$set(this.goodsList[this.currentId],'realMaterialId',currentData.materialId)
  1159. this.$set(this.goodsList[this.currentId],'realMaterialName',currentData.materialName)
  1160. this.$set(this.goodsList[this.currentId],'realMaterialNumber',currentData.materialNumber)
  1161. this.$set(this.goodsList[this.currentId],'realMaterialOldNumber',currentData.materialOldNumber)
  1162. this.$set(this.goodsList[this.currentId],'realSpecification',currentData.specification)
  1163. if(!this.listItem){
  1164. let str =`实装物料编号:${currentData.materialNumber}实装厂产品编码:${currentData.materialOldNumber}`
  1165. let remark
  1166. if (!this.goodsList[this.currentId].remark) {
  1167. remark = str
  1168. }else{
  1169. remark = this.goodsList[this.currentId].remark.replace(/str/g,str)
  1170. }
  1171. this.$set(this.goodsList[this.currentId],'remark',remark)
  1172. }
  1173. this.isSetMaterial = false
  1174. },
  1175. // 检查库存
  1176. checkStock() {
  1177. if(!this.warehouseValue) {
  1178. return this.$errorMsg('请选择仓库');
  1179. }
  1180. if(!this.goodsList) {
  1181. return this.$errorMsg('请添加货品');
  1182. }
  1183. let ids = [];
  1184. this.goodsList.forEach(item => {
  1185. ids.push(item.materialId);
  1186. })
  1187. checkStock({
  1188. correspondId: this.warehouseValue,
  1189. materialId: ids.join(',')
  1190. }).then(res => {
  1191. if(res.data) {
  1192. this.goodsList.forEach((item, index) => {
  1193. item.status1 = res.data[index].allStockNum;
  1194. item.status2 = res.data[index].stockNum;
  1195. })
  1196. }
  1197. })
  1198. },
  1199. status2Filter(item) {
  1200. if (item.status2 === '' || item.status2 === null || item.status2 === undefined) return '未检查';
  1201. else if (item.status2 <= 0) return '无货';
  1202. if ( item.status2 <= 0 ) {
  1203. return '无货'
  1204. }else if(item.status2 >= 1 && item.status2 <= 30){
  1205. return item.status2
  1206. }else if(item.status2 >=31 && item.status2 <= 1000 ){
  1207. return '有货'
  1208. }else{
  1209. return '充足'
  1210. }
  1211. },
  1212. // 保存 / 提交审核
  1213. clickSubmitForm(type) {
  1214. this.$refs.mainForm.validate((valid) => {
  1215. if (valid) {
  1216. for(let i=0; i<this.goodsList.length; i++) {
  1217. if(!this.goodsList[i].customerWalletId) {
  1218. this.$errorMsg('请选择现金钱包');
  1219. return;
  1220. }
  1221. if(!this.goodsList[i].qty) {
  1222. this.$errorMsg('金额不能为0');
  1223. return;
  1224. }
  1225. }
  1226. let goodsList = JSON.parse(JSON.stringify(this.goodsList));
  1227. goodsList.forEach(item => {
  1228. delete item.rebateWallets;
  1229. delete item.wallets;
  1230. })
  1231. let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
  1232. let saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
  1233. let params = {
  1234. enginOrderId: this.mainForm.orderNum,
  1235. loginUserId: this.mainForm.loginUserId,
  1236. refEnginRecordNo: this.mainForm.loginNum || '',
  1237. refProjectCategory: this.mainForm.enginName || '',
  1238. refTradeCategory: this.mainForm.loginType || '',
  1239. refPromiseStatus: this.mainForm.promiseStatus || '',
  1240. refFactoryNo: this.mainForm.factoryNum || '',
  1241. refUseUnit: this.mainForm.company || '',
  1242. refLinkman: this.mainForm.contactMan || '',
  1243. refTel: this.mainForm.tel || '',
  1244. refPhone: this.mainForm.phone || '',
  1245. refInstallAddress: this.mainForm.address || '',
  1246. refDeclareNo: this.mainForm.declareNo || '',
  1247. refCount: this.mainForm.refCount || '',
  1248. saleTypeId: this.mainForm.saleType,
  1249. saleTypeCode: saleTypeItem.saleCode,
  1250. saleTypeName: saleTypeItem.saleName,
  1251. geLiInerNote: this.mainForm.greeRemark || '',
  1252. geLiNote: this.mainForm.greeReply || '',
  1253. remark: this.mainForm.remark || '',
  1254. fileNo: this.mainForm.fileNum || '',
  1255. serviceId: this.mainForm.salesMan,
  1256. serviceName: saleManItem ? saleManItem.nickName : goodsList[0].serviceName,
  1257. refProjectNote: this.mainForm.projectRemark,
  1258. refProjectType: this.mainForm.projectType,
  1259. refRegionWork: this.mainForm.regionWork,
  1260. refBuyUnitName: this.mainForm.refBuyUnitName,
  1261. refPromiseProvide: this.mainForm.refPromiseProvide,
  1262. refOtherAnnexIdea: this.mainForm.refOtherAnnexIdea,
  1263. items: goodsList,
  1264. }
  1265. this.formLoading = true;
  1266. if(type === 1) {
  1267. if(this.listItem) {
  1268. editHome(params).then(res => {
  1269. this.$successMsg('编辑成功');
  1270. this.goBack();
  1271. this.$parent.getList();
  1272. }).finally(res => {
  1273. this.formLoading = false;
  1274. })
  1275. }else {
  1276. addHome(params).then(res => {
  1277. this.$successMsg('新增成功');
  1278. this.goBack();
  1279. this.$parent.getList();
  1280. }).finally(res => {
  1281. this.formLoading = false;
  1282. })
  1283. }
  1284. }else if(type === 2) {
  1285. submitHome(params).then(res => {
  1286. this.$successMsg('提交审核成功');
  1287. this.goBack();
  1288. this.$parent.getList();
  1289. }).finally(res => {
  1290. this.formLoading = false;
  1291. })
  1292. }
  1293. }
  1294. })
  1295. },
  1296. setMainAndItem(data) {
  1297. this.isShowDialog = false;
  1298. this.mainForm.type = data.productCategory;
  1299. this.mainForm.loginUserId = data.userid;
  1300. // this.mainForm.saleType = '';
  1301. this.mainForm.loginNum = data.recordNo;
  1302. this.mainForm.enginName = data.projectName;
  1303. this.mainForm.loginType = data.tradeCategory;
  1304. this.mainForm.factoryNum = data.factoryNo;
  1305. this.mainForm.promiseStatus = data.promiseStatus;
  1306. this.mainForm.company = data.useUnit;
  1307. this.mainForm.contactMan = data.buyUnitCallMen;
  1308. this.mainForm.tel = data.buyUnitTel;
  1309. this.mainForm.phone = data.buyUnitPhone;
  1310. this.mainForm.address = data.installAddress;
  1311. this.mainForm.declareNo = data.declareNo;
  1312. this.mainForm.projectRemark = data.buChonShuoMing;
  1313. this.mainForm.projectType = data.govBuyType;
  1314. this.mainForm.refCount = data.refCount;
  1315. this.mainForm.regionWork = data.regionWork;
  1316. this.mainForm.refBuyUnitName = data.buyUnitName;
  1317. this.mainForm.refPromiseProvide = data.promiseProvide === 1 ? '已保证':'未保证';
  1318. this.mainForm.refOtherAnnexIdea = data.otherAnnexIdea;
  1319. let saleTypeItem = this.salesTypeList.find(o => o.id === this.mainForm.saleType);
  1320. this.goodsList = data.items.map(item => {
  1321. return {
  1322. useRefCount: item.useRefCount,
  1323. saleTypeId: saleTypeItem.id,
  1324. saleTypeCode: saleTypeItem.saleCode,
  1325. saleTypeName: saleTypeItem.saleName,
  1326. materialId: item.materialId,
  1327. materialNumber: item.materialNumber,
  1328. materialOldNumber: item.materialOldNumber,
  1329. materialName: item.materialName,
  1330. specification: item.machine,
  1331. enginNum: item.num,
  1332. enginPrice: item.price,
  1333. enginTotality: item.totality,
  1334. historyHasDeliverQty: item.hasDeliverQty,
  1335. unit: item.unit,
  1336. price: item.price,
  1337. qty: item.num,
  1338. customerWalletId2: '',
  1339. rebateRate: '',
  1340. discAmount: '',
  1341. customerWalletId: '',
  1342. isDirectTransfer: false,
  1343. directTransferQty: '',
  1344. hasSendQty: '',
  1345. remark: item.discri,
  1346. tax: '',
  1347. status1: '',
  1348. status2: '',
  1349. rebateWallets: item.customerWalletList.filter(item => {
  1350. return item.type === 'REBATE';
  1351. }),
  1352. wallets: item.customerWalletList.filter(item => {
  1353. return item.type === 'COMMONLY';
  1354. }),
  1355. }
  1356. })
  1357. this.goodsList.forEach((k,i)=>{
  1358. this.$set(this.goodsList[i],'realMaterialId',k.materialId)
  1359. this.$set(this.goodsList[i],'realMaterialName',k.materialName)
  1360. this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
  1361. this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
  1362. this.$set(this.goodsList[i],'realSpecification',k.specification)
  1363. if(!this.listItem){
  1364. let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
  1365. let remark
  1366. if (!this.goodsList[i].remark) {
  1367. remark = str
  1368. }else{
  1369. remark = this.goodsList[i].remark.replace(/str/g,str)
  1370. }
  1371. this.$set(this.goodsList[i],'remark',remark)
  1372. }
  1373. })
  1374. this.goodsList.forEach(item => {
  1375. item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
  1376. item.serviceId = (item.wallets && item.wallets.length) ? item.wallets[0].serviceId : '';
  1377. item.serviceName = (item.wallets && item.wallets.length) ? item.wallets[0].serviceName : '';
  1378. })
  1379. },
  1380. async querySaleTypeGoods(oldNumbers) {
  1381. await getRetailProductList({
  1382. pageNum: 1,
  1383. pageSize: -1,
  1384. saleId: this.mainForm.saleType,
  1385. billType: 'HOME',
  1386. oldNumbers: oldNumbers.join(','),
  1387. customerId: this.mainForm.customerId
  1388. }).then(res => {
  1389. console.log('请求后可选机型接口', res.data.records)
  1390. if (!res.data.records || res.data.records.length === 0) {
  1391. this.mainForm.saleType = this.oldSaleType
  1392. console.log(1)
  1393. this.$errorMsg(oldNumbers.join(',') + " 产品无此销售类型")
  1394. this.notInRefQueryGoodsList = ''
  1395. return
  1396. }
  1397. if (res.data.records.length < oldNumbers.length) {
  1398. let notInOldNumbers = []
  1399. for (let i = 0; i < oldNumbers.length; i++) {
  1400. let oldNumber = oldNumbers[i]
  1401. let index = res.data.records.findIndex(v => v.materialOldNumber === oldNumber)
  1402. if (index < 0) {
  1403. notInOldNumbers.push(oldNumber)
  1404. }
  1405. }
  1406. this.mainForm.saleType = this.oldSaleType
  1407. console.log(2)
  1408. this.$errorMsg(notInOldNumbers.join(',') + " 产品无此销售类型")
  1409. this.notInRefQueryGoodsList = ''
  1410. return
  1411. }
  1412. this.notInRefQueryGoodsList = res.data.records
  1413. })
  1414. },
  1415. replaceHistoryItems(items, copyGoodsList) {
  1416. if (items && copyGoodsList) {
  1417. for (let i = 0; i < items.length; i++) {
  1418. let index = copyGoodsList.findIndex(v => v.materialOldNumber === items[i].materialOldNumber)
  1419. if (index >= 0) {
  1420. items[i].price = copyGoodsList[index].price
  1421. items[i].num = copyGoodsList[index].qty
  1422. items[i].discri = copyGoodsList[index].remark
  1423. }
  1424. }
  1425. }
  1426. return items
  1427. },
  1428. addRefItems(items, notInRefGoodsList) {
  1429. if (notInRefGoodsList && this.notInRefQueryGoodsList) {
  1430. for (let i = 0; i < notInRefGoodsList.length; i++) {
  1431. let index = this.notInRefQueryGoodsList.findIndex(v => v.materialOldNumber === notInRefGoodsList[i].materialOldNumber)
  1432. if (index >= 0) {
  1433. this.notInRefQueryGoodsList[index].batchPrice = notInRefGoodsList[i].price
  1434. this.notInRefQueryGoodsList[index].qty = notInRefGoodsList[i].qty
  1435. this.notInRefQueryGoodsList[index].remark = notInRefGoodsList[i].remark
  1436. }
  1437. }
  1438. console.log('非引用单产品', this.notInRefQueryGoodsList)
  1439. for (let i = 0; i < this.notInRefQueryGoodsList.length; i++) {
  1440. let goods = this.notInRefQueryGoodsList[i]
  1441. let customerWalletList = [].concat(goods.rebateWallets).concat(goods.wallets)
  1442. items.push({
  1443. saleTypeId: goods.saleTypeId,
  1444. saleTypeCode: goods.saleTypeCode,
  1445. saleTypeName: goods.saleTypeName,
  1446. materialId: goods.materialId,
  1447. materialNumber: goods.materialNumber,
  1448. materialOldNumber: goods.materialOldNumber,
  1449. materialName: goods.materialName,
  1450. machine: goods.specification,
  1451. num: goods.qty,
  1452. batchPrice: goods.batchPrice,
  1453. discri: goods.remark,
  1454. customerWalletList: customerWalletList
  1455. })
  1456. }
  1457. }
  1458. }
  1459. }
  1460. }
  1461. </script>
  1462. <style scoped lang="scss">
  1463. .detail-container {
  1464. width: 100%;
  1465. height: 100%;
  1466. }
  1467. .main-title {
  1468. display: flex;
  1469. justify-content: space-between;
  1470. align-items: center;
  1471. margin-top: 20px;
  1472. height: 60px;
  1473. border-bottom: 1px solid #DCDFE6;
  1474. margin-bottom: 20px;
  1475. .title {
  1476. font-size: 16px;
  1477. font-weight: 600;
  1478. padding-left: 10px;
  1479. }
  1480. }
  1481. .tables {
  1482. display: flex;
  1483. margin-top: 10px;
  1484. .table {
  1485. width: 45%;
  1486. }
  1487. .buttons {
  1488. display: flex;
  1489. flex-direction: column;
  1490. justify-content: center;
  1491. align-items: center;
  1492. padding: 0 10px;
  1493. button {
  1494. margin: 0;
  1495. margin-top: 10px;
  1496. }
  1497. }
  1498. }
  1499. ::v-deep input::-webkit-outer-spin-button,
  1500. ::v-deep input::-webkit-inner-spin-button {
  1501. -webkit-appearance: none;
  1502. }
  1503. ::v-deep input[type='number'] {
  1504. -moz-appearance: textfield;
  1505. }
  1506. </style>