diff --git a/components/listWrap.vue b/components/listWrap.vue
new file mode 100644
index 0000000..03432c2
--- /dev/null
+++ b/components/listWrap.vue
@@ -0,0 +1,169 @@
+
+
+
+
+ {{ item.coin_name }}
+
+
+ {{ item.buying_price }}元{{ type == '2' ?'进':'' }}
+ {{ item.price }}元售
+
+
+
+
+
+
+
+ {{ item.year }}
+ {{ item.format }}
+
+ {{ item.rating_department }}
+
+
+
+ {{ item.operate_time }}
+ {{ item.rating_code }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/visitorInfo.vue b/components/visitorInfo.vue
index 1a911de..96b380d 100644
--- a/components/visitorInfo.vue
+++ b/components/visitorInfo.vue
@@ -65,7 +65,7 @@ export default {
.user-info-com {
font-family: PingFang SC;
.user-info {
- margin: 0 18rpx 20rpx;
+ margin: 0 18rpx 0rpx;
background: #FFFFFF;
padding: 34rpx 24rpx 44rpx;
position: relative;
diff --git a/pages.json b/pages.json
index de6b1d8..8bcf631 100644
--- a/pages.json
+++ b/pages.json
@@ -19,6 +19,16 @@
"titleNView": false
}
}
+ },
+ {
+ "path": "pages/searchCoinName/index",
+ "style": {
+ "navigationBarTitleText": "搜索钱币信息",
+ "enablePullDownRefresh": true,
+ "app-plus": {
+ "titleNView": false
+ }
+ }
}
],
diff --git a/pages/coinsDetail/index.vue b/pages/coinsDetail/index.vue
index 9918e89..6e407fe 100644
--- a/pages/coinsDetail/index.vue
+++ b/pages/coinsDetail/index.vue
@@ -1,10 +1,58 @@
-
-
+
+
+
+
+
+
+ {{ textObj[detailItem.ancient_coin_status] }}
+ 进价 {{ detailItem.buying_price }}元
+
+ 历史:
+ {{ detailItem.buying_price }}元进
+
+ {{ detailItem.price }}元售
+
+
+
+
+
+ 元
+
+
+
+
+
+ 售价
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+ 进价
+
+
+
+
+ 元
+
+
+
+
+
+
@@ -25,37 +73,57 @@ import VisitorInfo from '@/components/visitorInfo.vue';
export default {
name: "coinsDetail",
- props:['scanCodeDetail'],
+ props: ['scanCodeDetail'],
components: {
VisitorInfo,
ListBox
},
data() {
return {
+ textObj:{
+ 0:'进价:',
+ '1':'售价:',
+ '2':'再次入库价:',
+ },
+ cssUrl: this.cssUrl1,
visitorInfo: {},
- id:'',
+ id: '',
detailItem: {},
- scan_code_detail:''
+ scan_code_detail: '',
+ price: '',
+ buying_price:'',
+ price2:'',
+ isFocus:false
+ }
+ },
+ computed: {
+ price2Length() {
+ return this.price2.length
}
},
watch: {
scanCodeDetail(newVal, oldVal) {
- this.detailItem = {...newVal}//更新
+ this.detailItem = { ...newVal }//更新
}
},
- mounted(){
- if(this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0){
- this.detailItem = {...this.scanCodeDetail}
+ mounted() {
+ if (this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0) {
+ this.detailItem = { ...this.scanCodeDetail }
}
- },
+
+ },
onLoad(options) {
// console.log(options,'this.$route.query-=',this.scanCodeDetail);
- const {id} = options;
- // 跳转详情页
- if(id){
+ const { id } = options;
+ // 跳转详情页
+ if (id) {
this.id = id;
let detailItem = uni.getStorageSync('detail')
- if (detailItem)this.detailItem = JSON.parse(detailItem)
+ if (detailItem) this.detailItem = JSON.parse(detailItem)
+ this.price = this.detailItem.price;
+ // this.price1 = this.detailItem.price1 || ''
+ this.buying_price = this.detailItem.buying_price;
+
}
// else{
// // 扫描后的弹出框信息
@@ -63,14 +131,191 @@ export default {
// this.detailItem = {...this.scanCodeDetail}
// }
},
+ methods:{
+ updatePrice(type){
+ let params={
+ scan_code_detail:JSON.stringify({...this.detailItem}),
+ rating_code:this.detailItem.rating_code,
+ rating_agency_id:this.detailItem.rating_agency_id
+ }
+ if(type == 'buying_price'){
+ params.buying_price = this.buying_price;
+ }else{
+ params.price = this.price;
+ }
+ this.$http.req('/api/update_price', {
+ ...params
+ }, 'POST').then(data => {
+ if (data == -1) return
+ this.$pop.modelShow(data.msg)
+
+ }).catch(res => {
+ });
+ }
+ }
};
\ No newline at end of file
diff --git a/static/images/form_edit.png b/static/images/form_edit.png
new file mode 100644
index 0000000..c4ebb8f
Binary files /dev/null and b/static/images/form_edit.png differ
diff --git a/static/images/prescriptSearch.svg b/static/images/prescriptSearch.svg
new file mode 100644
index 0000000..af867a0
--- /dev/null
+++ b/static/images/prescriptSearch.svg
@@ -0,0 +1 @@
+
\ No newline at end of file