特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

399 lines
7.8 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="记工记账" />
  4. <view class="page-tag">
  5. <uv-tabs :list="tabs"
  6. @click="clickTabsType"
  7. lineWidth="55"
  8. lineHeight="8" :activeStyle="{
  9. color: '#3796F8',
  10. }" :inactiveStyle="{
  11. color: '#999999',
  12. }" itemStyle="padding:60rpx 20rpx 20rpx 20rpx;width: 44%;"></uv-tabs>
  13. </view>
  14. <view class="page-picture">
  15. <view class="page-picture-img">
  16. <view class="page-picture-group" @click="show = true">
  17. <image src="../../static/image/keepAccounts/artisan.png" mode="aspectFit" />
  18. <view>
  19. 新建账本
  20. </view>
  21. </view>
  22. </view>
  23. <view class="page-picture-img"
  24. @click="$utils.navigateTo('/pages_order/kepp/AnnualExpenditure')">
  25. <view class="page-picture-group">
  26. <image src="../../static/image/keepAccounts/wallet.png" mode="aspectFit" />
  27. <view>全年收支</view>
  28. </view>
  29. </view>
  30. <view class="page-picture-img" @click="$utils.navigateTo('/pages_order/kepp/MechanicProblem')">
  31. <view class="page-picture-group">
  32. <image src="../../static/image/keepAccounts/accountBook.png" mode="aspectFit" />
  33. <view>
  34. 技工问题
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view style="font-weight: 500; margin-top: 20rpx;">
  40. <uv-tabs :list="tabsSatus"
  41. @click="clickTabsStatus"
  42. lineWidth="0" lineHeight="0" :activeStyle="{
  43. color: '#3796F8',
  44. }"></uv-tabs>
  45. </view>
  46. <view class="list">
  47. <view class="item"
  48. v-for="(item,index) in list"
  49. @click="$utils.navigateTo('/pages_order/kepp/keepAccountsDetail?id=' + item.id)"
  50. :key="index">
  51. <view class="top">
  52. <view class="title">
  53. {{ item.title }}
  54. </view>
  55. <view class="date">
  56. {{ item.createTime }}
  57. </view>
  58. </view>
  59. <view class="btn">
  60. <view class="left"
  61. @click.stop="openUpdate(item)">
  62. <uv-icon
  63. name="setting"
  64. size="40rpx"></uv-icon>
  65. 设置
  66. </view>
  67. <view class="right">
  68. <view class="b1">
  69. 记工
  70. </view>
  71. <view class="b2">
  72. 记账
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <uv-overlay :show="show">
  79. <view class="warp">
  80. <view class="rect">
  81. <view class="warp-top">
  82. {{ addOrUpdate ? '编辑项目' : '新建项目'}}
  83. </view>
  84. <view class="rect-two">
  85. <view class="designation">项目名称</view>
  86. <view class="wire" />
  87. <!-- <view class="description">请输入项目名称</view> -->
  88. <input class="rect-input"
  89. v-model="form.title"
  90. placeholder="请输入项目名称"/>
  91. <!-- <view class="option">
  92. <select class="select">
  93. <option value="option1">收入 </option>
  94. </select>
  95. </view> -->
  96. <!-- <view class="introduce">
  97. 项目金额1314
  98. </view> -->
  99. <view class="">
  100. <uv-radio-group v-model="form.status">
  101. <view style="display: flex;">
  102. <uv-radio
  103. :customStyle="{margin: '8px'}"
  104. v-for="(item, index) in statusList"
  105. :key="index"
  106. iconSize="30rpx"
  107. size="40rpx"
  108. labelSize="26rpx"
  109. :label="item.name"
  110. :name="item.value">
  111. </uv-radio>
  112. </view>
  113. </uv-radio-group>
  114. </view>
  115. <view class="button">
  116. <view @click="show = false">取消</view>
  117. <view @click="submit">确定</view>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </uv-overlay>
  123. <tabber select="1" />
  124. </view>
  125. </template>
  126. <script>
  127. import tabber from '@/components/base/tabbar.vue'
  128. import mixinList from '@/mixins/list.js'
  129. export default {
  130. mixins : [mixinList],
  131. components: {
  132. tabber,
  133. },
  134. data() {
  135. return {
  136. tabs: [
  137. {
  138. name: '个人记工',
  139. },
  140. {
  141. name: '班组记工',
  142. },
  143. ],
  144. tabsSatus : [
  145. {
  146. name: '在建项目',
  147. },
  148. {
  149. name: '结束项目',
  150. },
  151. ],
  152. statusList : [
  153. {
  154. name : '在建',
  155. value : 0,
  156. },
  157. {
  158. name : '结束',
  159. value : 1,
  160. },
  161. ],
  162. show: false,
  163. mixinsListApi : 'commonQueryNotebookList',
  164. addOrUpdate : false,
  165. form : {
  166. title : '',
  167. status : 0,
  168. },
  169. }
  170. },
  171. computed: {
  172. },
  173. onLoad() {
  174. this.queryParams.status = 0
  175. this.queryParams.type = 0
  176. },
  177. methods: {
  178. clickTabsType({index}){
  179. this.queryParams.type = index
  180. this.getData()
  181. },
  182. clickTabsStatus({index}){
  183. this.queryParams.status = index
  184. this.getData()
  185. },
  186. submit(){
  187. if(this.$utils.verificationAll(this.form, {
  188. title : '请输入项目名称',//
  189. })){
  190. return
  191. }
  192. this.form.type = this.queryParams.type
  193. this.$api('commonAddBill', this.form, res => {
  194. if(res.code == 200){
  195. this.show = false
  196. this.form = {
  197. title : '',
  198. status : 0,
  199. }
  200. this.getData()
  201. }
  202. })
  203. },
  204. openUpdate(item){
  205. this.form = {
  206. id : item.id,
  207. title : item.title,
  208. status : item.status,
  209. status : item.status,
  210. }
  211. this.addOrUpdate = true
  212. this.show = true
  213. }
  214. }
  215. }
  216. </script>
  217. <style scoped lang="scss">
  218. .page {
  219. .page-tag {
  220. font-weight: 600;
  221. }
  222. .page-picture {
  223. margin-top: 40rpx;
  224. display: flex;
  225. justify-content: space-around;
  226. .page-picture-img {
  227. width: 220rpx;
  228. height: 220rpx;
  229. display: flex;
  230. justify-content: center;
  231. align-items: center;
  232. background-color: #fff;
  233. border-radius: 10rpx;
  234. .page-picture-group {
  235. height: 80rpx;
  236. image {
  237. width: 100%;
  238. height: 100%;
  239. }
  240. }
  241. }
  242. }
  243. .list{
  244. .item{
  245. margin: 30rpx;
  246. background-color: #fff;
  247. padding: 20rpx;
  248. border-radius: 20rpx;
  249. .top{
  250. display: flex;
  251. justify-content: space-between;
  252. padding: 20rpx;
  253. .title{
  254. font-weight: 900;
  255. }
  256. .date{
  257. }
  258. }
  259. .btn{
  260. display: flex;
  261. justify-content: space-between;
  262. padding: 20rpx;
  263. .left{
  264. display: flex;
  265. align-items: center;
  266. }
  267. .right{
  268. display: flex;
  269. view{
  270. padding: 15rpx 40rpx;
  271. margin: 0 10rpx;
  272. border-radius: 10rpx;
  273. }
  274. .b1{
  275. border: 1px solid #FFA011;
  276. color: #FFA011;
  277. }
  278. .b2{
  279. background: $uni-color;
  280. color: #fff;
  281. }
  282. }
  283. }
  284. }
  285. }
  286. .warp {
  287. display: flex;
  288. justify-content: center;
  289. align-items: center;
  290. height: 100%;
  291. .rect {
  292. width: 90%;
  293. background-color: #fff;
  294. border-radius: 20rpx;
  295. overflow: hidden;
  296. .warp-top {
  297. text-align: center;
  298. font-size: 24rpx;
  299. padding: 15rpx 0;
  300. color: #FFFFFF;
  301. background-color: #3796F8;
  302. }
  303. .rect-two {
  304. width: 90%;
  305. margin-left: 5%;
  306. font-size: 28rpx;
  307. .designation {
  308. padding: 20rpx 0;
  309. color: #333;
  310. font-weight: 600;
  311. }
  312. }
  313. .wire {
  314. border-bottom: 4rpx dashed rgb(168, 197, 255);
  315. }
  316. .description {
  317. padding: 20rpx 0;
  318. color: #666666;
  319. }
  320. .rect-input {
  321. height: 40rpx;
  322. background-color: #EBF0FC;
  323. border: 2rpx solid #4280FD;
  324. border-radius: 14rpx;
  325. padding: 10rpx 20rpx;
  326. }
  327. .option {
  328. padding: 40rpx 40rpx 40rpx 0rpx;
  329. .select {
  330. background-color: #EBF0FC;
  331. padding: 10rpx 20rpx;
  332. color: #4280FD;
  333. border: 2rpx solid #4280FD;
  334. border-radius: 5rpx;
  335. }
  336. }
  337. .introduce {
  338. text-align: center;
  339. background-color: #EBF0FC;
  340. padding: 20rpx 0;
  341. color: #4280FD;
  342. }
  343. .button {
  344. display: flex;
  345. justify-content: space-around;
  346. text-align: center;
  347. align-content: center;
  348. margin: 50rpx 0;
  349. view:nth-child(1) {
  350. color: #575757;
  351. border: 2rpx solid #C7C7C7;
  352. }
  353. view:nth-child(2) {
  354. color: #FFFFFF;
  355. background-color: #3796F8;
  356. }
  357. view {
  358. width: 45%;
  359. padding: 15rpx 0;
  360. border-radius: 32rpx;
  361. font-size: 24rpx;
  362. }
  363. }
  364. }
  365. }
  366. }
  367. </style>