Commit b348498f by yaxiLiuu

走通流程

parent a9edc2b1
......@@ -4,7 +4,7 @@ import actionTypes_error from '../actiontype/error'
let domain = ENV.domain;
export function scanBarCodeGetProductInfo(postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/scanning_sku_barcode_for_add_loss_task');
let url = String(domain+'/machine_pad/scanning_sku_barcode_for_add_loss_task');
fetch(url,{
credentials : 'include',
method : 'POST',
......@@ -32,7 +32,7 @@ export function scanBarCodeGetProductInfo(postData) {
}
export function submitProductInfo(postData) {
return (dispatch)=>{
let url = String(domain+'/web/machine_pad/submit_add_loss_task');
let url = String(domain+'/machine_pad/submit_add_loss_task');
fetch(url,{
credentials : 'include',
method : 'POST',
......
......@@ -4,7 +4,7 @@ const domain = ENV.domain;
//有服务器交互的actions
export function initGetOtherProblem(postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/list_other_fault.action');
let url = String(domain+'/machine_pad/list_other_fault.action');
console.log(url)
fetch(url,{
credentials : 'include',
......@@ -31,7 +31,7 @@ export function initGetOtherProblem(postData) {
}
export function addNewProbem(postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/insert_problem.action');
let url = String(domain+'/machine_pad/insert_problem.action');
console.log(url)
fetch(url,{
credentials : 'include',
......@@ -59,8 +59,7 @@ export function addNewProbem(postData) {
}
export function deleteProblem(postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/skip_feed_problem.action');
console.log(url)
let url = String(domain+'/machine_pad/skip_feed_problem.action');
fetch(url,{
credentials : 'include',
method : 'POST',
......@@ -86,7 +85,7 @@ export function deleteProblem(postData) {
}
export function submitProblemList(postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/add_feed_problem.action');
let url = String(domain+'/machine_pad/add_feed_problem.action');
console.log(url)
fetch(url,{
credentials : 'include',
......
......@@ -214,7 +214,7 @@ const fakeJson2 = {
}
export function getReportDamageList (postData) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/list_all_dealed_invetory_loss/'+postData.taskId+'.json');
let url = String(domain+'/machine_pad/list_all_dealed_invetory_loss/'+postData.taskId+'.json');
console.log(url)
fetch(url,{
credentials : 'include',
......@@ -241,7 +241,7 @@ export function getReportDamageList (postData) {
}
export function deleteDamageItem(postaData,taskId) {
return (dispatch) => {
let url = String(domain+'/web/machine_pad/delete_invetory_loss_by_saas');
let url = String(domain+'/machine_pad/delete_invetory_loss_by_saas');
console.log(url)
fetch(url,{
credentials : 'include',
......
......@@ -11,7 +11,7 @@ export default class FinishTroubleComponent extends React.Component{
haveNext(){
console.log("有");
let props = this.props;
props.changePages(CONFIG.showPage[3])
props.changePages(CONFIG.showPage[2])
}
haveNoNext(){
......
......@@ -37,15 +37,11 @@ export default class OtherQuestionContainer extends React.Component{
componentDidUpdate() {
}
componentWillReceiveProps(nextProps){
/* let {state} = nextProps;
let {otherQuestion,refreshImg} = state;
let lastRefreshImg = this.props.state.refreshImg;
if(String(lastRefreshImg)!=String(refreshImg)){
//更新数据
let troubleId = ""
let {state,changePages} = nextProps;
let {otherQuestion} = state;
if(otherQuestion.submitOtherProblem){
changePages(CONFIG.showPage[8])
}
console.log(refreshImg);
console.log("============================willrecvie refreshImg")*/
}
componentWillUnmount(){
......@@ -150,7 +146,6 @@ export default class OtherQuestionContainer extends React.Component{
submitProblemList(postData)
}
if(index+1 == postData.problems.length && needEdit.length>0){
console.log("================及Nlaile=========")
that.setState({
showPop:true,
popupInfo:{
......@@ -180,7 +175,7 @@ export default class OtherQuestionContainer extends React.Component{
let {state} = this.props;
let {storeInfo} = state;
let tmpUrl = "";
tmpUrl = `${ENV.uploadImg}${troubleId}/${this.state.taskTy}`
tmpUrl = `${ENV.uploadImg}/${troubleId}/${this.state.taskTy}`
this.setState({
"showQr":true,
"qrUrl":tmpUrl
......@@ -275,7 +270,7 @@ export default class OtherQuestionContainer extends React.Component{
saveText={this.handleSaveRemarkText.bind(this)}
></TextArea>
}else if(this.state.showQr){
elementUI = <Qrcode goBack={this.handleQrBack.bind(this)} url={this.state.taskTy}></Qrcode>
elementUI = <Qrcode goBack={this.handleQrBack.bind(this)} url={this.state.qrUrl}></Qrcode>
}else{
elementUI = <div className={"OtherQuestionContainer"}>
{this.state.showPop?(
......@@ -296,7 +291,7 @@ export default class OtherQuestionContainer extends React.Component{
</div>
<div className={"opeationContainer clearfix"}>
<button className={"addMoreBtn"} onClick={this.handleAddNewTroble.bind(this)}><span>+</span>录入更多</button>
<button className={"noMoreBtn"} onClick={this.handleSubmitProblemList.bind(this)}>没有更多</button>
<button className={"noMoreBtn"} onClick={this.handleSubmitProblemList.bind(this)}>提交</button>
</div>
<div className={"overPass"} onClick={this.handleOverPass.bind(this)}>跳过</div>
......
......@@ -43,7 +43,7 @@ function addNewProblem(state,data) {
allFeeds[String(temObj.id)].files = [];
allFeeds[String(temObj.id)].problemType = '';
allFeeds[String(temObj.id)].detailProblemType = '';
allFeeds[String(temObj.id)].remark = "dfdfdfdf";
allFeeds[String(temObj.id)].remark = "";
state.data_allProblemList = allFeeds;
let newInfo = Object.assign({},state,data);
return newInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment