stock_detail.blade.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. @extends('layouts.base')
  2. @section('title', "库存明细")
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. .edit-i {
  7. display: none;
  8. }
  9. .el-table_1_column_2:hover .edit-i {
  10. font-weight: 900;
  11. padding: 0;
  12. margin: 0;
  13. display: inline-block;
  14. }
  15. .el-tabs__item, .is-top {
  16. font-size: 16px
  17. }
  18. .el-tabs__active-bar {
  19. height: 3px;
  20. }
  21. .list-title {
  22. display: flex;
  23. width: 100%;
  24. background: #f9f9f9;
  25. padding: 15px 10px;
  26. font-weight: 900;
  27. border: 1px solid #e9e9e9;
  28. }
  29. .list-title .list-title-1 {
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. }
  34. .list-info {
  35. display: flex;
  36. padding: 10px;
  37. justify-content: left;
  38. background: #f9f9f9;
  39. }
  40. .list-con {
  41. display: flex;
  42. width: 100%;
  43. font-size: 12px;
  44. font-weight: 500;
  45. align-items: stretch;
  46. border-bottom: 1px solid rgb(233, 233, 233);
  47. }
  48. .list-con-goods {
  49. display: flex;
  50. align-items: center;
  51. justify-content: center;
  52. box-sizing: border-box;
  53. padding-left: 10px;
  54. border-top: 1px solid #e9e9e9;
  55. min-height: 90px
  56. }
  57. .list-con-goods-text {
  58. min-height: 70px;
  59. overflow: hidden;
  60. flex: 1;
  61. display: flex;
  62. flex-direction: column;
  63. justify-content: space-between;
  64. }
  65. .list-con-goods-price {
  66. border-right: 1px solid #e9e9e9;
  67. border-left: 1px solid #e9e9e9;
  68. min-width: 150px;
  69. min-height: 90px;
  70. text-align: left;
  71. padding: 20px;
  72. display: flex;
  73. flex-direction: column;
  74. }
  75. .list-con-goods-title {
  76. font-size: 14px;
  77. line-height: 20px;
  78. text-overflow: -o-ellipsis-lastline;
  79. overflow: hidden;
  80. text-overflow: ellipsis;
  81. display: -webkit-box;
  82. -webkit-line-clamp: 2;
  83. line-clamp: 2;
  84. -webkit-box-orient: vertical;
  85. }
  86. .list-con-goods-option {
  87. font-size: 12px;
  88. color: #999
  89. }
  90. .list-con-member-info {
  91. display: flex;
  92. padding: 0 2px;
  93. flex-direction: column;
  94. flex: 1;
  95. min-width: 120px;
  96. line-height: 28px;
  97. justify-content: center;
  98. text-align: left;
  99. font-size: 14px;
  100. border-top: 1px solid #e9e9e9;
  101. border-right: 1px solid #e9e9e9;
  102. }
  103. .list-member {
  104. padding: 10px;
  105. font-size: 12px;
  106. font-weight: 500;
  107. }
  108. .list-num {
  109. flex: 3;
  110. display: flex;
  111. align-items: center;
  112. border-right: 1px solid #e9e9e9;
  113. justify-content: center;
  114. }
  115. .list-gen {
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. line-height: 28px;
  120. }
  121. .list-gen-txt {
  122. flex: 1;
  123. border-right: 1px solid #e9e9e9;
  124. border-bottom: 1px solid #e9e9e9;
  125. align-items: center;
  126. justify-content: center;
  127. display: flex;
  128. }
  129. .list-opt {
  130. flex: 1;
  131. display: flex;
  132. align-items: center;
  133. border-left: 1px solid #e9e9e9;
  134. justify-content: center;
  135. }
  136. /* 导航 */
  137. .el-radio-button .el-radio-button__inner, .el-radio-button:first-child .el-radio-button__inner {
  138. border-radius: 4px 4px 4px 4px;
  139. border-left: 0px;
  140. }
  141. .el-radio-button__inner {
  142. border: 0;
  143. }
  144. .el-radio-button:last-child .el-radio-button__inner {
  145. border-radius: 4px 4px 4px 4px;
  146. }
  147. .panel .active a {
  148. background-color: #29ba9c !important;
  149. border-radius: 18px !important;
  150. color: #fff;
  151. }
  152. .add-shopnav li a {
  153. display: inline-block;
  154. padding: 0 12px;
  155. line-height: 32px;
  156. color: #333;
  157. border: 1px solid #e5e5e5;
  158. background: #f8f8f8;
  159. min-width: 80px;
  160. text-align: center;
  161. }
  162. .panel a {
  163. border: none !important;
  164. background-color: #fff !important;
  165. }
  166. </style>
  167. <div class="all">
  168. <div id="app" v-cloak>
  169. <div class="vue-head">
  170. <div class="vue-main-title" style="margin-bottom:20px">
  171. <div class="vue-main-title-button">
  172. </div>
  173. </div>
  174. <div class="vue-search">
  175. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  176. <el-form-item label="">
  177. <el-input v-model="search_form.order_sn" placeholder="订单编号"></el-input>
  178. </el-form-item>
  179. <el-form-item label="">
  180. <el-select v-model="search_form.type" clearable placeholder="订单类型"
  181. style="width:150px">
  182. <el-option label="订单类型" value="0"></el-option>
  183. <el-option label="出货" value="1"></el-option>
  184. <el-option label="进货" value="2"></el-option>
  185. </el-select>
  186. </el-form-item>
  187. <el-form-item label="">
  188. <el-button type="primary" @click="search(1)">搜索</el-button>
  189. </el-form-item>
  190. </el-form>
  191. </div>
  192. </div>
  193. <div class="vue-main">
  194. <div class="vue-main-form">
  195. <div class="vue-main-title" style="margin-bottom:20px">
  196. <div class="vue-main-title-left"></div>
  197. <div class="vue-main-title-content" style="flex:0 0 140px">库存列表</div>
  198. </div>
  199. <template style="margin-top:-10px;">
  200. <el-table
  201. :data="list"
  202. style="padding:0 10px"
  203. >
  204. <el-table-column
  205. prop="order_sn"
  206. align="center"
  207. label="订单编号"
  208. >
  209. </el-table-column>
  210. <el-table-column
  211. align="center"
  212. label="交易方"
  213. >
  214. <template slot-scope="scope">
  215. <div>
  216. <div v-if="scope.row.nickname" class="vue-ellipsis">
  217. <el-image :src="scope.row.avatar"
  218. style='width:30px;height:30px;padding:1px;border:1px solid #ccc'></el-image>
  219. </div>
  220. <div class="vue-ellipsis">[[scope.row.nickname?scope.row.nickname:'平台']]</div>
  221. </div>
  222. </template>
  223. </el-table-column>
  224. <el-table-column
  225. prop="price"
  226. align="center"
  227. label="订单金额"
  228. >
  229. </el-table-column>
  230. <el-table-column
  231. prop="type_name"
  232. align="center"
  233. label="类型"
  234. >
  235. </el-table-column>
  236. <el-table-column
  237. prop="goods_total"
  238. align="center"
  239. label="数量"
  240. >
  241. </el-table-column>
  242. <el-table-column
  243. prop="stock"
  244. align="center"
  245. label="剩余库存"
  246. >
  247. </el-table-column>
  248. </el-table>
  249. </template>
  250. </div>
  251. </div>
  252. <div class="vue-page" v-if="total>0">
  253. <el-row>
  254. <el-col align="right">
  255. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  256. :page-size="per_page" :current-page="current_page" background
  257. ></el-pagination>
  258. </el-col>
  259. </el-row>
  260. </div>
  261. </div>
  262. </div>
  263. <script>
  264. var app = new Vue({
  265. el: "#app",
  266. delimiters: ['[[', ']]'],
  267. name: 'test',
  268. data() {
  269. return {
  270. listUrl: '{!! yzWebUrl('plugin.agency.admin.stock.detail-list') !!}',//获取订单数据链接
  271. goods_id: '{!! $_REQUEST['goods_id'] !!}',
  272. uid: '{!! $_REQUEST['uid'] !!}',
  273. list: [],
  274. has_many_level: [],
  275. change_sort: '',
  276. times: [],
  277. data: "",
  278. expressCompanies: [],//快递公司
  279. extra_param: {},
  280. code: 'all',
  281. search_form: {
  282. // member_id: "",
  283. },
  284. order_type: '',
  285. close_order_show: false,//关闭订单弹窗
  286. close_order_con: "",//关闭订单原因
  287. close_order_id: "",
  288. close_order1_show: false,//手动关闭订单弹窗
  289. close_order1_con: "",//手动关闭订单原因
  290. close_order1_id: "",
  291. cancel_send_show: false,// 取消发货弹窗
  292. cancel_send_con: "",//取消发货原因
  293. cancel_send_id: '',
  294. confirm_send_show: false,// 确认发货弹窗
  295. confirm_send_id: "",
  296. change_price_show: false,//修改价格弹窗
  297. change_price_id: "",
  298. change_all_money: 0.00,//价格修改
  299. all_money: 0.00,//买家实付
  300. order_model: {},
  301. dispatch_price: 0,//运费
  302. order_goods_model: [],
  303. address_info: {},
  304. send: {
  305. dispatch_type_id: 1,
  306. express_code: "",
  307. express_sn: "",
  308. },
  309. send_rules: {},
  310. more_send_show: false,
  311. order_goods_send_list: [],
  312. send_order_goods_ids: [],
  313. street: 0,
  314. province_list: [],
  315. city_list: [],
  316. district_list: [],
  317. street_list: [],
  318. areaLoading: false,
  319. rules: {},
  320. current_page: 1,
  321. total: 1,
  322. per_page: 1,
  323. readonly: false,
  324. sid:0
  325. }
  326. },
  327. created() {
  328. let result = this.viewReturn();
  329. this.__initial(result);
  330. this.search_form.member_id = this.getParam('member_id') ? this.getParam('member_id') : '';
  331. },
  332. mounted() {
  333. this.sid = this.getParam("id");
  334. this.getData(1);
  335. },
  336. methods: {
  337. viewReturn() {
  338. return {!! $data?:'{}' !!};
  339. },
  340. __initial(data) {
  341. if (data.code) {
  342. this.code = data.code;
  343. }
  344. if (data.listUrl) {
  345. this.listUrl = data.listUrl;
  346. }
  347. if (data.extraParam) {
  348. this.extra_param = data.extraParam;
  349. }
  350. this.expressCompanies = data.expressCompanies;
  351. console.log(data);
  352. },
  353. getData(page) {
  354. let requestData = {
  355. goods_id:this.goods_id,
  356. uid:this.uid,
  357. page: page,
  358. code: this.code,
  359. search: JSON.parse(JSON.stringify(this.search_form)),
  360. };
  361. if (this.times && this.times.length > 0) {
  362. requestData.search.start_time = this.times[0];
  363. requestData.search.end_time = this.times[1];
  364. }
  365. requestData.search.sid = this.sid;
  366. console.log(requestData);
  367. let loading = this.$loading({
  368. target: document.querySelector(".content"),
  369. background: 'rgba(0, 0, 0, 0)'
  370. });
  371. this.$http.post(this.listUrl, requestData).then(function (response) {
  372. if (response.data.result) {
  373. this.list = response.data.data.data;
  374. this.current_page = response.data.data.current_page;
  375. this.total = response.data.data.total;
  376. this.per_page = response.data.data.per_page;
  377. loading.close();
  378. } else {
  379. this.$message({
  380. message: response.data.msg,
  381. type: 'error'
  382. });
  383. }
  384. loading.close();
  385. }, function (response) {
  386. this.$message({
  387. message: response.data.msg,
  388. type: 'error'
  389. });
  390. loading.close();
  391. });
  392. },
  393. search(val) {
  394. this.getData(val);
  395. },
  396. escapeHTML(a) {
  397. a = "" + a;
  398. return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");
  399. },
  400. getParam(name) {
  401. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  402. var r = window.location.search.substr(1).match(reg);
  403. if (r != null) return unescape(r[2]);
  404. return null;
  405. },
  406. currentChange(val) {
  407. this.loading = true;
  408. this.real_search_form.id = this.id;
  409. this.$http.post('{!! yzWebFullUrl('plugin.agency.admin.stock.detail-list') !!}', {
  410. page: val,
  411. search: this.real_search_form
  412. }).then(function (response) {
  413. if (response.data.result) {
  414. this.list = response.data.data.data;
  415. this.current_page = response.data.data.current_page;
  416. this.total = response.data.data.total;
  417. this.per_page = response.data.data.per_page;
  418. loading.close();
  419. } else {
  420. this.$message({
  421. message: response.data.msg,
  422. type: 'error'
  423. });
  424. }
  425. loading.close();
  426. }, function (response) {
  427. console.log(response);
  428. this.loading = false;
  429. }
  430. );
  431. },
  432. },
  433. })
  434. </script>
  435. @endsection