浏览代码

前端gjy

18513069273 4 年之前
父节点
当前提交
71fd81cc59

+ 23 - 0
src/views/contractManagement/purchaseContract.vue

@@ -906,5 +906,28 @@ export default {
     cursor: text;
     padding: 0 !important;
   }
+  .el-message-box{
+    width: 440px;
+    height: 160px;
+    background: #FFFFFF;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+ /deep/.el-message-box__message p{
+    width: 351px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #191919;
+    line-height: 20px;
+  }
+.el-message-box__title{
+  width: 440px;
+  height: 160px;
+  background: #FFFFFF;
+  box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+  border-radius: 4px;
+}
 }
 </style>

+ 450 - 464
src/views/contractManagement/purchaseContractAdd.vue

@@ -21,516 +21,499 @@
       </el-col>
     </el-row>
 
-    <div class="wenzi">
-      <h3>基本信息</h3>
-      <p style="color: #8890b1">
-        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
-        标记的条目提交后不可修改。
-      </p>
-    </div>
-    <div class="center">
-      <ws-form ref="deptBudgetList" :model="deptBudgetList">
-        <!--基本信息-->
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <!--合同编号-->
+        <ws-form-item
+          label="合同编号"
+          span="1"
+          prop="contractNo"
+          class="readonly"
+        >
+          <ws-input
+            v-model="deptBudgetList.contractNo"
+            placeholder="请输入合同编号"
+            maxlength="20"
+            size="small"
+            :rules="ruleDeptBudget"
+          />
+        </ws-form-item>
 
-        <ws-info-table>
-          <!--合同编号-->
-          <ws-form-item
-            label="合同编号"
-            span="1"
-            prop="contractNo"
-            class="readonly"
-          >
-            <ws-input
-              v-model="deptBudgetList.contractNo"
-              placeholder="请输入合同编号"
-              maxlength="20"
-              size="small"
-              :rules="ruleDeptBudget"
-            />
-          </ws-form-item>
+        <!--运输方式-->
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          <ws-input
+            v-model="deptBudgetList.shippingType"
+            placeholder="请输入运输方式"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--运输方式-->
-          <ws-form-item label="运输方式" span="1" prop="shippingType">
-            <ws-input
-              v-model="deptBudgetList.shippingType"
-              placeholder="请输入运输方式"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--买方-->
+        <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.buyer"
+            placeholder="请输入买方名称"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--买方-->
-          <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
-            <ws-input
-              v-model="deptBudgetList.buyer"
-              placeholder="请输入买方名称"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--结算方式-->
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+          <ws-input
+            v-model="deptBudgetList.settlementMethod"
+            placeholder="请输入结算方式"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--结算方式-->
-          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
-            <ws-input
-              v-model="deptBudgetList.settlementMethod"
-              placeholder="请输入结算方式"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--卖方-->
+        <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.seller"
+            placeholder="请输入卖方名称"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--卖方-->
-          <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
-            <ws-input
-              v-model="deptBudgetList.seller"
-              placeholder="请输入卖方名称"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--货源地-->
+        <ws-form-item label="货源地" span="1" prop="sourceGoods">
+          <ws-input
+            v-model="deptBudgetList.sourceGoods"
+            placeholder="请输入货源地"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--货源地-->
-          <ws-form-item label="货源地" span="1" prop="sourceGoods">
-            <ws-input
-              v-model="deptBudgetList.sourceGoods"
-              placeholder="请输入货源地"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--买方电话-->
+        <ws-form-item label="买方电话" span="1" prop="contractNo">
+          <ws-input
+            v-model.number="deptBudgetList.buyerPhone"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--买方电话-->
-          <ws-form-item label="买方电话" span="1" prop="contractNo">
-            <ws-input
-              v-model.number="deptBudgetList.buyerPhone"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--交货地-->
+        <ws-form-item label="交货地" span="1" prop="placeDelivery">
+          <ws-input
+            v-model="deptBudgetList.placeDelivery"
+            placeholder="请输入交货地"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--交货地-->
-          <ws-form-item label="交货地" span="1" prop="placeDelivery">
-            <ws-input
-              v-model="deptBudgetList.placeDelivery"
-              placeholder="请输入交货地"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--卖方电话-->
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <ws-input
+            v-model="deptBudgetList.sellerPhone"
+            placeholder="请输入卖方电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--卖方电话-->
-          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
-            <ws-input
-              v-model="deptBudgetList.sellerPhone"
-              placeholder="请输入卖方电话"
-              maxlength="100"
-              size="small"
+        <!--包装方式-->
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          <ws-select
+            v-model="deptBudgetList.packingMethod"
+            placeholder=""
+            class="typeselect"
+            :value="value1"
+            @change="selectpackingMethod"
+          >
+            <ws-option
+              v-for="item in packtypeList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
+          </ws-select>
+        </ws-form-item>
 
-          <!--包装方式-->
-          <ws-form-item label="包装方式" span="1" prop="packingMethod">
-            <ws-select
-              v-model="deptBudgetList.packingMethod"
-              placeholder=""
-              class="typeselect"
-              :value="value1"
-              @change="selectpackingMethod"
-            >
-              <ws-option
-                v-for="item in packtypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-
-          <!--重量(吨)-->
-          <ws-form-item label="重量(吨)" span="1" prop="weight">
-            <ws-input
-              v-model="deptBudgetList.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            v-model="deptBudgetList.weight"
+            placeholder="请输入重量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--验收方式-->
-          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
-            <el-select
-              v-model="deptBudgetList.acceptanceMethod"
-              placeholder="请选择验收方式"
-              style="width: 100%"
-              filterable
-              @change="selectunitList"
+        <!--验收方式-->
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          <el-select
+            v-model="deptBudgetList.acceptanceMethod"
+            placeholder="请选择验收方式"
+            style="width: 100%"
+            filterable
+            @change="selectunitList"
+          >
+            <el-option
+              v-for="(item, index) in unitList"
+              :key="item.constValue"
+              :label="item.constValue"
+              :value="item.constValue"
             >
-              <el-option
-                v-for="(item, index) in unitList"
-                :key="item.constValue"
-                :label="item.constValue"
-                :value="item.constValue"
-              >
-                <span class="unit-left" style="float: left">
-                  <span v-if="item.flag == 'delete'">
-                    {{ item.constValue }}</span
-                  >
-                  <!-- 新增文本框 -->
-                  <div
-                    style="width: 160px"
-                    v-if="item.flag !== 'delete'"
-                    @click.stop
-                  >
-                    <ws-input
-                      v-model="item.constValue"
-                      clearable
-                      maxlength="10"
-                      style="width: 100%"
-                    ></ws-input>
-                  </div>
-                </span>
-                <span style="float: right; color: #8492a6; font-size: 13px">
-                  <!-- 对号 -->
-                  <i
-                    class="el-icon-check"
-                    style="line-height: 29px; margin-left: 10px"
-                    v-if="item.flag !== 'delete'"
-                    @click.stop="saveClick(item, index)"
-                  ></i>
-                  <!-- 编辑 -->
-                  <i
-                    class="el-icon-edit"
-                    style="line-height: 29px; margin-left: 10px"
-                    v-if="item.flag == 'delete'"
-                    @click.stop="editClick(item, index)"
-                  ></i>
-                  <!-- 删除 -->
-                  <i
-                    class="el-icon-delete"
-                    style="line-height: 29px"
-                    @click.stop="deleteClick(item, index)"
-                  ></i>
-                </span>
-              </el-option>
-              <!-- 新增按钮 -->
-              <el-option value="" label="">
+              <span class="unit-left" style="float: left">
+                <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                <!-- 新增文本框 -->
                 <div
-                  style="
-                    text-align: right;
-                    border-top: 1px solid #dcdfe6;
-                    padding: 5px;
-                  "
+                  style="width: 160px"
+                  v-if="item.flag !== 'delete'"
+                  @click.stop
                 >
-                  <ws-button type="primary" @click.stop="addClick">{{
-                    $t('button.add')
-                  }}</ws-button>
+                  <ws-input
+                    v-model="item.constValue"
+                    clearable
+                    maxlength="10"
+                    style="width: 100%"
+                  ></ws-input>
                 </div>
-              </el-option>
-            </el-select>
-          </ws-form-item>
+              </span>
+              <span style="float: right; color: #8492a6; font-size: 13px">
+                <!-- 对号 -->
+                <i
+                  class="el-icon-check"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag !== 'delete'"
+                  @click.stop="saveClick(item, index)"
+                ></i>
+                <!-- 编辑 -->
+                <i
+                  class="el-icon-edit"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag == 'delete'"
+                  @click.stop="editClick(item, index)"
+                ></i>
+                <!-- 删除 -->
+                <i
+                  class="el-icon-delete"
+                  style="line-height: 29px"
+                  @click.stop="deleteClick(item, index)"
+                ></i>
+              </span>
+            </el-option>
+            <!-- 新增按钮 -->
+            <el-option value="" label="">
+              <div
+                style="
+                  text-align: right;
+                  border-top: 1px solid #dcdfe6;
+                  padding: 5px;
+                "
+              >
+                <ws-button type="primary" @click.stop="addClick">{{
+                  $t('button.add')
+                }}</ws-button>
+              </div>
+            </el-option>
+          </el-select>
+        </ws-form-item>
 
-          <!--溢短装(%)-->
-          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
-            <ws-input
-              v-model="deptBudgetList.overShort"
-              placeholder="请输入溢短装比例(%)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--交货日期(起)-->
-          <ws-form-item
-            label="交货日期(起)"
-            span="1"
-            prop="deliveryDateStart"
-          >
-            <ws-date-picker
-              :picker-options="pickerBeginDateBefore"
-              v-model="deptBudgetList.deliveryDateStart"
-              type="date"
-              default-value="1980-01-01"
-              placeholder="请选择交货日期(起)"
-              format="yyyy-MM-dd"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
+        <!--溢短装(%)-->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input
+            v-model="deptBudgetList.overShort"
+            placeholder="请输入溢短装比例(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--交货日期(起)-->
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          <ws-date-picker
+            :picker-options="pickerBeginDateBefore"
+            v-model="deptBudgetList.deliveryDateStart"
+            type="date"
+            default-value="1980-01-01"
+            placeholder="请选择交货日期(起)"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
 
-          <!--合同单价(元/吨)-->
-          <ws-form-item
-            class="readonly"
-            label="合同单价(元/吨)"
-            span="1"
-            prop="unitContractPrice"
-          >
-            <ws-input
-              v-model="deptBudgetList.unitContractPrice"
-              placeholder="请输入合同单价"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--合同单价(元/吨)-->
+        <ws-form-item
+          class="readonly"
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          <ws-input
+            v-model="deptBudgetList.unitContractPrice"
+            placeholder="请输入合同单价"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--交货日期(止)-->
-          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
-            <ws-date-picker
-              :picker-options="pickerBeginDateBefore"
-              v-model="deptBudgetList.deliveryDateEnd"
-              type="date"
-              default-value="1980-01-01"
-              placeholder="请选择交货日期(起)"
-              format="yyyy-MM-dd"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
+        <!--交货日期(止)-->
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          <ws-date-picker
+            :picker-options="pickerBeginDateBefore"
+            v-model="deptBudgetList.deliveryDateEnd"
+            type="date"
+            default-value="1980-01-01"
+            placeholder="请选择交货日期(起)"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
 
-          <!--合同总价-->
-          <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
-            <ws-input
-              v-model="deptBudgetList.totalContractPrice"
-              placeholder="请输入合同总价"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--合同总价-->
+        <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
+          <ws-input
+            v-model="deptBudgetList.totalContractPrice"
+            placeholder="请输入合同总价"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--签订日期-->
-          <ws-form-item label="签订日期" span="1" prop="signingDate">
-            <ws-date-picker
-              :picker-options="pickerBeginDateBefore"
-              v-model="deptBudgetList.signingDate"
-              type="date"
-              default-value="1980-01-01"
-              placeholder="请选择合同签订日期"
-              format="yyyy-MM-dd"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-        </ws-info-table>
-      </ws-form>
-    </div>
+        <!--签订日期-->
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker
+            :picker-options="pickerBeginDateBefore"
+            v-model="deptBudgetList.signingDate"
+            type="date"
+            default-value="1980-01-01"
+            placeholder="请选择合同签订日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+      </ws-info-table>
+    </ws-form>
     <div class="wenzi">
       <h3>货物信息</h3>
     </div>
-    <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
-        <!--货物信息-->
+    <ws-form
+      ref="deptBudgetList"
+      :rules="ruleDeptBudget"
+      :model="deptBudgetList"
+    >
+      <!--货物信息-->
 
-        <ws-info-table>
-          <!--货名-->
-          <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
-            <ws-select
-              v-model="deptBudgetList.contractGoodsInfo.goodsName"
-              placeholder=""
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-
-          <!--水分(%)<=-->
-          <ws-form-item label="水分(%)" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="100"
-              size="small"
+      <ws-info-table>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.goodsName"
+            placeholder=""
+            class="typeselect"
+            @change="selectgoodsName"
+          >
+            <ws-option
+              v-for="item in goodnameList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
+          </ws-select>
+        </ws-form-item>
 
-          <!--品级-->
-          <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="deptBudgetList.contractGoodsInfo.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
+        <!--水分(%)<=-->
+        <ws-form-item label="水分(%)" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.waterContent"
+            placeholder="请输入水分占比"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--杂质(%)<=-->
-          <ws-form-item label="杂质(%)" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.impurity"
-              placeholder="请输入杂质占比(%)"
-              maxlength="100"
-              size="small"
+        <!--品级-->
+        <ws-form-item label="品级" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectgrade"
+          >
+            <ws-option
+              v-for="item in gradeList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
+          </ws-select>
+        </ws-form-item>
 
-          <!--容量(克/升)>=-->
-          <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
-              placeholder="请输入容重"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--杂质(%)<=-->
+        <ws-form-item label="杂质(%)" span="1" prop="impurity">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.impurity"
+            placeholder="请输入杂质占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--霉变粒(%)<=-->
-          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
-              placeholder="请输入霉变粒占比(%)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--容量(克/升)>=-->
+        <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+            placeholder="请输入容重"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--热损伤(%)<=-->
-          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
-              placeholder="请输入输入热损伤占比(%)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--不完整粒(%)<=-->
-          <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
-              placeholder="请输入不完整粒占比(%)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
-      </ws-form>
-    </div>
+        <!--霉变粒(%)<=-->
+        <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+            placeholder="请输入霉变粒占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--热损伤(%)<=-->
+        <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+            placeholder="请输入输入热损伤占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--不完整粒(%)<=-->
+        <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+            placeholder="请输入不完整粒占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+    </ws-form>
 
     <div class="wenzi">
       <h3>流程信息</h3>
     </div>
-    <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
-        <!--流程信息-->
+    <ws-form
+      ref="deptBudgetList"
+      :rules="ruleDeptBudget"
+      :model="deptBudgetList"
+    >
+      <!--流程信息-->
 
-        <ws-info-table>
-          <!--合同收入(元)-->
-          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-              placeholder="请输入合同收入(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+      <ws-info-table>
+        <!--合同收入(元)-->
+        <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+            placeholder="请输入合同收入(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--已开发票(元)-->
-          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsName"
-              placeholder="请输入已开发票(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--已开发票(元)-->
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsName"
+            placeholder="请输入已开发票(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--费用支出(元)-->
-          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.waterContent"
-              placeholder="请输入费用支出(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+        <!--费用支出(元)-->
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.waterContent"
+            placeholder="请输入费用支出(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--未开发票(元)-->
-          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.impurity"
-              placeholder="请输入未开发票(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--已完成发货量(吨)-->
-          <ws-form-item
-            label="已完成发货量(吨)"
-            span="1"
-            prop="imperfectGrain"
+        <!--未开发票(元)-->
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.impurity"
+            placeholder="请输入未开发票(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--已完成发货量(吨)-->
+        <ws-form-item label="已完成发货量(吨)" span="1" prop="imperfectGrain">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+            placeholder="请输入已完成发货量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--双章原件回收情况-->
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractProcessInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectChapterTwo"
           >
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
-              placeholder="请输入已完成发货量(吨)"
-              maxlength="100"
-              size="small"
+            <ws-option
+              v-for="item in ChapterTwoList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
-          <!--双章原件回收情况-->
-          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
-            <ws-select
-              v-model="deptBudgetList.contractProcessInfo.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectChapterTwo"
-            >
-              <ws-option
-                v-for="item in ChapterTwoList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-        </ws-info-table>
-      </ws-form>
-    </div>
+          </ws-select>
+        </ws-form-item>
+      </ws-info-table>
+    </ws-form>
 
     <div class="wenzi">
       <h3>备注信息</h3>
     </div>
-    <div class="ce">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
-        <!--备注信息-->
-        <ws-input
-          v-model="deptBudgetList.remarks"
-          type="textarea"
-          row="3"
-          placeholder="请输入备注信息,不超过200字"
-          maxlength="200"
-        />
-        <ws-upload
-          ref="upload"
-          table-name="maintain_work_order"
-          oss-key="mainPlan"
-          :comp-id="compId"
-          :appendix-ids="appendixIdsAdd"
-          :vesselId="deptBudgetList.addressUrl"
-          :size-limit="size"
-          @uploadSuccess="uploadSuccess"
-          @onChange="onChange"
-          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-        />
-      </ws-form>
-    </div>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="ruleDeptBudget"
+      :model="deptBudgetList"
+    >
+      <!--备注信息-->
+      <ws-input
+        v-model="deptBudgetList.remarks"
+        type="textarea"
+        row="3"
+        placeholder="请输入备注信息,不超过200字"
+        maxlength="200"
+      />
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        @onChange="onChange"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </ws-form>
     <div style="text-align: right; padding: 10px" class="center">
       <el-button
         class="bg-bottom"
@@ -1228,6 +1211,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.el-form {
+  padding: 0 15%;
+}
 /deep/.ws-info-table .el-form-item {
   border-right: 1px solid #cdd2dc;
   border-bottom: 1px solid #cdd2dc;

+ 365 - 1
src/views/contractManagement/purchaseContractEdit.vue

@@ -687,7 +687,371 @@ export default {
       }
     },
     submit() {
-      console.log(this.deptBudgetList)
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      console.log(this.deptBudgetList.contractNo.length)
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyer.length < 4 ||
+        this.deptBudgetList.buyer.length > 30
+      ) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入4到30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.seller.length < 4 ||
+        this.deptBudgetList.seller.length > 30
+      ) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入4到30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源地!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货地!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        /\.\d{3}$/.test(this.deptBudgetList.weight) == false ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.impurity)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.bulkDensity)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.mildewGrain)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.jiaorenli)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.imperfectGrain)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsNameKey) ==
+          false
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.waterContent) ==
+          false
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.mildewGrain) ==
+          false
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsName) ==
+          false
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.impurity) ==
+          false
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+        /\.\d{3}$/.test(
+          this.deptBudgetList.contractProcessInfo.imperfectGrain
+        ) == false
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.compId = this.compId

+ 454 - 228
src/views/contractManagement/salesContract.vue

@@ -6,12 +6,22 @@
       <template slot="left">
         <ws-button
           type="primary"
-          :disable="checkBtn"
           @click="handleAdd()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >添加</ws-button
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
         >
         <ws-button
           @click="exportlist()"
@@ -36,25 +46,18 @@
             :value="item.value"
           />
         </ws-select>
-        <ws-date-picker
-          :picker-options="pickerBeginDateBefore"
-          v-model="startDate"
-          type="date"
-          default-value="1980-01-01"
-          placeholder="起始日期"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
-        />
-        <span>至</span>
-        <ws-date-picker
-          :picker-options="pickerBeginDateBefore"
-          v-model="endDate"
-          type="date"
-          default-value="1980-01-01"
-          placeholder="截止日期"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
-        />
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
         <ws-input
           v-model="searchKeyWord"
           placeholder="可按照合同编号、买方名称、卖方名称进行查找"
@@ -65,24 +68,57 @@
         ></ws-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
         <ws-button
+          class="find"
           type="primary"
-          :disable="checkBtn"
           @click="find()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >查找</ws-button
-        >
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
       </template>
     </BaseHeaderLayout>
-
-    <el-table :data="tableData.records" style="width: 100%; margin-top: 10px">
-      <el-table-column type="index" />
+    <el-table
+      class="wenzi"
+      :data="contractList.records"
+      style="width: 100%; margin-top: 10px"
+    >
+      <!-- <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column> -->
       <el-table-column prop="contractNo" label="合同编号" width="80">
       </el-table-column>
       <el-table-column prop="goodsName" label="货名" width="80">
       </el-table-column>
-      <el-table-column prop="grade" label="品级"> </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
       <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
       <el-table-column prop="unitContractPrice" label="合同单价(元)">
       </el-table-column>
@@ -91,70 +127,114 @@
       <el-table-column prop="seller" label="卖方"> </el-table-column>
       <el-table-column prop="imperfectGrain" label="已完成(吨)">
         <template slot-scope="scope">
-          <span v-if="scope.row.proportion >= 90" style="color: red">{{
+          <span style="color: #5473e8; font-weight: 600">{{
             scope.row.imperfectGrain
           }}</span>
-          <span
-            v-if="scope.row.proportion < 90"
-            style="color: #5473e8; font-weight: 600"
-            >{{ scope.row.imperfectGrain }}</span
-          >
         </template>
       </el-table-column>
       <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
           <el-popover
             placement="left"
-            :width="400"
+            :width="285"
             trigger="click"
+            visible-arrow="false"
             @show="history(scope.row)"
           >
             <template>
-              <span slot="reference">{{ scope.row.status }}</span>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
             </template>
             <div>
-              <p>操作历史</p>
-              <div v-for="(item, index) in historyList">
-                <div class="vertical-circle"></div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
                 <div class="vertical-text">
-                  {{ item.operateUser }}{{ item.dealMsg }}<br />{{
-                    item.updateDate
-                  }}
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
                 </div>
-                <div
-                  v-if="index != historyList.length - 1"
-                  class="vertical-line"
-                ></div>
               </div>
             </div>
           </el-popover>
-          <i class="el-icon-edit" @click="editClick(scope.row)"></i>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
         </template>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column prop="mildewGrain" label="未回款(元)">
+      <el-table-column prop="mildewGrain" label="已付款(元)">
       </el-table-column>
-
       <el-table-column prop="addressUrl" label="附件">
         <template slot-scope="scope">
-          <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i>
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
       </el-table-column>
-
-      <el-table-column prop="address" label="操作" width="300">
+      <el-table-column prop="address" label="操作" width="200">
         <template slot-scope="scope">
-          <el-button
-            type="success"
-            size="small"
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
             @click="handleExamine(scope.row)"
-            >查看</el-button
-          >
-          <el-button type="primary" size="small" @click="handleEdit(scope.row)"
-            >编辑</el-button
-          >
-          <el-button type="danger" size="small" @click="handleDelete(scope.row)"
-            >删除</el-button
-          >
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            @click="handleEdit(scope.row)"
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
         </template>
       </el-table-column>
     </el-table>
@@ -196,11 +276,10 @@ import {
   billoperatehis,
   deletecontract,
 } from '@/model/contarct/index'
-
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import {dayjs, EventBus } from 'base-core-lib'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -209,7 +288,7 @@ export default {
   },
   watch: {
     vesselId(val) {
-      this.getVesselData()
+      this.getList()
     },
     isShow(val) {
       this.showType = val
@@ -224,26 +303,22 @@ export default {
       monetaryKey: null,
       // 表格显示数据
       tableDate: [],
+      size: 10,
       // 是否显示
       showType: true,
       // 年
       year: '',
-      // 提交类型
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      
+      deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
+      appendixIdsAdd: '',
       searchType: 1,
+      searchTypeText: '未完成',
       searchKeyWord: '',
+      contractType: 2,
       startDate: null,
       endDate: null,
-      appendixIdsAdd: '',
-
-      contractType: 1,
-      historyList: {},
+      // 提交类型
       submitType: true,
       contractForm: {},
       categoryIndex: 0,
@@ -251,67 +326,108 @@ export default {
       deptBudgetTotal: 0,
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
-      deptBudgetTotal:{},
-      handleSizeChange:{},
       handleCurrentChange:{},
-      compId:{},
-      size:{},
- 
       deptCircularPage: {},
-      accessoryTFs: false,
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
         },
       },
-      tableData: [],
+      accessoryTFs: false,
       taskTypeList: [
         { value: '未完成', type: 1 },
         { value: '已完成', type: 2 },
-        { value: '待回款', type: 3 },
         { value: '全部合同', type: '' },
       ],
-      deptBudgetList: {
-        seafarerName: '',
-        crtDutyId: '',
-        crtDutyName: '',
-        seafarerSexKey: '',
-        mobilePhone: '',
-        birthday: '',
-        dutyId: '',
-        dutyName: '',
-        intendedShipId: '',
-        intendedShipName: '',
-        interviewPersons: '',
-        interviewDates: '',
-        interviewType: '',
-        interviewResult: '1',
-        interviewOpinion: '',
-        aliasName: '',
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
       },
-      searchTypeText: '未完成',
+      value1: '',
+      value2: '',
     }
   },
-
   activated() {
-    this.deletecontract()
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
     this.getList()
     this.showType = this.isShow
   },
-
-
   methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
     handleClose() {
       this.accessoryTFs = false
     },
-    history(row) {
-      console.log(row)
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then((response) => {
-          this.historyList = response
-        })
-    },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -322,23 +438,6 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    uploadSuccess(data, files, url) {
-      console.log(data, files, url)
-      // this.deptBudgetList.
-      // this.formData.append('files', files)
-      // this.feedbackObj.uploadNameAttachment = data.appendixName
-      // this.feedbackObj.pathUploadAttachment = data.appendixPath
-      // // this.newAppendixs = files
-      // this.onChangeFlag = true
-    },
-    // deletecontract(){
-    //   deletecontract({
-
-    //   }).toPromise()
-    //     .then((response) => {
-    //       this.tableData = response
-    //     })
-    // },
     getList() {
       getList({
         compId: sessionStorage.getItem('ws-pf_compId'),
@@ -354,81 +453,45 @@ export default {
         .toPromise()
         .then((response) => {
           for (var i = 0; i < response.records.length; i++) {
-            if (
-              response.records[i].imperfectGrain != '' &&
-              response.records[i].weight != ''
-            ) {
-              response.records[i].proportion =
-                Math.floor(
-                  (response.records[i].imperfectGrain /
-                    response.records[i].weight) *
-                    10000
-                ) / 100
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray = response.records[
+                i
+              ].addressUrl.split(',')
             } else {
-              response.records[i].proportion = 0
+              response.records[i].addressUrlArray = []
             }
           }
-          this.tableData = response
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
           this.contractList = response
         })
     },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
 
-
-    // this.deptBudgetList.
-    // this.formData.append('files', files)
-    // this.feedbackObj.uploadNameAttachment = data.appendixName
-    // this.feedbackObj.pathUploadAttachment = data.appendixPath
-    // // this.newAppendixs = files
-    // this.onChangeFlag = true
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
-        }
-      }
-    },
-    find() {
-      this.currentPage = 1
-      this.getList()
-    },
-     async exportlist() {
-    
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_销售合同`,
-        type: 'xls',
-      })
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
     },
     editClick(row) {
+      
       var status = ''
       if (row.status == '待执行' || row.status == '已完成') {
         status = '执行中'
       } else if (row.status == '执行中') {
         status = '已完成'
       }
-      this.$confirm(`是否将状态改为${status}`, '提示', {
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
         confirmButtonText: '确定',
-        cancelButtonText: '取消',
+        cancelButtonText:'取消',
         type: 'warning',
+      
       })
         .then(() => {
           editstatus({ id: row.id })
@@ -448,6 +511,13 @@ export default {
           return false
         })
     },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
     fujian(row) {
       if (
         row.receiveAttachmentPath === null ||
@@ -462,47 +532,84 @@ export default {
       }
       this.appendixIdss = row.receiveAttachmentPath
     },
-
-    // 关闭 dialog时 处理文件url 初始化upload组件
     handleExamine(row) {
-      console.log(row)
+    
       this.$router.push({
         name: 'salesContractExamine',
-        query: { id: row.id, status: row.status },
+        query: { id: row.id },
       })
     },
     handleAdd() {
       this.$router.push({ path: 'salesContractAdd' })
     },
-
-    deletecontract() {},
-    filtlistQuery() {},
-    searchDialog() {},
-    vesselIdSelected() {},
-    seelctShips() {},
-    checkBtn() {},
     handleEdit(row) {
       this.$router.push({
         name: 'salesContractEdit',
-        query: { id: row.id },
+        params: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+      this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
       })
     },
+    // deletecontract(){},
+    //删除 
+    
 
     approve() {},
     listQuery() {},
     total() {},
     clearfiltQuery() {},
     selectCrtDuty() {},
+
     handleDelete(row) {
-      var handleDelete = ''
+      var handleDelete = ' ' 
       if (row.handleDelete == '待执行' || row.handleDelete == '已完成') {
         handleDelete = '执行中'
       } else if (row.handleDelete == '执行中') {
         handleDelete = '已完成'
       }
       this.$confirm(`合同删除后不可恢复,是否继续删除?`, '提示', {
-        confirmButtonText: '确定',
         cancelButtonText: '取消',
+        confirmButtonText: '确定',
         type: 'warning',
       })
         .then(() => {
@@ -527,10 +634,127 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.wrap {
+  width: 400px;
+  position: absolute;
+  top: 131px;
+  left: 794px;
+  transform-origin: right center;
+  z-index: 2005;
+}
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid #e9ecf7;
+  margin-left: 4px;
+  padding: 0 3px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
 .el-pagination {
   padding: 10px 15px;
   margin-bottom: 0;
-  text-align: right;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.vertical-circle {
+  width: 10px;
+  height: 10px;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
 }
 .typeselect {
   width: 500px;
@@ -544,6 +768,9 @@ export default {
   display: block;
   clear: both;
 }
+.el-table {
+  font-size: 16px;
+}
 .taskType {
   width: 100%;
   background-color: #fff;
@@ -579,6 +806,10 @@ export default {
 .findValue {
   margin: 0 10px;
 }
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
 .button-container {
   display: flex;
   flex-wrap: nowrap;
@@ -610,27 +841,6 @@ export default {
     }
   }
 }
-.vertical-line {
-  height: 100px;
-  border-left: 2px solid;
-  margin-left: 4px;
-}
-.vertical-circle {
-  float: left;
-  width: 10px;
-  height: 10px;
-  border: 2px solid white;
-  background-color: #08b8e6;
-  -webkit-border-radius: 100px;
-}
-.vertical-circle:first-child {
-  color: red;
-}
-.vertical-text {
-  float: left;
-  margin-top: -7px;
-}
-
 .box-app {
   display: inline-block;
   float: left;
@@ -715,12 +925,28 @@ export default {
     cursor: text;
     padding: 0 !important;
   }
-  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label{
-  width: 130px;
-}
+  .el-message-box{
+    width: 440px;
+    height: 160px;
+    background: #FFFFFF;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+ /deep/.el-message-box__message p{
+    width: 351px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #191919;
+    line-height: 20px;
+  }
+.el-message-box__title{
+  width: 440px;
+  height: 160px;
+  background: #FFFFFF;
+  box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+  border-radius: 4px;
 }
-/deep/.el-table .el-table__header .cell,
-/deep/.el-table .el-table__body .cell {
-  text-align: center;
 }
 </style>

+ 45 - 4
src/views/contractManagement/salesContractAdd.vue

@@ -1378,7 +1378,51 @@ export default {
     }
   }
 }
-
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 130px;
+}
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
+}
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+  width: 232px;
+  left: 21px;
+}
+/deep/.el-textarea {
+  width: 900px;
+  margin: 0px;
+}
+/deep/el-date-editor--date {
+  width: 200px;
+}
+.unchanged {
+  position: absolute;
+  left: 37px;
+  width: 102px;
+  height: 14px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  width: 232px;
+}
 // 控制select为只读的时候显示样式
 /deep/.ws-class-table-col {
   height: auto;
@@ -1408,7 +1452,4 @@ export default {
   overflow: scroll;
   height: 93vh;
 }
-/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
-  width: 130px;
-}
 </style>

+ 430 - 65
src/views/contractManagement/salesContractEdit.vue

@@ -32,19 +32,17 @@
         <ws-info-table>
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
-
-            
-           <div class="unchanged">
-           {{deptBudgetList.contractNo}} 
-           </div>
-               <span class='unchangeable'>*</span>
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+            <span class="unchangeable">*</span>
           </ws-form-item>
 
           <!--运输方式-->
           <ws-form-item label="运输方式" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.shippingType"
-              placeholder='请输入运输方式'
+              placeholder="请输入运输方式"
               maxlength="100"
               size="small"
             />
@@ -53,16 +51,16 @@
           <!--买方-->
           <ws-form-item label="买方" span="1" prop="contractNo">
             <div class="unchanged">
-            {{deptBudgetList.buyer}}
+              {{ deptBudgetList.buyer }}
             </div>
-             <span class="unchangeable">*</span>
+            <span class="unchangeable">*</span>
           </ws-form-item>
 
           <!--结算方式-->
           <ws-form-item label="结算方式" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.settlementMethod"
-               placeholder='请输入结算方式'
+              placeholder="请输入结算方式"
               maxlength="100"
               size="small"
             />
@@ -70,19 +68,17 @@
 
           <!--卖方-->
           <ws-form-item label="卖方" span="1" prop="contractNo">
-
-           <div  class="unchanged">
-            {{deptBudgetList.seller}}
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
             </div>
-           <span class="unchangeable">*</span>
-
+            <span class="unchangeable">*</span>
           </ws-form-item>
 
           <!--货源地-->
           <ws-form-item label="货源地" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.sourceGoods"
-               placeholder='请输入货源地'
+              placeholder="请输入货源地"
               maxlength="100"
               size="small"
             />
@@ -91,7 +87,7 @@
           <ws-form-item label="买方电话" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.buyerPhone"
-               placeholder='请输入买方电话'
+              placeholder="请输入买方电话"
               maxlength="100"
               size="small"
             />
@@ -101,7 +97,7 @@
           <ws-form-item label="交货地" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.placeDelivery"
-               placeholder='请输入交货地'
+              placeholder="请输入交货地"
               maxlength="100"
               size="small"
             />
@@ -111,7 +107,7 @@
           <ws-form-item label="卖方电话" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.sellerPhone"
-               placeholder='请输入卖房电话'
+              placeholder="请输入卖房电话"
               maxlength="100"
               size="small"
             />
@@ -137,7 +133,7 @@
           <ws-form-item label="重量(吨)" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.weight"
-               placeholder='请输入重量(吨)'
+              placeholder="请输入重量(吨)"
               maxlength="100"
               size="small"
             />
@@ -214,7 +210,7 @@
           <ws-form-item label="溢短装(%)" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.overShort"
-               placeholder='请输入溢短装(%)'
+              placeholder="请输入溢短装(%)"
               maxlength="100"
               size="small"
             />
@@ -238,11 +234,10 @@
 
           <!--合同单价(元/吨)-->
           <ws-form-item label="合同单价(元/吨)" span="1" prop="contractNo">
-          <div class="unchanged">
-            {{deptBudgetList.unitContractPrice}}
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
             </div>
             <span class="unchangeable">*</span>
-
           </ws-form-item>
 
           <!--交货日期(止)-->
@@ -262,7 +257,7 @@
           <ws-form-item label="合同总价" span="1" prop="contractNo">
             <ws-input
               v-model="deptBudgetList.totalContractPrice"
-                placeholder='请输入合同总价'
+              placeholder="请输入合同总价"
               maxlength="100"
               size="small"
             />
@@ -308,17 +303,17 @@
                   :value="item.constValue"
                 />
               </ws-select> -->
-               <div  class="unchanged">
-              {{deptBudgetList.contractGoodsInfo.goodsName}}
+              <div class="unchanged">
+                {{ deptBudgetList.contractGoodsInfo.goodsName }}
               </div>
-              <span class='unchangeable'>*</span>
+              <span class="unchangeable">*</span>
             </ws-form-item>
 
             <!--水分(%)<=-->
             <ws-form-item label="水分(%)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.waterContent"
-                 placeholder='请输入水分(%)'
+                placeholder="请输入水分(%)"
                 maxlength="100"
                 size="small"
               />
@@ -345,7 +340,7 @@
             <ws-form-item label="杂质(%)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.impurity"
-                 placeholder='请输入杂质(%)'
+                placeholder="请输入杂质(%)"
                 maxlength="100"
                 size="small"
               />
@@ -355,7 +350,7 @@
             <ws-form-item label="容量(克/升)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
-                   placeholder='请输入容量(克/升)'
+                placeholder="请输入容量(克/升)"
                 maxlength="100"
                 size="small"
               />
@@ -365,7 +360,7 @@
             <ws-form-item label="霉变粒(%)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
-                 placeholder='请输入霉变粒(%)'
+                placeholder="请输入霉变粒(%)"
                 maxlength="100"
                 size="small"
               />
@@ -375,7 +370,7 @@
             <ws-form-item label="热损伤(%)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
-                  placeholder='请输入热损伤(%)'
+                placeholder="请输入热损伤(%)"
                 maxlength="100"
                 size="small"
               />
@@ -384,7 +379,7 @@
             <ws-form-item label="不完整粒(%)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
-                 placeholder='请输入不完整粒(%)'
+                placeholder="请输入不完整粒(%)"
                 maxlength="100"
                 size="small"
               />
@@ -408,7 +403,7 @@
             <ws-form-item label="合同收入(元)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-                  placeholder='请输入合同收入(元)'
+                placeholder="请输入合同收入(元)"
                 maxlength="100"
                 size="small"
               />
@@ -418,7 +413,7 @@
             <ws-form-item label="已开发票(元)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.goodsName"
-                   placeholder='请输入已开发票(元))'
+                placeholder="请输入已开发票(元))"
                 maxlength="100"
                 size="small"
               />
@@ -428,7 +423,7 @@
             <ws-form-item label="费用支出(元)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.waterContent"
-                placeholder='请输入费用支出(元)'
+                placeholder="请输入费用支出(元)"
                 maxlength="100"
                 size="small"
               />
@@ -438,7 +433,7 @@
             <ws-form-item label="未开发票(元)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.impurity"
-                   placeholder='请输入未开发票(元)'
+                placeholder="请输入未开发票(元)"
                 maxlength="100"
                 size="small"
               />
@@ -447,7 +442,7 @@
             <ws-form-item label="未回款(元)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.mildewGrain"
-                 placeholder='请输入未回款(元)'
+                placeholder="请输入未回款(元)"
                 maxlength="100"
                 size="small"
               />
@@ -457,7 +452,7 @@
             <ws-form-item label="已完成发货量(吨)" span="1" prop="contractNo">
               <ws-input
                 v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
-                 placeholder='请输入已完成发货量(吨)'
+                placeholder="请输入已完成发货量(吨)"
                 maxlength="100"
                 size="small"
               />
@@ -747,6 +742,371 @@ export default {
       }
     },
     submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      console.log(this.deptBudgetList.contractNo.length)
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyer.length < 4 ||
+        this.deptBudgetList.buyer.length > 30
+      ) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入4到30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.seller.length < 4 ||
+        this.deptBudgetList.seller.length > 30
+      ) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入4到30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源地!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货地!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        /\.\d{3}$/.test(this.deptBudgetList.weight) == false ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.impurity)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.bulkDensity)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.mildewGrain)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.jiaorenli)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.imperfectGrain)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsNameKey) ==
+          false
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.waterContent) ==
+          false
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.mildewGrain) ==
+          false
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsName) ==
+          false
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+        /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.impurity) ==
+          false
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+        /\.\d{3}$/.test(
+          this.deptBudgetList.contractProcessInfo.imperfectGrain
+        ) == false
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.compId = this.compId
@@ -932,40 +1292,45 @@ export default {
 }
 
 //*号
-.unchangeable{
-position: absolute;
- width: 9px;
-height: 22px;
-font-size: 16px;
-font-family: PingFangSC-Medium, PingFang SC;
-font-weight: 500;
-color: #FF2727;
-line-height: 22px;
-display: inline-block;
-right: 14px;
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
 }
-/deep/.el-input ,/deep/.el-date-editor{
-    font-size: 13px;
-    width: 232px;
-    left: 21px;
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+  width: 232px;
+  left: 21px;
 }
-/deep/.el-textarea{
+/deep/.el-textarea {
   width: 900px;
   margin: 0px;
 }
-/deep/el-date-editor--date{
+/deep/el-date-editor--date {
   width: 200px;
 }
-.unchanged{
+.unchanged {
   position: absolute;
   left: 37px;
   width: 102px;
-height: 14px;
-font-size: 14px;
-font-family: PingFangSC-Regular, PingFang SC;
-font-weight: 400;
-color: #AFB5CB;
-line-height: 14px;
-
+  height: 14px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  width: 232px;
 }
 </style>

+ 62 - 9
src/views/contractManagement/salesContractExamine.vue

@@ -20,7 +20,12 @@
         >
       </el-col>
     </el-row>
-
+     <div class="state">
+      <h2>销售合同</h2>
+      <p>【编号:{{deptBudgetList.contractNo}}】</p>
+      <span class="icon">&nbsp;&nbsp;{{ deptBudgetList.status }}</span>
+    </div>
+     <div class="center">
     <ws-form
       ref="deptBudgetList"
       :rules="mainReportAdd"
@@ -235,23 +240,24 @@
             {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
           </div>
         </ws-form-item>
-        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+        <!-- <ws-form-item label="双章原件回收情况" span="1" prop="grade">
           <div class="unchanged">
             {{ deptBudgetList.contractProcessInfo.grade }}
           </div>
 
           >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
-        </ws-form-item>
-        <ws-form-item label="双章原件回收情况" span="1" prop="grade"
-          >{{ deptBudgetList.contractProcessInfo.grade }}
-
+        </ws-form-item> -->
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade" >
+           <div class="unchanged">
+          {{deptBudgetList.contractProcessInfo.grade}}
+           </div>
         </ws-form-item>
       </ws-info-table>
       <div class="remark">
         <h3>备注信息</h3>
       </div>
 
-        <div class="unchanged">
+        <div class="unchanged beizhu">
       {{ deptBudgetList.remarks }}
         </div> 
 
@@ -268,6 +274,7 @@
         >关闭</el-button
       >
     </div>
+    </div>
   </div>
 </template>
 
@@ -548,8 +555,41 @@ export default {
 .container {
   overflow: scroll;
   height: 93vh;
+  
+}
+.state{
+  width: 900px;
+  margin: 0 auto;
+}
+.state h2,.state p{
+   display: inline-block;
+}
+.state p{
+   display: inline-block;
+   margin-left: 10px;
+   width: 170px;
+height: 20px;
+font-size: 14px;
+font-family: PingFangSC-Regular, PingFang SC;
+font-weight: 400;
+color: #000000;
+line-height: 20px;
 }
-//*号
+.icon{
+  display: inline-block;
+  width: 60px;
+height: 24px;
+background: #ECFEFF;
+border-radius: 12px;
+border: 1px solid #50CAD4;
+position: relative;
+font-family: PingFangSC-Regular, PingFang SC;
+font-size: 14px;
+color: #50CAD4;
+line-height: 24px;
+}
+
+ //*号
 .unchangeable{
 position: absolute;
  width: 9px;
@@ -574,18 +614,31 @@ right: 14px;
 /deep/el-date-editor--date{
   width: 200px;
 }
+.beizhu{
+   position: absolute;
+
+  margin: 0 auto;
+ 
+}
 .unchanged{
   position: absolute;
   left: 37px;
-  width: 102px;
+  width: 900px;
 height: 14px;
 font-size: 14px;
 font-family: PingFangSC-Regular, PingFang SC;
 font-weight: 400;
 color: #AFB5CB;
 line-height: 14px;
+
+
 }
 /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label{
   width: 130px;
 }
+/deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+    width: 232px;
+}
 </style>

+ 1 - 8
vue.config.js

@@ -142,16 +142,9 @@ module.exports = {
 
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
-        target: 'http://localhost:8090/',
+        // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.124:8090/',
-
         target: 'http://192.168.1.124:8090/',
-
-
-
-
-        // target: 'http://192.168.1.110:8090/',
-
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址