物料图纸下载
This commit is contained in:
parent
2266b03a69
commit
736d29b2f3
|
@ -9,7 +9,8 @@
|
||||||
*/
|
*/
|
||||||
import {urls, values, childTabArr, formid, baseFormId} from "./../methodGroup/constance";
|
import {urls, values, childTabArr, formid, baseFormId} from "./../methodGroup/constance";
|
||||||
import updateButtonStatus from "./updateButtonStatus";
|
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;
|
const {NCTooltip} = base;
|
||||||
export default function (props, id) {
|
export default function (props, id) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
@ -96,7 +97,10 @@ export default function(props, id) {
|
||||||
if (this.state.code !== '') {
|
if (this.state.code !== '') {
|
||||||
ajax({
|
ajax({
|
||||||
url: urls['rollBackMaterialBillCode'],
|
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) => {
|
success: (res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +109,13 @@ export default function(props, id) {
|
||||||
ajax({
|
ajax({
|
||||||
url: urls['materialcancel'],
|
url: urls['materialcancel'],
|
||||||
success: (res) => {
|
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;
|
break;
|
||||||
case 'Refresh':
|
case 'Refresh':
|
||||||
this.getData(() => {
|
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;
|
break;
|
||||||
case 'Enable':
|
case 'Enable':
|
||||||
|
@ -200,7 +213,10 @@ export default function(props, id) {
|
||||||
enablestate: data.material.rows[0].values['enablestate']
|
enablestate: data.material.rows[0].values['enablestate']
|
||||||
});
|
});
|
||||||
updateButtonStatus(this.props, 'browse');
|
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']
|
enablestate: data.grid.material.rows[0].values['enablestate']
|
||||||
});
|
});
|
||||||
updateButtonStatus(this.props, 'browse');
|
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: ""
|
code: ""
|
||||||
});
|
});
|
||||||
// this.props.form.EmptyAllFormValue('audit');
|
// 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)
|
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;
|
let pk_material = this.props.form.getFormItemsValue(formid, 'pk_material').value;
|
||||||
this.props.modal.show('assignstatusModal', {
|
this.props.modal.show('assignstatusModal', {
|
||||||
title: [this.props.MutiInit.getIntl("10140MATERIAL") && this.props.MutiInit.getIntl("10140MATERIAL").get('10140MATERIAL-000048'), /* 国际化处理: 已分配组织查询*/,/* 国际化处理: 已分配组织查询*/
|
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>
|
<span className='iconfont icon-shuoming1 shuoming-style'></span>
|
||||||
</NCTooltip>],
|
</NCTooltip>],
|
||||||
content: this.getAssignStatus(pk_material)
|
content: this.getAssignStatus(pk_material)
|
||||||
|
@ -502,7 +529,9 @@ export default function(props, id) {
|
||||||
if (!_output_pk || !_output_pk.value) {
|
if (!_output_pk || !_output_pk.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setState({oids:[_output_pk.value]},()=>{this.refs.printOutput.open()});
|
this.setState({oids: [_output_pk.value]}, () => {
|
||||||
|
this.refs.printOutput.open()
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'Associate':
|
case 'Associate':
|
||||||
let pk_material_pf = this.props.form.getFormItemsValue('material', 'pk_material_pf');
|
let pk_material_pf = this.props.form.getFormItemsValue('material', 'pk_material_pf');
|
||||||
|
@ -530,7 +559,10 @@ export default function(props, id) {
|
||||||
break;
|
break;
|
||||||
case 'Upgrade'://升级
|
case 'Upgrade'://升级
|
||||||
if (this.props.form.getFormItemsValue(formid, 'pk_group').value === this.props.form.getFormItemsValue(formid, 'pk_org').value) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
pk = this.props.form.getFormItemsValue(formid, 'pk_material');
|
pk = this.props.form.getFormItemsValue(formid, 'pk_material');
|
||||||
|
@ -570,7 +602,10 @@ export default function(props, id) {
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.onButtonClick(props, 'Refresh');
|
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 {
|
} else {
|
||||||
this.onButtonClick(props, 'Refresh');
|
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':
|
case 'Reback':
|
||||||
//props.linkBack();
|
//props.linkBack();
|
||||||
props.pushTo('/list', {
|
props.pushTo('/list', {
|
||||||
pagecode:this.props.config.pagecodelist});
|
pagecode: this.props.config.pagecodelist
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'DataTemplet':
|
case 'DataTemplet':
|
||||||
let CardData = this.props.createMasterChildData(props.config.pagecode, formid, values['convert'], "editTable");
|
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);
|
this.DataTempletModal.show(this.config.dataTemplet_funcode, reqData1);
|
||||||
break;
|
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=*/
|
/*q2LCmxM8POvl78IL0LiydqJ/RITUXLjH1kojvbLBRO8=*/
|
|
@ -36,6 +36,7 @@ const urls = {
|
||||||
"querychild":"/nccloud/uapbd/material/queryMaterialChild.do",
|
"querychild":"/nccloud/uapbd/material/queryMaterialChild.do",
|
||||||
'materialPictureQuery':"/nccloud/uapbd/material/materialPictureQuery.do",
|
'materialPictureQuery':"/nccloud/uapbd/material/materialPictureQuery.do",
|
||||||
"materialcancel": '/nccloud/uapbd/material/materialcancel.do',
|
"materialcancel": '/nccloud/uapbd/material/materialcancel.do',
|
||||||
|
"downloadPlmUrl": '/nccloud/uapbd/material/downloadPlmFile.do'
|
||||||
};
|
};
|
||||||
const delUrls = {
|
const delUrls = {
|
||||||
'fi' : '/nccloud/uapbd/material/delMaterialfi.do',
|
'fi' : '/nccloud/uapbd/material/delMaterialfi.do',
|
||||||
|
|
Loading…
Reference in New Issue