diff --git a/src/purp/pp/supplierprice/constance/index.js b/src/purp/pp/supplierprice/constance/index.js
new file mode 100644
index 00000000..b16d07ca
--- /dev/null
+++ b/src/purp/pp/supplierprice/constance/index.js
@@ -0,0 +1,93 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 供应商价目表常量
+ * @Date: 2018-04-23 19:40:59
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-01-05 20:13:03
+ */
+
+/**
+ * 请求地址
+ */
+const URL = {
+ save: '/nccloud/purp/supplierprice/save.do',
+ edit: '/nccloud/purp/supplierprice/edit.do',
+ delete: '/nccloud/purp/supplierprice/delete.do',
+ query: '/nccloud/purp/supplierprice/query.do',
+ queryByPk: '/nccloud/purp/supplierprice/queryByPk.do',
+ assgin: '/nccloud/purp/supplierprice/assign.do',
+ afterEdit: '/nccloud/purp/supplierprice/afterEdit.do',
+ orgChange: '/nccloud/purp/supplierprice/orgChange.do',
+ fixRate: '/nccloud/pu/arrival/fixRate.do',
+ print: '/nccloud/purp/supplierprice/print.do',
+ excel: '/nccloud/purp/supplierprice/excel.do'
+};
+
+const ROOT = '#app';
+/**
+ * 区域编码
+ */
+const AREA = {
+ listTable: 'listTable',
+ searchArea: 'searchArea'
+};
+
+// 页面模板编码
+const PAGECODE = {
+ listPagecode: '400500000_list',
+ appcode: '400500000' // 应用编码
+};
+
+/**
+ * 页面状态
+ */
+const STATUS = {
+ edit: 'edit',
+ browse: 'browse'
+};
+
+const PAGEID = '400500000_list';
+
+const COMMON = {
+ oid: '1001Z81000000000AJRY'
+};
+
+const BUTTONAREA = {
+ listhead: 'list_head',
+ listinner: 'list_inner'
+};
+
+const ALLBUTTONS = [
+ 'Add',
+ 'Edit',
+ 'Export',
+ 'Import',
+ 'Assign',
+ 'Delete',
+ 'Save',
+ 'Cancel',
+ 'Print',
+ 'Output',
+ 'Refresh',
+ 'PrintPop',
+ 'ExportImport'
+];
+const BROWSEBUTTONS = [
+ 'Add',
+ 'Edit',
+ 'Delete',
+ 'Export',
+ 'Import',
+ 'Assign',
+ 'ExportImport',
+ 'Refresh',
+ 'PrintPop',
+ 'Print',
+ 'Output'
+];
+const EDITBUTTONS = [ 'Add', 'Save', 'Delete', 'Cancel' ];
+const APPID = '0001Z810000000030YVU';
+export { URL, STATUS, AREA, ROOT, PAGEID, APPID, COMMON, BUTTONAREA, EDITBUTTONS, ALLBUTTONS, BROWSEBUTTONS, PAGECODE };
+
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/btnClicks/buttonClick.js b/src/purp/pp/supplierprice/list/btnClicks/buttonClick.js
new file mode 100644
index 00000000..f1672677
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/btnClicks/buttonClick.js
@@ -0,0 +1,20 @@
+/*q2LCmxM8POvl78IL0Liydg1dcQgxyofotE/WgPzUuy0=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 按钮点击事件
+ * @Date: 2018-04-09 16:31:22
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2022-04-22 20:23:16
+ */
+import ActionHandler from '../viewController/actionHandler';
+
+export default function (props, id) {
+ ActionHandler.getInstance(this).doAction(id);
+ if (id == 'Add') {
+ this.setState({
+ status: 'edit'
+ });
+ }
+}
+
+/*q2LCmxM8POvl78IL0Liydg1dcQgxyofotE/WgPzUuy0=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/btnClicks/index.js b/src/purp/pp/supplierprice/list/btnClicks/index.js
new file mode 100644
index 00000000..d42c3e71
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/btnClicks/index.js
@@ -0,0 +1,9 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+import buttonClick from './buttonClick';
+import searchBtnClick from './searchBtnClick';
+import tableButtonClick from './tableButtonClick';
+import pageInfoClick from './pageInfoClick';
+
+export { buttonClick, searchBtnClick, tableButtonClick, pageInfoClick };
+
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/btnClicks/pageInfoClick.js b/src/purp/pp/supplierprice/list/btnClicks/pageInfoClick.js
new file mode 100644
index 00000000..87fc40d3
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/btnClicks/pageInfoClick.js
@@ -0,0 +1,56 @@
+/*j07c8riwYnz20MYibuDbtEZex4qb2Efv3mNJRwOPM4g=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 根据pk查询供应商价目表
+ * @Date: 2023-01-05 19:33:05
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-01-05 19:33:05
+ */
+import { ajax } from 'nc-lightapp-front';
+import { AREA, URL, STATUS, ALLBUTTONS, BROWSEBUTTONS } from '../../constance';
+import { showQueryResultInfoForNoPage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+export default function(props, pks) {
+ let data = {
+ pks: pks,
+ pageid: AREA.listTable
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryByPk,
+ data: data,
+ success: (res) => {
+ this.setState({
+ searchData: data
+ });
+ if (res && res.data.grid && res.data.grid[AREA.listTable]) {
+ this.props.editTable.setTableData(AREA.listTable, res.data.grid.listTable);
+ this.props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ showQueryResultInfoForNoPage(res.data.count);
+ } else {
+ this.props.editTable.setTableData(AREA.listTable, { rows: [], areacode: AREA.listTable });
+ this.props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ showQueryResultInfoForNoPage();
+ }
+ this.props.button.setButtonVisible(ALLBUTTONS, false);
+ this.props.button.setButtonVisible(BROWSEBUTTONS, true);
+ this.props.button.setButtonDisabled(
+ [ 'Delete', 'Print', 'Edit', 'Output', 'Assign', 'PrintPop', 'Export' ],
+ true
+ );
+ this.props.button.setButtonDisabled([ 'Refresh' ], false);
+ let count = this.props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ this.props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ }
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtEZex4qb2Efv3mNJRwOPM4g=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/btnClicks/searchBtnClick.js b/src/purp/pp/supplierprice/list/btnClicks/searchBtnClick.js
new file mode 100644
index 00000000..fadb8340
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/btnClicks/searchBtnClick.js
@@ -0,0 +1,97 @@
+/*YuO8szH0cVixePu/Bt+mG26jsTjmE/kuwOQHfbIg/PM=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击事件处理
+ * @Date: 2018-04-03 11:02:47
+ * @Last Modified by: hechenk
+ * @Last Modified time: 2023-08-15 09:37:50
+ */
+
+import { ajax, NCMessage, toast } from 'nc-lightapp-front';
+import { AREA, URL, STATUS, COMMON, PAGEID, ALLBUTTONS, BROWSEBUTTONS, EDITBUTTONS } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+//点击查询,获取查询区数据
+export default function(value) {
+ let pageinfo = { pageIndex: 0, pageSize: 10 };
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea);
+ if (!queryInfo.querycondition) {
+ return;
+ }
+ if (
+ !this.state.pk_org &&
+ !((this.props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value || {}).firstvalue
+ ) {
+ toast({
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000012') /* 国际化处理: 财务组织不能为空*/,
+ color: 'warning'
+ });
+ return;
+ }
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_org');
+ if (pk_org.value.firstvalue != this.state.pk_org) {
+ if (queryInfo.querycondition.conditions) {
+ let conditions = queryInfo.querycondition.conditions.filter((item) => {
+ return item.field == 'pk_org' ? true : false;
+ });
+ if (Array.isArray(conditions) && conditions.length > 0) {
+ let condition = conditions[0];
+ this.refs.mainorg.onChange({ refname: condition.display, refpk: condition.value.firstvalue });
+ } else if (Array.isArray(conditions) && conditions.length == 0) {
+ queryInfo.querycondition.conditions.push({
+ field: 'pk_org',
+ value: { firstvalue: this.state.pk_org },
+ oprtype: '='
+ });
+ }
+ }
+ }
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGEID //页面编码
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.query,
+ data: data,
+ success: (res) => {
+ this.setState({
+ searchData: data
+ });
+ if (res && res.data.grid && res.data.grid[AREA.listTable]) {
+ this.props.editTable.setTableData(AREA.listTable, res.data.grid.listTable);
+ this.props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ showQueryResultInfoForNoPage(res.data.count);
+ } else {
+ this.props.editTable.setTableData(AREA.listTable, { rows: [], areacode: AREA.listTable });
+ this.props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ showQueryResultInfoForNoPage();
+ }
+ let flag = this.state.status != 'browse';
+ let editButtons = [ 'Save', 'Cancel' ];
+ let browseButtons = [ 'Edit', 'Export', 'Import', 'Assign', 'ExportExcel' ];
+ this.props.button.setButtonVisible(ALLBUTTONS, false);
+ this.props.button.setButtonVisible(BROWSEBUTTONS, true);
+ this.props.button.setButtonDisabled(
+ [ 'Delete', 'Print', 'Edit', 'Output', 'Assign', 'PrintPop', 'Export' ],
+ true
+ );
+ this.props.button.setButtonDisabled([ 'Refresh' ], false);
+ let count = this.props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ this.props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG26jsTjmE/kuwOQHfbIg/PM=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/btnClicks/tableButtonClick.js b/src/purp/pp/supplierprice/list/btnClicks/tableButtonClick.js
new file mode 100644
index 00000000..430a365a
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/btnClicks/tableButtonClick.js
@@ -0,0 +1,70 @@
+/*0GI1xcoeligdpMeXoHBphkuen3+hi44FWDFQN+UGL9s=*/
+import { ajax, base, toast } from 'nc-lightapp-front';
+import { URL, STATUS, AREA, PAGEID } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function tableButtonClick(props, key, text, record, index) {
+ let rows = [ record ];
+ ajax({
+ method: 'post',
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: rows
+ }
+ },
+ url: URL.delete,
+ success: (res) => {
+ if (props.editTable.getStatus(AREA.listTable) == 'edit') {
+ props.editTable.delRow(AREA.listTable, index);
+ let checked = props.editTable.getCheckedRows(AREA.listTable);
+ if (checked.length == 0) {
+ this.props.button.setButtonDisabled([ 'Delete' ], true);
+ }
+ } else {
+ this.state.delIndex = index;
+ props.editTable.delRow(AREA.listTable, index);
+ let data = this.props.editTable.getAllData(AREA.listTable);
+ ajax({
+ url: URL.save,
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ PageInfo: {},
+ rows: data.rows
+ }
+ },
+ success: (res) => {
+ if (res && res.data && res.data[AREA.listTable]) {
+ this.props.editTable.setTableData(AREA.listTable, res.data.listTable);
+ //this.props.editTable.delRow(AREA.listTable, this.state.delIndex, true);
+ } else {
+ this.props.editTable.setTableData(AREA.listTable, {
+ rows: [],
+ areacode: AREA.listTable
+ });
+ }
+ //this.props.button.setButtonDisabled([ 'Delete', 'Print', 'Output', 'Assign', 'PrintPop', 'Export' ], true);
+ let count = this.props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ this.props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ let checked = props.editTable.getCheckedRows(AREA.listTable);
+ if (checked.length == 0) {
+ this.props.button.setButtonDisabled([ 'Delete' ], true);
+ }
+ toast({ title: getLangByResId(this, '4005SUPPLIERPRICE-000013'), color: 'success' });/* 国际化处理: 删除成功*/
+ }
+ });
+ }
+ }
+ });
+}
+
+/*0GI1xcoeligdpMeXoHBphkuen3+hi44FWDFQN+UGL9s=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/config.json b/src/purp/pp/supplierprice/list/config.json
new file mode 100644
index 00000000..567b9d41
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/config.json
@@ -0,0 +1,12 @@
+{
+ "dependModuleName": [
+ "uap/common/components/excelImportconfig",
+ "uap/common/components/ExcelOutput",
+ "scmpub/scmpub/components/MainOrgRef"
+ ],
+ "dependjs": [
+ "../../../../uap/common/components/excelImportconfig/index.js",
+ "../../../../uap/common/components/ExcelOutput/index.js",
+ "../../../../scmpub/scmpub/components/MainOrgRef/index.js"
+ ]
+}
diff --git a/src/purp/pp/supplierprice/list/events/afterEvent.js b/src/purp/pp/supplierprice/list/events/afterEvent.js
new file mode 100644
index 00000000..3d3b2ab8
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/events/afterEvent.js
@@ -0,0 +1,307 @@
+/*DncIqBreQz6WZRX+v7OzgWYa9tLP3pPQrtj7ivO7JpE=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 编辑后事件处理
+ * @Date: 2018-04-12 16:54:10
+ * @Last Modified by: zhangmi
+ * @Last Modified time: 2021-09-07 09:21:35
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, AREA, PAGEID } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/editTableTools';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props, id, key, value, data, index, record) {
+ //有来源的供应商价目表保存修改的字段,通过updateKeys是否有值判断是否非法操作
+ if (record.values.fpricesrctype.value != 3) {
+ //判断值是否发生变化,修改的字段是否是失效日期。
+ if (!(data[0].oldvalue.value == data[0].newvalue.value || key == 'dinvaliddate')) {
+ this.updateKeys.push(key);
+ }
+ }
+
+ if (key == 'bsc') {
+ // BSC 标记
+ //handleBSCEvent(props, id, key, value, data, index, record);
+ } else if (key == 'dinvaliddate') {
+ // 失效日期
+ handleInvalidateEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'dvaliddate') {
+ // 生效日期
+ handleValidateEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'pk_material') {
+ // 物料
+ handleMaterialEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'corigcurrencyid') {
+ // 币种
+ handleCurrencyEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'pk_org') {
+ // 采购组织
+ handleOrgEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'ntaxrate') {
+ // 税率
+ handleTaxrateEvent.call(this, props, id, key, value, data, index, record);
+ } else if (key == 'castunitid') {
+ postEvent.call(this, props, id, key, value, data, record, index);
+ } else if (key == 'pk_supplier_v' || key == 'pk_supplier') {
+ postEvent.call(this, props, id, key, value, data, record, index);
+ } else if (
+ key == 'nnum' ||
+ key == 'nastnum' ||
+ key == 'nastorigprice' ||
+ key == 'norigprice' ||
+ key == 'nastorigtaxprice' ||
+ key == 'norigtaxprice' ||
+ key == 'ntaxrate' ||
+ key == 'vchangerate' ||
+ key == 'nimpost' ||
+ key == 'ninsurance' ||
+ key == 'ntransportmny' ||
+ key == 'pk_dept' ||
+ key == 'ftaxtypeflag' ||
+ key == 'pk_bizpsn'
+ ) {
+ postEvent.call(this, props, id, key, value, data, record, index);
+ } else if (key == 'crowno') {
+ let old = data[0].oldvalue;
+ if (old == value) {
+ return;
+ }
+ if (!/^-?[1-9]\d*$/.test(value)) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000014'), color: 'warning' }); /* 国际化处理: 行号必须是整数*/
+ props.editTable.setValByKeyAndIndex(id, index, 'crowno', { value: null });
+ RownoUtils.setRowNo(props, AREA.listTable, 'crowno');
+ }
+ if (value <= 0) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000015'), color: 'warning' }); /* 国际化处理: 行号必须大于零*/
+ props.editTable.setValByKeyAndIndex(id, index, 'crowno', { value: null });
+ RownoUtils.setRowNo(props, AREA.listTable, 'crowno');
+ } else {
+ let rownoSet = {};
+ let rows = props.editTable.getAllRows(AREA.listTable, true);
+ rows.map((row) => {
+ if (!rownoSet[row.values.crowno.value]) {
+ rownoSet[row.values.crowno.value] = 1;
+ } else {
+ rownoSet[row.values.crowno.value] += 1;
+ }
+ });
+ if (rownoSet[value] > 1) {
+ toast({
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000016'),
+ color: 'warning'
+ }); /* 国际化处理: 行号不能重复*/
+ props.editTable.setValByKeyAndIndex(id, index, 'crowno', { value: null });
+ RownoUtils.setRowNo(props, AREA.listTable, 'crowno');
+ }
+ }
+ }
+}
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleBSCEvent(props, id, key, value, data, index, record) {
+ if (value == null || typeof value == 'undefined' || value == '') {
+ toast({ color: 'warning', content: getLangByResId(this, '4005SUPPLIERPRICE-000017') }); /* 国际化处理: 是否为外为选择,请确定*/
+ }
+}
+
+/**
+ *
+ * @param {j} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleInvalidateEvent(props, id, key, value, data, index, record) {
+ let dvalidate =
+ (record && record['values'] && record['values']['dvaliddate'] && record['values']['dvaliddate']['value']) ||
+ null;
+ let nullValue = {
+ display: null,
+ scale: -1,
+ value: null
+ };
+ let dinvalidate = value || null;
+ if (dinvalidate != null && dvalidate != null) {
+ let beginDate = new Date(dvalidate.replace(/-/g, '/'));
+ let endDate = new Date(dinvalidate.replace(/-/g, '/'));
+ if (beginDate > endDate) {
+ props.cardTable.setValByKeyAndIndex(id, index, key, nullValue);
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000018')
+ }); /* 国际化处理: 价格失效日期不能在价格生效日期之前*/
+ }
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleValidateEvent(props, id, key, value, data, index, record) {
+ let dinvalidate =
+ (record && record['values'] && record['values']['dinvaliddate'] && record['values']['dinvaliddate']['value']) ||
+ null;
+ let dvalidate = value || null;
+ let nullValue = {
+ display: null,
+ scale: 0,
+ value: null
+ };
+
+ if (dinvalidate != null && dvalidate != null) {
+ let beginDate = new Date(dvalidate.replace(/-/g, '/'));
+ let endDate = new Date(dinvalidate.replace(/-/g, '/'));
+ if (beginDate > endDate) {
+ props.editTable.setValByKeyAndIndex(id, index, key, nullValue);
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000019')
+ }); /* 国际化处理: 价格生效日期不能在价格失效日期之后*/
+ }
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleMaterialEvent(props, id, key, value, data, index, record) {
+ if (!(value || {}).refpk) {
+ //toast({ color: 'warning', content: getLangByResId(this, '4005SUPPLIERPRICE-000020') });/* 国际化处理: 物料不能为空!*/
+ return;
+ }
+ // TODO
+ postEvent(props, id, key, value, data, record, index);
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleCurrencyEvent(props, id, key, value, data, index, record) {
+ if (data[0].oldvalue.value == data[0].newvalue.value) {
+ return;
+ }
+ const clearField = [
+ 'nimpost',
+ 'ninsurance',
+ 'ntransportmny',
+ 'norigprice',
+ 'norigtaxprice',
+ 'nastorigprice',
+ 'nastorigtaxprice'
+ ];
+ let nullValue = {
+ display: null,
+ scale: -1,
+ value: null
+ };
+ clearField.forEach((k) => {
+ props.editTable.setValByKeyAndIndex(id, index, k, nullValue);
+ record.values[k].value = null;
+ });
+
+ if (!data[0].newvalue.value) {
+ toast({ color: 'warning', content: getLangByResId(this, '4005SUPPLIERPRICE-000021') }); /* 国际化处理: 币种未定义,请先定义币种*/
+ return;
+ }
+ //postEvent(props, id, key, value, data, record, index);
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleOrgEvent(props, id, key, value, data, index, record) {
+ if (data.oldvalue.value == data.newvalue.value) {
+ return;
+ }
+ // TODO
+ postEvent(props, id, key, value, data, record, index);
+
+ // let nullValue = {
+ // display: null,
+ // scale: 0,
+ // value: null
+ // };
+ // for (let k in record.values) {
+ // props.editTable.setValByKeyAndRowId(id, record.rowId, k.key, nullValue);
+ // }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} id
+ * @param {*} key
+ * @param {*} value
+ * @param {*} data
+ * @param {*} index
+ */
+function handleTaxrateEvent(props, id, key, value, data, index, record) {
+ let nullValue = {
+ display: null,
+ scale: -1,
+ value: null
+ };
+ if (value != null && value < 0) {
+ props.editTable.setValByKeyAndIndex(id, index, key, nullValue);
+ } else {
+ postEvent(props, id, key, value, data, record, index);
+ }
+}
+
+function postEvent(props, moduleId, key, value, changedrows, record, index) {
+ let event = props.createGridAfterEventData(PAGEID, AREA.listTable, moduleId, key, changedrows);
+ event.grid[AREA.listTable].rows = event.grid[AREA.listTable].rows.filter((row) => {
+ return row.rowid == changedrows[0].rowid;
+ });
+ ajax({
+ method: 'POST',
+ url: URL.afterEdit,
+ data: event,
+ async: false,
+ success: (res) => {
+ if (res && res.data && res.data.listTable) {
+ // TODO 设置一行的数据
+ props.editTable.updateDataByIndexs(AREA.listTable, [
+ { index: index, data: res.data[AREA.listTable].rows[0] }
+ ]);
+ //props.editTable.setTableData(AREA.listTable, res.data[AREA.listTable], false);
+ }
+ props.editTable.setStatus(AREA.listTable, 'edit');
+ }
+ });
+}
+
+/*DncIqBreQz6WZRX+v7OzgWYa9tLP3pPQrtj7ivO7JpE=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/events/beforeEvent.js b/src/purp/pp/supplierprice/list/events/beforeEvent.js
new file mode 100644
index 00000000..e7ea615a
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/events/beforeEvent.js
@@ -0,0 +1,142 @@
+/*lA7FrGfHlashLvM+HJWGNdDKF1wgFQs5JTy0O+TZOQ4=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default async function(props, moduleId, item, index, value, record) {
+ if (record.values.fpricesrctype.value != 3) {
+ //有来源的供应商价目表“价格失效日期”支持修改
+ if (item.key == 'dinvaliddate') {
+ return true;
+ }
+ return false;
+ }
+ if (item.key == 'pk_bizpsn') {
+ if (!(record.values.pk_org_v || {}).value) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000022'), color: 'danger' }); /* 国际化处理: 采购组织不能为空*/
+ return false;
+ }
+ let meta = props.meta.getMeta();
+ let item_v = meta[moduleId].items.find((e) => e.attrcode == 'pk_bizpsn');
+ item_v.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ busifuncode: 'pu' // 这里对record.values.materiel要做一下非空校验
+ };
+ };
+ props.meta.setMeta(meta);
+ return true;
+ } else if (item.key == 'pk_dept') {
+ if (!(record.values.pk_org_v || {}).value) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000022'), color: 'danger' }); /* 国际化处理: 采购组织不能为空*/
+ return false;
+ }
+ let item = meta[moduleId].items.find((e) => e.attrcode == 'pk_dept');
+ item.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ busifuncode: 'pu'
+ };
+ };
+ props.meta.setMeta(meta);
+ return true;
+ } else if (item.key == 'pk_material') {
+ if (!(record.values.pk_org_v || {}).value) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000022'), color: 'danger' }); /* 国际化处理: 采购组织不能为空*/
+ return false;
+ }
+ let meta = props.meta.getMeta();
+ let item_v = meta[moduleId].items.find((e) => e.attrcode == 'pk_material');
+ item_v.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ };
+ props.meta.setMeta(meta);
+ return true;
+ } else if (item.key == 'pk_supplier_v' || item.key == 'pk_supplier') {
+ if (!(record.values.pk_org_v || {}).value) {
+ toast({ content: getLangByResId(this, '4005SUPPLIERPRICE-000022'), color: 'danger' }); /* 国际化处理: 采购组织不能为空*/
+ return false;
+ }
+ let meta = props.meta.getMeta();
+ let item_v = meta[moduleId].items.find((e) => e.attrcode == 'pk_supplier_v');
+ item_v.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value
+ };
+ };
+ let item = meta[moduleId].items.find((e) => e.attrcode == 'pk_supplier');
+ item.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value
+ };
+ };
+ props.meta.setMeta(meta);
+ return true;
+ } else if (item.key == 'pk_dept_v') {
+ // 部门
+ let meta = props.meta.getMeta();
+ let item_v = meta[moduleId].items.find((e) => e.attrcode == 'pk_dept_v');
+ item_v.queryCondition = () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ busifuncode: 'pu'
+ };
+ };
+ props.meta.setMeta(meta);
+ return true;
+ } else if (item.key == 'ipurprior') {
+ if ((record.cscid || {}).value) {
+ return false;
+ } else {
+ return true;
+ }
+ } else if (item.key == 'vchangerate') {
+ if (!(record.values.pk_material || {}).value) {
+ return false;
+ }
+ let cunitid = (record.values.cunitid || {}).value;
+ let castunitid = (record.values.castunitid || {}).value;
+ if (cunitid && castunitid) {
+ let fn = new Promise(function(resolve, reject) {
+ ajax({
+ method: 'post',
+ url: URL.fixRate,
+ data: { pk_material: record.values.pk_material.value, castunitid: castunitid },
+ success: (res) => {
+ let fixRate = res.data;
+ if (cunitid == castunitid || fixRate) {
+ resolve(false);
+ } else {
+ resolve(true);
+ }
+ }
+ });
+ });
+ return await fn.then((result) => result);
+ } else {
+ return false;
+ }
+ } else if (item.key == 'nnum' || item.key == 'nastnum' || item.key == 'castunitid') {
+ if (item.key == 'castunitid') {
+ let meta = props.meta.getMeta();
+ let item_v = meta[moduleId].items.find((e) => e.attrcode == 'castunitid');
+ item_v.queryCondition = () => {
+ return {
+ scm_cmaterialid: (record.values.pk_srcmaterial || {}).value,
+ GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ };
+ };
+ props.meta.setMeta(meta);
+ }
+ if (!(record.values.pk_material || {}).value) {
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+}
+
+/*lA7FrGfHlashLvM+HJWGNdDKF1wgFQs5JTy0O+TZOQ4=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/events/index.js b/src/purp/pp/supplierprice/list/events/index.js
new file mode 100644
index 00000000..40fb875f
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/events/index.js
@@ -0,0 +1,7 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+import afterEvent from './afterEvent';
+import beforeEvent from './beforeEvent';
+
+export { afterEvent, beforeEvent };
+
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/index.js b/src/purp/pp/supplierprice/list/index.js
new file mode 100644
index 00000000..058a4b1e
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/index.js
@@ -0,0 +1,456 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 供应商价目表列表组件
+ * @Date: 2018-04-02 14:57:46
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-21 10:29:27
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { createPage, ajax, base, toast, high } from 'nc-lightapp-front';
+import { afterEvent, beforeEvent } from './events';
+import { searchBtnClick, buttonClick } from './btnClicks';
+import { initTemplate } from './init';
+import { URL, AREA, ROOT, BUTTONAREA, ALLBUTTONS, EDITBUTTONS, BROWSEBUTTONS, PAGEID } from '../constance';
+import MainOrgRef from 'scmpub/scmpub/components/MainOrgRef';
+// import PurchaseOrgGridRef from 'uapbd/refer/org/PurchaseOrgGridRef';
+import { dateFormat } from '../../../public';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/editTableTools';
+import { createListTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import ExcelOutput from 'uap/common/components/ExcelOutput';
+const { NCDiv } = base;
+const { Refer } = high;
+let { ReferLoader } = Refer;
+class SupplierPriceList extends Component {
+ constructor(props) {
+ super(props);
+
+ props.use.search(AREA.searchArea);
+ props.use.editTable(AREA.listTable);
+
+ this.state = {
+ status: 'browse',
+ defaultVO: null,
+ pk_org: '',
+ mainOrg: {},
+ searchData: null,
+ selectedPKS: [],
+ delIndex: -1
+ };
+
+ //增加全局变量,用于记录修改有来源的供应商价目表除失效日期外的字段
+ this.updateKeys = new Array();
+ initLang(this, [ '4005supplierprice' ], 'purp', initTemplate.bind(this, this.props));
+
+ //initTemplate.call(this, this.props);
+ }
+
+ componentDidMount() {
+ this.props.editTable.setTableData(AREA.listTable, { rows: [] });
+ //this.getData();
+ this.toggleShow();
+ }
+
+ toggleShow = () => {
+ let flag = this.state.status != 'browse';
+ this.props.button.setButtonVisible(ALLBUTTONS, false);
+ this.props.button.setButtonVisible(BROWSEBUTTONS, true);
+ if (this.state.pk_org === '') {
+ let disable = {};
+
+ ALLBUTTONS.forEach((v) => {
+ disable[v] = false;
+ });
+ this.props.button.setDisabled(disable);
+ }
+ };
+
+ orgAfterEvent = (field, value) => {
+ if (field == 'pk_org' && Array.isArray(value) && value.length > 0) {
+ console.log(value);
+ this.refs.mainorg.onChange(value[0]);
+ }
+ };
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_org');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ let refname = pk_org.display;
+ arr = arr.map((item) => {
+ return { refpk: item, refname: refname };
+ });
+ this.orgAfterEvent.call(this, 'pk_org', arr);
+ }
+ };
+ render() {
+ const { editTable, search } = this.props;
+ const { createEditTable } = editTable;
+ const { NCCreateSearch } = search;
+ return (
+
+
+
+ {createListTitle(this)}
+ {/* 国际化处理: 供应商价目表*/}
+ {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ }}
+ onChange={(event) => {
+ if (event.refpk && event.refpk != this.state.pk_org) {
+ ajax({
+ method: 'POST',
+ url: URL.orgChange,
+ asycn: false,
+ data: {
+ key: 'pk_org',
+ value: event.refpk,
+ pagecode: PAGEID
+ },
+ success: (res) => {
+ if (res && res.data) {
+ this.setState(
+ {
+ pk_org: event.refpk,
+ mainOrg: event,
+ defaultVO: null
+ },
+ () => {
+ this.props.editTable.setTableData(AREA.listTable, { rows: [] });
+ this.state.defaultVO = res.data[AREA.listTable].rows[0];
+ let disable = {};
+ ALLBUTTONS.forEach((v) => {
+ disable[v] = false;
+ });
+
+ let meta = this.props.meta.getMeta();
+
+ meta[AREA.searchArea].items.map((item) => {
+ item.isShowUnit = false;
+ });
+ this.props.meta.setMeta(meta);
+ this.props.button.setDisabled(disable);
+ this.props.search.setSearchValByField(
+ AREA.searchArea,
+ 'pk_org',
+ {
+ value: event.refpk,
+ display: event.refname
+ }
+ );
+
+ this.props.button.setButtonDisabled(
+ [
+ 'Print',
+ 'PrintPop',
+ 'Delete',
+ 'Output',
+ 'Assign',
+ 'Refresh',
+ 'Export'
+ ],
+ true
+ );
+ let count = this.props.editTable.getNumberOfRows(
+ AREA.listTable
+ );
+ if (count > 0) {
+ this.props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ }
+ );
+ }
+ }
+ });
+ } else if (!event.refpk) {
+ this.state.defaultVO = null;
+ this.state.pk_org = '';
+ //this.props.search.setDisabled(AREA.searchArea, true);
+ let disable = {};
+ ALLBUTTONS.forEach((v) => {
+ disable[v] = true;
+ });
+ let meta = this.props.meta.getMeta();
+
+ meta[AREA.searchArea].items.map((item) => {
+ item.isShowUnit = true;
+ });
+ this.props.meta.setMeta(meta);
+ this.props.button.setDisabled(disable);
+ }
+ }}
+ />
+
+
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* 分配按钮 弹出组织参照,使用一个空的 div 来实现点击弹出参照框 */}
+
(this.realAssignBtn = dom)} />}
+ ref="assign"
+ isMultiSelectedEnabled={true}
+ isShow={true}
+ isAlwaysEmitOnChange={true}
+ onChange={(value) => {
+ if (value) {
+ let orgs = value.map((org) => {
+ return org.refpk;
+ });
+ let rows = this.props.editTable.getCheckedRows(AREA.listTable);
+ if (Array.isArray(rows) && rows.length > 0) {
+ ajax({
+ method: 'post',
+ url: URL.assgin,
+ data: {
+ pk_org: orgs,
+ pks: rows.map((row) => {
+ return row.data.values.pk_supplierprice.value;
+ })
+ },
+ success: (res) => {
+ toast({
+ title: getLangByResId(this, '4005SUPPLIERPRICE-000029'),
+ color: 'success',
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000036', {
+ i: res.data
+ })
+ }); /* 国际化处理: 分配成功*/
+ }
+ });
+ } else {
+ toast({
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000010'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择待分配的价目表*/
+ }
+ }
+ }}
+ queryCondition={() => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ }}
+ />
+ {/* (this.realAssignBtn = dom)} />}
+ ref="assign"
+ isMultiSelectedEnabled={true}
+ isShow={true}
+ isAlwaysEmitOnChange={true}
+ onChange={(value) => {
+ if (value) {
+ let orgs = value.map((org) => {
+ return org.refpk;
+ });
+ let rows = this.props.editTable.getCheckedRows(AREA.listTable);
+ if (Array.isArray(rows) && rows.length > 0) {
+ ajax({
+ method: 'post',
+ url: URL.assgin,
+ data: {
+ pk_org: orgs,
+ pks: rows.map((row) => {
+ return row.data.values.pk_supplierprice.value;
+ })
+ },
+ success: (res) => {
+ toast({
+ title: getLangByResId(this, '4005SUPPLIERPRICE-000029'),
+ color: 'success',
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000036', {
+ i: res.data
+ })
+ }); 国际化处理: 分配成功
+ }
+ });
+ } else {
+ toast({
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000010'),
+ color: 'warning'
+ }); 国际化处理: 请先选择待分配的价目表
+ }
+ }
+ }}
+ queryCondition={() => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ }}
+ /> */}
+
+
+
+
+
+ {this.state.status === 'browse' && (
+
+ {/* 查询区 */}
+ {NCCreateSearch(AREA.searchArea, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: (key, value) => {
+ if (key == 'pk_org') {
+ let data = {};
+ data.refpk = value.refpk;
+ data.refname = value.refname;
+ this.refs.mainorg.onChange(data);
+ }
+ },
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent,
+ defaultConditionsNum: 4
+ })}
+
+ )}
+
+ {createEditTable(AREA.listTable, {
+ showIndex: true,
+ showCheck: true,
+ adaptionHeight: true,
+ isAddRow: true,
+ onAfterEvent: afterEvent.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ selectedChange: () => {
+ let rows = this.props.editTable.getCheckedRows(AREA.listTable);
+ if (rows && rows.length == 0) {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Delete', 'Output', 'Assign', 'Export', 'PrintPop' ],
+ true
+ );
+ } else if (rows && rows.length == 1) {
+ if (rows[0].data.values.fpricesrctype.value == 3) {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Delete', 'Output', 'Assign', 'Export', 'PrintPop' ],
+ false
+ );
+ } else {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Output', 'Assign', 'Export', 'PrintPop' ],
+ false
+ );
+ }
+ } else if (rows && rows.length > 1) {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Delete', 'Output', 'Assign', 'Export', 'PrintPop' ],
+ false
+ );
+ }
+ },
+ onSelected: onSelect.bind(this),
+ onBatchSelected: onSelect.bind(this),
+ selectAll: onSelect.bind(this),
+ addRowCallback: () => {
+ this.setState({
+ status: 'edit'
+ });
+ let props = this.props;
+ props.button.setPopContent('Delete', '');
+ //props.search.setDisabled(AREA.searchArea, true);
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(EDITBUTTONS, true);
+ if (!this.state.defaultVO) {
+ toast({
+ content: getLangByResId(this, '4005SUPPLIERPRICE-000006'),
+ color: 'warning'
+ }); /* 国际化处理: 主组织不能为空*/
+ return;
+ }
+ //props.editTable.addRow(AREA.listTable, undefined,true);
+
+ if (this.props.editTable.getStatus(AREA.listTable) != 'edit') {
+ this.props.button.setButtonDisabled([ 'Delete' ], true);
+ }
+ let row = props.editTable.getNumberOfRows(AREA.listTable) - 1;
+ RownoUtils.setRowNoByIndex(props, AREA.listTable, 'crowno', row);
+ let defaultKey = [ 'pk_org', 'pk_org_v', 'pk_group', 'corigcurrencyid', 'tcreatetime' ];
+ let _this = this;
+ defaultKey.forEach((key) => {
+ _this.props.editTable.setValByKeyAndIndex(
+ AREA.listTable,
+ row,
+ key,
+ _this.state.defaultVO.values[key]
+ );
+ });
+ //设置自制 生效时间 生成时间
+ dateFormat();
+ let time = new Date();
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'dvaliddate', {
+ value: time.Format('yyyy-MM-dd') + ' 00:00:00',
+ display: time.Format('yyyy-MM-dd')
+ });
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'tcreatetime', {
+ value: time.Format('yyyy-MM-dd hh:mm:ss'),
+ display: time.Format('yyyy-MM-dd')
+ });
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'ftaxtypeflag', {
+ value: '1',
+ display: getLangByResId(this, '4005SUPPLIERPRICE-000007')
+ }); /* 国际化处理: 应税外加*/
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'fpricesrctype', {
+ value: '3',
+ display: getLangByResId(this, '4005SUPPLIERPRICE-000008')
+ }); /* 国际化处理: 自制*/
+ }
+ })}
+
+
+ );
+ }
+}
+
+function onSelect(props, moduleId, record, index, status) {
+ let rows = this.props.editTable.getCheckedRows(moduleId);
+ if (rows && rows.length == 1) {
+ if (rows[0].data.values.fpricesrctype.value == 3) {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Delete', 'Output', 'Edit', 'Assign', 'Export', 'PrintPop' ],
+ false
+ );
+ } else {
+ this.props.button.setButtonDisabled([ 'Print', 'Output', 'Edit', 'Assign', 'Export', 'PrintPop' ], false);
+ }
+ } else if (rows && rows.length > 1) {
+ this.props.button.setButtonDisabled(
+ [ 'Print', 'Delete', 'Output', 'Edit', 'Assign', 'Export', 'PrintPop' ],
+ false
+ );
+ }
+}
+SupplierPriceList = createPage({
+ billinfo: {
+ billtype: 'grid',
+ pagecode: PAGEID,
+ bodycode: {
+ [AREA.listTable]: 'editTable' //此处发生变化了,需要传一个对象
+ }
+ }
+})(SupplierPriceList);
+ReactDOM.render(, document.querySelector(ROOT));
+
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/init/index.js b/src/purp/pp/supplierprice/list/init/index.js
new file mode 100644
index 00000000..849f42c5
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/init/index.js
@@ -0,0 +1,5 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/init/initTemplate.js b/src/purp/pp/supplierprice/list/init/initTemplate.js
new file mode 100644
index 00000000..4d32c4a9
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/init/initTemplate.js
@@ -0,0 +1,356 @@
+/*pmFWCFu5nhKkBzYmrkBakX+/XbX5a6FrqsufOjG4HL0=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 供应商价目表列表界面元数据初始化
+ * @Date: 2018-04-02 13:46:03
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-12-01 18:21:48
+ */
+import excelImportconfig from 'uap/common/components/excelImportconfig';
+import { tableButtonClick, pageInfoClick } from '../btnClicks';
+import { PAGEID, BUTTONAREA, AREA, ALLBUTTONS, BROWSEBUTTONS, PAGECODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { columnSortUtils } from '../../../../../scmpub/scmpub/pub/tool/columnSortUtils';
+// import { high } from 'nc-lightapp-front';
+// const { Refer } = high;
+// let { ReferLoader } = Refer;
+
+export default function(props) {
+ let excelimportconfig = excelImportconfig(props, 'purp', '4221', true, '', {
+ appcode: PAGECODE.appcode,
+ pagecode: PAGECODE.listPagecode
+ });
+ let _this = this;
+ props.createUIDom(
+ {
+ pagecode: PAGEID
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifierMeta.call(_this, props, meta);
+ props.meta.setMeta(meta);
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setPopContent(
+ 'Delete',
+ getLangByResId(_this, '4005SUPPLIERPRICE-000005')
+ ); /* 国际化处理: 确认删除?*/
+ props.button.setUploadConfig('Import', excelimportconfig);
+ props.button.setButtons(button);
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(BROWSEBUTTONS, true);
+ let disable = {};
+
+ ALLBUTTONS.forEach((v) => {
+ disable[v] = true;
+ });
+ // props.search.setDisabled(AREA.searchArea, false);
+ props.button.setDisabled(disable);
+ }
+ let pk_org = _this.props.getUrlParam('pk_org');
+ let pk_orgName = _this.props.getUrlParam('pk_orgName');
+ if ((data.context && data.context.pk_org) || pk_org) {
+ let pk_og1 = data.context.pk_org;
+ let pk_orgName1 = data.context.org_Name;
+ if (pk_org && pk_orgName) {
+ pk_og1 = pk_org;
+ pk_orgName1 = pk_orgName;
+ }
+ _this.setState(
+ {
+ mainOrg: {
+ refpk: pk_og1,
+ refname: pk_orgName1
+ }
+ },
+ () => {
+ _this.refs.mainorg.onChange({
+ refpk: pk_og1,
+ refname: pk_orgName1
+ });
+ }
+ );
+ }
+ // 采购订单价格来源跳转过来
+ let pk = _this.props.getUrlParam('id');
+ if (pk) {
+ let pks = new Array();
+ pks.push(pk);
+ // 根据pk查询数据
+ pageInfoClick.call(_this, _this.props, pks);
+ }
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ let listTable = meta.listTable;
+ // 参照过滤
+ /**
+ * 1有来源单据不允许修改。
+ * 2对字段进行参照过滤。
+ */
+ let _this = this;
+ meta[AREA.searchArea].items.map((item) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'pk_org') {
+ console.log(item);
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '', busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_srcmaterial') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_bizpsn') {
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_supplier') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_material.pk_marbasclass') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode.startsWith('vbdef')) {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value;
+ if (pk_org == null || pk_org.firstvalue == null || pk_org.firstvalue == '') {
+ pk_org.firstvalue = this.state.pk_org;
+ }
+ return { pk_org: pk_org ? pk_org.firstvalue : '' };
+ };
+ } else if (item.attrcode == 'fpricesrctype') {
+ //价格来源日期删除EC价格库显示
+ let options = item.options;
+ let resultOptions = [];
+ options.map((param) => {
+ if ('2' != param.value) {
+ resultOptions.push(param);
+ }
+ });
+ /**
+ * 拼装最终的options内容
+ */
+ item.options = resultOptions;
+ }
+ });
+ listTable.items.map((item) => {
+ if (item.attrcode === 'pk_bizpsn') {
+ // item.render = function(text, record, index) {
+ // // return PsndocTreeGridRef({
+ // // queryCondition: () => {
+ // // return {
+ // // pk_org: (record.values.pk_org || {}).value,
+ // // busifuncode: 'pu' // 这里对record.values.materiel要做一下非空校验
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value,
+ // busifuncode: 'pu' // 这里对record.values.materiel要做一下非空校验
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode === 'castunitid') {
+ // item.render = function(text, record, index) {
+ // // return MeasdocDefaultGridRef({
+ // // queryCondition: () => {
+ // // return {
+ // // scm_cmaterialid: (record.values.pk_srcmaterial || {}).value,
+ // // GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // scm_cmaterialid: (record.values.pk_srcmaterial || {}).value,
+ // GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode === 'pk_material') {
+ item.isShowUnit = false;
+ // item.render = function(text, record, index) {
+ // // return MaterialMultiVersionGridRef({
+ // // queryCondition: () => {
+ // // return {
+ // // pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode === 'pk_dept') {
+ item.isShowUnit = false;
+ // item.render = function(text, record, index) {
+ // // return DeptNCTreeRef({
+ // // queryCondition: () => {
+ // // return {
+ // // pk_org: (record.values.pk_org || {}).value,
+ // // busifuncode: 'pu'
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value,
+ // busifuncode: 'pu'
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode === 'pk_dept_v') {
+ item.isShowUnit = false;
+ // item.render = function(text, record, index) {
+ // // return DeptNCVersionTreeRef({
+ // // queryCondition: () => {
+ // // return {
+ // // pk_org: (record.values.pk_org || {}).value,
+ // // busifuncode: 'pu'
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value,
+ // busifuncode: 'pu'
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode == 'pk_supplier_v' || item.attrcode == 'pk_supplier') {
+ item.isShowUnit = false;
+ // item.render = function(text, record, index) {
+ // // return SupplierVersionRefTreeGridRef({
+ // // queryCondition: () => {
+ // // return {
+ // // pk_org: (record.values.pk_org || {}).value
+ // // };
+ // // }
+ // // });
+ // return (
+ // {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value
+ // };
+ // }}
+ // />
+ // );
+ // };
+ } else if (item.attrcode.startsWith('vbdef')) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { pk_org: _this.state.pk_org };
+ };
+ }
+ });
+ // 操作列
+ if (listTable) {
+ let event = {
+ itemtype: 'customer',
+ visible: true,
+ label: getLangByResId(this, '4005SUPPLIERPRICE-000031') /* 国际化处理: 操作*/,
+ width: 150,
+ attrcode: 'opr',
+ fixed: 'right',
+ render(text, record, index) {
+ if (undefined !== record && record != null) {
+ let buttonAry = [];
+ if (record.values.fpricesrctype.value == 3) {
+ buttonAry = [ 'Delete' ];
+ }
+ return props.button.createOprationButton(buttonAry, {
+ area: BUTTONAREA.listinner,
+ ignoreHotkeyCode: [ 'Delete' ],
+ buttonLimit: 3,
+ onButtonClick: (props, key) => tableButtonClick.call(_this, props, key, text, record, index)
+ });
+ }
+ }
+ };
+ listTable.items.push(event);
+ }
+ columnSortUtils.numberSort(meta, AREA.listTable, 'crowno');
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakX+/XbX5a6FrqsufOjG4HL0=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/actionHandler.js b/src/purp/pp/supplierprice/list/viewController/actionHandler.js
new file mode 100644
index 00000000..36596256
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/actionHandler.js
@@ -0,0 +1,83 @@
+/*4fHBPsdsATx+m/nB2sxnoTTnuEzKt7xMAIOzPJFi1fg=*/
+import AddAction from './addAction';
+import EditAction from './editAction';
+import DeleteAction from './deleteAction';
+import CancelAction from './cancelAction';
+import SaveAction from './saveAction';
+import AssignAction from './assignAction';
+import ExportAction from './exportAction';
+import PrintAction from './printAction';
+import OutputAction from './outputAction';
+import RefreshAction from './refreshAction';
+
+
+class ActionHandler {
+ constructor(page) {
+ this.props = page.props;
+ this.page = page;
+ this.instance = null;
+ this.handlerMap = null;
+ }
+
+ static getInstance(page) {
+ if (this.instance == null) {
+ this.instance = new ActionHandler(page);
+ }
+ return this.instance;
+ }
+
+ /**
+ * 动作执行
+ * @param {*} key
+ */
+ doAction(key) {
+ if (this.handlerMap == null) {
+ this.init();
+ }
+ let action = this.handlerMap.get(key)
+ if (action == null) {
+ console.log('can not find a action named' +key);
+ } else {
+ this.before(key);
+ action.doAction(this.page);
+ this.after(key);
+ }
+
+ }
+
+ /**
+ * 动作前处理
+ * @param {*} key
+ */
+ before(key) {
+ //TODO
+ }
+ /**
+ * 动作后处理
+ * @param {*} key
+ */
+ after(key) {
+ //TODO
+ }
+ /**
+ * 加载对应按钮的action
+ */
+ init() {
+ let map = new Map();
+ map.set('Add', new AddAction());
+ map.set('Delete', new DeleteAction());
+ map.set('Save', new SaveAction());
+ map.set('Cancel', new CancelAction());
+ map.set('Edit', new EditAction());
+ map.set('PrintPop', new PrintAction());
+ map.set('Output', new OutputAction());
+ map.set('Export', new ExportAction());
+ map.set('Assign', new AssignAction());
+ map.set('Refresh', new RefreshAction());
+ this.handlerMap = map;
+
+ }
+}
+
+export default ActionHandler;
+/*4fHBPsdsATx+m/nB2sxnoTTnuEzKt7xMAIOzPJFi1fg=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/addAction.js b/src/purp/pp/supplierprice/list/viewController/addAction.js
new file mode 100644
index 00000000..573fd3d5
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/addAction.js
@@ -0,0 +1,66 @@
+/*R/JW7QQ4vCyCLghhsQtj9ACv322tydgH79JUNJ8w2gw=*/
+import ButtonController from './buttonController';
+import { toast } from 'nc-lightapp-front';
+import { AREA } from '../../constance';
+import { dateFormat } from '../../../../public';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/editTableTools';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class AddAction {
+ doAction(page) {
+ this.before(page);
+ let buttonController = ButtonController.getInstance(page);
+ let props = page.props;
+ page.state.status = 'edit';
+ // props.search.setDisabled(AREA.searchArea, true);
+ if (!page.state.defaultVO) {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000006'),
+ color: 'warning'
+ }); /* 国际化处理: 主组织不能为空*/
+ return;
+ }
+ let row = props.editTable.getNumberOfRows(AREA.listTable);
+ props.editTable.addRow(AREA.listTable, undefined, true);
+ RownoUtils.setRowNoByIndex(props, AREA.listTable, 'crowno', row);
+ buttonController.changeUiStatus.call(page);
+ let defaultKey = [ 'pk_org', 'pk_org_v', 'pk_group', 'corigcurrencyid', 'tcreatetime' ];
+ let _this = page;
+ defaultKey.forEach((key) => {
+ _this.props.editTable.setValByKeyAndIndex(AREA.listTable, row, key, _this.state.defaultVO.values[key]);
+ });
+ //设置自制 生效时间 生成时间
+ dateFormat();
+ let time = new Date();
+
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'dvaliddate', {
+ value: time.Format('yyyy-MM-dd') + ' 00:00:00',
+ display: time.Format('yyyy-MM-dd')
+ });
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'tcreatetime', {
+ value: time.Format('yyyy-MM-dd hh:mm:ss'),
+ display: time.Format('yyyy-MM-dd')
+ });
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'ftaxtypeflag', {
+ value: '1',
+ display: getLangByResId(page, '4005SUPPLIERPRICE-000007')
+ }); /* 国际化处理: 应税外加*/
+ props.editTable.setValByKeyAndIndex(AREA.listTable, row, 'fpricesrctype', {
+ value: '3',
+ display: getLangByResId(page, '4005SUPPLIERPRICE-000008')
+ }); /* 国际化处理: 自制*/
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default AddAction;
+
+/*R/JW7QQ4vCyCLghhsQtj9ACv322tydgH79JUNJ8w2gw=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/assignAction.js b/src/purp/pp/supplierprice/list/viewController/assignAction.js
new file mode 100644
index 00000000..f0ab2706
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/assignAction.js
@@ -0,0 +1,33 @@
+/*qxKWoeDu8IaE1rXD+suU1jRmKAXnASKwQS47GZaZ68c=*/
+import { toast } from 'nc-lightapp-front';
+import { AREA } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class AssignAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ if (Array.isArray(rows) && rows.length > 0) {
+ page.realAssignBtn.click();
+ } else {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000010'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择待分配的价目表*/
+ }
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default AssignAction;
+
+/*qxKWoeDu8IaE1rXD+suU1jRmKAXnASKwQS47GZaZ68c=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/buttonController.js b/src/purp/pp/supplierprice/list/viewController/buttonController.js
new file mode 100644
index 00000000..e0590d3f
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/buttonController.js
@@ -0,0 +1,90 @@
+/*kmMeNHXPpdljPj98yiqeQRh1ynCojIjmL/AFRx6VYrQ=*/
+import { URL, STATUS, AREA, PAGEID, ALLBUTTONS, EDITBUTTONS, BROWSEBUTTONS } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class ButtonController {
+ constructor(page) {
+ this.props = page.props;
+ this.page = page;
+ this.instance = null;
+ }
+
+ static getInstance(page) {
+ if (this.instance == null) {
+ this.instance = new ButtonController(page);
+ }
+ return this.instance;
+ }
+ /**
+ * 获得单表状态
+ * 编辑态 'edit'
+ * 浏览态 'browse'
+ */
+ getUiStatus = () => {
+ return this.props.editTable.getStatus(AREA.listTable);
+ };
+ /**
+ * 切换气泡按钮状态
+ */
+ togglePopButton = () => {
+ let { props } = this.page;
+ if (STATUS.edit == this.page.state.status) {
+ props.button.setPopContent('Delete', '');
+ } else {
+ props.button.setPopContent(
+ 'Delete',
+ getLangByResId(this.page, '4005SUPPLIERPRICE-000005')
+ ); /* 国际化处理: 确认删除?*/
+ }
+ };
+
+ /**
+ * 列表按钮状态切换
+ */
+ toggleMainButton = () => {
+ let { props } = this.page;
+ if (STATUS.edit == this.page.state.status) {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(EDITBUTTONS, true);
+ props.editTable.selectAllRows(AREA.listTable, false);
+ } else {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(BROWSEBUTTONS, true);
+ props.button.setButtonDisabled([ 'Delete', 'Print', 'Output', 'Assign', 'Export', 'PrintPop' ], true);
+ let count = props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ }
+ //切换状态时清空全局变量updateKeys。
+ this.page.updateKeys.splice(0, this.page.updateKeys.length);
+ };
+
+ /**
+ * 单表状态切换
+ */
+ changeUiStatus = () => {
+ this.toggleMainButton();
+ this.togglePopButton();
+ };
+
+ /**
+ * 刷新变更按钮状态
+ */
+ refresh = () => {
+ let props = this.props;
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(BROWSEBUTTONS, true);
+ props.button.setButtonDisabled([ 'Delete', 'Print', 'Export', 'Output' ], true);
+ let count = props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ };
+}
+export default ButtonController;
+
+/*kmMeNHXPpdljPj98yiqeQRh1ynCojIjmL/AFRx6VYrQ=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/cancelAction.js b/src/purp/pp/supplierprice/list/viewController/cancelAction.js
new file mode 100644
index 00000000..447cf3fd
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/cancelAction.js
@@ -0,0 +1,48 @@
+/*BPItCcel61E9+QkiAaTxp+QjNnFgcHep4yQHVORR6E0=*/
+import ButtonController from './buttonController';
+import { promptBox } from 'nc-lightapp-front';
+import { AREA } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class CancelAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let buttonController = ButtonController.getInstance(page);
+
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(page, '4005SUPPLIERPRICE-000004'), // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输/* 国际化处理: 确认取消*/
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000002'), // 提示内容,非必输/* 国际化处理: 是否确认要取消?*/
+ noFooter: false, // 是否显示底部按钮(确定、取消),默认显示(false),非必输
+ noCancelBtn: false, // 是否显示取消按钮,,默认显示(false),非必输
+ beSureBtnName: getLangByResId(page, '4005SUPPLIERPRICE-000003'), // 确定按钮名称, 默认为"确定",非必输/* 国际化处理: 确定*/
+ cancelBtnName: getLangByResId(page, '4005SUPPLIERPRICE-000004'), // 取消按钮名称, 默认为"取消",非必输/* 国际化处理: 取消*/
+ hasCloseBtn: false, //显示“X”按钮,默认不显示,不显示是false,显示是true
+ beSureBtnClick: () => {
+ page.setState(
+ {
+ status: 'browse'
+ },
+ () => {
+ props.editTable.cancelEdit(AREA.listTable);
+ buttonController.changeUiStatus.call(page);
+ }
+ );
+ // props.search.setDisabled(AREA.searchArea, false);
+ } // 确定按钮点击调用函数,非必输
+ });
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default CancelAction;
+
+/*BPItCcel61E9+QkiAaTxp+QjNnFgcHep4yQHVORR6E0=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/deleteAction.js b/src/purp/pp/supplierprice/list/viewController/deleteAction.js
new file mode 100644
index 00000000..cdf5a478
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/deleteAction.js
@@ -0,0 +1,142 @@
+/*w+zEC2IhjYdPMKcDQ9Ljk3hS4laSIWcGisOK0IA+W9c=*/
+import { ajax, toast,promptBox } from 'nc-lightapp-front';
+import { URL, AREA, PAGEID} from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+
+class DeleteAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ rows = rows.map((row) => {
+ return row.data;
+ });
+ ajax({
+ method: 'post',
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: rows
+ }
+ },
+ url: URL.delete,
+ success: (res) => {
+ if (props.editTable.getStatus(AREA.listTable) == 'edit') {
+ let indexSet = new Set();
+ let checkeddata = props.editTable.getCheckedRows(AREA.listTable);
+ let canDel = true;
+ checkeddata.map((row) => {
+ if (row.data.values.fpricesrctype.value == 3) {
+ indexSet.add(row.index);
+ } else {
+ canDel = false;
+ }
+ });
+ if (!canDel) {
+ toast({ content: getLangByResId(page, '4005SUPPLIERPRICE-000027'), color: 'warning' });
+ return;
+ }
+ props.editTable.deleteTableRowsByIndex(AREA.listTable, Array.from(indexSet));
+ props.button.setButtonDisabled(
+ [ 'Delete', 'Print', 'Output', 'Assign', 'PrintPop', 'Export' ],
+ true
+ );
+ let count = props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ } else {
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(page, '4005SUPPLIERPRICE-000037') /* 国际化处理: 提示信息*/,
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000026') /* 国际化处理: 是否确认删除?*/,
+ noFooter: false, // 是否显示底部按钮(确定、取消),默认显示(false),非必输
+ noCancelBtn: false, // 是否显示取消按钮,,默认显示(false),非必输
+ beSureBtnName: getLangByResId(page, '4005SUPPLIERPRICE-000003'), // 确定按钮名称, 默认为"确定",非必输/* 国际化处理: 确定*/
+ cancelBtnName: getLangByResId(page, '4005SUPPLIERPRICE-000004'), // 取消按钮名称, 默认为"取消",非必输/* 国际化处理: 取消*/
+ hasCloseBtn: false, //显示“X”按钮,默认不显示,不显示是false,显示是true
+ beSureBtnClick: () => {
+ let indexSet = new Set();
+ let checkeddata = props.editTable.getCheckedRows(AREA.listTable);
+ let canDel = true;
+ checkeddata.map((row) => {
+ if (row.data.values.fpricesrctype.value == 3) {
+ indexSet.add(row.index);
+ } else {
+ canDel = false;
+ }
+ });
+ if (!canDel) {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000027'),
+ color: 'warning'
+ }); /* 国际化处理: 只能删除自制的供应商价目表*/
+ return;
+ }
+ props.editTable.deleteTableRowsByIndex(AREA.listTable, Array.from(indexSet));
+ if (props.editTable.getStatus(AREA.listTable) == 'edit') {
+ props.button.setButtonDisabled([ 'Delete' ], true);
+ return;
+ }
+ let data = props.editTable.getAllData(AREA.listTable);
+ ajax({
+ url: URL.save,
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: data.rows
+ }
+ },
+ success: (res) => {
+ if (res && res.data && res.data[AREA.listTable]) {
+ props.editTable.setTableData(AREA.listTable, res.data.listTable);
+ } else {
+ props.editTable.setTableData(AREA.listTable, {
+ rows: [],
+ areacode: AREA.listTable
+ });
+ }
+ toast({
+ title: getLangByResId(page, '4005SUPPLIERPRICE-000013'),
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000036', { i: indexSet.size }),
+ color: 'success'
+ }); /* 国际化处理: 删除成功*/
+ props.button.setButtonDisabled(
+ [ 'Delete', 'Print', 'Output', 'Assign', 'PrintPop', 'Export' ],
+ true
+ );
+ let count = props.editTable.getNumberOfRows(AREA.listTable);
+ if (count > 0) {
+ props.button.setButtonDisabled([ 'Edit' ], false);
+ } else {
+ props.button.setButtonDisabled([ 'Edit' ], true);
+ }
+ }
+ });
+ } // 确定按钮点击调用函数,非必输
+ });
+ }
+ }
+
+ });
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default DeleteAction;
+/*w+zEC2IhjYdPMKcDQ9Ljk3hS4laSIWcGisOK0IA+W9c=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/editAction.js b/src/purp/pp/supplierprice/list/viewController/editAction.js
new file mode 100644
index 00000000..1cfc4ce8
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/editAction.js
@@ -0,0 +1,53 @@
+/*gQSvRI0XtVkOmPBu+w3g4JWrTvrCZrOuI725vcr8uCA=*/
+import ButtonController from './buttonController';
+import { ajax } from 'nc-lightapp-front';
+import { AREA, URL, PAGEID } from '../../constance';
+
+class EditAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let buttonController = ButtonController.getInstance(page);
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ rows = rows.map((row) => {
+ return row.data;
+ });
+ ajax({
+ method: 'post',
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: rows
+ }
+ },
+ url: URL.edit,
+ success: (res) => {
+ page.setState({
+ status: 'edit'
+ });
+ props.editTable.setStatus(AREA.listTable, 'edit');
+ buttonController.changeUiStatus.call(page);
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ }
+ });
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default EditAction;
+
+/*gQSvRI0XtVkOmPBu+w3g4JWrTvrCZrOuI725vcr8uCA=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/exportAction.js b/src/purp/pp/supplierprice/list/viewController/exportAction.js
new file mode 100644
index 00000000..4bffbffe
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/exportAction.js
@@ -0,0 +1,43 @@
+/*Y9mpBFax8ocymRgGWvYqlK5Iy6p5puIXPdQSSMdJW6I=*/
+
+import { AREA } from '../../constance';
+import { toast } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class ExportAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ if (Array.isArray(rows) && rows.length > 0) {
+ let selectpks = rows.map((row) => {
+ return row.data.values.pk_supplierprice.value;
+ });
+ page.setState(
+ {
+ selectedPKS: selectpks
+ },
+ () => {
+ props.modal.show('exportFileModal');
+ }
+ );
+ } else {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000009'),
+ color: 'warning'
+ }); /* 国际化处理: 请选择导出数据*/
+ }
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default ExportAction;
+
+/*Y9mpBFax8ocymRgGWvYqlK5Iy6p5puIXPdQSSMdJW6I=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/outputAction.js b/src/purp/pp/supplierprice/list/viewController/outputAction.js
new file mode 100644
index 00000000..5e743ed9
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/outputAction.js
@@ -0,0 +1,42 @@
+/*gEoP1PwBfwh3hahZCuMumI6RkNjBJwrAXODCGpQY0sU=*/
+import {toast, output } from 'nc-lightapp-front';
+import { AREA, URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class OutputAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000011'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ return;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_supplierprice.value;
+ });
+ output({
+ url: URL.print, //后台服务url
+ data: {
+ oids: ids, // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ outputType: 'output'
+ }
+ });
+
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default OutputAction;
+
+/*gEoP1PwBfwh3hahZCuMumI6RkNjBJwrAXODCGpQY0sU=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/printAction.js b/src/purp/pp/supplierprice/list/viewController/printAction.js
new file mode 100644
index 00000000..fa9dd1d4
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/printAction.js
@@ -0,0 +1,43 @@
+/*UefxjZLs4rMUopjT6SfhujtWarB3h13D6b4tRG6/3I4=*/
+import {toast, print } from 'nc-lightapp-front';
+import { AREA, URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class PrintAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let rows = props.editTable.getCheckedRows(AREA.listTable);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000011'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ return;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_supplierprice.value;
+ });
+ print(
+ 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
+ URL.print, //后台服务url
+ {
+ oids: ids // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ // 打印按钮不用传该参数,输出按钮(文件下载)需加参数outputType,值为output。
+ }
+ );
+
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default PrintAction;
+
+/*UefxjZLs4rMUopjT6SfhujtWarB3h13D6b4tRG6/3I4=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/refreshAction.js b/src/purp/pp/supplierprice/list/viewController/refreshAction.js
new file mode 100644
index 00000000..2ee2ff02
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/refreshAction.js
@@ -0,0 +1,47 @@
+/*zK5+8Cs1fYtHndsZZI4DWsM/N3Q5X843dAzZp8PYhvo=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, STATUS, AREA } from '../../constance';
+import ButtonController from './buttonController';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+class RefreshAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let buttonController = ButtonController.getInstance(page);
+ let data = page.state.searchData;
+ if (!data) {
+ toast({ content: getLangByResId(page, '4005SUPPLIERPRICE-000033', { i: 0 }), color: 'success' });
+ return;
+ }
+ ajax({
+ url: URL.query,
+ data: data,
+ success: (res) => {
+ if (res && res.data.grid && res.data.grid[AREA.listTable]) {
+ props.editTable.setTableData(AREA.listTable, res.data.grid.listTable);
+ props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ } else {
+ props.editTable.setTableData(AREA.listTable, { rows: [], areacode: AREA.listTable });
+ props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ }
+ let flag = page.state.status != 'browse';
+ buttonController.refresh();
+ showRefreshInfo();
+ }
+ });
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+
+export default RefreshAction;
+
+/*zK5+8Cs1fYtHndsZZI4DWsM/N3Q5X843dAzZp8PYhvo=*/
\ No newline at end of file
diff --git a/src/purp/pp/supplierprice/list/viewController/saveAction.js b/src/purp/pp/supplierprice/list/viewController/saveAction.js
new file mode 100644
index 00000000..b67661c0
--- /dev/null
+++ b/src/purp/pp/supplierprice/list/viewController/saveAction.js
@@ -0,0 +1,140 @@
+/*Z6Ki8FTZpL6p+CVAxoVh+sS1xEQgjeFJPvUCcgzj1UQ=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, STATUS, AREA, PAGEID } from '../../constance';
+import ButtonController from './buttonController';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class SaveAction {
+ doAction(page) {
+ this.before(page);
+ let props = page.props;
+ let buttonController = ButtonController.getInstance(page);
+ let rows = props.editTable.getAllRows(AREA.listTable, true);
+ let delRow = [];
+ // 空行过滤
+ for (let i = 0; i < rows.length; i++) {
+ if (
+ !rows[i].values.pk_material.value &&
+ !rows[i].values.norigprice.value &&
+ !rows[i].values.norigtaxprice.value &&
+ !rows[i].values.nastorigprice.value &&
+ !rows[i].values.nastorigtaxprice.value &&
+ !rows[i].values.vchangerate.value
+ ) {
+ delRow.push(i);
+ }
+ }
+ props.editTable.deleteTableRowsByIndex(AREA.listTable, delRow);
+ rows = props.editTable.getAllRows(AREA.listTable, true);
+ // 必输项校验
+ let flag = props.editTable.checkRequired(AREA.listTable, rows);
+ if (!flag) {
+ return;
+ }
+ let data = {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: rows
+ }
+ };
+ //设置伪列
+ data.model.rows.map((row, index) => {
+ // 设置pseudocolumn字段值,用于前后台合并
+ row.values.pseudocolumn.value = index + '';
+ });
+ setTimeout(function() {
+ props.validateToSave(data, () => {
+ ajax({
+ url: URL.save,
+ data: {
+ pageid: PAGEID,
+ model: {
+ areaType: 'table',
+ areacode: AREA.listTable,
+ rows: rows
+ },
+ userjson: JSON.stringify(page.updateKeys)
+ },
+ success: (res) => {
+ if (res && res.data) {
+ props.beforeUpdatePage();
+ let data = page.state.searchData;
+
+ if (res && res.data && res.data[AREA.listTable]) {
+ props.editTable.setTableData(AREA.listTable, res.data.listTable);
+ props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ } else {
+ props.editTable.setTableData(AREA.listTable, {
+ rows: [],
+ areacode: AREA.listTable
+ });
+ props.editTable.setStatus(AREA.listTable, STATUS.browse);
+ }
+ // props.search.setDisabled(AREA.searchArea, false);
+ page.setState(
+ {
+ status: 'browse'
+ },
+ () => {
+ buttonController.changeUiStatus.call(page);
+ }
+ );
+ props.updatePage(null, AREA.listTable);
+ toast({
+ title: getLangByResId(page, '4005SUPPLIERPRICE-000000'),
+ color: 'success'
+ }); /* 国际化处理: 保存成功*/
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ } else {
+ props.editTable.setTableData(AREA.listTable, {
+ rows: [],
+ areacode: AREA.listTable
+ });
+ props.editTable.setStatus(AREA.listTable, STATUS.browse);
+
+ let flag = page.state.status != 'browse';
+
+ // props.search.setDisabled(AREA.searchArea, false);
+
+ page.setState(
+ {
+ status: 'browse'
+ },
+ () => {
+ buttonController.changeUiStatus.call(page);
+ }
+ );
+ toast({
+ content: getLangByResId(page, '4005SUPPLIERPRICE-000000'),
+ color: 'success'
+ }); /* 国际化处理: 保存成功*/
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ }
+ }
+ });
+ });
+ }, 200);
+ this.after(page);
+ }
+
+ before(page) {
+ // TODO
+ }
+
+ after(page) {
+ // TODO
+ }
+}
+export default SaveAction;
+
+/*Z6Ki8FTZpL6p+CVAxoVh+sS1xEQgjeFJPvUCcgzj1UQ=*/
\ No newline at end of file
diff --git a/src/purp/public/dateformat.js b/src/purp/public/dateformat.js
new file mode 100644
index 00000000..4fd9e4c2
--- /dev/null
+++ b/src/purp/public/dateformat.js
@@ -0,0 +1,26 @@
+/*92QcCQ1MRjkSEFQIgla9r73mHh2xeDx6yTSZkGTtqEE=*/
+export function dateFormat() {
+ Date.prototype.Format = function (fmt) {
+ //author: meizz
+ var o = {
+ 'M+': this.getMonth() + 1, //月份
+ 'd+': this.getDate(), //日
+ 'h+': this.getHours(), //小时
+ 'm+': this.getMinutes(), //分
+ 's+': this.getSeconds(), //秒
+ 'q+': Math.floor((this.getMonth() + 3) / 3), //季度
+ S: this.getMilliseconds(), //毫秒
+ };
+ if (/(y+)/.test(fmt)) {
+ fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
+ }
+ for (var k in o){
+ if (new RegExp('(' + k + ')').test(fmt)) {
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
+ }
+ }
+ return fmt;
+ };
+}
+
+/*92QcCQ1MRjkSEFQIgla9r73mHh2xeDx6yTSZkGTtqEE=*/
\ No newline at end of file
diff --git a/src/purp/public/index.js b/src/purp/public/index.js
new file mode 100644
index 00000000..e5100fd0
--- /dev/null
+++ b/src/purp/public/index.js
@@ -0,0 +1,4 @@
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
+import {dateFormat} from './dateformat';
+export {dateFormat};
+/*wcAyGzXIuLMPKe72bAn4f72BcH03jamWKj7p/ELKGtY=*/
\ No newline at end of file
diff --git a/src/purp/public/lang/standard/simpchn/4005askbill.json b/src/purp/public/lang/standard/simpchn/4005askbill.json
new file mode 100644
index 00000000..9a357fad
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005askbill.json
@@ -0,0 +1,62 @@
+{
+ "4005ASKBILL-000000": "询报价单",
+ "4005ASKBILL-000001": "确定要删除吗?",
+ "4005ASKBILL-000002": "当前单据未保存,您确认离开此页面?",
+ "4005ASKBILL-000003": "删除成功",
+ "4005ASKBILL-000004": "操作",
+ "4005ASKBILL-000005": "请选择数据",
+ "4005ASKBILL-000006": "删除",
+ "4005ASKBILL-000007": "失败!",
+ "4005ASKBILL-000008": "取消成功",
+ "4005ASKBILL-000009": "请选择行!",
+ "4005ASKBILL-000010": "应税外加",
+ "4005ASKBILL-000011": "自由",
+ "4005ASKBILL-000012": "所选物料行为空,不可增加供应商行",
+ "4005ASKBILL-000013": "请选择要删除的物料行",
+ "4005ASKBILL-000014": "无符合条件数据",
+ "4005ASKBILL-000015": "请选择要删除的供应商行",
+ "4005ASKBILL-000016": "提示",
+ "4005ASKBILL-000017": "有未处理完的单据,是否退出转单?",
+ "4005ASKBILL-000018": "注意",
+ "4005ASKBILL-000019": "有未处理完的单据,是否返回?",
+ "4005ASKBILL-000020": "选择供应商",
+ "4005ASKBILL-000021": "表体应至少有一行物料,否则无法选择供应商!",
+ "4005ASKBILL-000022": "邮箱设置",
+ "4005ASKBILL-000023": "是否删除",
+ "4005ASKBILL-000024": "用户信息?",
+ "4005ASKBILL-000025": "发出",
+ "4005ASKBILL-000026": "导出数据项目设置",
+ "4005ASKBILL-000027": "发送邮件",
+ "4005ASKBILL-000029": "确定",
+ "4005ASKBILL-000030": "取消",
+ "4005ASKBILL-000031": "生成Excel",
+ "4005ASKBILL-000032": "发送",
+ "4005ASKBILL-000033": "未选择发送供应商",
+ "4005ASKBILL-000034": "待选",
+ "4005ASKBILL-000035": "已选",
+ "4005ASKBILL-000036": "收件人",
+ "4005ASKBILL-000037": "收件人不能为空",
+ "4005ASKBILL-000038": "主题",
+ "4005ASKBILL-000039": "附件",
+ "4005ASKBILL-000040": "备注",
+ "4005ASKBILL-000041": "已存在完成的供应商行时不能删除,请检查",
+ "4005ASKBILL-000042": "询报价单号(",
+ "4005ASKBILL-000043": ")_供应商(",
+ "4005ASKBILL-000044": "成功",
+ "4005ASKBILL-000045": "发送成功!",
+ "4005ASKBILL-000046": "到货日期不能小于询价日期",
+ "4005ASKBILL-000047": "报价失效日期不能在报价生效日期之前",
+ "4005ASKBILL-000048": "导出格式文件设置",
+ "4005ASKBILL-000049": "文件类型",
+ "4005ASKBILL-000050": "发送成功",
+ "4005ASKBILL-000051": "请选择待询价的供应商!",
+ "4005ASKBILL-000052": "不存在需要报价的行",
+ "4005ASKBILL-000053": "邮箱地址不合法",
+ "4005ASKBILL-000054": "有供应商行不支持拖拽复制!",
+ "4005ASKBILL-000055": "上一步",
+ "4005ASKBILL-000056": "下一步",
+ "4005ASKBILL-000057": "发送",
+ "4005ASKBILL-000058": "请选择供应商",
+ "4005ASKBILL-000059": "请在“导出数据项目设置”中选择导出的数据",
+ "4005ASKBILL-000060": "请在“发送邮件”中录入收件人"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005checkitem.json b/src/purp/public/lang/standard/simpchn/4005checkitem.json
new file mode 100644
index 00000000..8467afb3
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005checkitem.json
@@ -0,0 +1,5 @@
+{
+ "4005CHECKITEM-000000": "检验项目",
+ "4005CHECKITEM-000001": "检验项目编码",
+ "4005CHECKITEM-000002": "检验项目名称"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005discount.json b/src/purp/public/lang/standard/simpchn/4005discount.json
new file mode 100644
index 00000000..0cb9144b
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005discount.json
@@ -0,0 +1,15 @@
+{
+ "4005DISCOUNT-000000": "确认修改",
+ "4005DISCOUNT-000001": "是否修改组织,这样会清空您录入的信息?",
+ "4005DISCOUNT-000002": "保存成功",
+ "4005DISCOUNT-000003": "当前单据未保存,您确认离开此页面",
+ "4005DISCOUNT-000004": "采购折扣",
+ "4005DISCOUNT-000005": "基本信息",
+ "4005DISCOUNT-000006": "操作",
+ "4005DISCOUNT-000007": "折扣梯度",
+ "4005DISCOUNT-000008": "单品折扣",
+ "4005DISCOUNT-000009": "组合折扣",
+ "4005DISCOUNT-000010": "适用组织",
+ "4005DISCOUNT-000011": "请选择数据",
+ "4005DISCOUNT-000012": "确定要删除吗?"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005echarts.json b/src/purp/public/lang/standard/simpchn/4005echarts.json
new file mode 100644
index 00000000..7115363a
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005echarts.json
@@ -0,0 +1,19 @@
+{
+ "4005ECHARTS-000001": "采购执行价对比分析",
+ "4005ECHARTS-000002": "期间",
+ "4005ECHARTS-000003": "价格(元)",
+ "4005ECHARTS-000004": "采购执行价",
+ "4005ECHARTS-000005": "平均价",
+ "4005ECHARTS-000006": "参考成本",
+ "4005ECHARTS-000007": "平均价",
+ "4005ECHARTS-000008": "历史价格折线图",
+ "4005ECHARTS-000009": "报价",
+ "4005ECHARTS-000010": "审批价",
+ "4005ECHARTS-000011": "交易价",
+ "4005ECHARTS-000012": "加载中",
+ "4005ECHARTS-000013": "历史价格",
+ "4005ECHARTS-000014": "执行价对比分析",
+ "4005ECHARTS-000015": "按日分析",
+ "4005ECHARTS-000016": "按周分析",
+ "4005ECHARTS-000017": "按月分析"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005newpricequery.json b/src/purp/public/lang/standard/simpchn/4005newpricequery.json
new file mode 100644
index 00000000..f1f239bf
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005newpricequery.json
@@ -0,0 +1,3 @@
+{
+ "4005NEWPRICEQUERY-000000": "业务数据月数最多可查询36个月,请检查"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005priceaudit.json b/src/purp/public/lang/standard/simpchn/4005priceaudit.json
new file mode 100644
index 00000000..5c97d605
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005priceaudit.json
@@ -0,0 +1,77 @@
+{
+ "4005PRICEAUDIT-000000": "输入值必须为(0,∞]或者(0,∞]/(0,∞]",
+ "4005PRICEAUDIT-000001": "清空组织会清空您录入的信息!",
+ "4005PRICEAUDIT-000002": "是否修改组织,这样会清空您录入的信息?",
+ "4005PRICEAUDIT-000003": "提示",
+ "4005PRICEAUDIT-000004": "有未处理完的单据,是否退出转单",
+ "4005PRICEAUDIT-000005": "有未处理完的单据,是否退出转单?",
+ "4005PRICEAUDIT-000006": "确定要取消吗?",
+ "4005PRICEAUDIT-000007": "取消成功",
+ "4005PRICEAUDIT-000008": "操作成功!",
+ "4005PRICEAUDIT-000009": "行关闭失败!",
+ "4005PRICEAUDIT-000010": "请选择需要操作的数据!",
+ "4005PRICEAUDIT-000011": "行关闭成功!",
+ "4005PRICEAUDIT-000012": "合并显示",
+ "4005PRICEAUDIT-000013": "委外订单合并显示: ",
+ "4005PRICEAUDIT-000014": "确定要删除所选数据吗?",
+ "4005PRICEAUDIT-000015": "删除成功!",
+ "4005PRICEAUDIT-000016": "第",
+ "4005PRICEAUDIT-000017": "行来源于资产配置申请, 不能删除\n",
+ "4005PRICEAUDIT-000018": "行已经关闭\n",
+ "4005PRICEAUDIT-000019": "行已经有后续单据\n",
+ "4005PRICEAUDIT-000020": "行打开失败!",
+ "4005PRICEAUDIT-000021": "表体为空",
+ "4005PRICEAUDIT-000022": "是否继续保存?",
+ "4005PRICEAUDIT-000023": "当前单据未保存,您确定离开此页面?",
+ "4005PRICEAUDIT-000024": "价格审批单",
+ "4005PRICEAUDIT-000025": "指派",
+ "4005PRICEAUDIT-000026": "删除",
+ "4005PRICEAUDIT-000027": "是否确定删除?",
+ "4005PRICEAUDIT-000028": "操作",
+ "4005PRICEAUDIT-000029": "提交成功!",
+ "4005PRICEAUDIT-000030": "请选择需要提交的数据!",
+ "4005PRICEAUDIT-000031": "设置页签数量的默认值",
+ "4005PRICEAUDIT-000032": "请选择需要删除的数据!",
+ "4005PRICEAUDIT-000033": "请选择要输出的订单!",
+ "4005PRICEAUDIT-000034": "请选择要打印的订单!",
+ "4005PRICEAUDIT-000035": "请选择需要收回的数据!",
+ "4005PRICEAUDIT-000036": "注意",
+ "4005PRICEAUDIT-000037": "确定要删除吗?",
+ "4005PRICEAUDIT-000038": "待提交",
+ "4005PRICEAUDIT-000039": "审批中",
+ "4005PRICEAUDIT-000040": "执行中",
+ "4005PRICEAUDIT-000041": "全部",
+ "4005PRICEAUDIT-000042": "首页",
+ "4005PRICEAUDIT-000043": "委外订单管理",
+ "4005PRICEAUDIT-000044": "物资需求申请",
+ "4005PRICEAUDIT-000045": "查询结果为空",
+ "4005PRICEAUDIT-000046": "生成价格审批单",
+ "4005PRICEAUDIT-000047": "选择请购单",
+ "4005PRICEAUDIT-000048": "提交失败!",
+ "4005PRICEAUDIT-000049": "保存成功!",
+ "4005PRICEAUDIT-000050": "收回成功!",
+ "4005PRICEAUDIT-000051": "刷新成功",
+ "4005PRICEAUDIT-000052": "查询成功!",
+ "4005PRICEAUDIT-000053": "整单打开成功!",
+ "4005PRICEAUDIT-000054": "整单关闭成功!",
+ "4005PRICEAUDIT-000055": "行打开成功!",
+ "4005PRICEAUDIT-000056": "提交",
+ "4005PRICEAUDIT-000057": "删除",
+ "4005PRICEAUDIT-000058": "收回",
+ "4005PRICEAUDIT-000059": "保存提交成功!",
+ "4005PRICEAUDIT-000060": "确定修改",
+ "4005PRICEAUDIT-000061": "取消",
+ "4005PRICEAUDIT-000062": "刷新失败",
+ "4005PRICEAUDIT-000063": "删除失败!",
+ "4005PRICEAUDIT-000064": "请先确定表头库存组织的值。",
+ "4005PRICEAUDIT-000065": "请先确定表头收货客户的值。",
+ "4005PRICEAUDIT-000066": "选择采购合同",
+ "4005PRICEAUDIT-000067": "未选中表体行,或没有联副数据!",
+ "4005PRICEAUDIT-000068": "请勾选一行表体!",
+ "4005PRICEAUDIT-000069": "请先录入物料!",
+ "4005PRICEAUDIT-000070": "生成询报价单",
+ "4005PRICEAUDIT-000071": "选择询报价单",
+ "4005PRICEAUDIT-000072": "请启用相应模块!",
+ "4005PRICEAUDIT-000073": "选中行没有物料,请录入物料",
+ "4005PRICEAUDIT-000074": "有供应商行不支持拖拽复制!"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005pub.json b/src/purp/public/lang/standard/simpchn/4005pub.json
new file mode 100644
index 00000000..31bd7780
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005pub.json
@@ -0,0 +1,6 @@
+{
+ "4005PUB-000000": "无符合条件数据",
+ "4005PUB-000001": "请选择要删除的物料行",
+ "4005PUB-000002": "请选择要删除的供应商行",
+ "4005pub-000003": "行号不能重复"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005qpschm.json b/src/purp/public/lang/standard/simpchn/4005qpschm.json
new file mode 100644
index 00000000..725716b3
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005qpschm.json
@@ -0,0 +1,48 @@
+{
+ "4005QPSCHM-000000": "优质优价标准重复",
+ "4005QPSCHM-000001": "删除成功",
+ "4005QPSCHM-000002": "组织节点只能维护当前节点有权限组织的数据",
+ "4005QPSCHM-000003": "历史版本",
+ "4005QPSCHM-000004": "表体行不能为空",
+ "4005QPSCHM-000005": "提示",
+ "4005QPSCHM-000006": "保存为新版本吗?",
+ "4005QPSCHM-000007": "是",
+ "4005QPSCHM-000008": "否",
+ "4005QPSCHM-000009": "扣吨公式:",
+ "4005QPSCHM-000010": "调价公式:",
+ "4005QPSCHM-000011": "优质优价方案-集团",
+ "4005QPSCHM-000012": "优质优价方案-采购组织",
+ "4005QPSCHM-000013": "如果",
+ "4005QPSCHM-000014": "否则",
+ "4005QPSCHM-000015": "则",
+ "4005QPSCHM-000016": "并且",
+ "4005QPSCHM-000017": "或者",
+ "4005QPSCHM-000018": "元数据属性",
+ "4005QPSCHM-000019": "表和字段",
+ "4005QPSCHM-000020": "项目和内容",
+ "4005QPSCHM-000021": "操作",
+ "4005QPSCHM-000022": "失效日期应大于等于生效日期",
+ "4005QPSCHM-000023": "扣吨公式为空",
+ "4005QPSCHM-000024": "表体扣吨页签中,优质优价标准为空,因此扣吨公式不应有值!",
+ "4005QPSCHM-000025": "调价公式为空",
+ "4005QPSCHM-000026": "表体调价页签中,优质优价标准为空,因此调价公式不应有值!",
+ "4005QPSCHM-000027": "扣吨的计算优先级设置错误...",
+ "4005QPSCHM-000028": "调价的计算优先级设置错误...",
+ "4005QPSCHM-000029": "先决条件公式设置错误,包含非法检验项目,类型:",
+ "4005QPSCHM-000030": "扣吨",
+ "4005QPSCHM-000031": "调价",
+ "4005QPSCHM-000032": "优先级",
+ "4005QPSCHM-000033": "类型",
+ "4005QPSCHM-000034": "先决条件公式设置错误,包含非法检验项目",
+ "4005QPSCHM-000035": "公式中包含非法变量 ",
+ "4005QPSCHM-000036": "查询成功",
+ "4005QPSCHM-000037": "请选择要删除的数据",
+ "4005QPSCHM-000038": "删除",
+ "4005QPSCHM-000039": "确定要删除吗?",
+ "4005QPSCHM-000040": "删除失败",
+ "4005QPSCHM-000041": "请选择要打印的订单!",
+ "4005QPSCHM-000042": "优质优价方案",
+ "4005QPSCHM-000043": "方案编码",
+ "4005QPSCHM-000044": "方案名称",
+ "4005QPSCHM-000045": "当前单据未保存,您确认离开此页面"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005qpstandard.json b/src/purp/public/lang/standard/simpchn/4005qpstandard.json
new file mode 100644
index 00000000..8e57fb15
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005qpstandard.json
@@ -0,0 +1,44 @@
+{
+ "4005QPSTANDARD-000000": "组织节点只能维护当前节点有权限组织的数据",
+ "4005QPSTANDARD-000001": "删除成功",
+ "4005QPSTANDARD-000002": "历史版本",
+ "4005QPSTANDARD-000003": "提示",
+ "4005QPSTANDARD-000004": "保存为新版本吗?",
+ "4005QPSTANDARD-000005": "是",
+ "4005QPSTANDARD-000006": "否",
+ "4005QPSTANDARD-000007": "上下限值不相等",
+ "4005QPSTANDARD-000008": "数据输入错误",
+ "4005QPSTANDARD-000009": "上限值不能小于下限值",
+ "4005QPSTANDARD-000010": " 上限值不能小于下限值",
+ "4005QPSTANDARD-000011": " 上下限值不相等",
+ "4005QPSTANDARD-000012": "当前单据未保存,您确认离开此页面",
+ "4005QPSTANDARD-000013": "优质优价标准-集团",
+ "4005QPSTANDARD-000014": "优质优价标准-采购组织",
+ "4005QPSTANDARD-000015": "如果",
+ "4005QPSTANDARD-000016": "否则",
+ "4005QPSTANDARD-000017": "则",
+ "4005QPSTANDARD-000018": "并且",
+ "4005QPSTANDARD-000019": "或者",
+ "4005QPSTANDARD-000020": "元数据属性",
+ "4005QPSTANDARD-000021": "表和字段",
+ "4005QPSTANDARD-000022": "项目和内容",
+ "4005QPSTANDARD-000023": "操作",
+ "4005QPSTANDARD-000024": " 无表体行,无法保存!",
+ "4005QPSTANDARD-000025": "失效日期应大于等于生效日期",
+ "4005QPSTANDARD-000026": "字符型标准值,累计方式只能选择不累计",
+ "4005QPSTANDARD-000027": " 区间为空,序号:",
+ "4005QPSTANDARD-000028": " 区间重叠:",
+ "4005QPSTANDARD-000029": " 上下限值不等,序号:",
+ "4005QPSTANDARD-000030": " 上下限必须全部包含,序号:",
+ "4005QPSTANDARD-000031": " 区间重叠,序号:",
+ "4005QPSTANDARD-000032": "不是数字型",
+ "4005QPSTANDARD-000033": "不是数字型,表体序号:",
+ "4005QPSTANDARD-000034": " 表头基准区间与调整区间重叠,表体序号:",
+ "4005QPSTANDARD-000035": "请选择要删除的数据",
+ "4005QPSTANDARD-000036": "请选择要打印的订单!",
+ "4005QPSTANDARD-000037": "确定要删除吗?",
+ "4005QPSTANDARD-000038": "优质优价标准",
+ "4005QPSTANDARD-000039": "优质优价编码",
+ "4005QPSTANDARD-000040": "优质优价名称",
+ "4005QPSTANDARD-000041": "表头标准值类型不能为空!"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005supplieroffercontrast.json b/src/purp/public/lang/standard/simpchn/4005supplieroffercontrast.json
new file mode 100644
index 00000000..9b34d5db
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005supplieroffercontrast.json
@@ -0,0 +1,9 @@
+{
+ "1880000025-000000": "期间",
+ "1880000025-000001": "价格(元)",
+ "1880000025-000002": "平均价",
+ "1880000025-000003": "参考成本",
+ "1880000025-000004": "查询条件分析区间为其他时,天数不能为空",
+ "1880000025-000005": "价格",
+ "1880000025-000006": "供应商报价对比分析"
+}
\ No newline at end of file
diff --git a/src/purp/public/lang/standard/simpchn/4005supplierprice.json b/src/purp/public/lang/standard/simpchn/4005supplierprice.json
new file mode 100644
index 00000000..6a175e42
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005supplierprice.json
@@ -0,0 +1,40 @@
+{
+ "4005SUPPLIERPRICE-000000": "保存成功",
+ "4005SUPPLIERPRICE-000001": "确认取消",
+ "4005SUPPLIERPRICE-000002": "确定要取消吗?",
+ "4005SUPPLIERPRICE-000003": "确定",
+ "4005SUPPLIERPRICE-000004": "取消",
+ "4005SUPPLIERPRICE-000005": "确定要删除吗?",
+ "4005SUPPLIERPRICE-000006": "主组织不能为空",
+ "4005SUPPLIERPRICE-000007": "应税外加",
+ "4005SUPPLIERPRICE-000008": "自制",
+ "4005SUPPLIERPRICE-000009": "请选择导出数据",
+ "4005SUPPLIERPRICE-000010": "请先选择待分配的价目表",
+ "4005SUPPLIERPRICE-000011": "请先选择数据",
+ "4005SUPPLIERPRICE-000012": "采购组织不能为空",
+ "4005SUPPLIERPRICE-000013": "删除成功",
+ "4005SUPPLIERPRICE-000014": "行号必须是整数",
+ "4005SUPPLIERPRICE-000015": "行号必须大于零",
+ "4005SUPPLIERPRICE-000016": "行号不能重复",
+ "4005SUPPLIERPRICE-000017": "是否为外为选择,请确定",
+ "4005SUPPLIERPRICE-000018": "价格失效日期不能在价格生效日期之前",
+ "4005SUPPLIERPRICE-000019": "价格生效日期不能在价格失效日期之后",
+ "4005SUPPLIERPRICE-000020": "物料不能为空!",
+ "4005SUPPLIERPRICE-000021": "币种未定义,请先定义币种",
+ "4005SUPPLIERPRICE-000022": "采购组织不能为空",
+ "4005SUPPLIERPRICE-000023": "采购组织",
+ "4005SUPPLIERPRICE-000024": "提示信息",
+ "4005SUPPLIERPRICE-000025": "是否确认取消?",
+ "4005SUPPLIERPRICE-000026": "确定要删除所选数据?",
+ "4005SUPPLIERPRICE-000027": "只能删除自制的供应商价目表",
+ "4005SUPPLIERPRICE-000028": "分配",
+ "4005SUPPLIERPRICE-000029": "分配成功",
+ "4005SUPPLIERPRICE-000030": "供应商价目表",
+ "4005SUPPLIERPRICE-000031": "操作",
+ "4005SUPPLIERPRICE-000032": "刷新成功!",
+ "4005SUPPLIERPRICE-000033": "查询成功,共{i}条",
+ "4005SUPPLIERPRICE-000034": "未查询出符合条件的数据!",
+ "4005SUPPLIERPRICE-000035": "查询结果大于100条,请缩小条件再试!",
+ "4005SUPPLIERPRICE-000036": "处理成功{i}条",
+ "4005SUPPLIERPRICE-000037": "删除"
+}
diff --git a/src/purp/public/lang/standard/simpchn/4005workbench.json b/src/purp/public/lang/standard/simpchn/4005workbench.json
new file mode 100644
index 00000000..cb188a20
--- /dev/null
+++ b/src/purp/public/lang/standard/simpchn/4005workbench.json
@@ -0,0 +1,21 @@
+{
+ "4005WORKBENCH-000000": "第",
+ "4005WORKBENCH-000001": "年",
+ "4005WORKBENCH-000002": "季度",
+ "4005WORKBENCH-000003": "月",
+ "4005WORKBENCH-000004": "上旬",
+ "4005WORKBENCH-000005": "中旬",
+ "4005WORKBENCH-000006": "下旬",
+ "4005WORKBENCH-000007": "周",
+ "4005WORKBENCH-000008": "日",
+ "4005WORKBENCH-000009": "订单采购执行价变动趋势",
+ "4005WORKBENCH-000010": "采购价格查询",
+ "4005WORKBENCH-000011": "提交成功",
+ "4005WORKBENCH-000012": "价格审批单",
+ "4005WORKBENCH-000013": "提交指派",
+ "4005WORKBENCH-000014": "张",
+ "4005WORKBENCH-000015": "行",
+ "4005WORKBENCH-000016": "待报价",
+ "4005WORKBENCH-000017": "暂无数据",
+ "4005WORKBENCH-000018": "提交"
+}