Rap 原分销系统代码Web
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

f0ec0ebcdb530468c3dfa491efee37987223e2ff.svn-base 49KB

5 місяці тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494
  1. <template>
  2. <div class="app-container">
  3. <div style="margin-bottom:10px">
  4. <el-button type="success" @click="addBtn">新增</el-button>
  5. <el-button type="success" @click="importBtn">导入</el-button>
  6. <el-button type="success" @click="exportTempBtn">模版下载</el-button>
  7. </div>
  8. <!--搜索-->
  9. <el-form class="mt_15" ref="form" inline size="small">
  10. <el-form-item label="关键词">
  11. <el-input v-model.trim="searchParm.keyWord" clearable placeholder='关键词'></el-input>
  12. </el-form-item>
  13. <el-form-item label="Item">
  14. <el-input v-model.trim="searchParm.item" clearable></el-input>
  15. </el-form-item>
  16. <el-form-item label="店铺名称">
  17. <el-input v-model.trim="searchParm.shopName" clearable></el-input>
  18. </el-form-item>
  19. <el-form-item label="支付订单ID">
  20. <el-input v-model.trim="searchParm.payOrderId" clearable></el-input>
  21. </el-form-item>
  22. <el-form-item label="商品参数">
  23. <el-select v-model.trim="searchParm.paramsType" placeholder="请选择">
  24. <el-option
  25. v-for="item in searchParamsTypeList"
  26. :key="item.name"
  27. :label="item.name"
  28. :value="item.id">
  29. </el-option>
  30. </el-select>
  31. </el-form-item>
  32. <el-form-item label="国家">
  33. <el-input v-model.trim="searchParm.country" clearable></el-input>
  34. </el-form-item>
  35. <el-form-item label="账号">
  36. <el-input v-model.trim="searchParm.account" clearable></el-input>
  37. </el-form-item>
  38. <el-form-item label="状态">
  39. <el-select v-model.trim="searchParm.status" placeholder="请选择">
  40. <el-option
  41. v-for="item in statusList"
  42. :key="item.name"
  43. :label="item.name"
  44. :value="item.id">
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item>
  49. <el-button type="primary" @click="goSearch">搜索</el-button>
  50. <el-button type="warning" @click="resetForm">重置</el-button>
  51. </el-form-item>
  52. </el-form>
  53. <!--表格渲染-->
  54. <el-table ref="table" border size="small" :data="list" :header-cell-style="{textAlign:'center'}">
  55. <el-table-column label="商品属性" prop="paramsType" align="center">
  56. <template slot-scope="scope">
  57. {{ scope.row.paramsType | getparamsType}}
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="国家" prop="country" align="center"/>
  61. <el-table-column label="账号" prop="account" align="center"/>
  62. <el-table-column label="店铺名称" prop="shopName" align="center"/>
  63. <el-table-column label="关键词" prop="keyWord" align="center"/>
  64. <el-table-column label="数量" prop="number" align="center"/>
  65. <el-table-column label="规格" prop="specification" align="center"/>
  66. <el-table-column label="颜色" prop="color" align="center"/>
  67. <el-table-column label="优惠卷" prop="exchange" align="center"/>
  68. <el-table-column label="Item" prop="item" align="center"/>
  69. <el-table-column label="状态" prop="status" align="center">
  70. <template slot-scope="scope">
  71. {{ scope.row.status | getStatus}}
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="创建时间" prop="createdAt" align="center"/>
  75. <el-table-column label="修改时间" prop="updatedAt" align="center"/>
  76. <el-table-column label="操作" width="270" align="left" >
  77. <template slot-scope="scope">
  78. <el-button type="info" @click="getBtnById(scope.row.id)">查看</el-button>
  79. <!--仅仅带执行状态才允许修改-->
  80. <span v-if="scope.row.status == 1" slot="footer">
  81. <el-button type="warning" @click="editById(scope.row)" style="margin-left: 0px">修改</el-button>
  82. </span>
  83. <span v-if="scope.row.status != 3" slot="footer">
  84. <el-button type="danger" @click="delById(scope.row.id)">删除</el-button>
  85. </span>
  86. <span v-if="scope.row.status == 3" slot="footer">
  87. <el-button type="danger" @click="getOrderBtnById(scope.row.ctClickOrderId)">订单</el-button>
  88. </span>
  89. <span v-if="scope.row.status == 6" slot="footer">
  90. <el-button type="danger" @click="supplement(scope.row.id)">补录</el-button>
  91. </span>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <!--分页-->
  96. <div class="mt_15">
  97. <el-pagination
  98. @size-change="handleSizeChange"
  99. @current-change="handleCurrentChange"
  100. :current-page="searchParm.page"
  101. :page-sizes="[10, 20, 30, 40, 50]"
  102. :page-size="searchParm.pageSize"
  103. layout="total, sizes, prev, pager, next, jumper"
  104. :total="total">
  105. </el-pagination>
  106. </div>
  107. <!--新增弹窗-->
  108. <el-dialog :visible.sync="dialogAddVisible" :title="dialogAddTitle" center width="45%">
  109. <div class="dialog-content">
  110. <el-form ref="addParm" size="small" :model="addParm" :rules="rules" label-width="100px">
  111. <el-form-item label="买家账号" prop="buyerName">
  112. <el-input v-model.trim="addParm.buyerName" clearable style="width:270px"/>
  113. <el-button
  114. type="primary"
  115. icon="el-icon-search"
  116. @click="goSearchBuyer"
  117. style="width:130px"
  118. >请选择买家</el-button>
  119. </el-form-item>
  120. <!-- 先选择应用 后才能选择这个 根据应用调用不同的对应的 请求参数 分页查询 -->
  121. <el-form-item label="商品参数" prop="paramsType">
  122. <el-radio-group v-model.trim="addParm.paramsType" @change="changeCheckRange">
  123. <el-radio :label="1">关键词</el-radio>
  124. <el-radio :label="2">链接</el-radio>
  125. </el-radio-group>
  126. </el-form-item>
  127. <el-form-item v-if="labelVal === 1">
  128. <el-form-item label="店铺名称" prop="shopName">
  129. <el-input v-model.trim="addParm.shopName" clearable></el-input>
  130. </el-form-item>
  131. <el-form-item label="关键词" prop="keyWord">
  132. <el-input v-model.trim="addParm.keyWord" clearable></el-input>
  133. </el-form-item>
  134. <el-form-item label="标题" prop="title">
  135. <el-input v-model.trim="addParm.title" clearable></el-input>
  136. </el-form-item>
  137. <el-form-item label="最小价格区间" prop="sectionMin">
  138. <el-input v-model.trim="addParm.sectionMin" clearable></el-input>
  139. </el-form-item>
  140. <el-form-item label="最大价格区间" prop="sectionMax">
  141. <el-input v-model.trim="addParm.sectionMax" clearable></el-input>
  142. </el-form-item>
  143. <el-form-item label="Item" prop="item">
  144. <el-input v-model.trim="addParm.item" clearable></el-input>
  145. </el-form-item>
  146. </el-form-item>
  147. <el-form-item label="链接" v-if="labelVal === 2" prop="link">
  148. <el-input v-model.trim="addParm.link" clearable></el-input>
  149. </el-form-item>
  150. <el-form-item label="优惠卷" prop="exchange">
  151. <el-input v-model.trim="addParm.exchange" clearable></el-input>
  152. </el-form-item>
  153. <el-form-item label="数量" prop="number">
  154. <el-input v-model.trim="addParm.number" clearable></el-input>
  155. </el-form-item>
  156. <el-form-item label="规格" prop="specification">
  157. <el-input v-model.trim="addParm.specification" clearable></el-input>
  158. </el-form-item>
  159. <el-form-item label="颜色" prop="color">
  160. <el-input v-model.trim="addParm.color" clearable></el-input>
  161. </el-form-item>
  162. <el-form-item label="留言" prop="amessage">
  163. <el-input v-model.trim="addParm.amessage" clearable></el-input>
  164. </el-form-item>
  165. </el-form>
  166. </div>
  167. <span slot="footer">
  168. <el-button type="info" @click="sureAddCancle('addParm')">取消</el-button>
  169. <el-button type="primary" @click="sureAdd('addParm')">确认</el-button>
  170. </span>
  171. </el-dialog>
  172. <!-- 买家弹窗 -->
  173. <el-dialog :visible.sync="dialogBuyerVisible" :title="dialogBuyerTitle" center width="75%">
  174. <div class="dialog-content">
  175. <!--搜索-->
  176. <el-form class="mt_15" ref="form" inline size="small">
  177. <el-form-item label="账号">
  178. <el-input v-model.trim="searchBuyerParm.account" clearable placeholder="账号"></el-input>
  179. </el-form-item>
  180. <el-form-item label="昵称">
  181. <el-input v-model.trim="searchBuyerParm.nickName" clearable></el-input>
  182. </el-form-item>
  183. <el-form-item label="密码">
  184. <el-input v-model.trim="searchBuyerParm.pwd" clearable></el-input>
  185. </el-form-item>
  186. <el-form-item label="公司">
  187. <el-select v-model.trim="searchBuyerParm.companyId" placeholder="请选择">
  188. <el-option
  189. v-for="item in companys"
  190. :key="item.name"
  191. :label="item.name"
  192. :value="item.id"
  193. ></el-option>
  194. </el-select>
  195. </el-form-item>
  196. <el-form-item>
  197. <el-button type="primary" @click="goSearchBuyer">搜索</el-button>
  198. <el-button type="warning" @click="resetBuyerForm">重置</el-button>
  199. </el-form-item>
  200. </el-form>
  201. <!--表格渲染-->
  202. <el-table
  203. ref="table"
  204. border
  205. size="small"
  206. :data="buyerList"
  207. :header-cell-style="{textAlign:'center'}"
  208. :cell-style="{textAlign:'center'}"
  209. >
  210. <el-table-column label="序号" type="index" width="50" />
  211. <el-table-column label="账号" prop="account" />
  212. <el-table-column label="所属国家" prop="contntryShort" />
  213. <el-table-column label="昵称" prop="nickName" />
  214. <el-table-column label="密码" prop="pwd" />
  215. <el-table-column label="公司" prop="companyName" />
  216. <el-table-column label="平台" prop="platformName" />
  217. <el-table-column label="VPNIP" prop="ipAddress" />
  218. <el-table-column label="信用卡卡号" prop="number" />
  219. <el-table-column label="州" prop="state" />
  220. <el-table-column label="国家" prop="country" />
  221. <el-table-column label="地址1" prop="addressline1" />
  222. <el-table-column label="占用状态" prop="status">
  223. <template slot-scope="scope">{{ scope.row.status | getBuyerStatus}}</template>
  224. </el-table-column>
  225. <el-table-column label="创建时间" prop="createdAt" />
  226. <el-table-column label="修改时间" prop="updatedAt" />
  227. <el-table-column label="操作" width="220">
  228. <template slot-scope="scope">
  229. <el-button type="info" @click="getBuyerBtnById(scope.row.id)">查看</el-button>
  230. <el-button type="success" @click="getBuyerById(scope.row)" v-if="buyerId !== scope.row.id">选中</el-button>
  231. <div v-if="buyerId === scope.row.id">已选中</div>
  232. </template>
  233. </el-table-column>
  234. </el-table>
  235. <!--分页-->
  236. <div class="mt_15">
  237. <el-pagination
  238. @size-change="handleSizeChange"
  239. @current-change="handleCurrentChange"
  240. :current-page="searchBuyerParm.page"
  241. :page-sizes="[10, 20, 30, 40, 50]"
  242. :page-size="searchBuyerParm.pageSize"
  243. layout="total, sizes, prev, pager, next, jumper"
  244. :total="total"
  245. ></el-pagination>
  246. </div>
  247. </div>
  248. </el-dialog>
  249. <!--导入 importBtn-->
  250. <el-dialog :visible.sync="dialogImportVisible" :title="dialogImportTitle" center width="22%">
  251. <div class="dialog-content">
  252. <el-upload
  253. class="upload-demo"
  254. drag
  255. ref="upload"
  256. :action="uploadFileUrl"
  257. :headers="uploadHeaders"
  258. :show-file-list = "false"
  259. :on-success="uploadSuccess"
  260. :before-upload="beforeAvatarUpload"
  261. multiple>
  262. <i class="el-icon-upload"></i>
  263. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  264. <div class="el-upload__tip" slot="tip">只能上传xlsl文件,且不超过10M</div>
  265. </el-upload>
  266. </div>
  267. </el-dialog>
  268. <!--修改弹窗-->
  269. <el-dialog :visible.sync="dialogEditVisible" :title="dialogEditTitle" center width="45%">
  270. <div class="dialog-content">
  271. <el-form ref="editParm" size="small" :model="editParm" :rules="rules" label-width="100px">
  272. <el-form-item label="买家账号" prop="buyerName">
  273. <el-input v-model.trim="editParm.buyerName" :disabled="true" style="width:200px" />
  274. <el-button
  275. type="primary"
  276. icon="el-icon-search"
  277. @click="goSearchBuyer"
  278. style="width:130px"
  279. >请选择设</el-button>
  280. </el-form-item>
  281. <!-- 先选择应用 后才能选择这个 根据应用调用不同的对应的 请求参数 分页查询 -->
  282. <el-form-item label="商品参数" prop="paramsType">
  283. <el-radio-group v-model.trim="editParm.paramsType" @change="changeCheckRange">
  284. <el-radio :label="1">关键词</el-radio>
  285. <el-radio :label="2">链接</el-radio>
  286. </el-radio-group>
  287. </el-form-item>
  288. <el-form-item v-if="editParm.paramsType === 1">
  289. <el-form-item label="店铺名称" prop="shopName">
  290. <el-input v-model.trim="editParm.shopName" clearable></el-input>
  291. </el-form-item>
  292. <el-form-item label="关键词" prop="keyWord">
  293. <el-input v-model.trim="editParm.keyWord" clearable></el-input>
  294. </el-form-item>
  295. <el-form-item label="标题" prop="title">
  296. <el-input v-model.trim="editParm.title" clearable></el-input>
  297. </el-form-item>
  298. <el-form-item label="最小价格区间" prop="sectionMin">
  299. <el-input v-model.trim="editParm.sectionMin" clearable></el-input>
  300. </el-form-item>
  301. <el-form-item label="最大价格区间" prop="sectionMax">
  302. <el-input v-model.trim="editParm.sectionMax" clearable></el-input>
  303. </el-form-item>
  304. <el-form-item label="Item" prop="item">
  305. <el-input v-model.trim="editParm.item" clearable></el-input>
  306. </el-form-item>
  307. </el-form-item>
  308. <el-form-item label="链接" v-if="editParm.paramsType === 2" prop="link">
  309. <el-input v-model.trim="editParm.link" clearable></el-input>
  310. </el-form-item>
  311. <el-form-item label="优惠卷" prop="exchange">
  312. <el-input v-model.trim="editParm.exchange" clearable></el-input>
  313. </el-form-item>
  314. <el-form-item label="数量" prop="number">
  315. <el-input v-model.trim="editParm.number" clearable></el-input>
  316. </el-form-item>
  317. <el-form-item label="规格" prop="specification">
  318. <el-input v-model.trim="editParm.specification" clearable></el-input>
  319. </el-form-item>
  320. <el-form-item label="颜色" prop="color">
  321. <el-input v-model.trim="editParm.color" clearable></el-input>
  322. </el-form-item>
  323. <el-form-item label="留言" prop="amessage">
  324. <el-input v-model.trim="editParm.amessage" clearable></el-input>
  325. </el-form-item>
  326. </el-form>
  327. </div>
  328. <span slot="footer">
  329. <el-button type="info" @click="sureEditCancle('editParm')">取消</el-button>
  330. <el-button type="primary" @click="sureEdit('editParm')">确认</el-button>
  331. </span>
  332. </el-dialog>
  333. <!--详情弹窗-->
  334. <el-dialog :visible.sync="dialogDetailVisible" :title="dialogDetailTitle" center width="45%">
  335. <div class="dialog-content">
  336. <el-form ref="form" size="small" label-width="100px">
  337. <el-form-item label="买家账号" prop="buyerName">
  338. <el-input v-model.trim="detailParm.buyerName" :disabled="true" clearable></el-input>
  339. </el-form-item>
  340. <!-- 先选择应用 后才能选择这个 根据应用调用不同的对应的 请求参数 分页查询 -->
  341. <el-form-item label="商品参数" prop="paramsType">
  342. <el-radio-group v-model.trim="detailParm.paramsType" @change="changeCheckRange">
  343. <el-radio :label="1" :disabled="true">关键词</el-radio>
  344. <el-radio :label="2" :disabled="true">链接</el-radio>
  345. </el-radio-group>
  346. </el-form-item>
  347. <el-form-item v-if="detailParm.paramsType === 1">
  348. <el-form-item label="店铺名称" prop="shopName">
  349. <el-input v-model.trim="detailParm.shopName" :disabled="true" clearable></el-input>
  350. </el-form-item>
  351. <el-form-item label="关键词" prop="keyWord">
  352. <el-input v-model.trim="detailParm.keyWord" :disabled="true" clearable></el-input>
  353. </el-form-item>
  354. <el-form-item label="标题" prop="title">
  355. <el-input v-model.trim="detailParm.title" :disabled="true" clearable></el-input>
  356. </el-form-item>
  357. <el-form-item label="Item" prop="item">
  358. <el-input v-model.trim="detailParm.item" :disabled="true" clearable></el-input>
  359. </el-form-item>
  360. </el-form-item>
  361. <el-form-item v-if="detailParm.paramsType === 2" label="链接" prop="link">
  362. <el-input v-model.trim="detailParm.link" :disabled="true" clearable></el-input>
  363. </el-form-item>
  364. <el-form-item label="数量" prop="number">
  365. <el-input v-model.trim="detailParm.number" :disabled="true" clearable></el-input>
  366. </el-form-item>
  367. <el-form-item label="规格" prop="specification">
  368. <el-input v-model.trim="detailParm.specification" :disabled="true" clearable></el-input>
  369. </el-form-item>
  370. <el-form-item label="颜色" prop="color">
  371. <el-input v-model.trim="detailParm.color" :disabled="true" clearable></el-input>
  372. </el-form-item>
  373. <el-form-item label="优惠卷" prop="exchange">
  374. <el-input v-model.trim="detailParm.exchange" :disabled="true" clearable></el-input>
  375. </el-form-item>
  376. <el-form-item label="留言" prod="amessage">
  377. <el-input v-model.trim="detailParm.amessage" :disabled="true" clearable></el-input>
  378. </el-form-item>
  379. <el-form-item label="执行结果" prod="response">
  380. <el-input v-model.trim="detailParm.response" :disabled="true" clearable></el-input>
  381. </el-form-item>
  382. <el-form-item label="状态" prod="status">
  383. <el-select v-model.trim="detailParm.status" :disabled="true" placeholder="请选择">
  384. <el-option
  385. v-for="item in detailStatusList"
  386. :key="item.name"
  387. :label="item.name"
  388. :value="item.id">
  389. </el-option>
  390. </el-select>
  391. </el-form-item>
  392. </el-form>
  393. </div>
  394. </el-dialog>
  395. <!--Order详情弹窗-->
  396. <el-dialog :visible.sync="dialogOrderDetailVisible" :title="dialogOrderDetailTitle" center width="45%">
  397. <div class="dialog-content">
  398. <el-form ref="form" size="small" label-width="100px">
  399. <el-form-item label="创建时间" prop="createdAt">
  400. <el-input v-model.trim="orderDetailParm.createdAt" :disabled="true" clearable></el-input>
  401. </el-form-item>
  402. <el-form-item label="修改时间" prop="updatedAt">
  403. <el-input v-model.trim="orderDetailParm.updatedAt" :disabled="true" clearable></el-input>
  404. </el-form-item>
  405. <el-form-item label="总金额" prop="amount">
  406. <el-input v-model.trim="orderDetailParm.amount" :disabled="true" clearable></el-input>
  407. </el-form-item>
  408. <el-form-item label="状态描述" prop="paymentResults">
  409. <el-input v-model.trim="orderDetailParm.paymentResults" :disabled="true" clearable></el-input>
  410. </el-form-item>
  411. <el-form-item label="店铺名称" prop="shop">
  412. <el-input v-model.trim="orderDetailParm.shop" :disabled="true" clearable></el-input>
  413. </el-form-item>
  414. <el-form-item label="购买数量" prop="pricesNumber">
  415. <el-input v-model.trim="orderDetailParm.pricesNumber" :disabled="true" clearable></el-input>
  416. </el-form-item>
  417. <el-form-item label="订单id" prop="orderId">
  418. <el-input v-model.trim="orderDetailParm.orderId" :disabled="true" clearable></el-input>
  419. </el-form-item>
  420. <el-form-item label="商品名称" prop="shopName">
  421. <el-input v-model.trim="orderDetailParm.shopName" :disabled="true" clearable></el-input>
  422. </el-form-item>
  423. <el-form-item label="时间" prop="orderDate">
  424. <el-input v-model.trim="orderDetailParm.orderDate" :disabled="true" clearable></el-input>
  425. </el-form-item>
  426. </el-form>
  427. </div>
  428. </el-dialog>
  429. <!--Order补录弹窗-->
  430. <el-dialog :visible.sync="dialogSupplementVisible" :title="dialogSupplementTitle" center width="45%">
  431. <div class="dialog-content">
  432. <el-form ref="supplementParm" size="small" :model="supplementParm" :rules="orderRules" label-width="100px">
  433. <el-form-item label="刷单ID" prop="clickFarmingId">
  434. <el-input v-model.trim="supplementParm.clickFarmingId" :disabled="true" clearable></el-input>
  435. </el-form-item>
  436. <el-form-item label="总金额" prop="amount">
  437. <el-input v-model.trim="supplementParm.amount" clearable></el-input>
  438. </el-form-item>
  439. <el-form-item label="状态描述" prop="paymentResults">
  440. <el-input v-model.trim="supplementParm.paymentResults" clearable></el-input>
  441. </el-form-item>
  442. <el-form-item label="店铺名称" prop="shop">
  443. <el-input v-model.trim="supplementParm.shop" clearable></el-input>
  444. </el-form-item>
  445. <el-form-item label="购买数量" prop="pricesNumber">
  446. <el-input v-model.trim="supplementParm.pricesNumber" clearable></el-input>
  447. </el-form-item>
  448. <el-form-item label="订单id" prop="orderId">
  449. <el-input v-model.trim="supplementParm.orderId" clearable></el-input>
  450. </el-form-item>
  451. <el-form-item label="商品名称" prop="shopName">
  452. <el-input v-model.trim="supplementParm.shopName" clearable></el-input>
  453. </el-form-item>
  454. <el-form-item label="时间" prop="orderDate">
  455. <el-input v-model.trim="supplementParm.orderDate" clearable></el-input>
  456. </el-form-item>
  457. </el-form>
  458. </div>
  459. <span slot="footer">
  460. <el-button type="info" @click="dialogSupplementVisible=flase">取消</el-button>
  461. <el-button type="primary" @click="sureSuppment">确认</el-button>
  462. </span>
  463. </el-dialog>
  464. <!--详情弹窗-->
  465. <el-dialog :visible.sync="dialogBuyerDetailVisible" :title="dialogBuyerDetailTitle" center width="45%">
  466. <div class="dialog-content">
  467. <el-form ref="form" size="small" label-width="120px">
  468. <el-form-item label="账号" prop="account">
  469. <el-input v-model.trim="detailBuyerParm.account" :disabled="true"></el-input>
  470. </el-form-item>
  471. <el-form-item label="昵称" prop="nickName">
  472. <el-input v-model.trim="detailBuyerParm.nickName" :disabled="true"></el-input>
  473. </el-form-item>
  474. <el-form-item label="密码" prop="pwd">
  475. <el-input v-model.trim="detailBuyerParm.pwd" :disabled="true"></el-input>
  476. </el-form-item>
  477. <el-form-item label="公司" prop="companyId">
  478. <el-select v-model.trim="detailBuyerParm.companyId" disabled placeholder="请选择">
  479. <el-option
  480. v-for="item in companys"
  481. :key="item.name"
  482. :label="item.name"
  483. :value="item.id"
  484. ></el-option>
  485. </el-select>
  486. </el-form-item>
  487. <el-form-item label="平台" prop="platformId">
  488. <el-select v-model.trim="detailBuyerParm.platformId" disabled placeholder="请选择">
  489. <el-option
  490. v-for="item in platformList"
  491. :key="item.name"
  492. :label="item.name"
  493. :value="item.id"
  494. ></el-option>
  495. </el-select>
  496. </el-form-item>
  497. <!--国家-->
  498. <el-form-item label="国家" prop="contntryShort">
  499. <el-input v-model.trim="detailBuyerParm.contntryShort" disabled clearable></el-input>
  500. </el-form-item>
  501. <!--VPN vpnId -->
  502. <el-form-item label="VPNIP" prop="vpnIp">
  503. <el-input v-model.trim="detailBuyerParm.vpnIp" disabled clearable></el-input>
  504. </el-form-item>
  505. <!--信用卡ID cardId -->
  506. <el-form-item label="信用卡卡号" prop="cardNumber">
  507. <el-input v-model.trim="detailBuyerParm.cardNumber" disabled clearable></el-input>
  508. </el-form-item>
  509. <!--用户等级 level -->
  510. <el-form-item label="用户等级" prop="level">
  511. <el-select v-model.trim="detailBuyerParm.level" disabled placeholder="请选择">
  512. <el-option
  513. v-for="item in levelList"
  514. :key="item.name"
  515. :label="item.name"
  516. :value="item.id"
  517. ></el-option>
  518. </el-select>
  519. </el-form-item>
  520. <!--占用状态 occupyStatus -->
  521. <el-form-item label="占用状态" prop="occupyStatus">
  522. <el-select v-model.trim="detailBuyerParm.occupyStatus" disabled placeholder="请选择">
  523. <el-option
  524. v-for="item in occupyStatusList"
  525. :key="item.name"
  526. :label="item.name"
  527. :value="item.id"
  528. ></el-option>
  529. </el-select>
  530. </el-form-item>
  531. <!--状态 status -->
  532. <el-form-item label="状态" prop="status">
  533. <el-select v-model.trim="detailBuyerParm.status" disabled placeholder="请选择">
  534. <el-option
  535. v-for="item in buyerStatusList"
  536. :key="item.name"
  537. :label="item.name"
  538. :value="item.id"
  539. ></el-option>
  540. </el-select>
  541. </el-form-item>
  542. <!--占用账户-->
  543. <el-form-item label="占用账户" prop="occupyAccount">
  544. <el-input v-model.trim="detailBuyerParm.occupyAccount" :disabled="true" clearable></el-input>
  545. </el-form-item>
  546. <!--账户余额-->
  547. <el-form-item label="账户余额" prop="balance">
  548. <el-input v-model.trim="detailBuyerParm.balance" :disabled="true" clearable></el-input>
  549. </el-form-item>
  550. <!--购买总金额-->
  551. <el-form-item label="账户购买总金额" prop="buyTotalMoney">
  552. <el-input v-model.trim="detailBuyerParm.buyTotalMoney" :disabled="true" clearable></el-input>
  553. </el-form-item>
  554. <!--地址1-->
  555. <el-form-item label="地址1" prop="addressline1">
  556. <el-input v-model.trim="detailBuyerParm.addressline1" :disabled="true" clearable></el-input>
  557. </el-form-item>
  558. <!--国家-->
  559. <el-form-item label="国家" prop="country">
  560. <el-input v-model.trim="detailBuyerParm.country" :disabled="true" clearable></el-input>
  561. </el-form-item>
  562. <!--州-->
  563. <el-form-item label="州" prop="state">
  564. <el-input v-model.trim="detailBuyerParm.state" :disabled="true" clearable></el-input>
  565. </el-form-item>
  566. <!--电话-->
  567. <el-form-item label="电话" prop="tel">
  568. <el-input v-model.trim="detailBuyerParm.tel" :disabled="true" clearable></el-input>
  569. </el-form-item>
  570. <!--lastname-->
  571. <el-form-item label="lastname" prop="lastname">
  572. <el-input v-model.trim="detailBuyerParm.lastname" :disabled="true" clearable></el-input>
  573. </el-form-item>
  574. <!--税号-->
  575. <el-form-item label="税号" prop="vatNumber">
  576. <el-input v-model.trim="detailBuyerParm.vatNumber" :disabled="true" clearable></el-input>
  577. </el-form-item>
  578. <!--城市-->
  579. <el-form-item label="城市" prop="city">
  580. <el-input v-model.trim="detailBuyerParm.city" :disabled="true" clearable></el-input>
  581. </el-form-item>
  582. <!--地址2-->
  583. <el-form-item label="地址2" prop="addressline2">
  584. <el-input v-model.trim="detailBuyerParm.addressline2" :disabled="true" clearable></el-input>
  585. </el-form-item>
  586. <!--firstname-->
  587. <el-form-item label="firstname" prop="firstname">
  588. <el-input v-model.trim="detailBuyerParm.firstname" :disabled="true" clearable></el-input>
  589. </el-form-item>
  590. <!--邮政编码-->
  591. <el-form-item label="邮政编码" prop="postalcode">
  592. <el-input v-model.trim="detailBuyerParm.postalcode" :disabled="true" clearable></el-input>
  593. </el-form-item>
  594. </el-form>
  595. </div>
  596. </el-dialog>
  597. </div>
  598. </template>
  599. <script>
  600. import { add, editById, delById, getList, getById, getEditDetailById } from '@/api/group/clickfarming'
  601. import { getDetailById, supplement } from '@/api/group/clickOrder'
  602. import { getBuyerList, getBuyerById } from "@/api/group/dhPay";
  603. import { getAll } from "@/api/group/company";
  604. export default {
  605. filters: {
  606. getStatus: function (value) {
  607. if(value == 1) {
  608. return '待执行';
  609. } else if (value == 2) {
  610. return '执行中';
  611. } else if (value == 3) {
  612. return '执行成功';
  613. } else if(value == 4) {
  614. return '执行失败';
  615. } else if(value == 5) {
  616. return '待支付异常';
  617. } else if(value == 6) {
  618. return '支付成功异常';
  619. } else {
  620. return '执行失败';
  621. }
  622. },
  623. getBuyerStatus:function (value) {
  624. if(value == 1) {
  625. return '已占用';
  626. } else{
  627. return '未占用';
  628. }
  629. },
  630. getparamsType: function (value) {
  631. if(value == 1) {
  632. return '关键词';
  633. } else if (value == 2) {
  634. return '链接';
  635. }
  636. }
  637. },
  638. // 数据
  639. data() {
  640. return {
  641. searchParm: {
  642. page: 1,
  643. pageSize: 10,
  644. sort:'created_at',
  645. order:'desc',
  646. keyWord:null,
  647. status:null,
  648. item:null,
  649. shopName:'',
  650. payOrderId:null,
  651. type:null,
  652. paramsType:null,
  653. country:null,
  654. account:null
  655. },
  656. total:0,
  657. labelVal:"1",
  658. list: [],
  659. buyerList: [],
  660. companys:[],
  661. buyerId: null,
  662. uploadHeaders:{ Authorization: this.$store.getters.token },
  663. dialogAddVisible: false,
  664. dialogAddTitle: '新增',
  665. dialogDetailVisible: false,
  666. dialogDetailTitle: '详情',
  667. dialogOrderDetailVisible: false,
  668. dialogOrderDetailTitle: '订单详情',
  669. dialogEditVisible: false,
  670. dialogEditTitle: '修改',
  671. dialogSupplementVisible: false,
  672. dialogSupplementTitle: '补录',
  673. dialogImportVisible: false,
  674. dialogImportTitle:'导入',
  675. dialogBuyerVisible: false,
  676. dialogBuyerTitle: "买家列表",
  677. dialogBuyerVisible: false,
  678. dialogBuyerTitle: "买家列表",
  679. dialogBuyerDetailVisible: false,
  680. dialogBuyerDetailTitle: "买家详情",
  681. uploadFileUrl: process.env.VUE_APP_BASE_API + '/api/clickFarming/import',
  682. updateBoolean: false,
  683. tempUrl: process.env.VUE_APP_BASE_API + '/api/clickFarming/exportTemp',
  684. detailStatusList:[
  685. {
  686. id: 1,
  687. name: '待执行'
  688. },
  689. {
  690. id: 2,
  691. name: '执行中',
  692. },
  693. {
  694. id: 3,
  695. name: '执行成功'
  696. },
  697. {
  698. id: 4,
  699. name: '执行失败'
  700. },{
  701. id:5,
  702. name:"待支付异常"
  703. },{
  704. id:6,
  705. name:"支付成功异常"
  706. }],
  707. statusList:[
  708. {
  709. id: null,
  710. name: '全部'
  711. },
  712. {
  713. id: 1,
  714. name: '待执行'
  715. },
  716. {
  717. id: 2,
  718. name: '执行中',
  719. },
  720. {
  721. id: 3,
  722. name: '执行成功'
  723. },
  724. {
  725. id: 4,
  726. name: '执行失败'
  727. },{
  728. id:5,
  729. name:"待支付异常"
  730. },{
  731. id:6,
  732. name:"支付成功异常"
  733. }],
  734. searchTypeList:[
  735. {
  736. id: null,
  737. name: '全部'
  738. },
  739. {
  740. id: 1,
  741. name: '刷单'
  742. },
  743. {
  744. id: 2,
  745. name: '加入购物车',
  746. }
  747. ],
  748. searchParamsTypeList:[
  749. {
  750. id: null,
  751. name: '全部'
  752. },
  753. {
  754. id: 1,
  755. name: '关键词'
  756. },
  757. {
  758. id: 2,
  759. name: '链接',
  760. },
  761. ],
  762. addMonthList:[
  763. {
  764. name: 'January (01)'
  765. },
  766. {
  767. name: 'February (02)'
  768. },{
  769. name: 'March (03)'
  770. },{
  771. name: 'April (04)'
  772. },{
  773. name: 'May (05)'
  774. },{
  775. name: 'June (06)'
  776. },{
  777. name: 'July (07)'
  778. },{
  779. name: 'August (08)'
  780. },{
  781. name: 'September (09)'
  782. },{
  783. name: 'October (10)'
  784. },{
  785. name: 'November (11)'
  786. },{
  787. name: 'December (12)'
  788. }
  789. ],
  790. occupyStatusList: [
  791. {
  792. id: 1,
  793. name: "已占用"
  794. },
  795. {
  796. id: 2,
  797. name: "未占用"
  798. }
  799. ],
  800. buyerStatusList: [
  801. {
  802. id: 1,
  803. name: "待注册"
  804. },
  805. {
  806. id: 2,
  807. name: "待验证"
  808. },
  809. {
  810. id: 3,
  811. name: "待完善"
  812. },
  813. {
  814. id: 4,
  815. name: "正常"
  816. },
  817. {
  818. id: 5,
  819. name: "异常"
  820. },
  821. {
  822. id: 6,
  823. name: "可用但已用"
  824. },
  825. {
  826. id: 7,
  827. name: "删除"
  828. }
  829. ],
  830. levelList: [
  831. {
  832. id: 1,
  833. name: "普通"
  834. },
  835. {
  836. id: 2,
  837. name: "精品"
  838. },
  839. {
  840. id: 3,
  841. name: "压力"
  842. },
  843. {
  844. id: 4,
  845. name: "内部账号"
  846. }
  847. ],
  848. platformList: [
  849. {
  850. id: 1,
  851. name: "敦煌"
  852. },
  853. {
  854. id: 2,
  855. name: "速卖通"
  856. },
  857. {
  858. id: 3,
  859. name: "马帮"
  860. }
  861. ],
  862. addParm: {
  863. buyerId:null,
  864. buyerName:null,
  865. paramsType: 1,
  866. shopName: null,
  867. keyWord:null,
  868. title:null,
  869. link:null,
  870. number:null,
  871. specification:null,
  872. color:null,
  873. sectionMin:null,
  874. sectionMax:null,
  875. item:null,
  876. exchange:null,
  877. amessage:null
  878. },
  879. searchBuyerParm: {
  880. page: 1,
  881. pageSize: 10,
  882. account: null,
  883. sort: "created_at",
  884. order: "desc",
  885. nickName: null,
  886. pwd: null,
  887. companyId: null,
  888. platformId: 2
  889. },
  890. supplementParm: {
  891. clickFarmingId: null,
  892. amount: null,
  893. paymentResults: null,
  894. shop: null,
  895. pricesNumber: null,
  896. orderId: null,
  897. shopName: null,
  898. orderDate: null
  899. },
  900. editParm: {
  901. id: null,
  902. buyerId:null,
  903. buyerName:null,
  904. paramsType: null,
  905. shopName:null,
  906. keyWord:null,
  907. title:null,
  908. link:null,
  909. number:null,
  910. specification:null,
  911. color:null,
  912. sectionMin:null,
  913. sectionMax:null,
  914. item:null,
  915. exchange:null,
  916. amessage:null
  917. },
  918. detailParm: {
  919. id: null,
  920. buyerId:null,
  921. buyerName:null,
  922. paramsType: null,
  923. shopName: null,
  924. keyWord:null,
  925. title:null,
  926. link:null,
  927. number:null,
  928. specification:null,
  929. color:null,
  930. item:null,
  931. exchange:null,
  932. amessage:null,
  933. response:null,
  934. status:null
  935. },
  936. orderDetailParm: {
  937. id: null,
  938. createdAt:null,
  939. updatedAt:null,
  940. amount:null,
  941. paymentResults:null,
  942. shop:null,
  943. pricesNumber:null,
  944. orderId:null,
  945. shopName:null,
  946. orderDate:null
  947. },
  948. detailBuyerParm: {
  949. id: null,
  950. nickName:null,
  951. pwd:null,
  952. account: null,
  953. companyId:null,
  954. platformId:null,
  955. contntryShort:null,
  956. vpnId:null,
  957. vpnIp:null,
  958. cardId:null,
  959. cardNumber:null,
  960. level:null,
  961. occupyStatus:null,
  962. addressline1:null,
  963. country:null,
  964. state:null,
  965. tel:null,
  966. lastname:null,
  967. vatNumber:null,
  968. city:null,
  969. addressline2:null,
  970. firstname:null,
  971. postalcode:null,
  972. status:null
  973. },
  974. rules: {
  975. type: [
  976. {required: true, message:"请选择操作类型", trigger: 'blur'}
  977. ],
  978. paramsType: [
  979. {required: true, message:"请选择商品参数", trigger: 'blur'}
  980. ],
  981. shopName: [
  982. { required: true, message: '请输入店铺名称', trigger: 'blur' }
  983. ],
  984. keyWord: [
  985. { required: true, message: '请输入关键词', trigger: 'blur' }
  986. ],
  987. title: [
  988. { required: true, message: '请输入标题', trigger: 'blur' }
  989. ],
  990. link: [
  991. { required: true, message: '请输入链接', trigger: 'blur' }
  992. ],
  993. number: [
  994. { required: true, message: '请输入数量', trigger: 'blur' }
  995. ],
  996. item: [
  997. { required: true, message: '请输入Item', trigger: 'blur' }
  998. ],
  999. amessage: [
  1000. { required: true, message: '请输入留言', trigger: 'blur' }
  1001. ]
  1002. },
  1003. orderRules:{
  1004. amount: [
  1005. { required: true, message: '请输入总金额', trigger: 'blur' }
  1006. ],
  1007. paymentResults: [
  1008. { required: true, message: '请输入状态描述', trigger: 'blur' }
  1009. ],
  1010. shop: [
  1011. { required: true, message: '请输入店铺名称', trigger: 'blur' }
  1012. ],
  1013. pricesNumber: [
  1014. { required: true, message: '请输入购买数量', trigger: 'blur' }
  1015. ],
  1016. orderId: [
  1017. { required: true, message: '请输入订单id', trigger: 'blur' }
  1018. ],
  1019. shopName: [
  1020. { required: true, message: '请输入商品名称', trigger: 'blur' }
  1021. ],
  1022. orderDate: [
  1023. { required: true, message: '请输入时间', trigger: 'blur' }
  1024. ]
  1025. }
  1026. }
  1027. },
  1028. // 调用
  1029. created() {
  1030. this.goSearch();
  1031. },
  1032. //方法
  1033. methods: {
  1034. //重置
  1035. resetForm() {
  1036. this.searchParm.keyWord = null;
  1037. this.searchParm.item=null;
  1038. this.searchParm.status=null;
  1039. this.searchParm.shopName='';
  1040. this.searchParm.payOrderId=null;
  1041. this.searchParm.type=null;
  1042. this.searchParm.paramsType=null;
  1043. this.searchParm.country=null;
  1044. this.searchParm.account=null;
  1045. this.goSearch();
  1046. },
  1047. changeCheckRange(val) {
  1048. console.log("val:" + val)
  1049. this.labelVal = val;
  1050. },
  1051. // 获取所有公司信息
  1052. getCompanyAll() {
  1053. getAll()
  1054. .then(res => {
  1055. this.companys = res.data;
  1056. if (res.code == 200) {
  1057. console.log(this.companys);
  1058. }
  1059. })
  1060. .catch(() => {});
  1061. },
  1062. resetBuyerForm() {
  1063. this.searchBuyerParm.account = null;
  1064. this.searchBuyerParm.pwd = null;
  1065. this.searchBuyerParm.nickName = null;
  1066. this.searchBuyerParm.companyId = null;
  1067. this.searchBuyerParm.platformId = null;
  1068. this.goSearchBuyer();
  1069. },
  1070. // 查询
  1071. goSearch() {
  1072. this.searchParm.page=1;
  1073. this.getCompanyAll();
  1074. this.getDataList();
  1075. },
  1076. goSearchBuyer() {
  1077. this.dialogBuyerVisible = true;
  1078. this.searchBuyerParm.page = 1;
  1079. this.searchBuyerParm.platformId = 2;
  1080. this.getBuyerDataList();
  1081. },
  1082. getBuyerDataList() {
  1083. getBuyerList(this.searchBuyerParm)
  1084. .then(res => {
  1085. console.log(res);
  1086. if (res.code == 200) {
  1087. this.buyerList = res.data.list;
  1088. this.buyerTotal = res.data.total;
  1089. }
  1090. })
  1091. .catch(err => {
  1092. console.log(err);
  1093. });
  1094. },
  1095. getBuyerById(data){
  1096. this.buyerName = data.account;
  1097. this.buyerId = data.id;
  1098. if(this.dialogAddVisible == true) {
  1099. this.addParm.buyerId = data.id;
  1100. this.addParm.buyerName = data.account;
  1101. }
  1102. if(this.dialogEditVisible == true) {
  1103. this.editParm.buyerId = data.id;
  1104. this.editParm.buyerName = data.account;
  1105. }
  1106. this.dialogBuyerVisible = false;
  1107. console.log(data);
  1108. this.$message.success("选择成功");
  1109. },
  1110. // 查看买家信息根据id
  1111. getBuyerBtnById(id) {
  1112. getBuyerById({ id })
  1113. .then(res => {
  1114. if (res.code == 200) {
  1115. this.detailBuyerParm.id = res.data.id;
  1116. this.detailBuyerParm.nickName = res.data.nickName;
  1117. this.detailBuyerParm.pwd = res.data.pwd;
  1118. this.detailBuyerParm.account = res.data.account;
  1119. this.detailBuyerParm.companyId = res.data.companyId;
  1120. this.detailBuyerParm.platformId = res.data.platformId;
  1121. this.detailBuyerParm.contntryShort = res.data.contntryShort;
  1122. this.detailBuyerParm.vpnId = res.data.vpnId;
  1123. this.detailBuyerParm.vpnIp = res.data.ipAddress;
  1124. this.detailBuyerParm.cardNumber = res.data.number;
  1125. this.detailBuyerParm.cardId = res.data.cardId;
  1126. this.detailBuyerParm.level = res.data.level;
  1127. this.detailBuyerParm.occupyStatus = res.data.occupyStatus;
  1128. this.detailBuyerParm.occupyAccount = res.data.occupyAccount;
  1129. this.detailBuyerParm.balance = res.data.balance;
  1130. this.detailBuyerParm.buyTotalMoney = res.data.buyTotalMoney;
  1131. this.detailBuyerParm.addressline1 = res.data.addressline1;
  1132. this.detailBuyerParm.country = res.data.country;
  1133. this.detailBuyerParm.state = res.data.state;
  1134. this.detailBuyerParm.tel = res.data.tel;
  1135. this.detailBuyerParm.lastname = res.data.lastname;
  1136. this.detailBuyerParm.vatNumber = res.data.vatNumber;
  1137. this.detailBuyerParm.city = res.data.city;
  1138. this.detailBuyerParm.addressline2 = res.data.addressline2;
  1139. this.detailBuyerParm.firstname = res.data.firstname;
  1140. this.detailBuyerParm.postalcode = res.data.postalcode;
  1141. this.detailBuyerParm.status = res.data.status;
  1142. this.dialogBuyerDetailVisible = true;
  1143. }
  1144. })
  1145. .catch(err => {
  1146. console.log(err);
  1147. });
  1148. },
  1149. beforeAvatarUpload(file) {
  1150. console.log(file);
  1151. // const isXlsl = file.type === 'xlsl';
  1152. const isLt10M = file.size / 1024 / 1024 <10;
  1153. // if (!isXlsl) {
  1154. // this.$message.error('上传头像图片只能是 xlsl 格式!');
  1155. // }
  1156. if (!isLt10M) {
  1157. this.$message.error('上传头像图片大小不能超过 10MB!');
  1158. }
  1159. // return isXlsl && isLt10M;
  1160. return isLt10M;
  1161. },
  1162. uploadSuccess(res, file) {
  1163. this.dialogImportVisible = false;
  1164. if(res.code==200) {
  1165. console.log(res.data);
  1166. this.$message.success('导入成功!');
  1167. if(res.data != null) {
  1168. window.location.href = res.data;
  1169. }
  1170. }
  1171. this.getDataList();
  1172. },
  1173. // 新增
  1174. addBtn(){
  1175. this.addParm = {
  1176. country:null,
  1177. account:null,
  1178. pwd: null,
  1179. shopName: null,
  1180. keyWord:null,
  1181. title:null,
  1182. link:null,
  1183. number:null,
  1184. specification:null,
  1185. color:null,
  1186. item:null,
  1187. sectionMin: null,
  1188. sectionMax: null,
  1189. exchange:null,
  1190. vpnShare:null,
  1191. amessage:null,
  1192. month:null,
  1193. year:null,
  1194. cardName:null,
  1195. cardNumber:null,
  1196. cardPwd:null
  1197. }
  1198. this.dialogAddVisible = true;
  1199. },
  1200. // 导入
  1201. importBtn() {
  1202. this.dialogImportVisible = true
  1203. },
  1204. exportTempBtn() {
  1205. console.log(this.tempUrl)
  1206. window.location.href = this.tempUrl;
  1207. },
  1208. // 根据id删除
  1209. delById(id){
  1210. this.$confirm('确认删除?','提示',{
  1211. confirmButtonText: '确定',
  1212. cancelButtonText: '取消',
  1213. type: 'warning'
  1214. }).then(() => {
  1215. delById({id}).then(res => {
  1216. if(res.code==200) {
  1217. this.$message.success('删除成功!')
  1218. this.getDataList()
  1219. }
  1220. }).catch(err => {
  1221. this.$message.error(err);
  1222. console.log(err)
  1223. })
  1224. }).catch(() => {
  1225. this.$message.info('取消删除')
  1226. })
  1227. },
  1228. // 根据id 设置状态异常
  1229. abNormalById(id){
  1230. this.$confirm('确认状态修改为异常?','提示',{
  1231. confirmButtonText: '确定',
  1232. cancelButtonText: '取消',
  1233. type: 'warning'
  1234. }).then(() => {
  1235. abMormal({id}).then(res => {
  1236. if(res.code==200) {
  1237. this.$message.success('修改异常状态成功!')
  1238. this.getDataList()
  1239. }
  1240. }).catch(err => {
  1241. this.$message.error(err);
  1242. console.log(err)
  1243. })
  1244. }).catch(() => {
  1245. this.$message.info('取消修改')
  1246. })
  1247. },
  1248. // 补录
  1249. supplement(clickFarmingId) {
  1250. this.supplementParm.clickFarmingId=clickFarmingId;
  1251. this.supplementParm.amount=null;
  1252. this.supplementParm.paymentResults=null;
  1253. this.supplementParm.shop=null;
  1254. this.supplementParm.pricesNumber=null;
  1255. this.supplementParm.orderId=null;
  1256. this.supplementParm.shopName=null;
  1257. this.supplementParm.orderDate=null;
  1258. this.dialogSupplementVisible = true
  1259. },
  1260. // 修改
  1261. editById(data){
  1262. getEditDetailById({id: data.id}).then(res => {
  1263. if(res.code==200) {
  1264. console.log("res.data.type:" + res.data.type);
  1265. this.editParm.id = res.data.id;
  1266. this.editParm.type = res.data.type;
  1267. this.editParm.paramsType = res.data.paramsType;
  1268. this.editParm.shopName = res.data.shopName;
  1269. this.editParm.keyWord = res.data.keyWord;
  1270. this.editParm.title = res.data.title;
  1271. this.editParm.link = res.data.link;
  1272. this.editParm.number = res.data.number;
  1273. this.editParm.specification = res.data.specification;
  1274. this.editParm.color = res.data.color;
  1275. this.editParm.item = res.data.item;
  1276. this.editParm.sectionMin = res.data.sectionMin;
  1277. this.editParm.sectionMax = res.data.sectionMax;
  1278. this.editParm.exchange = res.data.exchange;
  1279. this.editParm.amessage = res.data.amessage;
  1280. this.editParm.buyerId= res.data.buyerId;
  1281. this.editParm.buyerName= res.data.buyerName;
  1282. this.buyerId = res.data.buyerId;
  1283. this.dialogEditVisible = true;
  1284. // this.$refs.editParm.clearValidate();
  1285. }
  1286. }).catch(err => {
  1287. this.$message.error(err);
  1288. console.log(err)
  1289. })
  1290. },
  1291. // 确认修改
  1292. sureEdit(editParm){
  1293. this.$refs[editParm].validate((valid) => {
  1294. if (valid) {
  1295. this.$refs.editParm.clearValidate();
  1296. editById(this.editParm).then(res => {
  1297. if(res.code==200) {
  1298. this.editParm.buyerId = this.buyerId;
  1299. this.dialogEditVisible = false
  1300. this.$message.success('修改成功!')
  1301. this.getDataList()
  1302. }
  1303. }).catch(err => {
  1304. this.$message.error(err);
  1305. console.log(err)
  1306. })
  1307. } else {
  1308. console.log('error submit!!');
  1309. return false;
  1310. }
  1311. });
  1312. },
  1313. sureEditCancle(editParm) {
  1314. dialogEditVisible=flase
  1315. this.$refs.editParm.clearValidate();
  1316. },
  1317. // 确认新增
  1318. sureAdd(addParm){
  1319. this.$refs[addParm].validate((valid) => {
  1320. if (valid) {
  1321. this.$refs.addParm.clearValidate();
  1322. add(this.addParm).then(res => {
  1323. if(res.code==200) {
  1324. this.addParm.buyerId = this.buyerId;
  1325. this.dialogAddVisible = false
  1326. this.$message.success('新增成功!')
  1327. this.getDataList()
  1328. }
  1329. }).catch(err => {
  1330. this.$message.error(err);
  1331. console.log(err)
  1332. })
  1333. } else {
  1334. console.log('error submit!!');
  1335. return false;
  1336. }
  1337. });
  1338. },
  1339. sureAddCancle(addParm) {
  1340. dialogAddVisible=false;
  1341. this.$refs.addParm.clearValidate();
  1342. },
  1343. // 确认补录
  1344. sureSuppment() {
  1345. supplement(this.supplementParm).then(res => {
  1346. if(res.code==200) {
  1347. this.dialogSupplementVisible = false
  1348. this.$message.success('补录成功!');
  1349. this.searchParm.status = null;
  1350. this.getDataList()
  1351. }
  1352. }).catch(err => {
  1353. console.log(err)
  1354. this.$message.success(err);
  1355. })
  1356. },
  1357. // 查看根据id
  1358. getBtnById(id){
  1359. getById({id}).then(res => {
  1360. if(res.code==200) {
  1361. this.detailParm.id = res.data.id;
  1362. this.detailParm.type = res.data.type;
  1363. this.detailParm.paramsType = res.data.paramsType;
  1364. this.detailParm.country = res.data.country;
  1365. this.detailParm.account = res.data.account;
  1366. this.detailParm.pwd = res.data.pwd;
  1367. this.detailParm.shopName = res.data.shopName;
  1368. this.detailParm.keyWord = res.data.keyWord;
  1369. this.detailParm.title = res.data.title;
  1370. this.detailParm.link = res.data.link;
  1371. this.detailParm.number = res.data.number;
  1372. this.detailParm.specification = res.data.specification;
  1373. this.detailParm.color = res.data.color;
  1374. this.detailParm.item = res.data.item;
  1375. this.detailParm.sectionMin = res.data.sectionMin;
  1376. this.detailParm.sectionMax = res.data.sectionMax;
  1377. this.detailParm.exchange = res.data.exchange;
  1378. this.detailParm.vpnShare = res.data.vpnShare;
  1379. this.detailParm.status = res.data.status;
  1380. this.detailParm.amessage = res.data.amessage;
  1381. this.detailParm.month = res.data.month;
  1382. this.detailParm.year = res.data.year;
  1383. this.detailParm.cardName = res.data.cardName;
  1384. this.detailParm.cardNumber = res.data.cardNumber;
  1385. this.detailParm.cardPwd= res.data.cardPwd;
  1386. this.detailParm.response = res.data.response;
  1387. this.detailParm.buyerName = res.data.buyerName;
  1388. this.dialogDetailVisible = true
  1389. }
  1390. }).catch(err => {
  1391. console.log(err)
  1392. })
  1393. },
  1394. // 获取订单详情
  1395. getOrderBtnById(id){
  1396. getDetailById({id}).then(res => {
  1397. if(res.code==200) {
  1398. this.orderDetailParm.id = res.data.id;
  1399. this.orderDetailParm.createdAt = res.data.createdAt;
  1400. this.orderDetailParm.updatedAt = res.data.updatedAt;
  1401. this.orderDetailParm.amount = res.data.amount;
  1402. this.orderDetailParm.paymentResults = res.data.paymentResults;
  1403. this.orderDetailParm.shop = res.data.shop;
  1404. this.orderDetailParm.pricesNumber = res.data.pricesNumber;
  1405. this.orderDetailParm.orderId = res.data.orderId;
  1406. this.orderDetailParm.shopName = res.data.shopName;
  1407. this.orderDetailParm.orderDate = res.data.orderDate;
  1408. this.dialogOrderDetailVisible = true
  1409. }
  1410. }).catch(err => {
  1411. console.log(err)
  1412. })
  1413. },
  1414. // 分页获取表格数据
  1415. getDataList(){
  1416. getList(this.searchParm).then(res => {
  1417. if(res.code==200) {
  1418. this.list = res.data.list;
  1419. this.total = res.data.total;
  1420. }
  1421. }).catch(err => {
  1422. console.log(err)
  1423. })
  1424. },
  1425. // 分页
  1426. handleSizeChange(val) {
  1427. console.log(`每页 ${val} 条`);
  1428. this.searchParm.pageSize = val;
  1429. this.getDataList();
  1430. },
  1431. handleCurrentChange(val) {
  1432. console.log(`当前页: ${val}`);
  1433. this.searchParm.page = val;
  1434. this.getDataList();
  1435. }
  1436. }
  1437. }
  1438. </script>
  1439. <style rel="stylesheet/scss" lang="scss" scoped>
  1440. </style>