first commit
This commit is contained in:
15
pages/deal/saleOrder/kanban/from/printTag/printTag.acss
Normal file
15
pages/deal/saleOrder/kanban/from/printTag/printTag.acss
Normal file
@@ -0,0 +1,15 @@
|
||||
.checkbox {
|
||||
display: block;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
/* 卡片边框颜色 */
|
||||
border: 1px solid #161515;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
background-color: #ffffff;
|
||||
}
|
||||
20
pages/deal/saleOrder/kanban/from/printTag/printTag.axml
Normal file
20
pages/deal/saleOrder/kanban/from/printTag/printTag.axml
Normal file
@@ -0,0 +1,20 @@
|
||||
<view class="page">
|
||||
<view class="page-description">多项选择器</view>
|
||||
<form onSubmit="onSubmit" onReset="onReset">
|
||||
<view class="page-section">
|
||||
<view class="page-section-title">选择你用过的框架:</view>
|
||||
<view class="page-section-demo">
|
||||
<checkbox-group onChange="onChange" name="libs">
|
||||
<label class="checkbox order-item" a:for="{{items}}" key="label-{{index}}">
|
||||
<checkbox value="{{item.id}}" checked="{{item.checked}}" disabled="{{item.disabled}}" />
|
||||
<text class="checkbox-text">货号:{{item.name}} 色号:{{item.color_id_2[1]}} 细码:{{item.fineCode3Names}}</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="page-section-btns">
|
||||
<view><button type="ghost" size="mini">重置</button></view>
|
||||
<view><button type="primary" size="mini" formType="submit">提交</button></view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
113
pages/deal/saleOrder/kanban/from/printTag/printTag.js
Normal file
113
pages/deal/saleOrder/kanban/from/printTag/printTag.js
Normal file
@@ -0,0 +1,113 @@
|
||||
Page({
|
||||
data: {
|
||||
items: []
|
||||
},
|
||||
onLoad(query) {
|
||||
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
|
||||
dd.getStorage({
|
||||
key: 'saleOrderlines',
|
||||
success: (res) => {
|
||||
const selectedOrder = res.data;
|
||||
const orderLinesoptions = selectedOrder.orderLines;
|
||||
this.setData({
|
||||
items: orderLinesoptions
|
||||
});
|
||||
console.log('从本地存储获取到的数据:', selectedOrder);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('从本地存储获取数据失败:', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady() {
|
||||
// 页面加载完成
|
||||
},
|
||||
onShow() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload() {
|
||||
// 页面被关闭
|
||||
},
|
||||
onTitleClick() {
|
||||
// 标题被点击
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// 页面被下拉
|
||||
},
|
||||
onReachBottom() {
|
||||
// 页面被拉到底部
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: 'My App',
|
||||
desc: 'My App description',
|
||||
path: 'pages/index/index'
|
||||
};
|
||||
},
|
||||
onSubmit(e) {
|
||||
console.log('onSubmit', e);
|
||||
const selectedIds = e.detail.value.libs.map(Number); // 将 selectedIds 中的元素转换为数字类型
|
||||
console.log('选中的 ID:', selectedIds);
|
||||
|
||||
if (selectedIds.length === 0) {
|
||||
console.log('未选中任何 ID,清空本地缓存');
|
||||
dd.removeStorage({
|
||||
key: 'selectedSaleOrderLines',
|
||||
success: () => {
|
||||
console.log('本地缓存 selectedSaleOrderLines 已清空');
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('清空本地缓存 selectedSaleOrderLines 失败:', err);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const saleOrderLines = this.data.items;
|
||||
console.log('所有销售订单行数据:', saleOrderLines);
|
||||
|
||||
const selectedItems = saleOrderLines.filter(line => selectedIds.includes(line.id));
|
||||
const selectedSaleOrderLines = {
|
||||
selectedItems
|
||||
};
|
||||
console.log('选中的销售订单行记录:', selectedItems);
|
||||
|
||||
dd.setStorage({
|
||||
key: 'selectedSaleOrderLines',
|
||||
data: selectedSaleOrderLines,
|
||||
success: () => {
|
||||
console.log('选中的销售订单行记录已保存到本地存储:', selectedItems);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('保存选中的销售订单行记录到本地存储失败:', err);
|
||||
}
|
||||
});
|
||||
dd.reLaunch({
|
||||
url: "/pages/deal/saleOrder/kanban/from/printTag/printTemplate/printTemplate",
|
||||
success () {
|
||||
// 导航成功的回调函数
|
||||
console.log("导航成功");
|
||||
},
|
||||
fail: function (err) {
|
||||
// 导航失败的回调函数
|
||||
console.error("导航失败", err);
|
||||
},
|
||||
complete: function () {
|
||||
// 导航结束的回调函数(无论成功或失败都会执行)
|
||||
console.log("导航操作结束");
|
||||
}
|
||||
});
|
||||
// my.alert({
|
||||
// content: `你选择的框架是 ${selectedIds.join(', ')}`,
|
||||
// });
|
||||
},
|
||||
onReset(e) {
|
||||
console.log('onReset', e);
|
||||
},
|
||||
onChange(e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
3
pages/deal/saleOrder/kanban/from/printTag/printTag.json
Normal file
3
pages/deal/saleOrder/kanban/from/printTag/printTag.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,54 @@
|
||||
Page({
|
||||
data: {
|
||||
switch1: '',
|
||||
switch2: '',
|
||||
switch3: '',
|
||||
switch4: '',
|
||||
iconType: [
|
||||
'cancel',
|
||||
],
|
||||
// 'success',连接成功打勾
|
||||
// 'info', 感叹号
|
||||
// 'warn', 黄色感叹号
|
||||
// 'waiting',时钟
|
||||
// 'clear',打叉
|
||||
// 'success_no_circle',打勾
|
||||
// 'download',下载
|
||||
// 'cancel',打叉
|
||||
// 'search',搜索
|
||||
array: ['TSPL', 'ZPL', 'CPCL', 'ESC/POS'],
|
||||
value: {},
|
||||
printdata: {},
|
||||
blueoptions: [],
|
||||
deviceId: '',
|
||||
connected: false,
|
||||
devices: [],
|
||||
showDeviceList: false,
|
||||
currentDeviceServices: [],
|
||||
currentDeviceCharacteristics: [],
|
||||
hasLocation: false,
|
||||
location: {},
|
||||
deviceCount: 0,
|
||||
targetDeviceId: 'DC:0D:30:63:9E:0E',
|
||||
isSearching: true,
|
||||
printFormat: 'TSPL',
|
||||
maxAllowedLength: 1024,
|
||||
delayTime: 5000, // 默认延迟 5 秒,单位:毫秒
|
||||
paperSize: {
|
||||
width: 80, // 默认宽度 80mm
|
||||
height: 60 // 默认高度 60mm
|
||||
},
|
||||
index: 0 //指令集默认选择
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
const selectedSaleOrderLines = dd.getStorageSync({
|
||||
key: 'selectedSaleOrderLines'
|
||||
}).data;
|
||||
const printdata = selectedSaleOrderLines || {};
|
||||
this.setData({
|
||||
printdata
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
.cart-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.cart-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background-color: #ff5722;
|
||||
color: #fff;
|
||||
padding: 20px 50px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view>
|
||||
<rich-text nodes="{{nodes}}" onTap="tap"></rich-text>
|
||||
</view>
|
||||
|
||||
<view class="cart-bottom">
|
||||
<view class="cart-info">
|
||||
</view>
|
||||
<navigator
|
||||
open-type="navigate"
|
||||
url="/pages/deal/saleOrder/kanban/saleOrderKanban"
|
||||
class="confirm-button"
|
||||
>
|
||||
返回
|
||||
</navigator>
|
||||
<navigator
|
||||
open-type="navigate"
|
||||
url="/pages/deal/saleOrder/kanban/from/printTag/printTemplate/bluetooth/bluetooth"
|
||||
class="confirm-button"
|
||||
>
|
||||
确认
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,55 @@
|
||||
|
||||
|
||||
Page({
|
||||
data: {
|
||||
nodes: [{
|
||||
name: 'div',
|
||||
attrs: {
|
||||
class: 'wrapper',
|
||||
style: 'color: orange;',
|
||||
},
|
||||
children: [{
|
||||
type: 'text',
|
||||
text: 'Hello World! 拖拉设计打印模板待开发',
|
||||
}],
|
||||
}],
|
||||
},
|
||||
onLoad(query) {
|
||||
// 页面加载
|
||||
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
|
||||
},
|
||||
onReady() {
|
||||
// 页面加载完成
|
||||
},
|
||||
onShow() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload() {
|
||||
// 页面被关闭
|
||||
},
|
||||
onTitleClick() {
|
||||
// 标题被点击
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// 页面被下拉
|
||||
},
|
||||
onReachBottom() {
|
||||
// 页面被拉到底部
|
||||
},
|
||||
onShareAppMessage() {
|
||||
// 返回自定义分享信息
|
||||
return {
|
||||
title: 'My App',
|
||||
desc: 'My App description',
|
||||
path: 'pages/index/index',
|
||||
};
|
||||
},
|
||||
//
|
||||
tap() {
|
||||
console.log('tap');
|
||||
},
|
||||
//
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
26
pages/deal/saleOrder/kanban/from/saleOrderFrom.acss
Normal file
26
pages/deal/saleOrder/kanban/from/saleOrderFrom.acss
Normal file
@@ -0,0 +1,26 @@
|
||||
.cart-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.cart-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background-color: #ff5722;
|
||||
color: #fff;
|
||||
padding: 20px 50px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
203
pages/deal/saleOrder/kanban/from/saleOrderFrom.axml
Normal file
203
pages/deal/saleOrder/kanban/from/saleOrderFrom.axml
Normal file
@@ -0,0 +1,203 @@
|
||||
<!-- components/BasicInfoTab/BasicInfoTab.aml -->
|
||||
<view>
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">客户</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{selectedOrder.partner_id[1]}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">地址</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">销售日期</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{selectedOrder.date_order}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">计划收款日期</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">送货日期</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">默认仓库</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">业务员</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{selectedOrder.user_id[1]}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">销售单号</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{selectedOrder.name}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view>
|
||||
<tag>税率</tag>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">订单金额</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{selectedOrder.orde_ddje}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">优惠金额</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">合同金额</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<view class="page-section">
|
||||
<picker >
|
||||
<view class="form-row">
|
||||
<view class="form-row-label">非产品费用</view>
|
||||
<input
|
||||
name="databaseName"
|
||||
class="form-row-content"
|
||||
value="{{}}"
|
||||
placeholder="预留位置等待开发修改销售单数据"
|
||||
/>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="cart-bottom">
|
||||
<view class="cart-info">
|
||||
</view>
|
||||
<navigator
|
||||
open-type="navigate"
|
||||
url="/pages/deal/saleOrder/kanban/saleOrderKanban"
|
||||
class="confirm-button"
|
||||
>
|
||||
确认
|
||||
</navigator>
|
||||
<navigator
|
||||
open-type="navigate"
|
||||
url="/pages/deal/saleOrder/kanban/from/printTag/printTag"
|
||||
class="confirm-button"
|
||||
>
|
||||
打印
|
||||
</navigator>
|
||||
</view>
|
||||
55
pages/deal/saleOrder/kanban/from/saleOrderFrom.js
Normal file
55
pages/deal/saleOrder/kanban/from/saleOrderFrom.js
Normal file
@@ -0,0 +1,55 @@
|
||||
Page({
|
||||
data: {
|
||||
selectedOrder:{}
|
||||
},
|
||||
onLoad(query) {
|
||||
// 页面加载
|
||||
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
|
||||
const objectKey = query.objectKey;
|
||||
if (objectKey) {
|
||||
dd.getStorage({
|
||||
key: objectKey,
|
||||
success: (res) => {
|
||||
const selectedOrder = res.data;
|
||||
this.setData({
|
||||
selectedOrder
|
||||
});
|
||||
console.log('从本地存储获取到的数据:', selectedOrder);
|
||||
// 在这里可以对 selectedOrder 进行进一步处理
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('从本地存储获取数据失败:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// 页面加载完成
|
||||
},
|
||||
onShow() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload() {
|
||||
// 页面被关闭
|
||||
},
|
||||
onTitleClick() {
|
||||
// 标题被点击
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// 页面被下拉
|
||||
},
|
||||
onReachBottom() {
|
||||
// 页面被拉到底部
|
||||
},
|
||||
onShareAppMessage() {
|
||||
// 返回自定义分享信息
|
||||
return {
|
||||
title: 'My App',
|
||||
desc: 'My App description',
|
||||
path: 'pages/index/index',
|
||||
};
|
||||
},
|
||||
});
|
||||
3
pages/deal/saleOrder/kanban/from/saleOrderFrom.json
Normal file
3
pages/deal/saleOrder/kanban/from/saleOrderFrom.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
Reference in New Issue
Block a user