wangfukang 3 years ago
parent
commit
b332bf4bde
  1. BIN
      pages/.DS_Store
  2. 65
      pages/index/feedBack.vue
  3. 11
      pages/index/index.vue
  4. 3
      pages/inventory/addGoods.vue
  5. 2
      pages/rebate/rebateShare.vue
  6. 19
      pages/staff/clock/clock.vue
  7. 58
      pages/staff/signRule/signRule.vue

BIN
pages/.DS_Store

Binary file not shown.

65
pages/index/feedBack.vue

@ -3,15 +3,15 @@
<view>
<view class="formBox">
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px">
<uni-forms-item label="图片" name="productPicture">
<uni-forms-item label="问题图片" name="productPicture">
<view v-if="formData.productPicture !=''">
<img :src="formData.productPicture" alt="" class="upload-img">
</view>
<u-upload :fileList="formData.productPicture" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1"></u-upload>
</uni-forms-item>
<uni-forms-item label="描述" name="productIntro">
<uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请简要说明问题"
<uni-forms-item label="问题说明" name="productIntro">
<uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请简要描述问题"
trim="all" />
</uni-forms-item>
</uni-forms>
@ -19,6 +19,7 @@
<u-button type="primary" @tap.stop="submit()">保存</u-button>
</view>
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
</view>
</template>
@ -26,11 +27,28 @@
export default {
data() {
return {
fileList1: [],
formData: {
productPicture: [],
productIntro: ''
},
categoryList: [],
productId:'',
arrtList: [],
arrtChange: [],
dataList:[],
rules: {
productIntro: {
rules: [{
required: true,
errorMessage: '请简要描述问题',
}, ],
}
}
}
},
onLoad(option) {
},
methods: {
// 删除图片
@ -42,7 +60,8 @@
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
if (this.formData.productPicture == undefined) this.formData.productPicture = [];
if (this.formData.productPicture == undefined) this.formData.productPicture = [];
console.log(this[`fileList${event.name}`])
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
@ -84,22 +103,22 @@
}
});
})
},
categoryChange(e) {
},
// 触发提交表单
submit() {
let that = this;
let url = ''
this.$refs.form.validate().then(res => {
if(that.dataList !=''){
url = '/app/product/edit'
res.id = that.dataList.id
}else{
url = '/app/product/save'
}
that.tui.request(url, "post", res, false, false).then((res1) => {
this.$refs.form.validate().then(res => {
that.tui.request('/app/problemFeedback/saveOrUpdateProblemFeedback', "post", {
problemPicture:that.formData.productPicture,
problemContent:that.formData.productIntro
}, false, false).then((res1) => {
if (res1.code == 200) {
uni.navigateBack({
delta: 2
delta: 2
})
} else {
uni.showToast({
@ -123,6 +142,26 @@
border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
background-color: #fff;
.uni-data-select {
width: 100%;
}
.attrs {
text {
display: inline-block;
border: 1px solid $u-primary;
padding: 7px 20rpx;
margin: 20rpx;
background-color: #fff;
color: $u-primary;
}
.checkedText {
background-color: $u-primary;
color: #fff;
}
}
}
.upload-img{
width: 160rpx;

11
pages/index/index.vue

@ -205,13 +205,14 @@
// },
onShow() {
this.shopName = uni.getStorageSync('shopName')
this.type = uni.getStorageSync('type')
this.type = uni.getStorageSync('type')
this.getSaleInfo()
this.getServerData();
this.getOrderInfoList();
this.getWaitCount()
},
onLoad() {
this.getSaleInfo()
this.getServerData();
this.getOrderInfoList();
this.getWaitCount()
},
methods: {
getWaitCount() {

3
pages/inventory/addGoods.vue

@ -151,7 +151,8 @@
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
if (this.formData.productPicture == undefined) this.formData.productPicture = [];
if (this.formData.productPicture == undefined) this.formData.productPicture = [];
console.log(this[`fileList${event.name}`])
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {

2
pages/rebate/rebateShare.vue

@ -43,7 +43,7 @@
.content {
width: 100%;
height: 100%;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/abdc5c897c4f4fe198b74091a708030b.jpg') no-repeat;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/352c2490d88b47ac84bf13bfa046abcf.png') no-repeat;
background-size: cover;
background-position: center;
overflow: hidden;

19
pages/staff/clock/clock.vue

@ -40,8 +40,7 @@
</view>
</template>
<script>
import amap from '../../../common/ossutil/amap-wx.130.js'
<script>
import {
mapState
} from 'vuex'
@ -75,15 +74,15 @@
})
},
onClock() {
const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' })
amapObject.getRegeo({
success: (res) => {
},
fail: (err) => {
uni.getLocation({
type: 'wgs84',
isHighAccuracy:true,
accuracy:'best',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
})
});
// if (!this.isClock) {
// this.tui.request("/app/clockIn/", "get", {
// userId: this.userId

58
pages/staff/signRule/signRule.vue

@ -13,9 +13,13 @@
<view class="uni-input">{{addForm.endTime}}</view>
</picker>
</uni-forms-item>
<uni-forms-item label="定位" required>
<uni-forms-item label="定位" name="latitude" required>
<input type="text" v-model="addForm.latitude + ','+addForm.longitude" style="text-align:center;width:70%;border: 1px solid #eee;height: 72rpx;line-height: 72rpx !important;" disabled placeholder="获取位置用于员工打卡">
<view class="dw-btn" @tap="clockPosi">一键定位</view>
</uni-forms-item>
<uni-forms-item label="打卡范围" name="categoryId" required>
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择打卡范围"></uni-data-select>
</uni-forms-item>
</uni-forms>
<u-button type="primary" @click="onFormSubmit">保存</u-button>
@ -23,8 +27,7 @@
</view>
</template>
<script>
import amap from '../../../common/ossutil/amap-wx.130.js'
<script>
export default {
data() {
return {
@ -32,7 +35,32 @@
startTime: '06:00',
endTime: '14:00',
latitude:'',
longitude:''
longitude:'',
categoryId: '',
},
categoryList: [{
value: 1,
text: '100米'
},{
value: 2,
text: '200米'
},{
value: 3,
text: '500米'
}],
rules: {
categoryId: {
rules: [{
required: true,
errorMessage: '请选择打卡范围',
}],
},
latitude: {
rules: [{
required: true,
errorMessage: '请定位店铺位置',
}],
}
}
}
},
@ -44,16 +72,17 @@
this.time = e.detail.value;
},
clockPosi(){
const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' })
amapObject.getRegeo({
success: (res) => {
this.addForm.latitude = res[0].latitude
this.addForm.longitude = res[0].longitude
},
fail: (err) => {
let that = this;
uni.getLocation({
type: 'wgs84',
isHighAccuracy:true,
accuracy:'best',
success: function (res) {
console.log(res)
that.addForm.latitude = res.latitude
that.addForm.longitude = res.longitude
}
})
});
},
onFormSubmit() {
this.$refs.addForm.validate().then(async () => {
@ -106,5 +135,8 @@
text-align: center;
background: #088FEB;
color: #fff;
}
.uni-data-select {
width: 100%;
}
</style>
Loading…
Cancel
Save