import sqlite3
import sys
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtWidgets import QMessageBox
#import NextOffice.shipment.shipment_main
import NextOffice.shipment.shipment_edit
import NextOffice.shipment.shipment_add

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1460, 670)
        self.label_13 = QtWidgets.QLabel(Form)
        self.label_13.setGeometry(QtCore.QRect(520, 10, 161, 31))
        self.label_13.setObjectName("label_13")
        self.label_id1 = QtWidgets.QLabel(Form)
        self.label_id1.setGeometry(QtCore.QRect(40, 160, 51, 21))
        self.label_id1.setObjectName("label_id1")
        self.lineEdit_search = QtWidgets.QLineEdit(Form)
        self.lineEdit_search.setGeometry(QtCore.QRect(50, 40, 113, 20))
        self.lineEdit_search.setObjectName("lineEdit_search")
        self.label_customer1 = QtWidgets.QLabel(Form)
        self.label_customer1.setGeometry(QtCore.QRect(160, 160, 121, 21))
        self.label_customer1.setObjectName("label_customer1")
        self.line_7 = QtWidgets.QFrame(Form)
        self.line_7.setGeometry(QtCore.QRect(20, 70, 1211, 20))
        self.line_7.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_7.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_7.setObjectName("line_7")
        self.pushButton_SwitchCustomer = QtWidgets.QPushButton(Form)
        self.pushButton_SwitchCustomer.setGeometry(QtCore.QRect(1070, 40, 111, 23))
        self.pushButton_SwitchCustomer.setObjectName("pushButton_SwitchCustomer")
        self.pushButton_edit1 = QtWidgets.QPushButton(Form)
        self.pushButton_edit1.setGeometry(QtCore.QRect(1360, 150, 75, 23))
        self.pushButton_edit1.setObjectName("pushButton_edit1")
        self.line_2 = QtWidgets.QFrame(Form)
        self.line_2.setGeometry(QtCore.QRect(20, 200, 1351, 20))
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setGeometry(QtCore.QRect(350, 80, 61, 39))
        self.label_4.setObjectName("label_4")
        self.line = QtWidgets.QFrame(Form)
        self.line.setGeometry(QtCore.QRect(20, 110, 1351, 20))
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.pushButton_SwitchService = QtWidgets.QPushButton(Form)
        self.pushButton_SwitchService.setGeometry(QtCore.QRect(950, 40, 111, 23))
        self.pushButton_SwitchService.setObjectName("pushButton_SwitchService")
        self.label_8 = QtWidgets.QLabel(Form)
        self.label_8.setGeometry(QtCore.QRect(20, 42, 31, 20))
        self.label_8.setObjectName("label_8")
        self.label_5 = QtWidgets.QLabel(Form)
        self.label_5.setGeometry(QtCore.QRect(440, 80, 61, 39))
        self.label_5.setObjectName("label_5")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setGeometry(QtCore.QRect(110, 80, 61, 39))
        self.label_2.setObjectName("label_2")
        self.toolButton_connect = QtWidgets.QToolButton(Form)
        self.toolButton_connect.setGeometry(QtCore.QRect(1190, 40, 41, 31))
        self.toolButton_connect.setObjectName("toolButton_connect")
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setGeometry(QtCore.QRect(280, 80, 61, 39))
        self.label_3.setObjectName("label_3")
        self.toolButton_search = QtWidgets.QToolButton(Form)
        self.toolButton_search.setGeometry(QtCore.QRect(170, 30, 41, 31))
        self.toolButton_search.setObjectName("toolButton_search")
        self.pushButton_previous = QtWidgets.QPushButton(Form)
        self.pushButton_previous.setGeometry(QtCore.QRect(110, 590, 75, 23))
        self.pushButton_previous.setObjectName("pushButton_previous")
        self.label = QtWidgets.QLabel(Form)
        self.label.setGeometry(QtCore.QRect(30, 80, 51, 39))
        self.label.setObjectName("label")
        self.pushButton_next = QtWidgets.QPushButton(Form)
        self.pushButton_next.setGeometry(QtCore.QRect(220, 590, 75, 23))
        self.pushButton_next.setObjectName("pushButton_next")
        self.pushButton_new = QtWidgets.QPushButton(Form)
        self.pushButton_new.setGeometry(QtCore.QRect(560, 590, 91, 23))
        self.pushButton_new.setObjectName("pushButton_new")
        self.lineEdit_search2 = QtWidgets.QLineEdit(Form)
        self.lineEdit_search2.setGeometry(QtCore.QRect(390, 590, 31, 20))
        self.lineEdit_search2.setObjectName("lineEdit_search2")
        self.toolButton_search2 = QtWidgets.QToolButton(Form)
        self.toolButton_search2.setGeometry(QtCore.QRect(460, 580, 41, 31))
        self.toolButton_search2.setObjectName("toolButton_search2")
        self.label_9 = QtWidgets.QLabel(Form)
        self.label_9.setGeometry(QtCore.QRect(350, 580, 91, 39))
        self.label_9.setObjectName("label_9")
        self.label_10 = QtWidgets.QLabel(Form)
        self.label_10.setGeometry(QtCore.QRect(870, 80, 51, 39))
        self.label_10.setObjectName("label_10")
        self.label_11 = QtWidgets.QLabel(Form)
        self.label_11.setGeometry(QtCore.QRect(970, 80, 71, 39))
        self.label_11.setObjectName("label_11")
        self.label_12 = QtWidgets.QLabel(Form)
        self.label_12.setGeometry(QtCore.QRect(1240, 80, 51, 39))
        self.label_12.setObjectName("label_12")
        self.textBrowser_payRecord1 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_payRecord1.setGeometry(QtCore.QRect(830, 130, 141, 71))
        self.textBrowser_payRecord1.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_payRecord1.setLineWidth(0)
        self.textBrowser_payRecord1.setObjectName("textBrowser_payRecord1")
        self.label_order1 = QtWidgets.QLabel(Form)
        self.label_order1.setGeometry(QtCore.QRect(20, 160, 16, 21))
        self.label_order1.setObjectName("label_order1")
        self.label_order2 = QtWidgets.QLabel(Form)
        self.label_order2.setGeometry(QtCore.QRect(20, 250, 36, 21))
        self.label_order2.setObjectName("label_order2")
        self.label_order3 = QtWidgets.QLabel(Form)
        self.label_order3.setGeometry(QtCore.QRect(20, 340, 16, 31))
        self.label_order3.setObjectName("label_order3")
        self.label_order4 = QtWidgets.QLabel(Form)
        self.label_order4.setGeometry(QtCore.QRect(20, 420, 36, 41))
        self.label_order4.setObjectName("label_order4")
        self.label_order5 = QtWidgets.QLabel(Form)
        self.label_order5.setGeometry(QtCore.QRect(20, 510, 16, 31))
        self.label_order5.setObjectName("label_order5")
        self.pushButton_edit2 = QtWidgets.QPushButton(Form)
        self.pushButton_edit2.setGeometry(QtCore.QRect(1360, 240, 75, 23))
        self.pushButton_edit2.setObjectName("pushButton_edit2")
        self.pushButton_edit3 = QtWidgets.QPushButton(Form)
        self.pushButton_edit3.setGeometry(QtCore.QRect(1360, 330, 75, 23))
        self.pushButton_edit3.setObjectName("pushButton_edit3")
        self.pushButton_edit4 = QtWidgets.QPushButton(Form)
        self.pushButton_edit4.setGeometry(QtCore.QRect(1360, 420, 75, 23))
        self.pushButton_edit4.setObjectName("pushButton_edit4")
        self.pushButton_edit5 = QtWidgets.QPushButton(Form)
        self.pushButton_edit5.setGeometry(QtCore.QRect(1360, 510, 75, 23))
        self.pushButton_edit5.setObjectName("pushButton_edit5")
        self.label_14 = QtWidgets.QLabel(Form)
        self.label_14.setGeometry(QtCore.QRect(170, 80, 101, 39))
        self.label_14.setObjectName("label_14")
        self.label_shipDate1 = QtWidgets.QLabel(Form)
        self.label_shipDate1.setGeometry(QtCore.QRect(100, 160, 51, 21))
        self.label_shipDate1.setObjectName("label_shipDate1")
        self.label_sales1 = QtWidgets.QLabel(Form)
        self.label_sales1.setGeometry(QtCore.QRect(290, 160, 51, 21))
        self.label_sales1.setObjectName("label_sales1")
        self.label_production1 = QtWidgets.QLabel(Form)
        self.label_production1.setGeometry(QtCore.QRect(350, 160, 81, 21))
        self.label_production1.setObjectName("label_production1")
        self.label_model1 = QtWidgets.QLabel(Form)
        self.label_model1.setGeometry(QtCore.QRect(440, 160, 51, 21))
        self.label_model1.setObjectName("label_model1")
        self.label_15 = QtWidgets.QLabel(Form)
        self.label_15.setGeometry(QtCore.QRect(500, 80, 61, 39))
        self.label_15.setObjectName("label_15")
        self.label_macID1 = QtWidgets.QLabel(Form)
        self.label_macID1.setGeometry(QtCore.QRect(500, 160, 41, 21))
        self.label_macID1.setObjectName("label_macID1")
        self.label_16 = QtWidgets.QLabel(Form)
        self.label_16.setGeometry(QtCore.QRect(590, 80, 31, 39))
        self.label_16.setObjectName("label_16")
        self.label_17 = QtWidgets.QLabel(Form)
        self.label_17.setGeometry(QtCore.QRect(550, 80, 31, 39))
        self.label_17.setObjectName("label_17")
        self.label_18 = QtWidgets.QLabel(Form)
        self.label_18.setGeometry(QtCore.QRect(640, 80, 51, 39))
        self.label_18.setObjectName("label_18")
        self.label_number1 = QtWidgets.QLabel(Form)
        self.label_number1.setGeometry(QtCore.QRect(600, 160, 41, 21))
        self.label_number1.setObjectName("label_number1")
        self.label_unitPrice1 = QtWidgets.QLabel(Form)
        self.label_unitPrice1.setGeometry(QtCore.QRect(540, 160, 51, 21))
        self.label_unitPrice1.setObjectName("label_unitPrice1")
        self.label_amount1 = QtWidgets.QLabel(Form)
        self.label_amount1.setGeometry(QtCore.QRect(650, 160, 51, 21))
        self.label_amount1.setObjectName("label_amount1")
        self.label_19 = QtWidgets.QLabel(Form)
        self.label_19.setGeometry(QtCore.QRect(700, 80, 41, 39))
        self.label_19.setObjectName("label_19")
        self.label_paid1 = QtWidgets.QLabel(Form)
        self.label_paid1.setGeometry(QtCore.QRect(700, 160, 51, 21))
        self.label_paid1.setObjectName("label_paid1")
        self.label_20 = QtWidgets.QLabel(Form)
        self.label_20.setGeometry(QtCore.QRect(760, 80, 41, 39))
        self.label_20.setObjectName("label_20")
        self.label_receivable1 = QtWidgets.QLabel(Form)
        self.label_receivable1.setGeometry(QtCore.QRect(760, 160, 71, 21))
        self.label_receivable1.setObjectName("label_receivable1")
        self.label_payRemind1 = QtWidgets.QLabel(Form)
        self.label_payRemind1.setGeometry(QtCore.QRect(980, 160, 71, 21))
        self.label_payRemind1.setObjectName("label_payRemind1")
        self.textBrowser_shipTo1 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_shipTo1.setGeometry(QtCore.QRect(1050, 130, 141, 71))
        self.textBrowser_shipTo1.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_shipTo1.setLineWidth(0)
        self.textBrowser_shipTo1.setObjectName("textBrowser_shipTo1")
        self.label_21 = QtWidgets.QLabel(Form)
        self.label_21.setGeometry(QtCore.QRect(1090, 80, 71, 39))
        self.label_21.setObjectName("label_21")
        self.textBrowser_remark1 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_remark1.setGeometry(QtCore.QRect(1210, 130, 141, 71))
        self.textBrowser_remark1.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_remark1.setLineWidth(0)
        self.textBrowser_remark1.setObjectName("textBrowser_remark1")
        self.line_3 = QtWidgets.QFrame(Form)
        self.line_3.setGeometry(QtCore.QRect(20, 290, 1351, 20))
        self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.textBrowser_payRecord2 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_payRecord2.setGeometry(QtCore.QRect(830, 220, 141, 71))
        self.textBrowser_payRecord2.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_payRecord2.setLineWidth(0)
        self.textBrowser_payRecord2.setObjectName("textBrowser_payRecord2")
        self.label_number2 = QtWidgets.QLabel(Form)
        self.label_number2.setGeometry(QtCore.QRect(600, 250, 41, 21))
        self.label_number2.setObjectName("label_number2")
        self.textBrowser_shipTo2 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_shipTo2.setGeometry(QtCore.QRect(1050, 220, 141, 71))
        self.textBrowser_shipTo2.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_shipTo2.setLineWidth(0)
        self.textBrowser_shipTo2.setObjectName("textBrowser_shipTo2")
        self.label_customer2 = QtWidgets.QLabel(Form)
        self.label_customer2.setGeometry(QtCore.QRect(160, 250, 121, 21))
        self.label_customer2.setObjectName("label_customer2")
        self.label_id2 = QtWidgets.QLabel(Form)
        self.label_id2.setGeometry(QtCore.QRect(40, 250, 51, 21))
        self.label_id2.setObjectName("label_id2")
        self.label_sales2 = QtWidgets.QLabel(Form)
        self.label_sales2.setGeometry(QtCore.QRect(290, 250, 51, 21))
        self.label_sales2.setObjectName("label_sales2")
        self.label_production2 = QtWidgets.QLabel(Form)
        self.label_production2.setGeometry(QtCore.QRect(350, 250, 81, 21))
        self.label_production2.setObjectName("label_production2")
        self.label_amount2 = QtWidgets.QLabel(Form)
        self.label_amount2.setGeometry(QtCore.QRect(650, 250, 51, 21))
        self.label_amount2.setObjectName("label_amount2")
        self.label_model2 = QtWidgets.QLabel(Form)
        self.label_model2.setGeometry(QtCore.QRect(440, 250, 51, 21))
        self.label_model2.setObjectName("label_model2")
        self.label_receivable2 = QtWidgets.QLabel(Form)
        self.label_receivable2.setGeometry(QtCore.QRect(760, 250, 71, 21))
        self.label_receivable2.setObjectName("label_receivable2")
        self.textBrowser_remark2 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_remark2.setGeometry(QtCore.QRect(1210, 220, 141, 71))
        self.textBrowser_remark2.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_remark2.setLineWidth(0)
        self.textBrowser_remark2.setObjectName("textBrowser_remark2")
        self.label_payRemind2 = QtWidgets.QLabel(Form)
        self.label_payRemind2.setGeometry(QtCore.QRect(980, 250, 71, 21))
        self.label_payRemind2.setObjectName("label_payRemind2")
        self.label_macID2 = QtWidgets.QLabel(Form)
        self.label_macID2.setGeometry(QtCore.QRect(500, 250, 41, 21))
        self.label_macID2.setObjectName("label_macID2")
        self.label_unitPrice2 = QtWidgets.QLabel(Form)
        self.label_unitPrice2.setGeometry(QtCore.QRect(540, 250, 51, 21))
        self.label_unitPrice2.setObjectName("label_unitPrice2")
        self.label_shipDate2 = QtWidgets.QLabel(Form)
        self.label_shipDate2.setGeometry(QtCore.QRect(100, 250, 51, 21))
        self.label_shipDate2.setObjectName("label_shipDate2")
        self.label_paid2 = QtWidgets.QLabel(Form)
        self.label_paid2.setGeometry(QtCore.QRect(700, 250, 51, 21))
        self.label_paid2.setObjectName("label_paid2")
        self.line_4 = QtWidgets.QFrame(Form)
        self.line_4.setGeometry(QtCore.QRect(20, 380, 1351, 20))
        self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_4.setObjectName("line_4")
        self.label_number3 = QtWidgets.QLabel(Form)
        self.label_number3.setGeometry(QtCore.QRect(600, 340, 41, 21))
        self.label_number3.setObjectName("label_number3")
        self.textBrowser_payRecord3 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_payRecord3.setGeometry(QtCore.QRect(830, 310, 141, 71))
        self.textBrowser_payRecord3.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_payRecord3.setLineWidth(0)
        self.textBrowser_payRecord3.setObjectName("textBrowser_payRecord3")
        self.label_amount3 = QtWidgets.QLabel(Form)
        self.label_amount3.setGeometry(QtCore.QRect(650, 340, 51, 21))
        self.label_amount3.setObjectName("label_amount3")
        self.label_customer3 = QtWidgets.QLabel(Form)
        self.label_customer3.setGeometry(QtCore.QRect(160, 340, 121, 21))
        self.label_customer3.setObjectName("label_customer3")
        self.label_receivable3 = QtWidgets.QLabel(Form)
        self.label_receivable3.setGeometry(QtCore.QRect(760, 340, 71, 21))
        self.label_receivable3.setObjectName("label_receivable3")
        self.label_id3 = QtWidgets.QLabel(Form)
        self.label_id3.setGeometry(QtCore.QRect(40, 340, 51, 21))
        self.label_id3.setObjectName("label_id3")
        self.label_sales3 = QtWidgets.QLabel(Form)
        self.label_sales3.setGeometry(QtCore.QRect(290, 340, 51, 21))
        self.label_sales3.setObjectName("label_sales3")
        self.label_model3 = QtWidgets.QLabel(Form)
        self.label_model3.setGeometry(QtCore.QRect(440, 340, 51, 21))
        self.label_model3.setObjectName("label_model3")
        self.label_macID3 = QtWidgets.QLabel(Form)
        self.label_macID3.setGeometry(QtCore.QRect(500, 340, 41, 21))
        self.label_macID3.setObjectName("label_macID3")
        self.label_payRemind3 = QtWidgets.QLabel(Form)
        self.label_payRemind3.setGeometry(QtCore.QRect(980, 340, 71, 21))
        self.label_payRemind3.setObjectName("label_payRemind3")
        self.label_shipDate3 = QtWidgets.QLabel(Form)
        self.label_shipDate3.setGeometry(QtCore.QRect(100, 340, 51, 21))
        self.label_shipDate3.setObjectName("label_shipDate3")
        self.textBrowser_shipTo3 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_shipTo3.setGeometry(QtCore.QRect(1050, 310, 141, 71))
        self.textBrowser_shipTo3.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_shipTo3.setLineWidth(0)
        self.textBrowser_shipTo3.setObjectName("textBrowser_shipTo3")
        self.textBrowser_remark3 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_remark3.setGeometry(QtCore.QRect(1210, 310, 141, 71))
        self.textBrowser_remark3.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_remark3.setLineWidth(0)
        self.textBrowser_remark3.setObjectName("textBrowser_remark3")
        self.label_unitPrice3 = QtWidgets.QLabel(Form)
        self.label_unitPrice3.setGeometry(QtCore.QRect(540, 340, 51, 21))
        self.label_unitPrice3.setObjectName("label_unitPrice3")
        self.label_production3 = QtWidgets.QLabel(Form)
        self.label_production3.setGeometry(QtCore.QRect(350, 340, 81, 21))
        self.label_production3.setObjectName("label_production3")
        self.label_paid3 = QtWidgets.QLabel(Form)
        self.label_paid3.setGeometry(QtCore.QRect(700, 340, 51, 21))
        self.label_paid3.setObjectName("label_paid3")
        self.label_number4 = QtWidgets.QLabel(Form)
        self.label_number4.setGeometry(QtCore.QRect(600, 430, 41, 21))
        self.label_number4.setObjectName("label_number4")
        self.label_unitPrice4 = QtWidgets.QLabel(Form)
        self.label_unitPrice4.setGeometry(QtCore.QRect(540, 430, 51, 21))
        self.label_unitPrice4.setObjectName("label_unitPrice4")
        self.label_sales4 = QtWidgets.QLabel(Form)
        self.label_sales4.setGeometry(QtCore.QRect(290, 430, 51, 21))
        self.label_sales4.setObjectName("label_sales4")
        self.label_paid4 = QtWidgets.QLabel(Form)
        self.label_paid4.setGeometry(QtCore.QRect(700, 430, 51, 21))
        self.label_paid4.setObjectName("label_paid4")
        self.line_5 = QtWidgets.QFrame(Form)
        self.line_5.setGeometry(QtCore.QRect(20, 470, 1351, 20))
        self.line_5.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_5.setObjectName("line_5")
        self.label_receivable4 = QtWidgets.QLabel(Form)
        self.label_receivable4.setGeometry(QtCore.QRect(760, 430, 71, 21))
        self.label_receivable4.setObjectName("label_receivable4")
        self.label_shipDate4 = QtWidgets.QLabel(Form)
        self.label_shipDate4.setGeometry(QtCore.QRect(100, 430, 51, 21))
        self.label_shipDate4.setObjectName("label_shipDate4")
        self.label_customer4 = QtWidgets.QLabel(Form)
        self.label_customer4.setGeometry(QtCore.QRect(160, 430, 121, 21))
        self.label_customer4.setObjectName("label_customer4")
        self.label_id4 = QtWidgets.QLabel(Form)
        self.label_id4.setGeometry(QtCore.QRect(40, 430, 51, 21))
        self.label_id4.setObjectName("label_id4")
        self.label_macID4 = QtWidgets.QLabel(Form)
        self.label_macID4.setGeometry(QtCore.QRect(500, 430, 41, 21))
        self.label_macID4.setObjectName("label_macID4")
        self.textBrowser_payRecord4 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_payRecord4.setGeometry(QtCore.QRect(830, 400, 141, 71))
        self.textBrowser_payRecord4.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_payRecord4.setLineWidth(0)
        self.textBrowser_payRecord4.setObjectName("textBrowser_payRecord4")
        self.label_model4 = QtWidgets.QLabel(Form)
        self.label_model4.setGeometry(QtCore.QRect(440, 430, 51, 21))
        self.label_model4.setObjectName("label_model4")
        self.label_amount4 = QtWidgets.QLabel(Form)
        self.label_amount4.setGeometry(QtCore.QRect(650, 430, 51, 21))
        self.label_amount4.setObjectName("label_amount4")
        self.textBrowser_remark4 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_remark4.setGeometry(QtCore.QRect(1210, 400, 141, 71))
        self.textBrowser_remark4.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_remark4.setLineWidth(0)
        self.textBrowser_remark4.setObjectName("textBrowser_remark4")
        self.label_production4 = QtWidgets.QLabel(Form)
        self.label_production4.setGeometry(QtCore.QRect(350, 430, 81, 21))
        self.label_production4.setObjectName("label_production4")
        self.label_payRemind4 = QtWidgets.QLabel(Form)
        self.label_payRemind4.setGeometry(QtCore.QRect(980, 430, 71, 21))
        self.label_payRemind4.setObjectName("label_payRemind4")
        self.textBrowser_shipTo4 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_shipTo4.setGeometry(QtCore.QRect(1050, 400, 141, 71))
        self.textBrowser_shipTo4.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_shipTo4.setLineWidth(0)
        self.textBrowser_shipTo4.setObjectName("textBrowser_shipTo4")
        self.label_number5 = QtWidgets.QLabel(Form)
        self.label_number5.setGeometry(QtCore.QRect(600, 520, 41, 21))
        self.label_number5.setObjectName("label_number5")
        self.label_unitPrice5 = QtWidgets.QLabel(Form)
        self.label_unitPrice5.setGeometry(QtCore.QRect(540, 520, 51, 21))
        self.label_unitPrice5.setObjectName("label_unitPrice5")
        self.label_sales5 = QtWidgets.QLabel(Form)
        self.label_sales5.setGeometry(QtCore.QRect(290, 520, 51, 21))
        self.label_sales5.setObjectName("label_sales5")
        self.label_paid5 = QtWidgets.QLabel(Form)
        self.label_paid5.setGeometry(QtCore.QRect(700, 520, 51, 21))
        self.label_paid5.setObjectName("label_paid5")
        self.line_6 = QtWidgets.QFrame(Form)
        self.line_6.setGeometry(QtCore.QRect(20, 560, 1351, 20))
        self.line_6.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_6.setObjectName("line_6")
        self.label_receivable5 = QtWidgets.QLabel(Form)
        self.label_receivable5.setGeometry(QtCore.QRect(760, 520, 71, 21))
        self.label_receivable5.setObjectName("label_receivable5")
        self.label_shipDate5 = QtWidgets.QLabel(Form)
        self.label_shipDate5.setGeometry(QtCore.QRect(100, 520, 51, 21))
        self.label_shipDate5.setObjectName("label_shipDate5")
        self.label_customer5 = QtWidgets.QLabel(Form)
        self.label_customer5.setGeometry(QtCore.QRect(160, 520, 121, 21))
        self.label_customer5.setObjectName("label_customer5")
        self.label_id5 = QtWidgets.QLabel(Form)
        self.label_id5.setGeometry(QtCore.QRect(40, 520, 51, 21))
        self.label_id5.setObjectName("label_id5")
        self.label_macID5 = QtWidgets.QLabel(Form)
        self.label_macID5.setGeometry(QtCore.QRect(500, 520, 41, 21))
        self.label_macID5.setObjectName("label_macID5")
        self.textBrowser_payRecord5 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_payRecord5.setGeometry(QtCore.QRect(830, 490, 141, 71))
        self.textBrowser_payRecord5.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_payRecord5.setLineWidth(0)
        self.textBrowser_payRecord5.setObjectName("textBrowser_payRecord5")
        self.label_model5 = QtWidgets.QLabel(Form)
        self.label_model5.setGeometry(QtCore.QRect(440, 520, 51, 21))
        self.label_model5.setObjectName("label_model5")
        self.label_amount5 = QtWidgets.QLabel(Form)
        self.label_amount5.setGeometry(QtCore.QRect(650, 520, 51, 21))
        self.label_amount5.setObjectName("label_amount5")
        self.textBrowser_remark5 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_remark5.setGeometry(QtCore.QRect(1210, 490, 141, 71))
        self.textBrowser_remark5.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_remark5.setLineWidth(0)
        self.textBrowser_remark5.setObjectName("textBrowser_remark5")
        self.label_production5 = QtWidgets.QLabel(Form)
        self.label_production5.setGeometry(QtCore.QRect(350, 520, 81, 21))
        self.label_production5.setObjectName("label_production5")
        self.label_payRemind5 = QtWidgets.QLabel(Form)
        self.label_payRemind5.setGeometry(QtCore.QRect(980, 520, 71, 21))
        self.label_payRemind5.setObjectName("label_payRemind5")
        self.textBrowser_shipTo5 = QtWidgets.QTextBrowser(Form)
        self.textBrowser_shipTo5.setGeometry(QtCore.QRect(1050, 490, 141, 71))
        self.textBrowser_shipTo5.setFrameShadow(QtWidgets.QFrame.Plain)
        self.textBrowser_shipTo5.setLineWidth(0)
        self.textBrowser_shipTo5.setObjectName("textBrowser_shipTo5")
        self.label_13.raise_()
        self.label_id1.raise_()
        self.lineEdit_search.raise_()
        self.label_customer1.raise_()
        self.line_7.raise_()
        self.pushButton_SwitchCustomer.raise_()
        self.pushButton_edit1.raise_()
        self.line_2.raise_()
        self.label_4.raise_()
        self.line.raise_()
        self.pushButton_SwitchService.raise_()
        self.label_8.raise_()
        self.label_5.raise_()
        self.label_2.raise_()
        self.toolButton_connect.raise_()
        self.label_3.raise_()
        self.toolButton_search.raise_()
        self.pushButton_previous.raise_()
        self.label.raise_()
        self.pushButton_next.raise_()
        self.pushButton_new.raise_()
        self.toolButton_search2.raise_()
        self.label_9.raise_()
        self.lineEdit_search2.raise_()
        self.label_10.raise_()
        self.label_11.raise_()
        self.label_12.raise_()
        self.textBrowser_payRecord1.raise_()
        self.label_order1.raise_()
        self.label_order2.raise_()
        self.label_order3.raise_()
        self.label_order4.raise_()
        self.label_order5.raise_()
        self.pushButton_edit2.raise_()
        self.pushButton_edit3.raise_()
        self.pushButton_edit4.raise_()
        self.pushButton_edit5.raise_()
        self.label_14.raise_()
        self.label_shipDate1.raise_()
        self.label_sales1.raise_()
        self.label_production1.raise_()
        self.label_model1.raise_()
        self.label_15.raise_()
        self.label_macID1.raise_()
        self.label_16.raise_()
        self.label_17.raise_()
        self.label_18.raise_()
        self.label_number1.raise_()
        self.label_unitPrice1.raise_()
        self.label_amount1.raise_()
        self.label_19.raise_()
        self.label_paid1.raise_()
        self.label_20.raise_()
        self.label_receivable1.raise_()
        self.label_payRemind1.raise_()
        self.textBrowser_shipTo1.raise_()
        self.label_21.raise_()
        self.textBrowser_remark1.raise_()
        self.line_3.raise_()
        self.textBrowser_payRecord2.raise_()
        self.label_number2.raise_()
        self.textBrowser_shipTo2.raise_()
        self.label_customer2.raise_()
        self.label_id2.raise_()
        self.label_sales2.raise_()
        self.label_production2.raise_()
        self.label_amount2.raise_()
        self.label_model2.raise_()
        self.label_receivable2.raise_()
        self.textBrowser_remark2.raise_()
        self.label_payRemind2.raise_()
        self.label_macID2.raise_()
        self.label_unitPrice2.raise_()
        self.label_shipDate2.raise_()
        self.label_paid2.raise_()
        self.line_4.raise_()
        self.label_number3.raise_()
        self.textBrowser_payRecord3.raise_()
        self.label_amount3.raise_()
        self.label_customer3.raise_()
        self.label_receivable3.raise_()
        self.label_id3.raise_()
        self.label_sales3.raise_()
        self.label_model3.raise_()
        self.label_macID3.raise_()
        self.label_payRemind3.raise_()
        self.label_shipDate3.raise_()
        self.textBrowser_shipTo3.raise_()
        self.textBrowser_remark3.raise_()
        self.label_unitPrice3.raise_()
        self.label_production3.raise_()
        self.label_paid3.raise_()
        self.label_number4.raise_()
        self.label_unitPrice4.raise_()
        self.label_sales4.raise_()
        self.label_paid4.raise_()
        self.line_5.raise_()
        self.label_receivable4.raise_()
        self.label_shipDate4.raise_()
        self.label_customer4.raise_()
        self.label_id4.raise_()
        self.label_macID4.raise_()
        self.textBrowser_payRecord4.raise_()
        self.label_model4.raise_()
        self.label_amount4.raise_()
        self.textBrowser_remark4.raise_()
        self.label_production4.raise_()
        self.label_payRemind4.raise_()
        self.textBrowser_shipTo4.raise_()
        self.label_number5.raise_()
        self.label_unitPrice5.raise_()
        self.label_sales5.raise_()
        self.label_paid5.raise_()
        self.line_6.raise_()
        self.label_receivable5.raise_()
        self.label_shipDate5.raise_()
        self.label_customer5.raise_()
        self.label_id5.raise_()
        self.label_macID5.raise_()
        self.textBrowser_payRecord5.raise_()
        self.label_model5.raise_()
        self.label_amount5.raise_()
        self.textBrowser_remark5.raise_()
        self.label_production5.raise_()
        self.label_payRemind5.raise_()
        self.textBrowser_shipTo5.raise_()

        self.retranslateUi(Form)
        self.pushButton_previous.clicked.connect(self.reloadWidgetDec)
        self.pushButton_next.clicked.connect(self.reloadWidgetAdd)
#        self.pushButton_new.clicked.connect(Form.handle_click)
#        self.label_9.linkActivated['QString'].connect(Form.handle_click)
#        self.pushButton_SwitchShipment.clicked.connect(Form.handle_show)
#        self.pushButton_SwitchCustomer.clicked.connect(Form.handle_show)
#        self.pushButton_edit1.clicked.connect(Form.handle_click)
#        self.pushButton_edit2.clicked.connect(Form.handle_click)
#        self.pushButton_edit3.clicked.connect(Form.handle_click)
#        self.pushButton_edit4.clicked.connect(Form.handle_click)
#        self.pushButton_edit5.clicked.connect(Form.handle_click)
        QtCore.QMetaObject.connectSlotsByName(Form)
    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.label_13.setText(_translate("Form", "<html><head/><body><p align=\"center\"><span style=\" font-size:16pt; font-weight:600; color:#0b3da8;\">产品出货信息</span></p></body></html>"))
        self.label_id1.setText(_translate("Form", "id"))
        self.label_customer1.setText(_translate("Form", "customer"))
        self.pushButton_SwitchCustomer.setText(_translate("Form", "客户信息界面"))
        self.pushButton_edit1.setText(_translate("Form", "编辑"))
        self.label_4.setText(_translate("Form", "出货产品"))
        self.pushButton_SwitchService.setText(_translate("Form", "售后服务记录"))
        self.label_8.setText(_translate("Form", "搜索"))
        self.label_5.setText(_translate("Form", "规格型号"))
        self.label_2.setText(_translate("Form", "出货日期"))
        self.toolButton_connect.setText(_translate("Form", "..."))
        self.label_3.setText(_translate("Form", "业务负责"))
        self.toolButton_search.setText(_translate("Form", "..."))
        self.pushButton_previous.setText(_translate("Form", "上一页"))
        self.label.setText(_translate("Form", "出货单ID"))
        self.pushButton_next.setText(_translate("Form", "下一页"))
        self.pushButton_new.setText(_translate("Form", "新增出货信息"))
        self.toolButton_search2.setText(_translate("Form", "..."))
        self.label_9.setText(_translate("Form", "跳到第       页"))
        self.label_10.setText(_translate("Form", "付款记录"))
        self.label_11.setText(_translate("Form", "下次付款时间"))
        self.label_12.setText(_translate("Form", "备注"))
        self.textBrowser_payRecord1.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">payRecord1</p></body></html>"))
        self.label_order1.setText(_translate("Form", "1"))
        self.label_order2.setText(_translate("Form", "2"))
        self.label_order3.setText(_translate("Form", "3"))
        self.label_order4.setText(_translate("Form", "4"))
        self.label_order5.setText(_translate("Form", "5"))
        self.pushButton_edit2.setText(_translate("Form", "编辑"))
        self.pushButton_edit3.setText(_translate("Form", "编辑"))
        self.pushButton_edit4.setText(_translate("Form", "编辑"))
        self.pushButton_edit5.setText(_translate("Form", "编辑"))
        self.label_14.setText(_translate("Form", "客户"))
        self.label_shipDate1.setText(_translate("Form", "shipDate"))
        self.label_sales1.setText(_translate("Form", "sales"))
        self.label_production1.setText(_translate("Form", "production"))
        self.label_model1.setText(_translate("Form", "model"))
        self.label_15.setText(_translate("Form", "设备号"))
        self.label_macID1.setText(_translate("Form", "macID"))
        self.label_16.setText(_translate("Form", "数量"))
        self.label_17.setText(_translate("Form", "单价"))
        self.label_18.setText(_translate("Form", "金额"))
        self.label_number1.setText(_translate("Form", "number"))
        self.label_unitPrice1.setText(_translate("Form", "unitPrice"))
        self.label_amount1.setText(_translate("Form", "amount1"))
        self.label_19.setText(_translate("Form", "已付款"))
        self.label_paid1.setText(_translate("Form", "paid1"))
        self.label_20.setText(_translate("Form", "应收款"))
        self.label_receivable1.setText(_translate("Form", "receivable1"))
        self.label_payRemind1.setText(_translate("Form", "payRemind"))
        self.textBrowser_shipTo1.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">shipto1</p></body></html>"))
        self.label_21.setText(_translate("Form", "发货地址"))
        self.textBrowser_remark1.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">remark1</p></body></html>"))
        self.textBrowser_payRecord2.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">payRecord1</p></body></html>"))
        self.label_number2.setText(_translate("Form", "number"))
        self.textBrowser_shipTo2.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">shipto1</p></body></html>"))
        self.label_customer2.setText(_translate("Form", "customer"))
        self.label_id2.setText(_translate("Form", "id"))
        self.label_sales2.setText(_translate("Form", "sales"))
        self.label_production2.setText(_translate("Form", "production"))
        self.label_amount2.setText(_translate("Form", "amount1"))
        self.label_model2.setText(_translate("Form", "model"))
        self.label_receivable2.setText(_translate("Form", "receivable1"))
        self.textBrowser_remark2.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">remark1</p></body></html>"))
        self.label_payRemind2.setText(_translate("Form", "payRemind"))
        self.label_macID2.setText(_translate("Form", "macID"))
        self.label_unitPrice2.setText(_translate("Form", "unitPrice"))
        self.label_shipDate2.setText(_translate("Form", "shipDate"))
        self.label_paid2.setText(_translate("Form", "paid1"))
        self.label_number3.setText(_translate("Form", "number"))
        self.textBrowser_payRecord3.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">payRecord1</p></body></html>"))
        self.label_amount3.setText(_translate("Form", "amount1"))
        self.label_customer3.setText(_translate("Form", "customer"))
        self.label_receivable3.setText(_translate("Form", "receivable1"))
        self.label_id3.setText(_translate("Form", "id"))
        self.label_sales3.setText(_translate("Form", "sales"))
        self.label_model3.setText(_translate("Form", "model"))
        self.label_macID3.setText(_translate("Form", "macID"))
        self.label_payRemind3.setText(_translate("Form", "payRemind"))
        self.label_shipDate3.setText(_translate("Form", "shipDate"))
        self.textBrowser_shipTo3.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">shipto1</p></body></html>"))
        self.textBrowser_remark3.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">remark1</p></body></html>"))
        self.label_unitPrice3.setText(_translate("Form", "unitPrice"))
        self.label_production3.setText(_translate("Form", "production"))
        self.label_paid3.setText(_translate("Form", "paid1"))
        self.label_number4.setText(_translate("Form", "number"))
        self.label_unitPrice4.setText(_translate("Form", "unitPrice"))
        self.label_sales4.setText(_translate("Form", "sales"))
        self.label_paid4.setText(_translate("Form", "paid1"))
        self.label_receivable4.setText(_translate("Form", "receivable1"))
        self.label_shipDate4.setText(_translate("Form", "shipDate"))
        self.label_customer4.setText(_translate("Form", "customer"))
        self.label_id4.setText(_translate("Form", "id"))
        self.label_macID4.setText(_translate("Form", "macID"))
        self.textBrowser_payRecord4.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">payRecord1</p></body></html>"))
        self.label_model4.setText(_translate("Form", "model"))
        self.label_amount4.setText(_translate("Form", "amount1"))
        self.textBrowser_remark4.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">remark1</p></body></html>"))
        self.label_production4.setText(_translate("Form", "production"))
        self.label_payRemind4.setText(_translate("Form", "payRemind"))
        self.textBrowser_shipTo4.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">shipto1</p></body></html>"))
        self.label_number5.setText(_translate("Form", "number"))
        self.label_unitPrice5.setText(_translate("Form", "unitPrice"))
        self.label_sales5.setText(_translate("Form", "sales"))
        self.label_paid5.setText(_translate("Form", "paid1"))
        self.label_receivable5.setText(_translate("Form", "receivable1"))
        self.label_shipDate5.setText(_translate("Form", "shipDate"))
        self.label_customer5.setText(_translate("Form", "customer"))
        self.label_id5.setText(_translate("Form", "id"))
        self.label_macID5.setText(_translate("Form", "macID"))
        self.textBrowser_payRecord5.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">payRecord1</p></body></html>"))
        self.label_model5.setText(_translate("Form", "model"))
        self.label_amount5.setText(_translate("Form", "amount1"))
        self.textBrowser_remark5.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">remark1</p></body></html>"))
        self.label_production5.setText(_translate("Form", "production"))
        self.label_payRemind5.setText(_translate("Form", "payRemind"))
        self.textBrowser_shipTo5.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">shipto1</p></body></html>"))
####以上为QTDesiger自动生成代码
###以下为自己写的代码
    def closeEvent(self, event):        #关闭窗口触发以下事件
        reply = QMessageBox.question(self, '消息提示', '你确定要退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
        if reply == QMessageBox.Yes:
            event.accept()        #接受关闭事件
        else:
            event.ignore()        #忽略关闭事件
    def reloadWidgetAdd(self,i): #点击下一页触发
        print ("reloadWidgeAdd")
        i= int(self.label_order5.text())
        if i < dblen: #dblen():
#            global g
            NextOffice.shipment.shipment_main.g=NextOffice.shipment.shipment_main.g+1 #全局变量P页数+1
            self.pageDisplay(NextOffice.shipment.shipment_main.g)
            print("shipment_main的g是",NextOffice.shipment.shipment_main.g)

        else:
            print("remain")
    def reloadWidgetDec(self,i): #点击上一页触发
        print ("reloadWidgeDec")
        i= int(self.label_order5.text())
        if i > 5:
            global g
            NextOffice.shipment.shipment_main.g=NextOffice.shipment.shipment_main.g-1 #全局变量P页数+1
#            g=g-1 #全局变量P页数-1
            self.pageDisplay(NextOffice.shipment.shipment_main.g)
        else:
            print("remain")
    def pageDisplay(self,g):  #本函数显示g页的数据
        print("pageDisplay",g)
        orderE=g*5
        orderD=orderE-1
        orderC=orderE-2
        orderB=orderE-3
        orderA=orderE-4
        self.label_order1.setText(str(orderA))
        self.label_order2.setText(str(orderB))
        self.label_order3.setText(str(orderC))
        self.label_order4.setText(str(orderD))
        self.label_order5.setText(str(orderE))

#        conn = sqlite3.connect('../nextai.db')
        conn = sqlite3.connect('nextai.db')

        curs = conn.cursor()  #创建游标
#        print ("pageData()打开数据库成功")
        curs.execute("SELECT * from shipment")
        data= curs.fetchall()

        p=g*5-4  #获得当前页面的第1行

        blank=["","","","","","","","0","0","0","","","","","",""]
        a=dblen%5 #计算最后一页总共有几行？
        b=5-a  #计算空白的有几行
        c=0
        while c<b:#将当前页面的空白记录行填充N/A，以免data赋值的时候不够5行导致出错
            data.append(blank)
            c=c+1



##计算出货产品价格与应收款
        unitPrice1=int(data[p-1][7])
        number1=int(data[p-1][8])
        amount1=unitPrice1*number1
        paid1=int(data[p-1][9])
        receivable1=amount1-paid1

        unitPrice2=int(data[p][7])
        number2=int(data[p][8])
        amount2=unitPrice2*number2
        paid2=int(data[p][9])
        receivable2=amount2-paid2

        unitPrice3=int(data[p+1][7])
        number3=int(data[p+1][8])
        amount3=unitPrice3*number3
        paid3=int(data[p+1][9])
        receivable3=amount3-paid3

        unitPrice4=int(data[p+2][7])
        number4=int(data[p+2][8])
        amount4=unitPrice4*number4
        paid4=int(data[p+2][9])
        receivable4=amount4-paid4

        unitPrice5=int(data[p+3][7])
        number5=int(data[p+3][8])
        amount5=unitPrice5*number5
        paid5=int(data[p+3][9])
        receivable5=amount5-paid5



#以下将数据库中获取的内容分别对应显示在5行内
        self.label_id1.setText(str(data[p-1][0])) #数据库是从0开始的，所以减1
        self.label_shipDate1.setText(str(data[p-1][1]))
        self.label_customer1.setText(str(data[p-1][2]))
        self.label_sales1.setText(str(data[p-1][3]))
        self.label_production1.setText(str(data[p-1][4]))
        self.label_model1.setText(str(data[p-1][5]))
        self.label_macID1.setText(str(data[p-1][6]))
        self.label_unitPrice1.setText(str(data[p-1][7]))
        self.label_number1.setText(str(data[p-1][8]))
        self.label_paid1.setText(str(data[p-1][9]))
        self.textBrowser_payRecord1.setText(str(data[p-1][10]))
        self.label_payRemind1.setText(str(data[p-1][11]))
        self.textBrowser_shipTo1.setText(str(data[p-1][12]))
        self.textBrowser_remark1.setText(str(data[p-1][13]))
        self.label_amount1.setText(str(amount1))
        self.label_receivable1.setText(str(receivable1))

        self.label_id2.setText(str(data[p][0])) #数据库是从0开始的，所以减1
        self.label_shipDate2.setText(str(data[p][1]))
        self.label_customer2.setText(str(data[p][2]))
        self.label_sales2.setText(str(data[p][3]))
        self.label_production2.setText(str(data[p][4]))
        self.label_model2.setText(str(data[p][5]))
        self.label_macID2.setText(str(data[p][6]))
        self.label_unitPrice2.setText(str(data[p][7]))
        self.label_number2.setText(str(data[p][8]))
#        self.label_amount2.setText(str(data[p][9]))
        self.label_paid2.setText(str(data[p][9]))
#        self.label_receivable2.setText(str(data[p][11]))
        self.textBrowser_payRecord2.setText(str(data[p][10]))
        self.label_payRemind2.setText(str(data[p][11]))
        self.textBrowser_shipTo2.setText(str(data[p][12]))
        self.textBrowser_remark2.setText(str(data[p][13]))
        self.label_amount2.setText(str(amount2))
        self.label_receivable2.setText(str(receivable2))

        self.label_id3.setText(str(data[p+1][0])) #数据库是从0开始的，所以减1
        self.label_shipDate3.setText(str(data[p+1][1]))
        self.label_customer3.setText(str(data[p+1][2]))
        self.label_sales3.setText(str(data[p+1][3]))
        self.label_production3.setText(str(data[p+1][4]))
        self.label_model3.setText(str(data[p+1][5]))
        self.label_macID3.setText(str(data[p+1][6]))
        self.label_unitPrice3.setText(str(data[p+1][7]))
        self.label_number3.setText(str(data[p+1][8]))
#        self.label_amount3.setText(str(data[p+1][9]))
        self.label_paid3.setText(str(data[p+1][9]))
#        self.label_receivable3.setText(str(data[p+1][11]))
        self.textBrowser_payRecord3.setText(str(data[p+1][10]))
        self.label_payRemind3.setText(str(data[p+1][11]))
        self.textBrowser_shipTo3.setText(str(data[p+1][12]))
        self.textBrowser_remark3.setText(str(data[p+1][13]))
        self.label_amount3.setText(str(amount3))
        self.label_receivable3.setText(str(receivable3))


        self.label_id4.setText(str(data[p+2][0])) #数据库是从0开始的，所以减1
        self.label_shipDate4.setText(str(data[p+2][1]))
        self.label_customer4.setText(str(data[p+2][2]))
        self.label_sales4.setText(str(data[p+2][3]))
        self.label_production4.setText(str(data[p+2][4]))
        self.label_model4.setText(str(data[p+2][5]))
        self.label_macID4.setText(str(data[p+2][6]))
        self.label_unitPrice4.setText(str(data[p+2][7]))
        self.label_number4.setText(str(data[p+2][8]))
#        self.label_amount4.setText(str(data[p+2][9]))
        self.label_paid4.setText(str(data[p+2][9]))
#        self.label_receivable4.setText(str(data[p+2][11]))
        self.textBrowser_payRecord4.setText(str(data[p+2][10]))
        self.label_payRemind4.setText(str(data[p+2][11]))
        self.textBrowser_shipTo4.setText(str(data[p+2][12]))
        self.textBrowser_remark4.setText(str(data[p+2][13]))
        self.label_amount4.setText(str(amount4))
        self.label_receivable4.setText(str(receivable4))


        self.label_id5.setText(str(data[p+3][0])) #数据库是从0开始的，所以减1
        self.label_shipDate5.setText(str(data[p+3][1]))
        self.label_customer5.setText(str(data[p+3][2]))
        self.label_sales5.setText(str(data[p+3][3]))
        self.label_production5.setText(str(data[p+3][4]))
        self.label_model5.setText(str(data[p+3][5]))
        self.label_macID5.setText(str(data[p+3][6]))
        self.label_unitPrice5.setText(str(data[p+3][7]))
        self.label_number5.setText(str(data[p+3][8]))
#        self.label_amount5.setText(str(data[p+3][9]))
        self.label_paid5.setText(str(data[p+3][9]))
#        self.label_receivable5.setText(str(data[p+3][11]))
        self.textBrowser_payRecord5.setText(str(data[p+3][10]))
        self.label_payRemind5.setText(str(data[p+3][11]))
        self.textBrowser_shipTo5.setText(str(data[p+3][12]))
        self.textBrowser_remark5.setText(str(data[p+3][13]))
        self.label_amount5.setText(str(amount5))
        self.label_receivable5.setText(str(receivable5))
        curs.close()  #关闭游标
        conn.commit() #保存数据库
        conn.close() #关闭数据库连接
    def page(self):
        global g
        g=g+0
        return g
    def reload(self):
        print("browser:reload start")
        print("g=",NextOffice.shipment.shipment_main.g)
        self.pageDisplay(NextOffice.shipment.shipment_main.g)
        print("browser:reload finish")

def dblen():
#        conn = sqlite3.connect('../nextai.db')
        conn = sqlite3.connect('nextai.db')

        curs = conn.cursor()  #创建游标

#        print ("打开数据库成功")

        curs.execute("SELECT * from shipment")
        data= curs.fetchall()
#        print (data[10])
        print (data[0][7])
#        print (data[0][1])

        lens=len(data)
        print ("开始运行数据库共有记录：",lens)

        curs.close()  #关闭游标
        conn.commit() #保存数据库
        conn.close() #关闭数据库连接
        return lens

class MyForm ( QWidget, Ui_Form ):
    def __init__(self):
        super().__init__()
        self.setupUi(self)
 #       e = NextOffice.shipment.shipment_edit.MyForm()
 #       a = NextOffice.shipment.shipment_add.MyForm()
#        self.pushButton_edit1.clicked.connect(e.handle_click1)
#        self.pushButton_edit2.clicked.connect(e.handle_click2)
#        self.pushButton_edit3.clicked.connect(e.handle_click3)
#        self.pushButton_edit4.clicked.connect(e.handle_click4)
#        self.pushButton_edit5.clicked.connect(e.handle_click5)
#        self.pushButton_new.clicked.connect(a.handle_click)



dblen=dblen() #获取数据库的总长度，赋值给变量dblen，这样就不需要每次去获取了


if __name__=='__main__':
#    global g #全局变量p——当前页面
    g=1
#    dblen=dblen() #获取数据库的总长度，赋值给变量dblen，这样就不需要每次去获取了
    app=QApplication(sys.argv)
    b = MyForm()
    b.pageDisplay(g)
#    b.showBrowser()
    b.show()
    e = NextOffice.shipment.shipment_edit.MyForm()
    a = NextOffice.shipment.shipment_add.MyForm()

    b.pushButton_edit1.clicked.connect(e.handle_click1)
#    w.pushButton_edit1.clicked.connect(e.handle_click1)
    b.pushButton_edit2.clicked.connect(e.handle_click2)
    b.pushButton_edit3.clicked.connect(e.handle_click3)
    b.pushButton_edit4.clicked.connect(e.handle_click4)
    b.pushButton_edit5.clicked.connect(e.handle_click5)

    b.pushButton_new.clicked.connect(a.handle_click)

    app.exec_()



"""
UIC之后，将以下2个语句中的Main修改为self即可
self.pushButton_next.clicked.connect(self.reloadWidgetAdd)
self.pushButton_previous.clicked.connect(self.reloadWidgetDec)

"""