diff --git a/App.vue b/App.vue
index 1733aa7..dfc3bf5 100644
--- a/App.vue
+++ b/App.vue
@@ -10,8 +10,7 @@
}
},
onLaunch() {
- //登录
- //登录
+ //登录
uni.setStorageSync('isAuth',true)
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
diff --git a/components/tabbar/tabbar.vue b/components/tabbar/tabbar.vue
index e6b9bcc..cf9ad08 100644
--- a/components/tabbar/tabbar.vue
+++ b/components/tabbar/tabbar.vue
@@ -29,10 +29,18 @@
BASE_IMG_URL:BASE_IMG_URL,
tablist:[
{
- pagePath: "/pages/index/contract/contract",
+ pagePath: "/pages/index/productSelect/productSelect",
iconPath: "https://hls.huhakeji.top/uploads/20260108/46d0feeaa65e6c2dbd47054fc333c467.png",
selectedIconPath: "https://hls.huhakeji.top/uploads/20260108/8cab46fc021348dc5cd7b2177206cb8a.png",
- text: "采购",
+ text: "首页",
+ isTip:true,
+ num:0
+ },
+ {
+ pagePath: "/pages/index/contract/contract",
+ iconPath: BASE_IMG_URL+"tab1.png",
+ selectedIconPath: BASE_IMG_URL+"tab1_a.png",
+ text: "订单",
isTip:true,
num:0
},
@@ -44,14 +52,14 @@
// isTip:true,
// num:0
// },
- {
- pagePath: "/pagesA/crm/customerManagement/customerManagement",
- iconPath: BASE_IMG_URL+"tab2.png",
- selectedIconPath: BASE_IMG_URL+"tab2_a.png",
- text: "门店",
- isTip:true,
- num:0
- },
+ // {
+ // pagePath: "/pagesA/crm/customerManagement/customerManagement",
+ // iconPath: BASE_IMG_URL+"tab2.png",
+ // selectedIconPath: BASE_IMG_URL+"tab2_a.png",
+ // text: "门店",
+ // isTip:true,
+ // num:0
+ // },
{
pagePath: "/pages/news/news",
iconPath: BASE_IMG_URL+"tab3.png",
diff --git a/manifest.json b/manifest.json
index cc1b10f..e616106 100644
--- a/manifest.json
+++ b/manifest.json
@@ -82,7 +82,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wxf2b7106cda55602b",
+ "appid" : "wxc4898617fbf7ab19",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/package-lock.json b/package-lock.json
index 661c793..d1b284e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,6 +14,70 @@
"vue-jsonp": "^2.0.0"
}
},
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.6.tgz",
+ "integrity": "sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/types": "^7.28.6"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.6.tgz",
+ "integrity": "sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@vue/compiler-sfc": {
+ "version": "2.7.16",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
+ "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.23.5",
+ "postcss": "^8.4.14",
+ "source-map": "^0.6.1"
+ },
+ "optionalDependencies": {
+ "prettier": "^1.18.2 || ^2.0.0"
+ }
+ },
"node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -50,6 +114,13 @@
"resolved": "https://registry.npmjs.org/bmaplib.texticonoverlay/-/bmaplib.texticonoverlay-1.0.2.tgz",
"integrity": "sha512-4ZTWr4ZP3B6qEWput5Tut16CfZgII38YwM3bpyb4gFTQyORlKYryFp9WHWrwZZaHlOyYDAXG9SX0hka43jTADg=="
},
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/dingtalk-jsapi": {
"version": "2.15.6",
"resolved": "https://registry.npmjs.org/dingtalk-jsapi/-/dingtalk-jsapi-2.15.6.tgz",
@@ -91,11 +162,103 @@
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/postcss": {
+ "version": "8.5.6",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "nanoid": "^3.3.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
"node_modules/promise-polyfill": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-7.1.2.tgz",
"integrity": "sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ=="
},
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "license": "BSD-3-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
@@ -106,6 +269,18 @@
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
+ "node_modules/vue": {
+ "version": "2.7.16",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz",
+ "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
+ "deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-sfc": "2.7.16",
+ "csstype": "^3.1.0"
+ }
+ },
"node_modules/vue-baidu-map": {
"version": "0.21.22",
"resolved": "https://registry.npmjs.org/vue-baidu-map/-/vue-baidu-map-0.21.22.tgz",
diff --git a/pages.json b/pages.json
index 5cdaac7..3efc983 100644
--- a/pages.json
+++ b/pages.json
@@ -3,6 +3,14 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
+ {
+ "path": "pages/index/productSelect/productSelect",
+ "style": {
+ "navigationBarTitleText": "选择商品",
+ "navigationBarBackgroundColor": "#008EFF",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/index/contract/contract",
"style": {
@@ -141,13 +149,13 @@
"navigationBarTitleText": "编辑费用"
}
},
- {
- "path": "pages/index/contract/contract",
- "style": {
- "navigationBarTitleText": "采购列表",
- "navigationBarBackgroundColor": "#008EFF"
- }
- },
+ // {
+ // "path": "pages/index/contract/contract",
+ // "style": {
+ // "navigationBarTitleText": "采购列表",
+ // "navigationBarBackgroundColor": "#008EFF"
+ // }
+ // },
{
"path": "pages/examine/examine",
"style": {
diff --git a/pages/index/productSelect/productSelect.vue b/pages/index/productSelect/productSelect.vue
new file mode 100644
index 0000000..fcef85b
--- /dev/null
+++ b/pages/index/productSelect/productSelect.vue
@@ -0,0 +1,478 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.num }}
+
+
+
+
+
+
+
+ 单位:{{ item.unit }}
+ 零售价:¥{{ item.price }}
+ 批发价:¥{{ item.wholesale }}
+
+ 数量
+
+ { changeNumber(e, index) }">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 全选
+
+ 已选{{ selectArr.length }}项
+
+
+ 确认选择
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/public/login.vue b/pages/public/login.vue
index 6c87b7a..d65414b 100644
--- a/pages/public/login.vue
+++ b/pages/public/login.vue
@@ -197,7 +197,7 @@
uni.setStorageSync('userinfo',res.data.userinfo)
uni.setStorageSync('token',res.data.userinfo.token)
uni.redirectTo({
- url:'/pages/index/index'
+ url:'/pages/index/productSelect/productSelect'
})
}
}
diff --git a/pagesA/crm/contract/contract.vue b/pagesA/crm/contract/contract.vue
index 610e156..07d3453 100644
--- a/pagesA/crm/contract/contract.vue
+++ b/pagesA/crm/contract/contract.vue
@@ -38,7 +38,7 @@
@changeData="changeOtherData">
-
+
购买产品
+添加产品
@@ -221,6 +221,7 @@ export default {
businessObj: {}, //关联商机
business_id: '',
isRequired: false, //是否只展示必填字段
+ fromProductSelect: false, //是否从商品选择页面进入
}
},
onLoad(options) {
@@ -236,6 +237,11 @@ export default {
//获取产品信息
this.getBusinessProduct()
}
+ // 从商品选择页面进入
+ if (options.fromProductSelect == '1') {
+ this.fromProductSelect = true
+ this.loadSelectedProducts()
+ }
this.getNumber()
//获取客户 列表
this.getCustomerList()
@@ -245,6 +251,26 @@ export default {
this.getdisType()
},
methods: {
+ // 加载从商品选择页面传来的商品
+ loadSelectedProducts() {
+ try {
+ const productsStr = uni.getStorageSync('selectedProducts')
+ if (productsStr) {
+ const products = JSON.parse(productsStr)
+ products.forEach(ele => {
+ ele.minprice = ele.price
+ ele.parts = []
+ ele.remark = ele.remark || ''
+ })
+ this.productList = products
+ this.handleTotalMoney()
+ // 清除缓存
+ uni.removeStorageSync('selectedProducts')
+ }
+ } catch (e) {
+ console.error('加载商品失败', e)
+ }
+ },
//切换是否只展示必填字段
changeRequired(e) {
this.isRequired = e.detail.value
@@ -629,8 +655,9 @@ export default {
duration: 2000
})
setTimeout(() => {
- uni.navigateBack({
- delta: 1
+ // 跳转到订单列表页面
+ uni.redirectTo({
+ url: '/pages/index/contract/contract'
})
}, 2000)
})