Merge remote-tracking branch 'company/master'

master
Tuzki 2 years ago
commit 1004ce7613
  1. 53
      pages/traceability-code/inventory.vue
  2. 277
      pages/traceability-code/sales.vue
  3. 2
      pages/traceability-product/delivery/deliveryEdit.vue
  4. 23
      pages/traceability-product/delivery/index.vue
  5. 12
      pages/traceability-product/index.vue
  6. 20
      pages/traceability-product/loss/index.vue
  7. 14
      pages/traceability-product/machining/materialsList.vue
  8. 21
      pages/traceability-product/sales/index.vue
  9. 4
      pages/traceability-product/sales/salesEdit.vue

@ -1,6 +1,5 @@
<template>
<view class="v-pages">
<u-list @scrolltolower="scrolltolower">
<!-- 页面 溯源码头部 -->
<view class="v-pages-code">
<view class="v-code-image">
@ -36,7 +35,9 @@
</view>
</view>
<!-- 页面 列表 -->
<z-paging ref="paging" v-model="listData" :pagingStyle="padingStyle" @query="getListData">
<view class="v-pages-list v-container">
<view class="v-pages-list-item" v-for="item in listData" :key="item.id">
<!-- 页面 卡片 -->
@ -84,8 +85,7 @@
</view>
</view>
</view>
<u-loadmore :status="status"/>
</u-list>
</z-paging>
</view>
</template>
<script>
@ -99,20 +99,16 @@ export default {
},
data() {
return {
padingStyle: {
top: '0x'
},
StaticScanRecord: null,
listData: [],
loadMoreStatus: 'loadmore',
queryParams: {
pageNo: 1,
pageSize: 10,
total: null
}
}
},
mixins: [mix],
onLoad: function () {
this.getStaticScanRecord()
this.getListData()
},
methods: {
// 访
@ -124,30 +120,19 @@ export default {
}
},
//
async getListData() {
this.loadMoreStatus = 'loading';
try {
const res = await ProductApi.getTraceabilityCodePage(this.queryParams)
this.listData = [...this.listData, ...res?.data?.list];
this.queryParams.total = res?.data?.total;
if (this.queryParams.pageNo * this.queryParams.pageSize >= this.queryParams.total) {
this.loadMoreStatus = 'nomore';
} else {
this.loadMoreStatus = 'loadmore';
}
} finally {
}
},
//
scrolltolower() {
if (this.loadMoreStatus == 'loading' || this.loadMoreStatus == 'nomore') {
return;
}
this.queryParams.pageNo++;
this.getListData()
}
//
async getListData(pageNo, pageSize) {
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
}
const res = await ProductApi.getTraceabilityCodePag(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
this.$refs.paging.complete(false);
}
},
}
}
</script>

@ -1,160 +1,139 @@
<template>
<view class="v-pages">
<u-list @scrolltolower="scrolltolower">
<!-- 页面 溯源码头部 -->
<view class="v-pages-code">
<view class="v-code-image">
<image
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/8f3e86e379710985ecebf74f9c0ba7705eeb6b0c81e8af5f9abbbfea648414f7.png"
mode="widthFix"></image>
</view>
<view class="v-code-top">
<view class="text">
<text class="iconfont icon-visit text-primary m-r-mini"></text>
今日访问
</view>
<view class="number">
<text>{{ StaticScanRecord.todayScan }}</text>
</view>
</view>
<view class="v-code-data">
<view class="v-code-data-box row">
<view class="v-code-data-item col-12">
<view class="number">
<text>{{ StaticScanRecord.yesterdayScan }}</text>
</view>
<view class="text m-t-mini">昨日访问()</view>
</view>
<view class="v-code-data-item col-12">
<view class="number">
<text>{{ StaticScanRecord.totalScan }}</text>
</view>
<view class="text m-t-mini">总访问量()</view>
</view>
</view>
</view>
</view>
<view class="v-pages">
<!-- 页面 溯源码头部 -->
<view class="v-pages-code">
<view class="v-code-image">
<image
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/8f3e86e379710985ecebf74f9c0ba7705eeb6b0c81e8af5f9abbbfea648414f7.png"
mode="widthFix"></image>
</view>
<view class="v-code-top">
<view class="text">
<text class="iconfont icon-visit text-primary m-r-mini"></text>
今日访问
</view>
<view class="number">
<text>{{ StaticScanRecord.todayScan }}</text>
</view>
</view>
<view class="v-code-data">
<view class="v-code-data-box row">
<view class="v-code-data-item col-12">
<view class="number">
<text>{{ StaticScanRecord.yesterdayScan }}</text>
</view>
<view class="text m-t-mini">昨日访问()</view>
</view>
<view class="v-code-data-item col-12">
<view class="number">
<text>{{ StaticScanRecord.totalScan }}</text>
</view>
<view class="text m-t-mini">总访问量()</view>
</view>
</view>
</view>
</view>
<!-- 页面 列表 -->
<view class="v-pages-list v-container">
<view class="v-pages-list-item" v-for="item in listData" :key="item.id">
<!-- 页面 卡片 -->
<view class="v-card">
<image src="@/static/images/icon_select.svg" class="v-card-select"></image>
<!-- 卡片 内容 -->
<view class="v-card-content">
<!-- 卡片 上部 -->
<view class="v-card-top row">
<!-- 卡片 信息 -->
<view class="v-card-info col">
<view class="v-card-title row">
<text class="name col">{{ item.processingName }}</text>
</view>
<view class="v-card-state m-t-mini">
<text class="state secondary"
v-if="item.speciesName">{{ item.speciesName }}
</text>
<dict-tag class="state primary" type="source_type" :value="item.sourceType"/>
</view>
<view class="v-card-code">
<text
class="iconfont icon-code m-r-small"></text>
{{ item.traceabilityCode }}
</view>
</view>
</view>
<!-- 页面 列表 -->
<z-paging ref="paging" v-model="listData" :pagingStyle="padingStyle" @query="getListData">
<view class="v-pages-list v-container">
<view class="v-pages-list-item" v-for="item in listData" :key="item.id">
<!-- 页面 卡片 -->
<view class="v-card">
<image src="@/static/images/icon_select.svg" class="v-card-select"></image>
<!-- 卡片 内容 -->
<view class="v-card-content">
<!-- 卡片 上部 -->
<view class="v-card-top row">
<!-- 卡片 信息 -->
<view class="v-card-info col">
<view class="v-card-title row">
<text class="name col">{{ item.processingName }}</text>
</view>
<view class="v-card-state m-t-mini">
<text class="state secondary" v-if="item.speciesName">{{ item.speciesName }}
</text>
<dict-tag class="state primary" type="source_type" :value="item.sourceType" />
</view>
<view class="v-card-code">
<text class="iconfont icon-code m-r-small"></text>
{{ item.traceabilityCode }}
</view>
</view>
</view>
<!-- 卡片 下部 -->
<view class="v-card-bot">
<view class="v-page-form small row">
<view class="v-form-item col-8">
<text>类型:</text>
<dict-tag class="state"
type="sales_type" :value="item.salesType"/>
</view>
<view class="v-form-item col-12">
<text>销售时间:</text>
{{ getData(item.createTime) }}
</view>
<view class="v-form-item col-4">
<button class="v-primary-btn">分享</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status"/>
</u-list>
</view>
<!-- 卡片 下部 -->
<view class="v-card-bot">
<view class="v-page-form small row">
<view class="v-form-item col-8">
<text>类型:</text>
<dict-tag class="state" type="sales_type" :value="item.salesType" />
</view>
<view class="v-form-item col-12">
<text>销售时间:</text>
{{ getData(item.createTime) }}
</view>
<view class="v-form-item col-4">
<button class="v-primary-btn">分享</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import * as ProductApi from "@/api/traceability/product"
import mix from '@/utils/mix.js'
import DictTag from "@/components/DictTag/index"
import * as ProductApi from "@/api/traceability/product"
import mix from '@/utils/mix.js'
import DictTag from "@/components/DictTag/index"
export default {
components: {
DictTag
},
data() {
return {
StaticScanRecord: null,
listData: [],
loadMoreStatus: 'loadmore',
queryParams: {
pageNo: 1,
pageSize: 10,
total: null
}
export default {
components: {
DictTag
},
data() {
return {
padingStyle: {
top: '0x'
},
StaticScanRecord: null,
listData: [],
}
},
mixins: [mix],
onLoad: function() {
this.getStaticScanRecord()
},
methods: {
// 访
async getStaticScanRecord() {
try {
const res = await ProductApi.getStaticScanRecord("2")
this.StaticScanRecord = res.data
} finally {}
},
}
},
mixins: [mix],
onLoad: function () {
this.getStaticScanRecord()
this.getListData()
},
methods: {
// 访
async getStaticScanRecord() {
try {
const res = await ProductApi.getStaticScanRecord("2")
this.StaticScanRecord = res.data
} finally {
}
},
//
async getListData() {
this.loadMoreStatus = 'loading';
try {
const res = await ProductApi.getSaleRecordCodePage(this.queryParams)
this.listData = [...this.listData, ...res?.data?.list];
this.queryParams.total = res?.data?.total;
if (this.queryParams.pageNo * this.queryParams.pageSize >= this.queryParams.total) {
this.loadMoreStatus = 'nomore';
} else {
this.loadMoreStatus = 'loadmore';
}
} finally {
}
},
//
scrolltolower() {
if (this.loadMoreStatus == 'loading' || this.loadMoreStatus == 'nomore') {
return;
}
this.queryParams.pageNo++;
this.getListData()
}
}
}
//
async getListData(pageNo, pageSize) {
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
}
const res = await ProductApi.getSaleRecordCodePage(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
this.$refs.paging.complete(false);
}
},
}
}
</script>
<style>
</style>
</style>

@ -13,7 +13,7 @@
<view class="v-form-item">
<view class="v-form-tip delivery m-t-small"></view>
<uni-forms-item label="配送公司" name="logisticsId" required>
<picker @change="CustomChange" :value="index" :range="CustomPickerList">
<picker @change="CustomChange" :value="CurrentCustomer" :range="CustomPickerList">
<view class="uni-input" v-if="CustomPickerList[CurrentCustomer]">
{{CustomPickerList[CurrentCustomer]}}
</view>

@ -122,35 +122,26 @@
},
listData: [],
RecordName: null,
RecordData: [],
}
},
watch: {
"queryParams.processingName"(newV, oldV) {
if (newV == "") {
this.clear()
}
RecordData: [],
}
},
mixins: [mix],
methods: {
//
//
async getListData(pageNo, pageSize) {
let $this_ = this;
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
processingName: this.queryParams.processingName,
}
console.log(queryParams)
const res = await ProductApi.getDeliveryRecordPage(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
this.$refs.paging.complete(false);
}
},
},
//
openPopup(index) {
@ -168,13 +159,13 @@
search(res) {
this.$refs.paging.reload()
},
//
clear(res) {
this.queryParams.processingName = null;
this.$refs.paging.reload()
},
//
cancel(res) {
this.queryParams.processingName = null;
@ -185,4 +176,4 @@
</script>
<style>
</style>
</style>

@ -115,13 +115,6 @@
ProductName: ''
}
},
watch: {
"queryParams.processingName"(newV, oldV) {
if (newV == "") {
this.clear()
}
}
},
mixins: [mix],
onUnload() {
uni.navigateBack({
@ -152,13 +145,12 @@
//
async getListData(pageNo, pageSize) {
let $this_ = this;
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
processingName: this.queryParams.processingName,
}
}
const res = await ProductApi.getProductPage(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
@ -223,4 +215,4 @@
</script>
<style lang="scss">
</style>
</style>

@ -116,27 +116,19 @@
},
listData: [],
RecordName: null,
RecordData: [],
}
},
watch: {
"queryParams.processingName"(newV, oldV) {
if (newV == "") {
this.clear()
}
RecordData: [],
}
},
mixins: [mix],
methods: {
methods: {
//
async getListData(pageNo, pageSize) {
let $this_ = this;
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
processingName: this.queryParams.processingName,
}
}
const res = await ProductApi.getLossPage(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
@ -160,13 +152,13 @@
search(res) {
this.$refs.paging.reload()
},
//
clear(res) {
this.queryParams.processingName = null;
this.$refs.paging.reload()
},
//
cancel(res) {
this.queryParams.processingName = null;
@ -178,4 +170,4 @@
</script>
<style>
</style>
</style>

@ -58,11 +58,11 @@
return {
padingStyle: {
top: '150rpx'
},
},
Product: -1,
productList: [],
selectData: [],
saveData: [],
saveData: [],
}
},
onLoad: function(options) {
@ -72,17 +72,15 @@
this.reviceData = null;
}
},
methods: {
methods: {
//
async getListData(pageNo, pageSize) {
let $this_ = this;
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
processingName: this.queryParams.processingName,
}
console.log(queryParams)
const res = await ProductApi.getSelfOroducedProductsAndInventory(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
@ -131,13 +129,13 @@
search() {
this.$refs.paging.reload()
},
//
clear() {
this.queryParams.processingName = null;
this.$refs.paging.reload()
},
//
cancel() {
this.queryParams.processingName = null;
@ -148,4 +146,4 @@
</script>
<style>
</style>
</style>

@ -114,34 +114,25 @@
},
listData: [],
RecordName: null,
RecordData: [],
}
},
watch: {
"queryParams.processingName"(newV, oldV) {
if (newV == "") {
this.clear()
}
RecordData: [],
}
},
mixins: [mix],
methods: {
methods: {
//
async getListData(pageNo, pageSize) {
let $this_ = this;
try {
const queryParams = {
pageNo: pageNo,
pageSize: pageSize,
processingName: this.queryParams.processingName,
}
console.log(queryParams)
const res = await ProductApi.getSaleRecordPage(queryParams)
this.$refs.paging.complete(res.data.list)
} catch {
this.$refs.paging.complete(false);
}
},
},
//
openPopup(index) {
@ -159,13 +150,13 @@
search(res) {
this.$refs.paging.reload()
},
//
clear(res) {
this.queryParams.processingName = null;
this.$refs.paging.reload()
},
//
cancel(res) {
this.queryParams.processingName = null;
@ -176,4 +167,4 @@
</script>
<style>
</style>
</style>

@ -12,7 +12,7 @@
<uni-forms :modelValue="formData" ref="formRef" :label-width="120" :rules="formRules">
<view class="v-form-item">
<uni-forms-item label="客户名称" name="customId" required>
<picker @change="ClientChange" :value="index" :range="ClientPickerList">
<picker @change="ClientChange" :value="CurrenSalesType" :range="ClientPickerList">
<view class="uni-input" v-if="ClientPickerList[CurrenClient]">
{{ClientPickerList[CurrenClient]}}
</view>
@ -30,7 +30,7 @@
<input v-model="formData.phone" placeholder="请输入联系电话" />
</uni-forms-item>
<uni-forms-item label="销售类型" name="salesType" required>
<picker @change="SalesTypeChange" :value="index" :range="SalesTypePickerList">
<picker @change="SalesTypeChange" :value="CurrenSalesType" :range="SalesTypePickerList">
<view class="uni-input" v-if="SalesTypePickerList[CurrenSalesType]">
{{SalesTypePickerList[CurrenSalesType]}}
</view>

Loading…
Cancel
Save