edit_quality_testing.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <view class='wrap'>
  4. <view class='title'>基本信息</view>
  5. <view class="c-row b-b">
  6. <view class="title">仓库</view>
  7. <view class="con-list">
  8. {{gridList.warehouseName}}
  9. </view>
  10. </view>
  11. <view class="c-row b-b">
  12. <view class="title">编号</view>
  13. <view class="con-list">
  14. {{gridList.qualityNo}}
  15. </view>
  16. </view>
  17. <view class="c-row b-b">
  18. <view class="title">客户</view>
  19. <view class="con-list">
  20. {{gridList.customerName}}({{gridList.customerPhone}})
  21. </view>
  22. </view>
  23. <view class="c-row b-b">
  24. <view class="title">车牌号</view>
  25. <view class="con-list">
  26. <input v-model='gridList.carNumber' placeholder="请输入车牌号"
  27. placeholder-style="font-size: 12px;" name="input"></input>
  28. </view>
  29. </view>
  30. <view class="c-row b-b">
  31. <view class="title">货名</view>
  32. <view class="con-list">
  33. <input v-model='gridList.goodsName' placeholder="请输入货名,如玉米"
  34. placeholder-style="font-size: 12px;" disabled name="input"></input>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import dragButton from "@/components/drag-button/drag-button.vue";
  42. import {
  43. mapState
  44. } from 'vuex';
  45. let startY = 0,
  46. moveY = 0,
  47. pageAtTop = true;
  48. export default {
  49. components: {
  50. dragButton
  51. },
  52. data() {
  53. return {
  54. inputShow: false,
  55. modalName: '',
  56. mycarStyle: '',
  57. feild: undefined,
  58. id:0,
  59. inputContent: '',
  60. coverTransform: 'translateY(0px)',
  61. coverTransition: '0s',
  62. moving: false,
  63. footprintList: [],
  64. searchKeyWord:'',
  65. isVip: false,
  66. userInfoTmp: [],
  67. inputStatus: 'none',
  68. carInfo: [],
  69. gridCol: 4,
  70. pageSize:10,
  71. currentPage:1,
  72. gridBorder: false,
  73. headUrl:"../../static/img/myimg/YongHu@3x.png",
  74. userphone:"",
  75. username:"请更改昵称",
  76. gridList: {},
  77. managementType:'',
  78. warehouseName: '',
  79. showTran: true,
  80. companyId: 1,
  81. current: 4
  82. }
  83. },
  84. onLoad() {
  85. },
  86. // #ifndef MP
  87. onNavigationBarButtonTap(e) {
  88. const index = e.index;
  89. if (index === 0) {
  90. this.navTo('/pages/set/set');
  91. } else if (index === 1) {
  92. // #ifdef APP-PLUS
  93. const pages = getCurrentPages();
  94. const page = pages[pages.length - 1];
  95. const currentWebview = page.$getAppWebview();
  96. currentWebview.hideTitleNViewButtonRedDot({
  97. index
  98. });
  99. // #endif
  100. uni.navigateTo({
  101. url: '/pages/notice/notice'
  102. })
  103. }
  104. },
  105. // #endif
  106. computed: {
  107. ...mapState(['hasLogin', 'userInfo']),
  108. // 手机号中间4位加*
  109. starUserphone(){
  110. let reg = /^(\d{3})\d{4}(\d{4})$/;
  111. if(this.userphone){
  112. return this.userphone.replace(reg, "$1****$2");
  113. }
  114. }
  115. },
  116. onLoad(options){
  117. console.log(options)
  118. this.id=options.id
  119. },
  120. onShow() {
  121. var that = this
  122. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection',{
  123. id:this.id
  124. }).then(res => {
  125. if(res.data.data){
  126. let data = res.data.data
  127. that.gridList =data
  128. }
  129. })
  130. },
  131. methods: {
  132. del(item){
  133. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
  134. id:item.id
  135. }).then(res => {
  136. if(res.data.code==200){
  137. this.$api.msg('删除成功')
  138. }else{
  139. this.$api.msg('系统异常,请联系管理员')
  140. }
  141. })
  142. },
  143. fankui(){
  144. uni.navigateTo({
  145. url: `/pages/user/fankui`
  146. })
  147. },
  148. zhibo() {
  149. uni.navigateTo({
  150. url: `/pageB/video/broadcast`
  151. })
  152. },
  153. look() {
  154. uni.navigateTo({
  155. url: `/pageB/video/look`
  156. })
  157. },
  158. contactUs() {
  159. const that = this
  160. uni.makePhoneCall({
  161. // 手机号
  162. phoneNumber: '18241771147',
  163. // 成功回调
  164. success: (res) => {},
  165. // 失败回调
  166. fail: (res) => {}
  167. });
  168. },
  169. loadData() {
  170. // const that = this
  171. // if(uni.getStorageSync("PageCur")){
  172. // that.PageCur = uni.getStorageSync("PageCur");
  173. // }
  174. // that.userInfoTmp = uni.getStorageSync("userInfo")
  175. // uni.showLoading({
  176. // title: '正在加载',
  177. // mask:true
  178. // })
  179. // that.$api.request('integral', 'getIndexData', failres => {
  180. // that.$api.msg(failres.errmsg)
  181. // uni.hideLoading()
  182. // }).then(res => {
  183. // let data = res.data
  184. // uni.setStorageSync("message", data.message);
  185. // uni.setStorageSync("task", data.task);
  186. // uni.setStorageSync("contract", data.contract);
  187. // uni.setStorageSync('showTran', data.showTran);
  188. // that.showTran = data.showTran
  189. // that.gridList[4].tips = data.task
  190. // that.gridList[2].tips = data.contract
  191. // that.companyId = data.companyId
  192. // uni.hideLoading()
  193. // })
  194. },
  195. confirm() {
  196. const that = this
  197. if (!that.inputContent) {
  198. that.$api.msg('输入不能为空')
  199. return
  200. }
  201. let obj = {}
  202. obj[that.feild] = that.inputContent
  203. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  204. that.userInfo.nickname = that.inputContent
  205. that.inputContent = ''
  206. that.$store.commit('login', that.userInfo)
  207. })
  208. },
  209. cancel() {
  210. this.inputShow = false
  211. this.inputStatus = 'none'
  212. this.genderShow = false
  213. },
  214. myAccount() {
  215. uni.navigateTo({
  216. url: `/pageA/pages/contract`
  217. })
  218. },
  219. /**
  220. * 统一跳转接口,拦截未登录路由
  221. * navigator标签现在默认没有转场动画,所以用view
  222. */
  223. navTo(url) {
  224. if (!this.hasLogin) {
  225. url = '/pages/public/login';
  226. }
  227. uni.navigateTo({
  228. url
  229. })
  230. },
  231. mycarClick(carNo) {
  232. this.modalName = null
  233. uni.navigateTo({
  234. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  235. })
  236. },
  237. scanCode() {
  238. uni.scanCode({
  239. success: function(res) {
  240. uni.navigateTo({
  241. url: res.result
  242. })
  243. }
  244. })
  245. },
  246. hideModal(e) {
  247. this.modalName = null
  248. },
  249. }
  250. }
  251. </script>
  252. <style lang='scss' scoped>
  253. page{
  254. background:#F5F6FA;
  255. }
  256. .c-row {
  257. display: -webkit-box;
  258. display: -webkit-flex;
  259. display: flex;
  260. -webkit-box-align: center;
  261. -webkit-align-items: center;
  262. align-items: center;
  263. padding: 10rpx 30rpx;
  264. position: relative;
  265. .title {
  266. /* color: #9698A2; */
  267. }
  268. .title-black {
  269. color: #333;
  270. }
  271. }
  272. .con-list {
  273. -webkit-box-flex: 1;
  274. -webkit-flex: 1;
  275. flex: 1;
  276. display: -webkit-box;
  277. display: -webkit-flex;
  278. display: flex;
  279. -webkit-box-orient: vertical;
  280. -webkit-box-direction: normal;
  281. -webkit-flex-direction: column;
  282. flex-direction: column;
  283. color: #303133;
  284. line-height: 40rpx;
  285. text-align: right;
  286. padding-right: 20rpx;
  287. font-size: 12px;
  288. }
  289. .wrap{
  290. background:#fff;margin:10px;border-radius:10px;
  291. >.title{
  292. padding:10px 16px;
  293. }
  294. .b-b:after{
  295. border-bottom:1px solid #eee;
  296. }
  297. }
  298. </style>