当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ts.default.api.updateContract方法代码示例

本文整理汇总了TypeScript中ts/opg.ts.default.api.updateContract方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.api.updateContract方法的具体用法?TypeScript ts.default.api.updateContract怎么用?TypeScript ts.default.api.updateContract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ts/opg.ts.default.api的用法示例。


在下文中一共展示了ts.default.api.updateContract方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

window['doSave'] = function (pop: PopUp, tb: Table, nextStep ?: Function) {
	let param = $('#tbForm').fieldsToJson({
		copyrightBeginDate: {
			name: '版权开始日',
			type: 'date',
			require: true,
		},
		copyrightEndDate: {
			name: '版权到期日',
			type: 'date',
			require: true,
		},
	});

	if (param) {

		let programId = $('#programId').val();
		if (!programId) {
			$('#programName').iptError('请选择节目');
		}
		else if (!param.authorizedPlatform) {
			$('#tdPlatform').iptError('请选择授权平台');
		}
		else {
			param.programId = programId;

			delete param.id;
			delete param.name;
			delete param.enName;
			delete param.mainCategoryDesc;
			delete param.minorCategoryDesc;
			delete param.produceYear;
			delete param.nation;
			delete param.episodes;
			delete param.lengthOfEpisode;

			delete param.contractNumber;
			delete param.authorizedRegionCNDesc;


			param.contractId = contractId;

			if (param.authorizedPlatform)
				param.authorizedPlatform = param.authorizedPlatform.join(',');

			if (param.authorizedCorp)
				param.authorizedCorp = param.authorizedCorp.join(',');

			if (param.transmitMode)
				param.transmitMode = param.transmitMode.join(',');

			if (param.authorizedRegionId)
				param.authorizedRegion = param.authorizedRegionId;
			delete param.authorizedRegionId;


			if(param.copyrightBeginDate)
				param.copyrightBeginDate += ' 00:00:00';
			if(param.copyrightEndDate)
				param.copyrightEndDate += ' 00:00:00';
			if(param.shareMoneyBeginDate)
				param.shareMoneyBeginDate += ' 00:00:00';
			if(param.shareMoneyEndDate)
				param.shareMoneyEndDate += ' 00:00:00';


			if (isEdit) {
				param.relContractProgramId = relCopyrightProgramId;

				param.copyrightType = contractFullMeta.copyrightType;
				param.copyrightRealBeginDate = contractFullMeta.copyrightRealBeginDate;
				param.copyrightRealEndDate = contractFullMeta.copyrightRealEndDate;

				console.log(param, contractFullMeta);
			}
			else {

				if (!param.copyrightType) {
					$('#selCopyrightType').iptError('请选择版权类型');
				}


				console.log(param);
			}

			//return;

			opg.api.updateContract(param, function () {
				if (!isEdit) {
					opg.ok(`合同"${contractNumber}"节目新增成功`);
				}
				tb.update();
				pop.close();

				if (nextStep)
					nextStep(contractId, tb);
				else {
				}
			});
		}
//.........这里部分代码省略.........
开发者ID:rpdg,项目名称:fy.js,代码行数:101,代码来源:detail.ts


注:本文中的ts/opg.ts.default.api.updateContract方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。