物料图纸下载
This commit is contained in:
parent
2266b03a69
commit
736d29b2f3
|
@ -9,7 +9,8 @@
|
|||
*/
|
||||
import {urls, values, childTabArr, formid, baseFormId} from "./../methodGroup/constance";
|
||||
import updateButtonStatus from "./updateButtonStatus";
|
||||
import { ajax, toast,print,getBusinessInfo,promptBox, base} from 'nc-lightapp-front';
|
||||
import {ajax, toast, print, getBusinessInfo, promptBox, base, formDownload} from 'nc-lightapp-front';
|
||||
|
||||
const {NCTooltip} = base;
|
||||
export default function (props, id) {
|
||||
let _this = this;
|
||||
|
@ -96,7 +97,10 @@ export default function(props, id) {
|
|||
if (this.state.code !== '') {
|
||||
ajax({
|
||||
url: urls['rollBackMaterialBillCode'],
|
||||
data : {pk_org:this.props.form.getFormItemsValue(formid,'pk_org').value,code:this.state.code},
|
||||
data: {
|
||||
pk_org: this.props.form.getFormItemsValue(formid, 'pk_org').value,
|
||||
code: this.state.code
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
}
|
||||
|
@ -105,7 +109,13 @@ export default function(props, id) {
|
|||
ajax({
|
||||
url: urls['materialcancel'],
|
||||
success: (res) => {
|
||||
this.setState({ images: initImages, imagesrc: initImagesrc, imgList: initImgList, curPageIndex: 0, transform: "translatex(0px)" })
|
||||
this.setState({
|
||||
images: initImages,
|
||||
imagesrc: initImagesrc,
|
||||
imgList: initImgList,
|
||||
curPageIndex: 0,
|
||||
transform: "translatex(0px)"
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -150,7 +160,10 @@ export default function(props, id) {
|
|||
break;
|
||||
case 'Refresh':
|
||||
this.getData(() => {
|
||||
toast({title:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-0000147'),color:'success'});/* 国际化处理: 刷新成功*/
|
||||
toast({
|
||||
title: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-0000147'),
|
||||
color: 'success'
|
||||
});/* 国际化处理: 刷新成功*/
|
||||
});
|
||||
break;
|
||||
case 'Enable':
|
||||
|
@ -200,7 +213,10 @@ export default function(props, id) {
|
|||
enablestate: data.material.rows[0].values['enablestate']
|
||||
});
|
||||
updateButtonStatus(this.props, 'browse');
|
||||
toast({content:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000022'),color:'success'});/* 国际化处理: 启用成功*/
|
||||
toast({
|
||||
content: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000022'),
|
||||
color: 'success'
|
||||
});/* 国际化处理: 启用成功*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -256,7 +272,10 @@ export default function(props, id) {
|
|||
enablestate: data.grid.material.rows[0].values['enablestate']
|
||||
});
|
||||
updateButtonStatus(this.props, 'browse');
|
||||
toast({content:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000025'),color:'success'});/* 国际化处理: 停用成功*/
|
||||
toast({
|
||||
content: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000025'),
|
||||
color: 'success'
|
||||
});/* 国际化处理: 停用成功*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -282,7 +301,13 @@ export default function(props, id) {
|
|||
code: ""
|
||||
});
|
||||
// this.props.form.EmptyAllFormValue('audit');
|
||||
this.setState({ images: [], imagesrc: [], imgList: [], curPageIndex: 0, defaultIndex: -1 });
|
||||
this.setState({
|
||||
images: [],
|
||||
imagesrc: [],
|
||||
imgList: [],
|
||||
curPageIndex: 0,
|
||||
defaultIndex: -1
|
||||
});
|
||||
});
|
||||
|
||||
this.updateFormEditEnable(this.config.node_type)
|
||||
|
@ -470,7 +495,9 @@ export default function(props, id) {
|
|||
let pk_material = this.props.form.getFormItemsValue(formid, 'pk_material').value;
|
||||
this.props.modal.show('assignstatusModal', {
|
||||
title: [this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000048'), /* 国际化处理: 已分配组织查询*/,/* 国际化处理: 已分配组织查询*/
|
||||
<NCTooltip inverse overlay={this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-0000180')} trigger={["hover"]}>
|
||||
<NCTooltip inverse
|
||||
overlay={this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-0000180')}
|
||||
trigger={["hover"]}>
|
||||
<span className='iconfont icon-shuoming1 shuoming-style'></span>
|
||||
</NCTooltip>],
|
||||
content: this.getAssignStatus(pk_material)
|
||||
|
@ -502,7 +529,9 @@ export default function(props, id) {
|
|||
if (!_output_pk || !_output_pk.value) {
|
||||
return
|
||||
}
|
||||
this.setState({oids:[_output_pk.value]},()=>{this.refs.printOutput.open()});
|
||||
this.setState({oids: [_output_pk.value]}, () => {
|
||||
this.refs.printOutput.open()
|
||||
});
|
||||
break;
|
||||
case 'Associate':
|
||||
let pk_material_pf = this.props.form.getFormItemsValue('material', 'pk_material_pf');
|
||||
|
@ -530,7 +559,10 @@ export default function(props, id) {
|
|||
break;
|
||||
case 'Upgrade'://升级
|
||||
if (this.props.form.getFormItemsValue(formid, 'pk_group').value === this.props.form.getFormItemsValue(formid, 'pk_org').value) {
|
||||
toast({content:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000026'),color:'warning'});/* 国际化处理: 待升级物料全部为集团数据,不需升级。*/
|
||||
toast({
|
||||
content: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000026'),
|
||||
color: 'warning'
|
||||
});/* 国际化处理: 待升级物料全部为集团数据,不需升级。*/
|
||||
break;
|
||||
}
|
||||
pk = this.props.form.getFormItemsValue(formid, 'pk_material');
|
||||
|
@ -570,7 +602,10 @@ export default function(props, id) {
|
|||
},
|
||||
success: (res) => {
|
||||
this.onButtonClick(props, 'Refresh');
|
||||
toast({content:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000028'),color:'success'});/* 国际化处理: 操作成功*/
|
||||
toast({
|
||||
content: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000028'),
|
||||
color: 'success'
|
||||
});/* 国际化处理: 操作成功*/
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -580,7 +615,10 @@ export default function(props, id) {
|
|||
}
|
||||
} else {
|
||||
this.onButtonClick(props, 'Refresh');
|
||||
toast({content:this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000028'),color:'success'});/* 国际化处理: 操作成功*/
|
||||
toast({
|
||||
content: this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000028'),
|
||||
color: 'success'
|
||||
});/* 国际化处理: 操作成功*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -588,7 +626,8 @@ export default function(props, id) {
|
|||
case 'Reback':
|
||||
//props.linkBack();
|
||||
props.pushTo('/list', {
|
||||
pagecode:this.props.config.pagecodelist});
|
||||
pagecode: this.props.config.pagecodelist
|
||||
});
|
||||
break;
|
||||
case 'DataTemplet':
|
||||
let CardData = this.props.createMasterChildData(props.config.pagecode, formid, values['convert'], "editTable");
|
||||
|
@ -599,6 +638,21 @@ export default function(props, id) {
|
|||
}
|
||||
this.DataTempletModal.show(this.config.dataTemplet_funcode, reqData1);
|
||||
break;
|
||||
case 'download_plm':
|
||||
let materialCode = this.props.form.getFormItemsValue(formid, 'code');
|
||||
if (!materialCode || !materialCode.value) {
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
sys_appcode: '10140MAG_base_card',
|
||||
materialCode: materialCode.value
|
||||
}
|
||||
formDownload({
|
||||
params,
|
||||
url: urls['downloadPlmUrl'],
|
||||
enctype: 1
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*q2LCmxM8POvl78IL0LiydqJ/RITUXLjH1kojvbLBRO8=*/
|
|
@ -36,6 +36,7 @@ const urls = {
|
|||
"querychild":"/nccloud/uapbd/material/queryMaterialChild.do",
|
||||
'materialPictureQuery':"/nccloud/uapbd/material/materialPictureQuery.do",
|
||||
"materialcancel": '/nccloud/uapbd/material/materialcancel.do',
|
||||
"downloadPlmUrl": '/nccloud/uapbd/material/downloadPlmFile.do'
|
||||
};
|
||||
const delUrls = {
|
||||
'fi' : '/nccloud/uapbd/material/delMaterialfi.do',
|
||||
|
|
Loading…
Reference in New Issue