stock-log.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. <?php
  2. /**
  3. * @link:http://www.goodmall.com/
  4. * @copyright: Copyright (c) 2020
  5. * Created by PhpStorm
  6. * Author: ganxiaohao
  7. * Date: 2020-05-08
  8. * Time: 16:11
  9. */
  10. use common\helpers\ComponentHelper;
  11. $diyPath = dirname(__DIR__) . '/components';
  12. ComponentHelper::loadComponentView('stock-goods-edit', $diyPath);
  13. ?>
  14. <div id="app" v-cloak>
  15. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1300px;">
  16. <div slot="header">
  17. <div>
  18. <span>库存明细</span>
  19. <!-- <div style="float: right; margin: -5px 0">
  20. <el-button type="primary" @click="editClick" size="small">添加库存商品</el-button>
  21. </div> -->
  22. </div>
  23. </div>
  24. <div class="table-body">
  25. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  26. <el-tab-pane label="扣减库存明细列表" name="first">
  27. <div class="head" style="display: flex;margin-bottom: 20px;">
  28. <el-input clearable style="width: 130px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.order_id" placeholder="请输入订单id"></el-input>
  29. <el-input clearable style="width: 170px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.keyword" placeholder="请输入代理商昵称/id"></el-input>
  30. <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.goods_name" placeholder="请输入商品名称"></el-input>
  31. <el-select clearable size="small" v-model="search1.changes_type" @change="searchFun1" class="select" placeholder="请选择库存扣减类型" style="margin-right: 20px;"><!-- @change='toSearch' -->
  32. <!-- <el-option key="all" label="全部等级" value=""></el-option> -->
  33. <el-option :key="index" :label="item.desc" :value="item.value" v-for="(item, index) in deductionList"></el-option>
  34. </el-select>
  35. <el-date-picker
  36. style="margin-right: 20px;"
  37. size="small"
  38. v-model="selectData"
  39. type="daterange"
  40. value-format="yyyy-MM-dd"
  41. range-separator="至"
  42. start-placeholder="开始日期"
  43. end-placeholder="结束日期">
  44. </el-date-picker>
  45. <el-button type="primary" icon="el-icon-search" style="padding: 0 10px !important;" @click="searchFun1">搜索</el-button>
  46. </div>
  47. <el-table
  48. size="small"
  49. :data="list"
  50. style="width: 100%"
  51. v-loading="listLoading">
  52. <el-table-column
  53. prop="agent_user_id"
  54. label="代理商用户id"
  55. align="center"
  56. min-width="120"
  57. >
  58. </el-table-column>
  59. <el-table-column
  60. label="代理商"
  61. min-width="150"
  62. >
  63. <template slot-scope="scope">
  64. <div class="table-info-img-text">
  65. <el-image class="table-info-img circle" v-if="scope.row.agent_user_avatar_url" :src="scope.row.agent_user_avatar_url">
  66. <div slot="error" class="image-slot">
  67. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  68. </div>
  69. </el-image>
  70. <div class="table-info-text">
  71. <div style="color:#000;">
  72. {{scope.row.agent_user_nickname}}
  73. <el-tag v-if="scope.row.is_sales">销售公司</el-tag>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. label="商品名称"
  81. min-width="150"
  82. >
  83. <template slot-scope="scope">
  84. <div style="display: flex;align-items: center;">
  85. <img v-if="scope.row.goods.cover_pic" :src="scope.row.goods.cover_pic" style="width: 40px;height: 40px;display: block;margin-right: 5px;" />
  86. <div style="text-align: left;line-height: 16px;">{{scope.row.goods.goods_name}}</div>
  87. </div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. prop="num"
  92. label="扣减库存数"
  93. align="center"
  94. min-width="100"
  95. >
  96. <template slot-scope="scope">
  97. -{{scope.row.num}}
  98. </template>
  99. </el-table-column>
  100. <!-- <el-table-column
  101. prop="user_nickname"
  102. label="对方用户"
  103. min-width="150"
  104. align="center"
  105. >
  106. <template slot-scope="scope">
  107. <div style="display: flex;align-items: center;justify-content: center;">
  108. <img v-if="scope.row.user_avatar_url" :src="scope.row.user_avatar_url" style="width: 40px;height: 40px;display: block;margin-right: 5px;" />
  109. <div>{{scope.row.user_nickname}}</div>
  110. </div>
  111. </template>
  112. </el-table-column> -->
  113. <el-table-column
  114. prop="id"
  115. align="center"
  116. label="扣减库存类型"
  117. min-width="100">
  118. <template slot-scope="scope">
  119. <el-tag>{{computedType(scope.row.changes_type)}}</el-tag>
  120. </template>
  121. </el-table-column>
  122. <el-table-column
  123. prop="order_id"
  124. align="center"
  125. label="订单id"
  126. min-width="80">
  127. </el-table-column>
  128. <el-table-column
  129. prop="remark"
  130. align="center"
  131. label="备注"
  132. min-width="80">
  133. </el-table-column>
  134. <el-table-column
  135. prop="created_at"
  136. align="center"
  137. label="时间"
  138. min-width="100">
  139. <template slot-scope="scope">
  140. {{formatTime(scope.row.created_at)}}
  141. </template>
  142. </el-table-column>
  143. <!-- <el-table-column
  144. align="center"
  145. label="操作"
  146. min-width="200">
  147. <template slot-scope="scope">
  148. <el-button type="primary" size="mini" @click="seeDetail">查看详情</el-button>
  149. </template>
  150. </el-table-column> -->
  151. </el-table>
  152. <!-- 代理库存页面 end -->
  153. <div style="text-align: right;margin: 20px 0;">
  154. <el-pagination
  155. @current-change="pagination"
  156. background
  157. layout="prev, pager, next"
  158. :page-count="pageCount">
  159. </el-pagination>
  160. </div>
  161. </el-tab-pane>
  162. <el-tab-pane label="增加库存明细列表" name="second">
  163. <div class="head" style="display: flex;margin-bottom: 20px;">
  164. <el-input clearable style="width: 130px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun2" v-model="search2.order_id" placeholder="请输入订单id"></el-input>
  165. <el-input clearable style="width: 170px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun2" v-model="search2.keyword" placeholder="请输入代理商昵称/id"></el-input>
  166. <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun2" v-model="search2.goods_name" placeholder="请输入商品名称"></el-input>
  167. <el-select clearable size="small" v-model="search2.changes_type" @change="searchFun2" class="select" placeholder="请选择库存增加类型" style="margin-right: 20px;"><!-- @change='toSearch' -->
  168. <el-option :key="index" :label="item.desc" :value="item.value" v-for="(item, index) in increaseList"></el-option>
  169. </el-select>
  170. <el-date-picker
  171. style="margin-right: 20px;"
  172. size="small"
  173. v-model="selectData2"
  174. type="daterange"
  175. value-format="yyyy-MM-dd"
  176. range-separator="至"
  177. start-placeholder="开始日期"
  178. end-placeholder="结束日期">
  179. </el-date-picker>
  180. <el-button type="primary" icon="el-icon-search" style="padding: 0 10px !important;" @click="searchFun2">搜索</el-button>
  181. </div>
  182. <el-table
  183. size="small"
  184. :data="list"
  185. style="width: 100%"
  186. v-loading="listLoading">
  187. <el-table-column
  188. prop="agent_user_id"
  189. label="代理商用户id"
  190. align="center"
  191. min-width="80"
  192. >
  193. </el-table-column>
  194. <el-table-column
  195. label="代理商"
  196. min-width="150"
  197. >
  198. <template slot-scope="scope">
  199. <div class="table-info-img-text">
  200. <el-image class="table-info-img circle" v-if="scope.row.agent_user_avatar_url" :src="scope.row.agent_user_avatar_url">
  201. <div slot="error" class="image-slot">
  202. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  203. </div>
  204. </el-image>
  205. <div class="table-info-text">
  206. <div style="color:#000;">{{scope.row.agent_user_nickname}}</div>
  207. </div>
  208. </div>
  209. </template>
  210. </el-table-column>
  211. <el-table-column
  212. label="商品名称"
  213. min-width="150"
  214. >
  215. <template slot-scope="scope">
  216. <div style="display: flex;align-items: center;">
  217. <img v-if="scope.row.goods.cover_pic" :src="scope.row.goods.cover_pic" style="width: 40px;height: 40px;display: block;margin-right: 5px;" />
  218. <div style="text-align: left;line-height: 16px;">{{scope.row.goods.goods_name}}</div>
  219. </div>
  220. </template>
  221. </el-table-column>
  222. <el-table-column
  223. prop="num"
  224. label="增加库存数量"
  225. align="center"
  226. min-width="100"
  227. >
  228. <template slot-scope="scope">
  229. +{{scope.row.num}}
  230. </template>
  231. </el-table-column>
  232. <!-- <el-table-column
  233. prop="user_nickname"
  234. label="对方用户"
  235. min-width="150"
  236. align="center"
  237. >
  238. <template slot-scope="scope">
  239. <div style="display: flex;align-items: center;justify-content: center;">
  240. <img v-if="scope.row.user_avatar_url" :src="scope.row.user_avatar_url" style="width: 40px;height: 40px;display: block;margin-right: 5px;" />
  241. <div>{{scope.row.user_nickname}}</div>
  242. </div>
  243. </template>
  244. </el-table-column> -->
  245. <el-table-column
  246. prop="id"
  247. align="center"
  248. label="增加库存类型"
  249. min-width="100">
  250. <template slot-scope="scope">
  251. <el-tag>{{computedType2(scope.row.changes_type)}}</el-tag>
  252. </template>
  253. </el-table-column>
  254. <el-table-column
  255. prop="order_id"
  256. align="center"
  257. label="订单id"
  258. min-width="80">
  259. </el-table-column>
  260. <el-table-column
  261. prop="remark"
  262. align="center"
  263. label="备注"
  264. min-width="80">
  265. </el-table-column>
  266. <el-table-column
  267. prop="created_at"
  268. align="center"
  269. label="时间"
  270. min-width="100">
  271. <template slot-scope="scope">
  272. {{formatTime(scope.row.created_at)}}
  273. </template>
  274. </el-table-column>
  275. <!-- <el-table-column
  276. align="center"
  277. label="操作"
  278. min-width="200">
  279. <template slot-scope="scope">
  280. <el-button type="primary" size="mini" @click="seeDetail">查看详情</el-button>
  281. </template>
  282. </el-table-column> -->
  283. </el-table>
  284. <!-- 代理库存页面 end -->
  285. <div style="text-align: right;margin: 20px 0;">
  286. <el-pagination
  287. @current-change="pagination"
  288. background
  289. layout="prev, pager, next"
  290. :page-count="pageCount">
  291. </el-pagination>
  292. </div>
  293. </el-tab-pane>
  294. </el-tabs>
  295. </div>
  296. </el-card>
  297. <stock-goods-edit v-model="edit.show" :edit_row="edit"></stock-goods-edit>
  298. <el-dialog
  299. center
  300. title="库存详情"
  301. :visible.sync="dialogVisible"
  302. width="50%"
  303. >
  304. <el-table
  305. size="small"
  306. :data="tableData2"
  307. style="width: 100%;padding-bottom: 30px;">
  308. <el-table-column
  309. label="商品名称"
  310. >
  311. <template slot-scope="scope">
  312. <div style="display: flex;align-items: center;">
  313. <img :src="scope.row.huiyuan.img" style="width: 35px;height: 35px;display: block;margin-right: 5px;" />
  314. <div>{{scope.row.huiyuan.name}}</div>
  315. </div>
  316. </template>
  317. </el-table-column>
  318. <el-table-column
  319. align="center"
  320. label="拿货价"
  321. >
  322. <template slot-scope="scope">
  323. ¥{{scope.row.id}}
  324. </template>
  325. </el-table-column>
  326. <el-table-column
  327. prop="id"
  328. align="center"
  329. label="库存">
  330. </el-table-column>
  331. </el-table>
  332. </el-dialog>
  333. </div>
  334. <script>
  335. const app = new Vue({
  336. el: '#app',
  337. data() {
  338. return {
  339. edit:{
  340. show:false,
  341. id:0,
  342. },
  343. list: [],
  344. keyword: '',
  345. listLoading: false,
  346. page: 1,
  347. level:1,
  348. pageCount: 0,
  349. condition_type_list: {
  350. 1: '下线用户数',
  351. 2: '累计佣金',
  352. 3: '已提现佣金'
  353. },
  354. price_type_list: {
  355. 1: '%',
  356. 2: '元'
  357. },
  358. dialogVisible:false,
  359. activeName: 'first',
  360. selectData:'',
  361. selectData2:'',
  362. increaseList:[],
  363. deductionList:[],
  364. jiaJianKuncun:[
  365. {
  366. name:'减库存',
  367. level:1
  368. },{
  369. name:'加库存',
  370. level:2
  371. }],
  372. jiaJianKuncunValue:'',
  373. search1:{
  374. order_id:'',
  375. goods_name:'',
  376. start:'',
  377. end:'',
  378. changes_type:'',
  379. keyword:''
  380. },
  381. search2:{
  382. order_id:'',
  383. goods_name:'',
  384. start:'',
  385. end:'',
  386. changes_type:'',
  387. keyword:''
  388. },
  389. tableData2: [{
  390. id:1,
  391. huiyuan:{
  392. img:'http://zhenai.ruinuomei.com/product/5a0bb3d1-cffe-49c7-99d7-b1481c31dc5c',
  393. name:'张三'
  394. },
  395. phone:15219398480,
  396. dengji:"等级1",
  397. pro:[
  398. {
  399. name:'红酒红酒红酒红酒红酒红酒红酒',
  400. price:199.99,
  401. kucun:99
  402. },
  403. {
  404. name:'红酒2',
  405. price:199.99,
  406. kucun:99
  407. },
  408. {
  409. name:'红酒3',
  410. price:199.99,
  411. kucun:99
  412. }
  413. ]
  414. },
  415. {
  416. id:1,
  417. huiyuan:{
  418. img:'http://zhenai.ruinuomei.com/product/5a0bb3d1-cffe-49c7-99d7-b1481c31dc5c',
  419. name:'张三'
  420. },
  421. phone:15219398480,
  422. dengji:"等级1",
  423. pro:[
  424. {
  425. name:'红酒1',
  426. price:199.99,
  427. kucun:99
  428. },
  429. {
  430. name:'红酒2',
  431. price:199.99,
  432. kucun:99
  433. },
  434. {
  435. name:'红酒3',
  436. price:199.99,
  437. kucun:99
  438. }
  439. ]
  440. }],
  441. agentLevelList:[]
  442. };
  443. },
  444. mounted: function () {
  445. this.getList();
  446. this.getChangesType();
  447. },
  448. methods: {
  449. searchFun1(){
  450. if(this.selectData && this.selectData[0]){
  451. this.search1.start = this.selectData[0];
  452. this.search1.end = this.selectData[1];
  453. }else{
  454. this.search1.start = '';
  455. this.search1.end = '';
  456. }
  457. this.page = 1;
  458. this.getList();
  459. },
  460. searchFun2(){
  461. if(this.selectData2 && this.selectData2[0]){
  462. this.search2.start = this.selectData2[0];
  463. this.search2.end = this.selectData2[1];
  464. }else{
  465. this.search2.start = '';
  466. this.search2.end = '';
  467. }
  468. this.page = 1;
  469. this.getList2();
  470. },
  471. computedType(type){//200会员买货;201给下级配货;202下级向自己补货;203自提货到线下;204系统扣减;
  472. if(type == 200){
  473. return "会员买货"
  474. }else if(type == 201){
  475. return "给下级配货"
  476. }else if(type == 202){
  477. return "下级向自己补货"
  478. }else if(type == 203){
  479. return "自提货到线下"
  480. }else if(type == 204){
  481. return "系统扣减"
  482. }
  483. if(type == 100){
  484. return "向上级补货"
  485. }else if(type == 101){
  486. return "上级给自己配货"
  487. }else if(type == 102){
  488. return "退货退库存"
  489. }else if(type == 103){
  490. return "系统添加"
  491. }else if(type == 104){
  492. return "平台补货赠送"
  493. }else if(type == 105){
  494. return "购买礼包赠送"
  495. }
  496. },
  497. computedType2(type){
  498. if(type == 100){
  499. return "向上级补货"
  500. }else if(type == 101){
  501. return "上级给自己配货"
  502. }else if(type == 102){
  503. return "退货退库存"
  504. }else if(type == 103){
  505. return "系统添加"
  506. }else if(type == 104){
  507. return "平台补货赠送"
  508. }else if(type == 105){
  509. return "购买礼包赠送"
  510. }
  511. if(type == 200){
  512. return "会员买货"
  513. }else if(type == 201){
  514. return "给下级配货"
  515. }else if(type == 202){
  516. return "下级向自己补货"
  517. }else if(type == 203){
  518. return "自提货到线下"
  519. }else if(type == 204){
  520. return "系统扣减"
  521. }
  522. },
  523. handleClick(tab, event) {
  524. if(this.activeName == "first"){
  525. this.page = 1;
  526. this.pageCount = 0;
  527. this.getList();
  528. }else if(this.activeName == "second"){
  529. this.page = 1;
  530. this.pageCount = 0;
  531. this.getList2();
  532. }
  533. },
  534. search() {
  535. this.page = 1;
  536. this.getList();
  537. },
  538. pagination(currentPage) {
  539. //let self = this;
  540. this.page = currentPage;
  541. if(this.activeName == "first"){
  542. this.getList();
  543. }else if(this.activeName == "second"){
  544. this.getList2();
  545. }
  546. },
  547. getList() {
  548. let self = this;
  549. self.listLoading = true;
  550. //console.log('请求扣减库存明细列表page='+self.page)
  551. //console.log('请求扣减库存明细列表search1='+JSON.stringify(this.search1))
  552. request({
  553. params: {
  554. r: 'cloud-stock-two/default/stock-log',//plugin/cloud_stock/mall/stock-log/get-deduction-list扣减库存明细列表
  555. page:self.page,
  556. limit: 10,
  557. log_type: 'sub',
  558. order_id:this.search1.order_id,
  559. goods_name:this.search1.goods_name,
  560. start:this.search1.start,
  561. end:this.search1.end,
  562. changes_type:this.search1.changes_type,
  563. keyword:this.search1.keyword
  564. },
  565. method: 'get',
  566. }).then(e => {
  567. //console.log('扣减库存明细列表='+JSON.stringify(e))
  568. self.listLoading = false;
  569. if(e.data.code == 0){
  570. self.list = e.data.data.list;
  571. self.pageCount = e.data.data.page_count;
  572. }
  573. }).catch(e => {
  574. console.log(e);
  575. });
  576. },formatTime(timeStamp) {
  577. var date = new Date();
  578. date.setTime(timeStamp * 1000);
  579. var y = date.getFullYear();
  580. var m = date.getMonth() + 1;
  581. m = m < 10 ? ('0' + m) : m;
  582. var d = date.getDate();
  583. d = d < 10 ? ('0' + d) : d;
  584. var h = date.getHours();
  585. h = h < 10 ? ('0' + h) : h;
  586. var minute = date.getMinutes();
  587. var second = date.getSeconds();
  588. minute = minute < 10 ? ('0' + minute) : minute;
  589. second = second < 10 ? ('0' + second) : second;
  590. return y + '-' + m + '-' + d +' '+ h + ':' + minute + ':' + second;
  591. },
  592. getList2(){
  593. let self = this;
  594. self.listLoading = true;
  595. //console.log('增加库存明细列表page='+self.page)
  596. //console.log('增加库存明细列表search2='+JSON.stringify(this.search2))
  597. request({
  598. params: {
  599. r: 'cloud-stock-two/default/stock-log',//增加库存明细列表 plugin/cloud_stock/mall/stock-log/get-increase-list
  600. page:self.page,
  601. log_type: 'add',
  602. limit: 10,
  603. order_id:this.search2.order_id,
  604. goods_name:this.search2.goods_name,
  605. start:this.search2.start,
  606. end:this.search2.end,
  607. changes_type:this.search2.changes_type,
  608. keyword:this.search2.keyword
  609. },
  610. method: 'get',
  611. }).then(e => {
  612. //console.log('增加库存明细列表='+JSON.stringify(e))
  613. self.listLoading = false;
  614. if(e.data.code == 0){
  615. self.list = e.data.data.list;
  616. self.pageCount = e.data.data.page_count;
  617. }
  618. }).catch(e => {
  619. console.log(e);
  620. });
  621. },
  622. getChangesType(){
  623. request({
  624. params: {
  625. r: 'cloud-stock-two/default/get-changes-type-list',//库存变动类型列表 plugin/cloud_stock/mall/stock-log/get-changes-type-list
  626. page:self.page,
  627. limit: 10
  628. },
  629. method: 'get',
  630. }).then(e => {
  631. //console.log('库存变动类型列表='+JSON.stringify(e))
  632. if(e.data.code == 0){
  633. this.increaseList = e.data.data[0].increase;
  634. this.deductionList = e.data.data[0].deduction;
  635. }
  636. }).catch(e => {
  637. console.log(e);
  638. });
  639. },
  640. switchStatus(row) {
  641. let self = this;
  642. self.listLoading = true;
  643. request({
  644. params: {
  645. r: 'plugin/stock/mall/level/switch-status',
  646. },
  647. method: 'post',
  648. data: {
  649. id: row.id,
  650. }
  651. }).then(e => {
  652. self.listLoading = false;
  653. if (e.data.code === 0) {
  654. self.$message.success(e.data.msg);
  655. } else {
  656. self.$message.error(e.data.msg);
  657. }
  658. self.getList();
  659. }).catch(e => {
  660. console.log(e);
  661. });
  662. },
  663. editClick(id){
  664. if (id){
  665. this.edit.id=id;
  666. this.edit.show=true;
  667. this.edit.title="编辑商品"
  668. }else {
  669. this.edit.show=true;
  670. this.edit.title="添加商品"
  671. }
  672. },
  673. levelDelete(row, index) {
  674. let self = this;
  675. self.$confirm('删除该库存商品, 是否继续?', '提示', {
  676. confirmButtonText: '确定',
  677. cancelButtonText: '取消',
  678. type: 'warning'
  679. }).then(() => {
  680. self.listLoading = true;
  681. request({
  682. params: {
  683. r: 'plugin/stock/mall/goods/delete',
  684. },
  685. method: 'post',
  686. data: {
  687. id: row.id,
  688. }
  689. }).then(e => {
  690. self.listLoading = false;
  691. if (e.data.code === 0) {
  692. self.$message.success(e.data.msg);
  693. self.list.splice(index, 1);
  694. } else {
  695. self.$message.error(e.data.msg);
  696. }
  697. }).catch(e => {
  698. console.log(e);
  699. });
  700. }).catch(() => {
  701. self.$message.info('已取消删除')
  702. });
  703. },
  704. seeDetail(){
  705. this.dialogVisible = true
  706. }
  707. }
  708. });
  709. </script>
  710. <style>
  711. .table-body {
  712. padding: 20px;
  713. background-color: #fff;
  714. }
  715. .input-item {
  716. display: inline-block;
  717. width: 250px;
  718. margin: 0 0 20px;
  719. }
  720. .input-item .el-input__inner {
  721. border-right: 0;
  722. }
  723. .input-item .el-input__inner:hover {
  724. border: 1px solid #dcdfe6;
  725. border-right: 0;
  726. outline: 0;
  727. }
  728. .input-item .el-input__inner:focus {
  729. border: 1px solid #dcdfe6;
  730. border-right: 0;
  731. outline: 0;
  732. }
  733. .input-item .el-input-group__append {
  734. background-color: #fff;
  735. border-left: 0;
  736. width: 10%;
  737. padding: 0;
  738. }
  739. .input-item .el-input-group__append .el-button {
  740. padding: 0;
  741. }
  742. .input-item .el-input-group__append .el-button {
  743. margin: 0;
  744. }
  745. /* .table-body .el-button {
  746. padding: 0 !important;
  747. border: 0;
  748. margin: 0 5px;
  749. } */
  750. .el-table thead{
  751. font-size: 14px;
  752. color: #333;
  753. }
  754. .el-table__footer-wrapper, .el-table__header-wrapper{
  755. border-bottom: 1.4px solid #D6D6D6;
  756. }
  757. .el-date-editor .el-range-separator{/* 设置选择日期框的中间的 ‘至’ 的宽度 */
  758. width: 8%;
  759. }
  760. </style>