chenrui 4 years ago
parent
commit
968439bc53

+ 22 - 0
src/api/customer.js

@@ -0,0 +1,22 @@
+import { axios } from '@/utils/request'
+
+//  客户列表
+export const custList = (params) => {
+  let url = `/cust/findPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑客户
+export const custSave = params => {
+  return axios({
+    url: '/cust/save',
+    data: params,
+    method: 'post'
+  })
+}

+ 34 - 19
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -25,26 +25,32 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单据审核时间">
-              <a-range-picker
-                  style="width:100%"
-                  id="inventoryQueryWarehouseDetail-bundleNamesss"
-                  :disabledDate="disabledDate"
-                  v-model="queryParam.brand"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']" />
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据审核时间">
+                <a-range-picker
+                    style="width:100%"
+                    id="inventoryQueryWarehouseDetail-bundleNamesss"
+                    :disabledDate="disabledDate"
+                    v-model="queryParam.brand"
+                    :format="dateFormat"
+                    :placeholder="['开始时间', '结束时间']" />
+                </a-form-item>
               </a-form-item>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单位名称">
-              <a-input id="inventoryQueryWarehouseDetail-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入单位名称"/>
-            </a-form-item>
-          </a-col>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单位名称">
+                <a-input id="inventoryQueryWarehouseDetail-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入单位名称"/>
+              </a-form-item>
+            </a-col>
+          </template>
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
           </a-col>
         </a-row>
       </a-form>
@@ -63,6 +69,10 @@
       :data="loadData"
       :showPagination="false"
       bordered>
+      <!-- 数量 -->
+      <template slot="number" slot-scope="text, record">
+        <span :class="[record.type == 1 ? 'green' : 'red']">{{record.type == 1 ? '+' : '-'}}{{record.number}}</span>
+      </template>
     </s-table>
     <div class="footer-box">
       <!-- 返回列表 -->
@@ -79,8 +89,7 @@ export default {
   components: { STable },
   data () {
     return {
-      labelCol: { span: 10 },
-      wrapperCol: { span: 14 },
+      advanced: false,  // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         orderBundleNo: '', //  订单编号
         orderBundle: {
@@ -107,7 +116,7 @@ export default {
         { title: '单位名称', dataIndex: 'productBrand', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓库', dataIndex: 'productBrand', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'productBrand', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'inventoryNum', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', scopedSlots: { customRender: 'number' }, width: 180, align: 'center' },
         { title: '总成本', dataIndex: 'inventoryMoney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
       ],
@@ -176,5 +185,11 @@ export default {
       margin: 50px auto 20px;
       text-align: center;
     }
+    .green{
+      color: #19be6b;
+    }
+    .red{
+      color: #ff0000;
+    }
   }
 </style>

+ 17 - 1
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -65,6 +65,10 @@
       :columns="columns"
       :data="loadData"
       bordered>
+      <!-- 预警提示 -->
+      <template slot="warningTips" slot-scope="text, record">
+        <span :class="[record.inventoryTotal == 1 ? 'green' : 'red']">{{record.warningTips}}</span>
+      </template>
       <!-- 需要编辑的字段 -->
       <template
         v-for="col in ['onWayNum', 'maxInventory', 'minInventory']"
@@ -134,7 +138,7 @@ export default {
         { title: '产品分类', dataIndex: 'productType', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '实时库存数(个)', dataIndex: 'inventoryNumy', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '在途数(个)', scopedSlots: { customRender: 'onWayNum' }, width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总库存数(个)', dataIndex: 'inventoryNumw', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总库存数(个)', dataIndex: 'inventoryTotal', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库存数(个)', scopedSlots: { customRender: 'maxInventory' }, width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最小库存数(个)', scopedSlots: { customRender: 'minInventory' }, width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '差异数量', dataIndex: 'inventoryNumh', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -286,5 +290,17 @@ export default {
         width: auto;
       }
     }
+    .green{
+      color: #19be6b;
+    }
+    .red{
+      color: #ff0000;
+    }
+    .yellow{
+      color: #ff9900;
+    }
+    .blue{
+      color: #2db7f5;
+    }
   }
 </style>

+ 6 - 14
src/views/salesManagement/customerManagement/edit.vue

@@ -93,9 +93,7 @@
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="配送方式" prop="contactPhone">
-            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择配送方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="DISPATCH_FASHION" id="customerManagementEdit-dispatchFashion" v-model="form.dispatchFashion" allowClear placeholder="请选择配送方式"></v-select>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
@@ -109,23 +107,17 @@
       <a-row :gutter="15">
         <a-col :span="8">
           <a-form-model-item label="价格类型" prop="contactPhone">
-            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择价格类型">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="PRICE_TYPE" id="customerManagementEdit-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型"></v-select>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="支付方式" prop="contactPhone">
-            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择支付方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="PAY_FASHION" id="customerManagementEdit-payFashion" v-model="form.payFashion" allowClear placeholder="请选择支付方式"></v-select>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="收款方式" prop="contactPhone">
-            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择收款方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="RECEIPT_PAYMENT" id="customerManagementEdit-receiptPayment" v-model="form.receiptPayment" allowClear placeholder="请选择收款方式"></v-select>
           </a-form-model-item>
         </a-col>
       </a-row>
@@ -151,7 +143,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-// import { goodsSave, goodsFind } from '@/api/goods'
+import { custSave } from '@/api/customer'
 export default {
   name: 'customerManagementEdit',
   components: { STable, VSelect },
@@ -230,7 +222,7 @@ export default {
           form.desc = _this.form.desc
           form.id = this.isEdit ? this.$route.params.id : null
           console.log(form,'-----提交信息')
-          // goodsSave(form).then(res => {
+          // custSave(form).then(res => {
           //   if (res.status == 200) {
           //     _this.$message.success(res.message)
           //     setTimeout(() => {

+ 2 - 2
src/views/salesManagement/customerManagement/list.vue

@@ -118,7 +118,7 @@
 
 <script>
 import moment from 'moment'
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { custList } from '@/api/customer'
 import { STable, VSelect } from '@/components'
 import customerManagementDetailModal from './detailModal.vue'
 export default {
@@ -152,7 +152,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+        // return custList( Object.assign(parameter, this.queryParam) ).then(res => {
         //   const data = res.data
         //   const no = (data.pageNo - 1) * data.pageSize
         //   for (var i = 0; i < data.list.length; i++) {

+ 35 - 64
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -9,52 +9,16 @@
     </a-card>
     <!-- 急件单信息 -->
     <a-card :bordered="false" class="urgentItemsOffsetDetail-info-wrapper">
-      <a-row :gutter="35">
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">客户名称:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">客户地址:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">支付方式:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-      </a-row>
-      <a-row :gutter="35">
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">联系手机:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">联系电话:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">收款方式:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-      </a-row>
-      <a-row :gutter="35">
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">急件单号:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-        <a-col :span="8" class="item-cont">
-          <p class="item-label">完结状态:</p>
-          <p class="item-main">名称思密达</p>
-          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
-        </a-col>
-      </a-row>
+      <a-descriptions :column="3">
+        <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
+        <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="急件单号">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
+      </a-descriptions>
     </a-card>
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -67,9 +31,13 @@
         ref="table"
         size="default"
         :rowKey="(record) => record.id"
-        :columns="columns"
+        :columns="unColumns"
         :data="loadData"
         bordered>
+        <!-- 库存数量 -->
+        <template slot="inventoryQuantity" slot-scope="text, record">
+          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{record.inventoryQuantity}}</span>
+        </template>
       </s-table>
     </a-card>
   </div>
@@ -84,25 +52,25 @@
       return {
         unColumns: [
           { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true },
-          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true },
-          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center' },
-          { title: '库存数量', dataIndex: 'productType', width: 200, align: 'center' },
-          { title: '未冲减数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true },
-          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center' }
+          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '库存数量', scopedSlots: { customRender: 'inventoryQuantity' }, width: 200, align: 'center' },
+          { title: '未冲减数量', dataIndex: 'quantityNotOffset', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } }
         ],
         columns: [
           { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true },
-          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true },
-          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center' },
-          { title: '入库时间', dataIndex: 'product2Brand', width: 200, align: 'center' },
-          { title: '仓库', dataIndex: 'productBrawnd', width: 200, align: 'center' },
-          { title: '仓位', dataIndex: 'productBradnd', width: 200, align: 'center' },
-          { title: '成本价', dataIndex: 'productsBrand', width: 200, align: 'center' },
-          { title: '已冲减数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true },
-          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center' },
-          { title: '成本小计', dataIndex: 'inventoryMoneyss', width: 180, align: 'center' }
+          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '入库时间', dataIndex: 'product2Brand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '仓库', dataIndex: 'productBrawnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '仓位', dataIndex: 'productBradnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '成本价', dataIndex: 'productsBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '已冲减数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '成本小计', dataIndex: 'inventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         ],
         // 加载数据方法 必须为 Promise 对象
         loadData: parameter => {
@@ -122,7 +90,7 @@
               pageNo: 1,
               pageSize: 10,
               list: [
-                { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+                { id: '1', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
               ]
             }
             const no = (data.pageNo - 1) * data.pageSize
@@ -198,6 +166,9 @@
           width: auto;
         }
       }
+      .red{
+        color: #ff0000;
+      }
     }
   }
 </style>

+ 7 - 1
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -57,7 +57,7 @@
       bordered>
       <!-- 状态 -->
       <template slot="state" slot-scope="text, record">
-        <span>{{record.state == 1 ? '已启用' : '已禁用'}}</span>
+        <span :class="[record.state == 1 ? 'green' : 'red']">{{record.state == 1 ? '已冲减' : '待冲减'}}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -163,5 +163,11 @@ export default {
         width: auto;
       }
     }
+    .red{
+      color: #ff0000;
+    }
+    .green{
+      color: #19be6b;
+    }
   }
 </style>