gooddetail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. //货权明细
  2. <template>
  3. <div class="container">
  4. <div class="center">
  5. <el-row style='margin-bottom:10px;'>
  6. <el-col :span="6">
  7. <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
  8. </el-col>
  9. <el-col :span="18">
  10. <div style='margin-left:10px;' class="datascreen">
  11. <div style="display:inline-block;width:50;">
  12. <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
  13. start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
  14. </el-date-picker></div>
  15. <el-input placeholder="可按业务编号、合同编号、客户查找" class="input_css" v-model="searchKeyWord"></el-input>
  16. <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
  17. src="../../../public/img/sousuo.png" alt="" /></el-button>
  18. </div>
  19. </el-col>
  20. </el-row>
  21. <el-row style='margin-bottom:10px;'>
  22. <el-col :span="18">
  23. <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
  24. <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">转入</el-button>
  25. <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">转出</el-button>
  26. </el-col>
  27. <el-col style="text-align:right;padding-right:10px;" :span="6">
  28. <el-button @click="handlerecord" type="primary">客户操作记录</el-button>
  29. <el-button @click="rollin" type="primary">货权转入</el-button>
  30. </el-col>
  31. </el-row>
  32. <div class="fromdata">
  33. <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
  34. <el-table-column type="index" label="序号">
  35. <template scope="scope">
  36. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  37. <span v-else>{{ scope.$index + 1 }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="transferOutNo" label="业务编号">
  41. </el-table-column>
  42. <el-table-column prop="relationReceiveNo" label="关联业务编号">
  43. <template scope="scope">
  44. <span v-if="scope.row.transferFlag==1"></span>
  45. <span v-if="scope.row.transferFlag==2">{{scope.row.relationReceiveNo}}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="outContractNo" label="合同编号"></el-table-column>
  49. <el-table-column prop="customer" label="客户">
  50. <template scope="scope">
  51. <span v-if="scope.row.transferFlag==1">{{scope.row.receiveCompName}}</span>
  52. <span v-if="scope.row.transferFlag==2">{{scope.row.customer}}</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column width="120" prop="warehouseName" label="库点名称">
  56. </el-table-column>
  57. <el-table-column width="150" prop="settlementPrice" label="仓位">
  58. <template scope="scope">
  59. <el-button @click="lookbinNumber(scope.row)" type="text">查看</el-button>
  60. </template>
  61. </el-table-column>
  62. <el-table-column width="120" prop="signingDate" label="类型">
  63. <template scope="scope">
  64. <span v-if="scope.row.transferFlag==1">转出</span>
  65. <span v-if="scope.row.transferFlag==2">转入</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column width="120" prop="agent" label="经办人">
  69. </el-table-column>
  70. <el-table-column width="200" prop="agent" label="期初粮款数据(元)">
  71. <template scope="scope">
  72. 应付{{scope.row.amountIngPayable}}-已付{{scope.row.amountEdPayable}}=未付{{scope.row.amountNotPayable}}
  73. </template>
  74. </el-table-column>
  75. <el-table-column width="120" prop="transferOutWeight" label="重量(吨)">
  76. </el-table-column>
  77. <el-table-column width="120" prop="avgCost" label="成本(元/吨)">
  78. <template scope="scope">
  79. <span v-if="scope.row.transferFlag==1">{{scope.row.salePrice}}</span>
  80. <span v-if="scope.row.transferFlag==2">{{scope.row.avgCost}}</span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column width="120" prop="updateDate" label="日期">
  84. </el-table-column>
  85. </el-table>
  86. </div>
  87. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  88. style="text-align:center" :page-size="pageSize"
  89. layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  90. </el-pagination>
  91. <el-dialog width='50%' :visible.sync="binNumbershow" :title="'仓位详情-'+(currectData.transferFlag==1?'转出':'')" top="20vh">
  92. <div class="flex"><div>仓位号</div><div>重量(吨)</div></div>
  93. <div class="flex" v-for="item in currectData.cargoPositionDetailsList">
  94. <div>{{ item.binNumber }}</div>
  95. <div>{{ item.weight }}</div>
  96. </div>
  97. </el-dialog>
  98. </div>
  99. </div>
  100. </template>
  101. <script>
  102. import {
  103. getroll
  104. } from '@/model/warehouse/index'
  105. export default {
  106. components: {},
  107. data() {
  108. return {
  109. value: '',
  110. tableData: [],
  111. show:false,
  112. deptBudgetTotal: 0,
  113. currentPage: 1,
  114. pageSize: 10,
  115. agreementType:'',
  116. deptCircularPage: {},
  117. searchType:'',
  118. searchKeyWord:'',
  119. startDate:'',
  120. endDate:'',
  121. tableData:{},
  122. datalist:{},
  123. currectData:{},
  124. compId:localStorage.getItem('ws-pf_compId'),
  125. binNumbershow:false,
  126. }
  127. },
  128. activated() {
  129. this.getList()
  130. },
  131. methods: {
  132. lookbinNumber(item){
  133. this.currectData=item
  134. this.binNumbershow=true
  135. },
  136. typeChange(num){
  137. this.searchType=num
  138. this.getList()
  139. },
  140. handleClose1(){
  141. this.show=false
  142. },
  143. returnsales(){
  144. this.$router.go(-1)
  145. },
  146. handleSelectionChange(val) {
  147. this.multipleSelection = val;
  148. },
  149. handlerecord(){
  150. this.$router.push({path:'customerrecord'})
  151. },
  152. rollin(){
  153. this.$router.push({path:'goodsrollIn'})
  154. },
  155. async getList() {
  156. var response=await getroll({
  157. // warehouseType: 1,
  158. startDate:this.startDate,
  159. endDate:this.endDate,
  160. searchKeyWord:this.searchKeyWord,
  161. currentPage: this.currentPage,
  162. pageSize:this.pageSize ,
  163. searchType:this.searchType,
  164. dropFlag:0,
  165. compId:localStorage.getItem('ws-pf_compId'),
  166. })
  167. .toPromise()
  168. this.tableData = response.records
  169. this.deptBudgetTotal = response.total
  170. },
  171. changeDate(){
  172. if(this.value){
  173. this.startDate = this.value[0]
  174. this.endDate = this.value[1]
  175. }
  176. this.getList()
  177. },
  178. pickerOptions() {},
  179. find() {
  180. this.getList()
  181. },
  182. handleSizeChange(val) {
  183. console.log(`每页 ${val} 条`)
  184. this.pageSize = val
  185. this.getList()
  186. },
  187. handleCurrentChange(val) {
  188. this.currentPage = val
  189. console.log(`当前页: ${val}`)
  190. this.getList()
  191. },
  192. },
  193. }
  194. </script>
  195. <style lang="scss" scoped>
  196. table,
  197. table tr th,
  198. table tr td {
  199. border: 2px solid #333333;
  200. padding: 5px 0;
  201. height: 55px;
  202. }
  203. .content {
  204. width: 1000px;
  205. padding: 70px 20px 20px 20px;
  206. font-size: 22px;
  207. position: absolute;
  208. top: 0;
  209. bottom: 0;
  210. left: 0;
  211. right: 0;
  212. }
  213. table {
  214. width: 100%;
  215. text-align: center;
  216. border-collapse: collapse;
  217. border: 3px solid #333333;
  218. }
  219. .col-bgc {
  220. background: #f6f7fb;
  221. }
  222. .container {
  223. background: #E8ECF6;
  224. }
  225. .center {
  226. margin: 0 auto;
  227. background: #ffffff;
  228. height: calc(100vh - 13vh);
  229. border-radius: 4px;
  230. padding: 20px 0;
  231. /deep/.el-table td,
  232. /deep/.el-table th {
  233. text-align: center;
  234. }
  235. }
  236. .row_top {
  237. background: #F6F7FC;
  238. border-radius: 4px;
  239. margin-bottom: 10px;
  240. .bg-left {
  241. padding-left: 30px;
  242. }
  243. .bg-right {
  244. padding-right: 10px;
  245. text-align: right;
  246. }
  247. .title {
  248. position: relative;
  249. }
  250. .title::before {
  251. content: '';
  252. display: inline-block;
  253. width: 5px;
  254. height: 30px;
  255. background: #5473e8;
  256. position: absolute;
  257. left: 0;
  258. }
  259. }
  260. .datascreen {
  261. display: flex;
  262. .data_css {
  263. width: 40%;
  264. }
  265. .input_css {
  266. width: 50%;
  267. margin: 0 10px;
  268. }
  269. .find {
  270. margin-right: 10px;
  271. }
  272. }
  273. .fromdata {
  274. margin: 20px 0;
  275. overflow-y: scroll;
  276. height: 546px;
  277. }
  278. .top_info{
  279. margin: 10px 0 0 10px;
  280. min-width: 712px;
  281. .info_css{
  282. margin-right: 20px;
  283. }
  284. }
  285. .bg-right{
  286. padding-top:15px;
  287. }
  288. .el-icon-connection{
  289. color:#409eff;
  290. }
  291. .flex{
  292. display:flex;justify-content: space-between;
  293. }
  294. </style>