| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598 |
- <template>
- <view :class="[AppTheme]" class="all_box">
- <view class="content_box">
- <view class="content_detail_1">
- <view class="detail_title_1">
- <view class="detail_title_p1">
- <image class="image" :src="storelist.pic" mode=""></image>
- </view>
- <view class="detail_title_p2">
- <view class="detail_title_p3">{{storelist.name}}</view>
- <view class="detail_title_p4">
- {{storelist.renyantime}}
- </view>
- <view>
- <u-line-progress :percentage="storelist.munber" activeColor="#ff0000"></u-line-progress>
- </view>
- <view class="fram_oper_1">
- <view class="fram_oper_2">
- <view class="views1">品种</view>
- <view class="views1">周期</view>
- <view class="views1">收获</view>
- </view>
- <view class="fram_oper_2">
- <view class="views1">{{storelist.vname}}</view>
- <view class="views1">{{storelist.cycle}}天</view>
- <view class="views1">{{storelist.bonusway}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="farm_name_4">
- <view class="farm_name_7" @click="pkxunzhe">
- <view class="farm_name_5">
- 操作类型
- </view>
- <view class="farm_name_6">
- {{operatorname}}
- <u-icon name="arrow-right" :bold="true" color="#999" size="18"></u-icon>
- </view>
- </view>
- <view class="bor_solp"></view>
- <view class="farm_name_7" @click="pkxun">
- <view class="farm_name_5">
- 操作详情
- </view>
- <view class="farm_name_6">
- {{operatorname2}}
- <u-icon name="arrow-right" :bold="true" color="#999" size="18" ></u-icon>
- </view>
- </view>
- </view>
- <view class="content_detail">
- <view class="detail_text">
- <textarea v-model="form.describe" class="detail_ipt" type="text" placeholder="请输入备注" />
- </view>
- <view class="content_detail_img">
- <view v-if="detailimg.length!=0" class="detail_img" v-for="(item,index) in detailimg" :key="index"
- @click="preview(item,index)">
- <image class="image" :src="item" mode=""></image>
- <u-icon @click="deleteimg(index)" class="delete_img" name="close-circle" color="#fff" size="20">
- </u-icon>
- </view>
- <view class="detail_img" @click="uploadlogo(2)">
- <u-icon class="icon_plus" name="plus" size="50"></u-icon>
- </view>
- </view>
- </view>
- <view class="submit bg-linear-gradient" @click="submit">记录</view>
- </view>
- <u-picker :show="show" :columns="columns" @cancel='cancel' @confirm='confirm' keyName="label"></u-picker>
- <u-picker :show="show1" :columns="columns1" @cancel='cancel1' @confirm='confirm1' keyName="label"></u-picker>
- <!-- <u-modal :show="show1" :title="title" :content='content' @confirm='confirmmodel'></u-modal> -->
- </view>
- </template>
- <script>
- import mineApi from "@/api/mine/index.js"
- import {
- pathToBase64
- } from "@/js/pathto64.js"
- export default {
- data() {
- return {
- primary: this.$theme.primary,
- settingFile: getApp().globalData.siteinfo,
- soil: '',
- detailimg: [], //农场描述附加图
- //表单数据
- form: {
- describe: "", //农场描述
- detailimg: [] //农场描述附加图
- },
- columns: [],
- columns1: [],
- show: false,
-
- show1: false,
-
- storelist: '',
- operatorname: '',
- operatorname2:'',
- id:''
- }
- },
- onLoad(options) {
- this.id = options.id
- this.finantype()
- },
- methods: {
- finantype() {
- mineApi.finantype({
- id: this.id
- })
- .then(res => {
- this.storelist = res.data;
- this.columns = res.data.lable1;
- this.operatorname = res.data.lable1[0][0].label;
- this.columns1= res.data.lable1[0][0].lable2;
- console.log(res.data.lable1[0][0].lable2[0][0].label,'this.columns2')
- this.operatorname2 = res.data.lable1[0][0].lable2[0][0].label;
- })
- },
- confirmmodel() {
- this.show1 = false
- uni.navigateTo({
- url: '/pagesD/pages/inspection/inspection'
- })
- },
- confirm(e) {
- console.log(e, 'eeeeeee')
- this.show = false
- this.id = e.value[0].id
- this.operatorname = e.value[0].label
- this.operatorname2 = e.value[0].lable2[0][0].label;
- this.columns1= e.value[0].lable2;
-
- },
- confirm1(e){
- this.show1= false
- this.operatorname2 = e.value[0].label
-
- },
- cancel() {
- this.show = false
- },
- cancel1() {
- this.show1 = false
- },
- pkxunzhe() {
- this.show = true
- },
- pkxun() {
- this.show1 = true
- },
- preview(url, idx) { //预览图片
- uni.previewImage({
- current: idx,
- urls: this.detailimg,
- success: function(res) {
- console.log(res, '预览')
- },
- fail: function(res) {
- console.log(res, '00000')
- }
- })
- },
- deleteimg(idx) { //图片删除
- this.detailimg.splice(idx, 1)
- this.form.detailimg.splice(idx, 1)
- },
- //提交资料
- submit() {
- let data = {
- orderid: this.storelist.orderid,//订单表id
- operator_name: this.operatorname,
- type_name: this.operatorname2,
- detail_img: this.form.detailimg,
- remark: this.form.describe,
- operid: this.storelist.operid,
- work_id: this.storelist.work_id,
- finance_id: this.storelist.goodid,
- farm_id: this.storelist.farm_id,
- name:this.storelist.opername
- }
- mineApi.getfinance(data)
- .then(res => {
- if (res.status === 1) {
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- setTimeout(() => {
- uni.redirectTo({
- url: '/pagesD/pages/financeoperator/financeoperator'
- })
- }, 1000)
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- }
- })
- .catch(error => {
- console.log(error, 'error')
- })
- },
- //上传Logo和农场描述附加图
- uploadlogo(num) {
- let that = this
- // #ifdef MP
- uni.chooseImage({
- count: 9,
- success: function(res) {
- res.tempFilePaths.forEach(ele => {
- that.detailimg.push(ele)
- uni.getFileSystemManager().readFile({
- filePath: ele,
- encoding: 'base64',
- success: function(ress) {
- //返回不带data:image/jpeg;base64,'头的base64格式
- let imageurl = 'data:image/jpeg;base64,' + ress
- .data;
- that.form.detailimg.push(imageurl)
- }
- })
- })
- }
- })
- // #endif
- // #ifdef APP||H5
- uni.chooseImage({
- count: 9,
- success: function(res) {
- res.tempFilePaths.forEach(ele => {
- that.detailimg.push(ele)
- pathToBase64(res.tempFilePaths[0]).then(base64 => {
- console.log(base64, "base64")
- that.form.detailimg.push(base64)
- })
- })
- },
- fail: function(res) {
- }
- })
- // #endif
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .all_box {
- // background-color: #ffffff;
- .step_bar {
- padding: 50rpx;
- padding-bottom: 80rpx;
- color: #fff;
- }
- .reason {
- background-color: #f97c00;
- color: #fff;
- line-height: 50rpx;
- padding: 0 20rpx;
- .reason_text {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- .content_box {
- padding-bottom: 20rpx;
- .farm_name_4 {
- width: 90%;
- margin-left: 2.5%;
- display: flex;
- flex-direction: column;
- // align-items: center;
- padding: 20rpx 20rpx;
- background: #fff;
- border-radius: 10upx;
- margin-top: 20rpx;
- .farm_name_7 {
- display: flex;
- justify-content: space-between;
- }
- .farm_name_5 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- image {
- width: 45rpx;
- height: 45rpx;
- }
- font-size: 32rpx;
- }
- .farm_name_6 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- color: #999;
- font-size: 26rpx;
- margin-right: 2vh;
- }
- }
- .content_detail_1 {
- width: 90%;
- margin-left: 2.5%;
- margin-top: 20rpx;
- border-radius: 10upx;
- background-color: #ffffff;
- padding: 20rpx;
- .detail_text_p1 {
- padding: 30rpx 0 0 0;
- // color: #999;
- .detail_text_p2 {
- padding: 20rpx 0;
- }
- }
- .detail_title_1 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .detail_title_p1 {
- width: 35%;
- .image {
- border-radius: 10rpx;
- width: 200rpx;
- height: 200rpx;
- }
- }
- .detail_title_p2 {
- width: 65%;
-
- .detail_title_p3 {
- padding: 20rpx 0;
- font-size: 32rpx;
- line-height: 45rpx;
- }
- .detail_title_p4 {
- margin-bottom: 20rpx;
- }
- .detail_title_p4 {
- -webkit-line-clamp: 2;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .fram_oper_1 {
- display: flex;
- flex-direction: column;
- .fram_oper_2 {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10rpx 0;
- .views1 {
- font-size: 28rpx;
- width: 20%;
- -webkit-line-clamp: 1;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- }
- }
- }
- // margin: 20rpx;
- .content_detail {
- margin: 15rpx;
- background: #fff;
- border-radius: 10upx;
- .detail_title {
- font-weight: 700;
- font-size: 30rpx;
- color: #999;
- // margin: 15rpx;
- }
- .detail_text {
- // font-size: 25rpx;
- margin-top: 20rpx;
- display: flex;
- .input {
- width: 100%;
- padding-left: 10rpx;
- height: 80rpx;
- border-radius: 5rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- border: 1rpx solid #eae8e9;
- }
- .detail_ipt {
- border: 1rpx solid #eae8e9;
- padding: 15rpx;
- width: 100%;
- .text {
- margin-bottom: 20rpx;
- }
- .detail_logo {
- margin-top: 20rpx;
- .img {
- width: 120rpx;
- height: 120rpx;
- }
- }
- .choose_img {
- margin-top: 20rpx;
- width: 120rpx;
- height: 120rpx;
- text-align: center;
- overflow: hidden;
- border: 1rpx solid #eae8e9;
- .icon_plus {
- margin: 15rpx;
- }
- }
- }
- .detail_ipt1 {
- border: 1rpx solid #eae8e9;
- padding: 15rpx;
- height: 70rpx;
- }
- .icon {
- position: absolute;
- top: 10rpx;
- right: 20rpx;
- z-index: 10;
- }
- }
- .detail_text_address {
- width: 100%;
- margin-top: 20rpx;
- height: 80rpx;
- border-radius: 5rpx;
- border: 1rpx solid #eae8e9;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .input {
- padding-left: 10rpx;
- width: 92%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .icon {}
- }
- .content_detail_img {
- display: flex;
- justify-content: space-between;
- align-items: center;
- flex-wrap: wrap;
- .detail_img {
- position: relative;
- margin-top: 10rpx;
- width: 200rpx;
- height: 200rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- border: 1rpx solid #eae8e9;
- // margin-right: 20rpx;
- .image {
- width: 200rpx;
- height: 200rpx;
- }
- .delete_img {
- position: absolute;
- top: 5rpx;
- right: 5rpx;
- }
- }
- }
- }
- .agree_terms {
- display: flex;
- justify-content: center;
- align-items: center;
- .agree_dot {
- margin-right: 10rpx;
- }
- text {
- color: #2375f4;
- }
- }
- .submit {
- font-size: 30rpx;
- color: #ffffff;
- padding: 25rpx 0;
- border-radius: 35rpx;
- text-align: center;
- width: 90%;
- margin: 20rpx auto;
- margin-bottom: 40rpx;
- }
- }
- .bor_solp {
- background-color: #999;
- height: 1rpx;
- width: 100%;
- transform: scaleY(0.3);
- margin: 25rpx 0;
- }
- .under_review {
- margin-top: 100rpx;
- text-align: center;
- image {
- width: 150rpx;
- height: 150rpx;
- }
- .text {
- margin-top: 20rpx;
- }
- }
- }
- </style>
|