Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

goodOrderQuery.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container ">
  7. <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
  8. <div>
  9. <el-date-picker
  10. size="small"
  11. v-model="start_time"
  12. prefix-icon="el-icon-date"
  13. :editable="false"
  14. style="width: 196px;"
  15. type="date"
  16. placeholder="选择日期时间"
  17. align="right"
  18. format="yyyy-MM-dd"
  19. value-format="yyyy-MM-dd"
  20. @change="startTimeChange"
  21. ></el-date-picker>-
  22. <el-date-picker
  23. size="small"
  24. v-model="end_time"
  25. prefix-icon="el-icon-date"
  26. :editable="false"
  27. style="width: 196px;"
  28. type="date"
  29. placeholder="选择日期时间"
  30. align="right"
  31. format="yyyy-MM-dd"
  32. value-format="yyyy-MM-dd"
  33. @change="endTimeChange"
  34. ></el-date-picker>
  35. <span>审核状态:</span>
  36. <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
  37. @change="changeTypeName">
  38. <el-option
  39. v-for="item in checkList"
  40. :key="item.id"
  41. :label="item.name"
  42. :value="item.id">
  43. </el-option>
  44. </el-select>
  45. <el-input
  46. size="small"
  47. style="width: 200px;margin-left:10px;"
  48. class="filter-item"
  49. v-model.trim="keywords"
  50. placeholder="订单编号或供应商名称"
  51. />
  52. <el-button
  53. size="small"
  54. class="filter-item"
  55. type="primary"
  56. icon="el-icon-search"
  57. @click="search"
  58. >搜索</el-button
  59. >
  60. </div>
  61. <div>
  62. <el-button size="small" type="primary" @click="toAdd">新增</el-button>
  63. </div>
  64. </div>
  65. <el-table
  66. :row-style="{ color: '#303133' }"
  67. :header-cell-style="{
  68. backgroundColor: 'rgb(245, 247, 250)',
  69. color: '#606266'
  70. }"
  71. :data="tableList"
  72. :class="signAndWeighBoxPatients"
  73. border
  74. >
  75. <el-table-column label="单据日期" align="center">
  76. <template slot-scope="scope">
  77. <span>{{getTimes(scope.row.document_date)}}</span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="单据编号" align="center">
  81. <template slot-scope="scope">
  82. <span>{{scope.row.number}}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="供应商" align="center">
  86. <template slot-scope="scope">
  87. <span>{{getName(scope.row.supplier_id)}}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="关联购货订单号" align="center" width="200">
  91. <template slot-scope="scope">
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="购货金额" align="center">
  95. <template slot-scope="scope">
  96. <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="优惠后金额" align="center">
  100. <template slot-scope="scope">
  101. {{getAllCount(scope.row.orderInfo)}}
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="已付款" align="center">
  105. <template slot-scope="scope">
  106. {{getAllCount(scope.row.orderInfo)}}
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="数量" align="center">
  110. <template slot-scope="scope">
  111. {{getAllCount(scope.row.orderInfo)}}
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="订单状态" align="center">
  115. <template slot-scope="scope">
  116. <span v-if="scope.row.is_check == 2">未审核</span>
  117. <span v-if="scope.row.is_check == 1">已审核</span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="制单人" align="center">
  121. <template slot-scope="scope">
  122. {{getDocName(scope.row.creater)}}
  123. </template>
  124. </el-table-column>
  125. <el-table-column label="审核人" align="center">
  126. <template slot-scope="scope">
  127. {{getDocName(scope.row.checker)}}
  128. </template>
  129. </el-table-column>
  130. <el-table-column label="操作" align="center" width="260px">
  131. <template slot-scope="scope">
  132. <el-button
  133. icon="el-icon-edit-outline"
  134. size="small"
  135. type="primary"
  136. @click="toClick(scope.row.id)"
  137. >编辑
  138. </el-button>
  139. <el-button
  140. icon="el-icon-delete"
  141. size="small"
  142. type="danger"
  143. @click="toClickOne(scope.row)"
  144. >删除
  145. </el-button>
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <el-pagination
  150. @size-change="handleSizeChange"
  151. @current-change="handleCurrentChange"
  152. :page-sizes="[10, 50, 100,200,500,1000]"
  153. :page-size="10"
  154. background
  155. align="right"
  156. style="margin-top:20px;"
  157. layout="total, sizes, prev, pager, next, jumper"
  158. :total="total"
  159. >
  160. </el-pagination>
  161. </div>
  162. </div>
  163. </template>
  164. <script>
  165. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  166. import {getAllSupply,getAllPurchaseOrderList} from "@/api/supply"
  167. import {uParseTime } from '@/utils/tools'
  168. export default {
  169. name: "stockIn",
  170. components: {
  171. },
  172. components: {
  173. BreadCrumb
  174. },
  175. data() {
  176. return {
  177. crumbs: [
  178. { path: false, name: "采购管理" },
  179. { path: "/spply/query", name: "购货单" }
  180. ],
  181. keywords: "",
  182. total: 0,
  183. multipleSelection: [],
  184. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  185. start_time: "",
  186. end_time:new Date(),
  187. page: 1,
  188. limit: 10,
  189. goodType: [],
  190. goodInfo: [],
  191. org_id:0,
  192. types:[],
  193. tableList:[],
  194. type_name:"",
  195. checkList:[
  196. {id:0,name:"请选择"},
  197. {id:1,name:"已审核"},
  198. {id:2,name:"未审核"},
  199. ],
  200. supplyList:[],
  201. check_id:0,
  202. doctorList:[],
  203. };
  204. },
  205. methods:{
  206. toAdd(){
  207. this.$router.push({path:"/purchase/order/add"})
  208. },
  209. changeTypeName(){
  210. },
  211. startTimeChange(){
  212. },
  213. endTimeChange(){
  214. },
  215. search(){
  216. },
  217. handleSizeChange(val){
  218. this.limit = val
  219. this.getlist()
  220. },
  221. handleCurrentChange(val){
  222. this.page = val
  223. this.getlist()
  224. },
  225. getAllSupply(){
  226. getAllSupply().then(response=>{
  227. if(response.data.state == 1){
  228. var supplyList = response.data.data.supplyList
  229. this.doctorList = response.data.data.doctorList
  230. for(let i=0;i<supplyList.length;i++){
  231. this.supplyList.push(supplyList[i])
  232. }
  233. }
  234. })
  235. },
  236. changeTypeName(){
  237. },
  238. getTimes(time) {
  239. if (time === '') {
  240. return ''
  241. }
  242. return uParseTime(time, '{y}-{m}-{d}')
  243. },
  244. getlist(){
  245. var params = {
  246. check_id:this.check_id,
  247. start_time:this.getTimes(this.start_time),
  248. end_time:this.getTimes(this.end_time),
  249. keyword:this.keywords,
  250. page:this.page,
  251. limit:this.limit,
  252. }
  253. getAllPurchaseOrderList(params).then(response=>{
  254. if(response.data.state == 1){
  255. var list = response.data.data.list
  256. console.log("list2332232323232",list)
  257. this.tableList = list
  258. var total = response.data.data.total
  259. this.total = total
  260. }
  261. })
  262. },
  263. getName(id){
  264. var name = ""
  265. for(let i=0;i<this.supplyList.length;i++){
  266. if(id == this.supplyList[i].id){
  267. name = this.supplyList[i].supplier_name
  268. }
  269. }
  270. return name
  271. },
  272. getDocName(id){
  273. var user_name = ""
  274. for(let i=0;i<this.doctorList.length;i++){
  275. if(id == this.doctorList[i].admin_user_id){
  276. user_name = this.doctorList[i].user_name
  277. }
  278. }
  279. return user_name
  280. },
  281. getAllBuyPrice(arr){
  282. var buy_price = 0
  283. if(arr!=undefined && arr.length > 0){
  284. for(let i=0;i<arr.length;i++){
  285. buy_price += (arr[i].count * arr[i].price)
  286. }
  287. }
  288. return buy_price.toFixed(2)
  289. },
  290. getAllCount(arr){
  291. var count = ""
  292. if(arr!=undefined && arr.length > 0){
  293. for(let i=0;i<arr.length;i++){
  294. count += arr[i].count
  295. }
  296. }
  297. return count
  298. },
  299. toClick(id){
  300. this.$router.push({path:"/purchase/order/edit?id="+id})
  301. }
  302. },
  303. created() {
  304. var now = new Date(); //当前日期
  305. var nowMonth = now.getMonth(); //当前月
  306. var nowYear = now.getFullYear(); //当前年
  307. //本月的开始时间
  308. var monthStartDate = new Date(nowYear, nowMonth, 1);
  309. this.start_time = monthStartDate
  310. this.org_id = this.$store.getters.xt_user.org_id
  311. this.getAllSupply()
  312. this.getlist()
  313. },
  314. };
  315. </script>
  316. <style rel="stylesheet/css" lang="scss" scoped>
  317. .information {
  318. border: 1px #dcdfe6 solid;
  319. padding: 30px 20px 30px 20px;
  320. .border {
  321. border-bottom: 1px #dcdfe6 solid;
  322. margin: 0px 0 20px 0;
  323. }
  324. }
  325. .title {
  326. background: #409eff;
  327. height: 44px;
  328. line-height: 44px;
  329. padding: 0 0 0 10px;
  330. color: #fff;
  331. margin: 0 0 10px 0;
  332. }
  333. .edit_separater {
  334. border-top: 1px solid rgb(233, 233, 233);
  335. margin-top: 15px;
  336. margin-bottom: 15px;
  337. }
  338. </style>
  339. <style>
  340. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  341. font-size: 12px;
  342. }
  343. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  344. background: #6fb5fa;
  345. }
  346. .count {
  347. color: #bd2c00;
  348. }
  349. .el-table td,
  350. .el-table th.is-leaf,
  351. .el-table--border,
  352. .el-table--group {
  353. border-color: #d0d3da;
  354. }
  355. .el-table--border::after,
  356. .el-table--group::after,
  357. .el-table::before {
  358. background-color: #d0d3da;
  359. }
  360. </style>