Example #1
0
def SearchUpdateRightEqui(inputValue):
    sInputvalue = inputValue.split('_')[0]
    sHasEqui = ''.join(inputValue.split('_')[1])
    sHasEquiList = sHasEqui.split(',')
    sGetEqui = searchValue(sInputvalue)[0]
    sEquipmentList = []
    returnHTML = ''
    a = 0
    for c in sHasEquiList:
        sEquiList = IDGetEquipment(c)
        if sEquiList != []:
            for i in sEquiList:
                sDict = {
                    'nHDRID': i['ID'],
                    'sEquipmentNo': i['sEquipmentNo'],
                }
            if sDict not in sEquipmentList:
                sEquipmentList.append(sDict)
                a += 1
    sDict = {
        'nHDRID': sGetEqui['nHDRID'],
        'sEquipmentNo': sGetEqui['sEquipmentNo'],
    }
    if sDict not in sEquipmentList:
        sEquipmentList.append(sDict)
        a += 1
    nWidth = str(round((100 / a), 2))
    for i in sEquipmentList:
        print(nWidth)
        returnHTML += "<li style=\"width: %s%%;\" id=\"addEuqi_equ_%s\"><a onclick=\"clearEqui('addEuqi_equ_%s')\">%s</a></li>" % (
            nWidth, i['nHDRID'], i['nHDRID'], i['sEquipmentNo'])
    return returnHTML
Example #2
0
def SplitArea_sEq(sEquipmentNo):
    ID = sEquipmentNo.split('_')[0]
    sSplitWidth = sEquipmentNo.split('_')[1]
    # print(ID)
    returnEquipment = IDGetEquipment(ID)
    returnDataNoCheck = IDGetNotCheckData(ID)
    returnDataCheck = IDGetCheckData(ID)
    returnHTML = ''
    for i in returnEquipment:
        returnHTML += ' <ul class="slot-list" id="Eq_%s"> \
                            <div> \
                                <input class="title_var" type="text" readOnly="true" value=%s> \
                                <div style="width: 310px;"> \
                                    <div class ="float_left" style="width: 115px; border-right:1px solid #ccc;"> \
                                        <span class="input-group-addon title_span_var" style="background-color:#FFFF00; font-size: 12px;" id="basic-addon1">%s</span> \
                                    </div> \
                                    <div class ="float_left" style="width: 60px; border-right:1px solid #ccc;"> \
                                        <span class="input-group-addon title_span_var" style="background-color:#FFFF00; font-size: 12px;" id="basic-addon1">已: %s</span> \
                                    </div> \
                                    <div class ="float_left" style="width: 60px; border-right:1px solid #ccc;"> \
                                        <span class="input-group-addon title_span_var" style="background-color:#FFFF00; font-size: 12px;" id="basic-addon1">未: %s</span> \
                                    </div> \
                                    <div class ="float_left" style="width: 60px; border-right:1px solid #ccc;""> \
                                        <span class="input-group-addon title_span_var" style="background-color:#FFFF00; font-size: 12px;" id="basic-addon1">共: %s</span> \
                                    </div> \
                                </div> \
                            </div>\
                            <div class="Top_Div" id="Top_Div_%s" style="height: %spx; width: 305px;">' % (i['ID'], i['sEquipmentNo'], i['sEquipmentName'], i['nCheckCount'], i['nNoCheckCount'], i['nCardCount'], i['ID'], sSplitWidth)

    returnHTML += ''
    if returnDataCheck == []:
        returnHTML += ' \
                <li class="slot-item li_style"> \
                    <div></div> \
                    <div class="clearfix"> \
                        <div> \
                            <div> \
                                <span>未预排数据</span> \
                            </div> \
                            <div> \
                                <span></span> \
                            </div> \
                        </div> \
                    </div> \
                </li> '
    else:
        for i in returnDataCheck:
            returnHTML += FromDictToHTML(i)

    returnHTML += '</div>'

    for i in returnEquipment:
        returnHTML += '<div class="Split_Span" id="split_span_%s" onmousedown="mouseDownMove(\'split_span_%s\')"></div> \
            <div class="Bottom_Area">' % (i['ID'], i['ID'])

    for i in returnDataNoCheck:
        returnHTML += FromDictToHTML(i)
    returnHTML += '</div> </ul>'
    return returnHTML
Example #3
0
def SplitArea_title3(sHDRIDValues):
    returnHtml = ''
    sHDRIDList = sHDRIDValues.split(',')
    sWidth = 99 / (len(sHDRIDList) - 1)
    for i in sHDRIDList:
        getEuqList = IDGetEquipment(i)
        for a in getEuqList:
            returnHtml += ' \
            <li style = "width: %s%%;" id = "addEuqi_equ_%s"> \
                <a onclick = "clearEqui(\'addEuqi_equ_%s\')">%s</a> \
            </li > ' % (sWidth, a['ID'], a['ID'], a['sEquipmentNo'])

    return returnHtml
Example #4
0
def AllData(equipmentNo):
    ID = equipmentNo.split('_')[1]
    returnData = IDGetAllData(ID)
    returnEquipment = IDGetEquipment(ID)
    returnHTML = ''

    for i in returnEquipment:
        returnHTML += ' <ul class="slot-list" id="Eq_%s"> \
                            <div> \
                                <input class="title_var" type="text" readOnly="true" value=%s> \
                                <span class="input-group-addon title_span_var" style="background-color:#FFFF00; width:1250px; font-size: 12px;" id="basic-addon1">%s</span> \
                                <span class="input-group-addon title_span_var" style="background-color:#FFFF00; width:1250px; font-size: 12px;" id="basic-addon1">预: %s 卡</span> \
                                <span class="input-group-addon title_span_var" style="background-color:#FFFF00; width:1250px; font-size: 12px;" id="basic-addon1">未: %s 卡</span> \
                            </div>' % (i['ID'], i['sEquipmentNo'],
                                       i['sEquipmentName'], i['nCheckCount'],
                                       i['nNoCheckCount'])

    for i in returnData:
        if str(i['sType']).find('洗缸') != -1:
            returnHTML += '\
                <li class="slot-it em XG_li" id="Card_%s"> \
                    <div class="clearfix XG_div"> \
                        <div> \
                            <div> \
                                <span>%s</span> \
                            </div> \
                            <div> \
                                <span></span> \
                            </div> \
                        </div> \
                    </div> \
                </li>' % (i['ID'], i['sType'])
        else:
            returnHTML += ' \
                            <li class="slot-item li_style" id="Card_%s" style="background-color: %s"> \
                                <div class="float_left border_div" style="background-color: %s;"></div> \
                                <div class="left_div float_left border_right"> \
                                    <ul> \
                                        <li class="border_bottom left_span_li"><span>%s</span></li> \
                                        <li class="border_bottom left_span_li" style="background-color: %s"><span>%s</span></li> \
                                        <li class="border_bottom left_span_li"><span>%s</span></li> \
                                        <li class="border_bottom left_span_li"><span>%s</span></li> \
                                        <li class="border_bottom left_work_li"><span>%s --&gt; %s --&gt; %s</span></li> \
                                    </ul> \
                                </div> \
                                <div class="right_div float_left border_right"> \
                                    <ul> \
                                        <li class="border_bottom right_span_li"><span>%s</span></li> \
                                        <li class="border_bottom right_span_li"><span>投胚:%s</span></li> \
                                        <li class="border_bottom right_span_li"><span>超时:%s</span></li> \
                                        <li class="border_bottom color_li"><span>%s</span></li> \
                                        <li class="border_bottom right_work_li"><span>%s</span></li> \
                                    </ul> \
                                </div> \
                                <div class="float_left border_div" style="background-color: %s;"></div> \
                            </li> \
                        ' % (i['ID'], i['sIsStart'], i['sWorkCode'],
                             i['sOrderNo'], i['sCheckColor'], i['sCardNo'],
                             i['sMaterialNo'], i['sColorNo'],
                             i['sWorkingProcedureNameLast'],
                             i['sWorkingProcedureNameCurrent'],
                             i['sWorkingProcedureNameNext'], i['sSalesName'],
                             i['nFactInputQty'], i['sOverTime'],
                             i['sColorName'], i['tPlanTime'], i['sColorCode'])
    returnHTML += '</ul>'

    print(returnHTML)
    return returnHTML
Example #5
0
def Equipment(equipmentNo):
    ID = equipmentNo.split('_')[1]
    returnData = IDGetData(ID)
    returnEquipment = IDGetEquipment(ID)
    returnHTML = ''

    for i in returnEquipment:
        returnHTML += ' <ul class="slot-list" id="Eq_%s"> \
                            <div> \
                                <input class="title_var" type="text" readOnly="true" value=%s> \
                                <span class="input-group-addon title_span_var" style="background-color:#FFFF00; width:1250px; font-size: 12px;" id="basic-addon1">%s</span> \
                                <span class="input-group-addon title_span_var" style="background-color:#FFFF00; width:1250px; font-size: 12px;" id="basic-addon1">共: %s 卡</span> \
                            </div>' % (i['ID'], i['sEquipmentNo'],
                                       i['sEquipmentName'], i['nCardCount'])

    for i in returnData:
        if i['sType'] == '洗缸':
            returnHTML += '\
                <li class="slot-item XG_li" id="Card_%s"> \
                    <div class="clearfix XG_div"> \
                        <div> \
                            <div> \
                                <span>洗缸</span> \
                            </div> \
                            <div> \
                                <span></span> \
                            </div> \
                        </div> \
                    </div> \
                </li>' % (i['ID'])
        else:
            returnHTML += ' \
                    <li class="slot-item li_style" id="Card_%s" \
                        style="border-left:10px solid %s; border-right:10px solid %s; "> \
                        <div class="clearfix"> \
                            <div class="float_left left_div border_right"> \
                                <div type="text" class="left_1 hover border_bottom" style="background-color: %s;"> \
                                    <span>%s</span> \
                                </div> \
                                <div class="left_2 border_bottom"> \
                                    <span>%s</span> \
                                </div> \
                                <div class="left_3 border_bottom"> \
                                    <span>%s</span> \
                                </div> \
                            </div> \
                            <div class="float_left right_div"> \
                                <div class="right_1 border_bottom border_right float_left right_1_left" style="background-color: %s; "> <span>预</span> </div> \
                                <div class="right_1 border_bottom border_right float_left right_1_mid" style="background-color: %s; "> <span>化</span> </div> \
                                <div class="right_1 border_bottom border_right float_left right_1_right" style="background-color:%s"> <span>%s</span> </div> \
                                <div class="right_2 border_bottom"> <span>投胚: %s</span> </div> \
                                <div class="right_3 border_bottom" > <span>滞留: %s</span> </div> \
                                <div class="right_4 border_bottom"> \
                                    <span>%s</span> \
                                </div> \
                            </div> \
                            <div class="left_4"> \
                                <span>%s --> %s --> %s</span> \
                            </div> \
                        </div> \
                    </li> ' % (
                i['ID'], i['sWorkCode'], i['sColorCode'], i['bISCheck'],
                i['sCardNo'], i['sMaterialNo'], i['sColorNo'], i['sPSColor'],
                i['sIsHYS'], i['sDyeingColor'], i['sDyeingCount'],
                i['nFactInputQty'], i['sOverTime'], i['sCustomerName'],
                i['sWorkingProcedureNameLast'],
                i['sWorkingProcedureNameCurrent'],
                i['sWorkingProcedureNameNext'])
    returnHTML += '</ul>'

    print(returnHTML)
    return returnHTML