Rap 原分销系统代码Web
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1584 líneas
52KB

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