添加页面
This commit is contained in:
@@ -99,7 +99,7 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
onLoad(_options) {
|
||||
// console.log(options);
|
||||
|
||||
this.setData({ loading: true });
|
||||
|
||||
@@ -3,18 +3,13 @@
|
||||
"search-popup": "/pages/components/search-popup/search-popup",
|
||||
"card-plugin": "/pages/components/card-plugin/card-plugin",
|
||||
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
|
||||
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
|
||||
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
|
||||
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
|
||||
"count-plugin": "/pages/components/count-plugin/count-plugin",
|
||||
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
|
||||
"t-input": "tdesign-miniprogram/input/input",
|
||||
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
|
||||
"search-input": "/pages/components/search-input/search-input",
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
|
||||
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
|
||||
"t-radio": "tdesign-miniprogram/radio/radio",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
|
||||
"search-input": "/pages/components/search-input/search-input"
|
||||
},
|
||||
"navigationBarTitleText": "销售订单"
|
||||
}
|
||||
@@ -65,7 +65,8 @@ Page({
|
||||
this.getOrderStep();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
this.data.params.order_no = e.detail.value;
|
||||
const key = getDataSet(e).key;
|
||||
this.data.params[key] = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
searchChange2(e: any) {
|
||||
@@ -76,17 +77,11 @@ Page({
|
||||
} else {
|
||||
delete this.data.params[key];
|
||||
}
|
||||
},
|
||||
onOrderStepChange(e: any) {
|
||||
this.data.params.order_step = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
onProcessStateChange(e: any) {
|
||||
this.data.params.process_state = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
onPayedStateChange(e: any) {
|
||||
this.data.params.payed_state = e.detail.value;
|
||||
onOptionChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
this.data.params[key] = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
datePickerConfirm(e: any) {
|
||||
@@ -106,25 +101,25 @@ Page({
|
||||
this.setData({ params: this.data.params });
|
||||
this.getList(1);
|
||||
},
|
||||
tabChange(e: any) {
|
||||
const state = getDataSet(e).key;
|
||||
this.data.params.state = state;
|
||||
this.getList();
|
||||
},
|
||||
paginationChange(e: any) {
|
||||
this.getList(e.detail.curr_page);
|
||||
},
|
||||
getOrderStep() {
|
||||
post('OrderStep/list').then((res: any) => {
|
||||
this.setData({ orderStep: toArray(res.data) });
|
||||
this.setData({
|
||||
orderStep: toArray(res.data).map((el) => ({
|
||||
label: el.order_step_name,
|
||||
value: el.order_step_id,
|
||||
})),
|
||||
});
|
||||
});
|
||||
},
|
||||
getList(curr: number = 1) {
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = JSON.parse(JSON.stringify(this.data.params));
|
||||
const temp = cloneLite(this.data.params);
|
||||
if (temp.order_step && temp.order_step.length) {
|
||||
temp.order_step = JSON.stringify(temp.order_step);
|
||||
temp.order_step = temp.order_step.join(',');
|
||||
} else {
|
||||
delete temp.order_step;
|
||||
}
|
||||
@@ -175,7 +170,7 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {},
|
||||
onLoad(_options) {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
||||
@@ -1,47 +1,31 @@
|
||||
<page-plugin isAuth="{{authInfo['SF_ERP_SALE_ORDERS_VIEW']}}" loading="{{loading}}"
|
||||
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
|
||||
<search-popup placeholder="输入销售单号" bind:change="searchChange" bind:ok="searchOk"
|
||||
bind:reset="searchReset" value="{{params.order_no}}">
|
||||
bind:reset="searchReset" value="{{params.order_no}}" data-key="order_no">
|
||||
<view slot="content">
|
||||
<search-input label="自定义单号" data-key="custom_order_no" bind:change="searchChange2" />
|
||||
<search-input label="经销商名称" data-key="custom_name" bind:change="searchChange2" />
|
||||
<search-input label="经销商手机" data-key="custom_phone" bind:change="searchChange2" />
|
||||
<!-- <search-input label="经销商地址" data-key="custom_address" bind:change="searchChange2" /> -->
|
||||
<search-input label="客户名称" data-key="end_user_name" bind:change="searchChange2" />
|
||||
<search-input label="客户手机" data-key="end_user_phone" bind:change="searchChange2" />
|
||||
<search-input label="客户地址" data-key="end_user_address" bind:change="searchChange2" />
|
||||
<t-cell title="订单阶段">
|
||||
<t-checkbox-group slot="note" bind:change="onOrderStepChange" value="{{params.order_step}}">
|
||||
<block wx:for="{{orderStep}}" wx:key="index">
|
||||
<t-checkbox icon="rectangle" borderless="{{true}}" block="{{false}}"
|
||||
value="{{item.order_step_id}}" style="margin-right: 16rpx;">
|
||||
{{item.order_step_name}}
|
||||
</t-checkbox>
|
||||
</block>
|
||||
</t-checkbox-group>
|
||||
</t-cell>
|
||||
<t-cell title="生产状态">
|
||||
<t-checkbox-group slot="note" bind:change="onProcessStateChange"
|
||||
value="{{params.process_state}}">
|
||||
<block wx:for="{{saleOrderProcessStateOption}}" wx:key="index">
|
||||
<t-checkbox icon="rectangle" borderless="{{true}}" block="{{false}}"
|
||||
value="{{item.value}}" style="margin-right: 16rpx;">
|
||||
{{item.label}}
|
||||
</t-checkbox>
|
||||
</block>
|
||||
</t-checkbox-group>
|
||||
</t-cell>
|
||||
<t-cell title="收款状态">
|
||||
<t-radio-group slot="note" bind:change="onPayedStateChange"
|
||||
value="{{params.payed_state || ''}}">
|
||||
<block wx:for="{{payedStateOption}}" wx:key="index">
|
||||
<t-radio borderless="{{true}}" block="{{false}}" value="{{item.value}}"
|
||||
style="margin-right: 16rpx;">
|
||||
{{item.label}}
|
||||
</t-radio>
|
||||
</block>
|
||||
</t-radio-group>
|
||||
</t-cell>
|
||||
<search-input label="自定义单号" value="{{params.custom_order_no}}" data-key="custom_order_no"
|
||||
bind:change="searchChange2" />
|
||||
<search-input label="经销商名称" value="{{params.custom_name}}" data-key="custom_name"
|
||||
bind:change="searchChange2" />
|
||||
<search-input label="经销商手机" value="{{params.custom_phone}}" data-key="custom_phone"
|
||||
bind:change="searchChange2" />
|
||||
<search-input label="客户名称" value="{{params.end_user_name}}" data-key="end_user_name"
|
||||
bind:change="searchChange2" />
|
||||
<search-input label="客户手机" value="{{params.end_user_phone}}" data-key="end_user_phone"
|
||||
bind:change="searchChange2" />
|
||||
<search-input label="客户地址" value="{{params.end_user_address}}" data-key="end_user_address"
|
||||
bind:change="searchChange2" />
|
||||
|
||||
<option-cell-plugin title="订单阶段" value="{{params.order_step}}" bind:change="onOptionChange"
|
||||
mode="checkbox" options="{{orderStep}}" data-key="order_step" />
|
||||
|
||||
<option-cell-plugin title="生产状态" value="{{params.process_state}}" bind:change="onOptionChange"
|
||||
mode="checkbox" data-key="process_state" options="{{saleOrderProcessStateOption}}" />
|
||||
|
||||
<option-cell-plugin title="收款状态" value="{{params.payed_state || ''}}"
|
||||
bind:change="onOptionChange" mode="radio" options="{{payedStateOption}}"
|
||||
data-key="payed_state" />
|
||||
|
||||
<date-picker-plugin title="单据开始日期" value="{{params.document_dateL}}" data-key="document_dateL"
|
||||
bind:confirm="datePickerConfirm" />
|
||||
<date-picker-plugin title="单据结束日期" value="{{params.document_dateU}}" data-key="document_dateU"
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
view.t-cell__title-text {
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user