修订
This commit is contained in:
2
NX.ERP.Webapp/dev.bat
Normal file
2
NX.ERP.Webapp/dev.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
start cmd /min /k npm-dev.bat
|
||||
2
NX.ERP.Webapp/npm-dev.bat
Normal file
2
NX.ERP.Webapp/npm-dev.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
npm run dev
|
||||
208
NX.ERP.Webapp/package-lock.json
generated
208
NX.ERP.Webapp/package-lock.json
generated
@@ -1704,6 +1704,16 @@
|
||||
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"cacache": {
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
|
||||
@@ -1730,6 +1740,53 @@
|
||||
"unique-filename": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
|
||||
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
|
||||
@@ -1746,6 +1803,16 @@
|
||||
"minipass": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"terser-webpack-plugin": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610194199773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
|
||||
@@ -1762,6 +1829,18 @@
|
||||
"terser": "^4.6.12",
|
||||
"webpack-sources": "^1.4.3"
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
|
||||
"integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2565,16 +2644,6 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz",
|
||||
"integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz",
|
||||
@@ -5418,13 +5487,6 @@
|
||||
"schema-utils": "^2.5.0"
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"filesize": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz",
|
||||
@@ -5649,8 +5711,8 @@
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
@@ -7723,13 +7785,6 @@
|
||||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.14.2",
|
||||
"resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591709094&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz",
|
||||
"integrity": "sha1-9TdkAGlRaPTMaUrJOT0MlYXu6hk=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz",
|
||||
@@ -11378,87 +11433,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.2.0",
|
||||
"resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-16.2.0.tgz",
|
||||
"integrity": "sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995297666&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz",
|
||||
"integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
|
||||
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
|
||||
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
|
||||
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-router": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz",
|
||||
@@ -11573,14 +11547,10 @@
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
"optional": true
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "3.1.0",
|
||||
@@ -11888,14 +11858,10 @@
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
"optional": true
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -2,7 +2,10 @@ import formatDate from 'dateformat'
|
||||
import axios from 'axios'
|
||||
import XLSX from 'xlsx'
|
||||
export const dateFormat = (date) => {
|
||||
return formatDate(date, 'yyyy-mm-dd')
|
||||
if(date ==null)
|
||||
{ return ''}
|
||||
else{return formatDate(date, 'yyyy-mm-dd')}
|
||||
|
||||
}
|
||||
|
||||
export const dateFormatFull = (date) => {
|
||||
@@ -70,6 +73,14 @@ export const gethours = (k) => {
|
||||
return ar
|
||||
}
|
||||
|
||||
export const sortByKey=(array,key)=> {
|
||||
return array.sort(function(a,b){
|
||||
var y = a[key];
|
||||
var x = b[key];
|
||||
return ((x<y)?-1:((x<y)?1:0));;
|
||||
})
|
||||
}
|
||||
|
||||
export const pageingData = (data, pagesize, index) => {
|
||||
if (!data) return []
|
||||
let pageNo = 1
|
||||
|
||||
@@ -15,7 +15,14 @@
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px" size="small" border :columns="columns" :data="pagedData"> </Table>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
@@ -34,136 +41,231 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorymom } from '@/api/pmc'
|
||||
import { pageingData, export_col_to_excel } from '@/libs/tools'
|
||||
import { getInventorymom } from "@/api/pmc";
|
||||
import { pageingData, export_col_to_excel,sortByKey } from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: '',
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: ''
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
key: 'invcode1',
|
||||
width: '100'
|
||||
type: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
align: 'center',
|
||||
key: 'cinvname1',
|
||||
width: '120'
|
||||
},
|
||||
|
||||
{
|
||||
title: '规格',
|
||||
align: 'center',
|
||||
key: 'cinvstd1',
|
||||
width: '250'
|
||||
title: "生产订单号",
|
||||
align: "center",
|
||||
key: "mocode",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'cqty',
|
||||
align: 'center',
|
||||
key: 'cqty'
|
||||
title: "订单行号",
|
||||
align: "center",
|
||||
key: "SortSeq",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'dqty',
|
||||
align: 'center',
|
||||
key: 'dqty'
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "InvCode",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'issqty',
|
||||
align: 'center',
|
||||
key: 'issqty'
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'momqty',
|
||||
align: 'center',
|
||||
key: 'momqty'
|
||||
title: "产品规格",
|
||||
align: "center",
|
||||
key: "cInvStd",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'mqty',
|
||||
align: 'center',
|
||||
key: 'mqty'
|
||||
title: "产品单位",
|
||||
align: "center",
|
||||
key: "cComUnitName",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'q',
|
||||
align: 'center',
|
||||
key: 'q'
|
||||
title: "投产量",
|
||||
align: "center",
|
||||
key: "Qty",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'rqty',
|
||||
align: 'center',
|
||||
key: 'rqty'
|
||||
title: "未完成",
|
||||
align: "center",
|
||||
key: "QualifiedInQty",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'rqty1',
|
||||
align: 'center',
|
||||
key: 'rqty1'
|
||||
title: "子件编码",
|
||||
align: "center",
|
||||
key: "invcode1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'rqty3',
|
||||
align: 'center',
|
||||
key: 'rqty3'
|
||||
title: "子件名称",
|
||||
align: "center",
|
||||
key: "cinvname1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'std',
|
||||
align: 'center',
|
||||
key: 'std'
|
||||
title: "子件规格",
|
||||
width: 200,
|
||||
align: "center",
|
||||
key: "cinvstd1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'wqty',
|
||||
align: 'center',
|
||||
key: 'wqty'
|
||||
}
|
||||
]
|
||||
}
|
||||
title: "子件单位",
|
||||
width: 80,
|
||||
align: "center",
|
||||
key: "cComUnitName1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: "子件属性",
|
||||
align: "center",
|
||||
key: "std",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: "总需求(未领量)",
|
||||
align: "center",
|
||||
key: "wqty",
|
||||
},
|
||||
{
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "cqty",
|
||||
},
|
||||
{
|
||||
title: "已领(现场)",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
},
|
||||
{
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
},
|
||||
{
|
||||
title: "采购在途",
|
||||
align: "center",
|
||||
key: "rqty",
|
||||
},
|
||||
{
|
||||
title: "委外在途",
|
||||
align: "center",
|
||||
key: "rqty1",
|
||||
},
|
||||
{
|
||||
title: "请购",
|
||||
align: "center",
|
||||
key: "rqty3",
|
||||
},
|
||||
{
|
||||
title: "在制",
|
||||
align: "center",
|
||||
key: "momqty",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length
|
||||
return this.datas.length;
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
||||
}
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas)
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
async loadData() {
|
||||
try {
|
||||
let _filetr = this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n]/) : []
|
||||
let _filetr =
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: [];
|
||||
|
||||
let resp = await getInventorymom(_filetr)
|
||||
this.pageNo = 1
|
||||
this.datas = resp.data.data
|
||||
let resp = await getInventorymom(_filetr);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
} catch (error) {}
|
||||
},
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize
|
||||
}
|
||||
}
|
||||
}
|
||||
this.pageSize = pageSize;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style >
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-row td {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-error-row td {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-old {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-new {
|
||||
color: #ff6600;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -11,18 +11,30 @@
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.so_code" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Button @click="handleClick">查询</Button>
|
||||
<Button @click="handelExport">导出</Button>
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@click="handleClick"
|
||||
>查询</Button
|
||||
>
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px" size="small" border :columns="columns" :data="pagedData"> </Table>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
@@ -41,140 +53,316 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorymonth } from '@/api/pmc'
|
||||
import { pageingData, export_col_to_excel } from '@/libs/tools'
|
||||
import { getInventorymonth } from "@/api/pmc";
|
||||
import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: '',
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: ''
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
key: 'invcode1',
|
||||
width: '100'
|
||||
title: "存货编号",
|
||||
align: "center",
|
||||
key: "cInvCode",
|
||||
width: "90",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
align: 'center',
|
||||
key: 'cinvname1',
|
||||
width: '120'
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
width: "120",
|
||||
},
|
||||
|
||||
{
|
||||
title: '规格',
|
||||
align: 'center',
|
||||
key: 'cinvstd1',
|
||||
width: '250'
|
||||
title: "规格",
|
||||
align: "center",
|
||||
key: "cInvStd",
|
||||
width: "220",
|
||||
},
|
||||
{
|
||||
title: 'cqty',
|
||||
align: 'center',
|
||||
key: 'cqty'
|
||||
title: "单位",
|
||||
width: 70,
|
||||
align: "center",
|
||||
key: "cComUnitName",
|
||||
},
|
||||
{
|
||||
title: 'dqty',
|
||||
align: 'center',
|
||||
key: 'dqty'
|
||||
title: "属性",
|
||||
width: 70,
|
||||
align: "center",
|
||||
key: "std",
|
||||
},
|
||||
{
|
||||
title: 'issqty',
|
||||
align: 'center',
|
||||
key: 'issqty'
|
||||
title: "总需求(未领量)",
|
||||
align: "center",
|
||||
key: "wqty",
|
||||
},
|
||||
{
|
||||
title: 'momqty',
|
||||
align: 'center',
|
||||
key: 'momqty'
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "cqty",
|
||||
},
|
||||
{
|
||||
title: 'mqty',
|
||||
align: 'center',
|
||||
key: 'mqty'
|
||||
title: "已领(现场)",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
},
|
||||
{
|
||||
title: 'q',
|
||||
align: 'center',
|
||||
key: 'q'
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty',
|
||||
align: 'center',
|
||||
key: 'rqty'
|
||||
title: "采购在途",
|
||||
align: "center",
|
||||
key: "rqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty1',
|
||||
align: 'center',
|
||||
key: 'rqty1'
|
||||
title: "委外在途",
|
||||
align: "center",
|
||||
key: "rqty1",
|
||||
},
|
||||
{
|
||||
title: 'rqty3',
|
||||
align: 'center',
|
||||
key: 'rqty3'
|
||||
title: "请购",
|
||||
align: "center",
|
||||
key: "rqty3",
|
||||
},
|
||||
{
|
||||
title: 'std',
|
||||
align: 'center',
|
||||
key: 'std'
|
||||
title: "在制",
|
||||
align: "center",
|
||||
key: "momqty",
|
||||
},
|
||||
{
|
||||
title: 'wqty',
|
||||
align: 'center',
|
||||
key: 'wqty'
|
||||
}
|
||||
]
|
||||
}
|
||||
title:
|
||||
new Date().getFullYear() +
|
||||
(new Date().getMonth() + 1 < 10
|
||||
? "0" + (new Date().getMonth() + 1)
|
||||
: new Date().getMonth() + 1),
|
||||
align: "center",
|
||||
key: "iQuantity00",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title:
|
||||
new Date(new Date().setMonth(new Date().getMonth() - 1))
|
||||
.getFullYear()
|
||||
.toString() +
|
||||
(new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 1)
|
||||
).getMonth() +
|
||||
1 <
|
||||
10
|
||||
? "0" +
|
||||
(
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 1)
|
||||
).getMonth() + 1
|
||||
).toString()
|
||||
: (
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 1)
|
||||
).getMonth() + 1
|
||||
).toString()),
|
||||
align: "center",
|
||||
key: "iQuantity01",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title:
|
||||
new Date(new Date().setMonth(new Date().getMonth() - 2))
|
||||
.getFullYear()
|
||||
.toString() +
|
||||
(new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 2)
|
||||
).getMonth() +
|
||||
1 <
|
||||
10
|
||||
? "0" +
|
||||
(
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 2)
|
||||
).getMonth() + 1
|
||||
).toString()
|
||||
: (
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 2)
|
||||
).getMonth() + 1
|
||||
).toString()),
|
||||
align: "center",
|
||||
key: "iQuantity02",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title:
|
||||
new Date(new Date().setMonth(new Date().getMonth() - 3))
|
||||
.getFullYear()
|
||||
.toString() +
|
||||
(new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 3)
|
||||
).getMonth() +
|
||||
1 <
|
||||
10
|
||||
? "0" +
|
||||
(
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 3)
|
||||
).getMonth() + 1
|
||||
).toString()
|
||||
: (
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 3)
|
||||
).getMonth() + 1
|
||||
).toString()),
|
||||
align: "center",
|
||||
key: "iQuantity03",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title:
|
||||
new Date(new Date().setMonth(new Date().getMonth() - 4))
|
||||
.getFullYear()
|
||||
.toString() +
|
||||
(new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 4)
|
||||
).getMonth() +
|
||||
1 <
|
||||
10
|
||||
? "0" +
|
||||
(
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 4)
|
||||
).getMonth() + 1
|
||||
).toString()
|
||||
: (
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 4)
|
||||
).getMonth() + 1
|
||||
).toString()),
|
||||
align: "center",
|
||||
key: "iQuantity04",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title:
|
||||
new Date(new Date().setMonth(new Date().getMonth() - 5))
|
||||
.getFullYear()
|
||||
.toString() +
|
||||
(new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 5)
|
||||
).getMonth() +
|
||||
1 <
|
||||
10
|
||||
? "0" +
|
||||
(
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 5)
|
||||
).getMonth() + 1
|
||||
).toString()
|
||||
: (
|
||||
new Date(
|
||||
new Date().setMonth(new Date().getMonth() - 5)
|
||||
).getMonth() + 1
|
||||
).toString()),
|
||||
|
||||
align: "center",
|
||||
key: "iQuantity04",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length
|
||||
return this.datas.length;
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
||||
}
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas)
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
async loadData() {
|
||||
try {
|
||||
|
||||
let _filert = {
|
||||
inv_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n]/) : null,
|
||||
inv_codes:
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
inv_std: this.filter.inv_std,
|
||||
so_code: this.filter.so_code
|
||||
}
|
||||
let resp = await getInventorymonth(_filert)
|
||||
this.pageNo = 1
|
||||
this.datas = resp.data.data
|
||||
so_code: this.filter.so_code,
|
||||
};
|
||||
let resp = await getInventorymonth(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = sortByKey(resp.data.data, "cInvCode");
|
||||
} catch (error) {}
|
||||
},
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize
|
||||
}
|
||||
}
|
||||
}
|
||||
this.pageSize = pageSize;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style >
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-row td {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-error-row td {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-old {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-new {
|
||||
color: #ff6600;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -12,17 +12,32 @@
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>规格</label>
|
||||
<label>销售订单表</label>
|
||||
<Input v-model="filter.so_code" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Button @click="handleClick">查询</Button>
|
||||
<Button @click="handelExport">导出</Button>
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@click="handleClick"
|
||||
>查询</Button
|
||||
>
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px" size="small" border :columns="columns" :data="pagedData"> </Table>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
@@ -41,139 +56,199 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorysocode } from '@/api/pmc'
|
||||
import { pageingData, export_col_to_excel } from '@/libs/tools'
|
||||
import { getInventorysocode } from "@/api/pmc";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: '',
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: ''
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
key: 'invcode1',
|
||||
width: '100'
|
||||
title: "销售类型",
|
||||
align: "center",
|
||||
key: "cSTName",
|
||||
width: "120",
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
align: 'center',
|
||||
key: 'cinvname1',
|
||||
width: '120'
|
||||
title: "销售编号",
|
||||
align: "center",
|
||||
key: "cSOCode",
|
||||
width: "150",
|
||||
},
|
||||
|
||||
{
|
||||
title: '规格',
|
||||
align: 'center',
|
||||
key: 'cinvstd1',
|
||||
width: '250'
|
||||
title: "订单日期",
|
||||
align: "center",
|
||||
key: "dDate",
|
||||
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.dDate)} </div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'cqty',
|
||||
align: 'center',
|
||||
key: 'cqty'
|
||||
title: "行号",
|
||||
align: "center",
|
||||
key: "iRowNo",
|
||||
width: "80",
|
||||
},
|
||||
{
|
||||
title: 'dqty',
|
||||
align: 'center',
|
||||
key: 'dqty'
|
||||
title: "客户名称",
|
||||
align: "center",
|
||||
key: "cCusAbbName",
|
||||
},
|
||||
{
|
||||
title: 'issqty',
|
||||
align: 'center',
|
||||
key: 'issqty'
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "cInvCode",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'momqty',
|
||||
align: 'center',
|
||||
key: 'momqty'
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
},
|
||||
{
|
||||
title: 'mqty',
|
||||
align: 'center',
|
||||
key: 'mqty'
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cInvStd",
|
||||
width: "220",
|
||||
},
|
||||
{
|
||||
title: 'q',
|
||||
align: 'center',
|
||||
key: 'q'
|
||||
title: "订单数",
|
||||
align: "center",
|
||||
key: "iQuantity",
|
||||
},
|
||||
{
|
||||
title: 'rqty',
|
||||
align: 'center',
|
||||
key: 'rqty'
|
||||
title: "发货时间",
|
||||
align: "center",
|
||||
key: "fhdDate",
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.fhdDate)} </div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'rqty1',
|
||||
align: 'center',
|
||||
key: 'rqty1'
|
||||
title: "发货数量",
|
||||
align: "center",
|
||||
key: "fqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty3',
|
||||
align: 'center',
|
||||
key: 'rqty3'
|
||||
title: "出库数量",
|
||||
align: "center",
|
||||
key: "cqty",
|
||||
},
|
||||
{
|
||||
title: 'std',
|
||||
align: 'center',
|
||||
key: 'std'
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "qty",
|
||||
},
|
||||
{
|
||||
title: 'wqty',
|
||||
align: 'center',
|
||||
key: 'wqty'
|
||||
}
|
||||
]
|
||||
}
|
||||
title: "在制量",
|
||||
align: "center",
|
||||
key: "momqty",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length
|
||||
return this.datas.length;
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
||||
}
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas)
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData()
|
||||
console.log(2)
|
||||
this.loadData();
|
||||
console.log(2);
|
||||
},
|
||||
async loadData() {
|
||||
|
||||
let _filert = {
|
||||
inv_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n]/) : null,
|
||||
inv_codes:
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
inv_std: this.filter.inv_std,
|
||||
so_code: this.filter.so_code
|
||||
}
|
||||
let resp = await getInventorysocode(_filert)
|
||||
this.pageNo = 1
|
||||
this.datas = resp.data.data
|
||||
so_code: this.filter.so_code,
|
||||
};
|
||||
let resp = await getInventorysocode(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas =resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "cSOCode");
|
||||
},
|
||||
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize
|
||||
}
|
||||
}
|
||||
}
|
||||
this.pageSize = pageSize;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style >
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-row td {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-error-row td {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-old {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-new {
|
||||
color: #ff6600;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -11,18 +11,30 @@
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.so_code" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Button @click="handleClick">查询</Button>
|
||||
<Button @click="handelExport">导出</Button>
|
||||
|
||||
<Col span="8">
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@click="handleClick"
|
||||
>查询</Button
|
||||
>
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px" size="small" border :columns="columns" :data="pagedData"> </Table>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
@@ -41,139 +53,187 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventoryall } from '@/api/pmc'
|
||||
import { pageingData, export_col_to_excel } from '@/libs/tools'
|
||||
import { getInventoryall } from "@/api/pmc";
|
||||
import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: '',
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: ''
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
key: 'invcode1',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
align: 'center',
|
||||
key: 'cinvname1',
|
||||
width: '120'
|
||||
type: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: '规格',
|
||||
align: 'center',
|
||||
key: 'cinvstd1',
|
||||
width: '250'
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "invcode1",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: 'cqty',
|
||||
align: 'center',
|
||||
key: 'cqty'
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'dqty',
|
||||
align: 'center',
|
||||
key: 'dqty'
|
||||
title: "规格型号",
|
||||
width: 200,
|
||||
align: "center",
|
||||
key: "cinvstd1",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'issqty',
|
||||
align: 'center',
|
||||
key: 'issqty'
|
||||
title: "单位",
|
||||
width: 80,
|
||||
align: "center",
|
||||
key: "c_com_unit_name",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'momqty',
|
||||
align: 'center',
|
||||
key: 'momqty'
|
||||
title: "属性",
|
||||
align: "center",
|
||||
key: "std",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: 'mqty',
|
||||
align: 'center',
|
||||
key: 'mqty'
|
||||
title: "总需求(未领量)",
|
||||
align: "center",
|
||||
key: "wqty",
|
||||
},
|
||||
{
|
||||
title: 'q',
|
||||
align: 'center',
|
||||
key: 'q'
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "cqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty',
|
||||
align: 'center',
|
||||
key: 'rqty'
|
||||
title: "已领(现场)",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty1',
|
||||
align: 'center',
|
||||
key: 'rqty1'
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
},
|
||||
{
|
||||
title: 'rqty3',
|
||||
align: 'center',
|
||||
key: 'rqty3'
|
||||
title: "采购在途",
|
||||
align: "center",
|
||||
key: "rqty",
|
||||
},
|
||||
{
|
||||
title: 'std',
|
||||
align: 'center',
|
||||
key: 'std'
|
||||
title: "委外在途",
|
||||
align: "center",
|
||||
key: "rqty1",
|
||||
},
|
||||
{
|
||||
title: 'wqty',
|
||||
align: 'center',
|
||||
key: 'wqty'
|
||||
}
|
||||
]
|
||||
}
|
||||
title: "请购",
|
||||
align: "center",
|
||||
key: "rqty3",
|
||||
},
|
||||
{
|
||||
title: "在制",
|
||||
align: "center",
|
||||
key: "momqty",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length
|
||||
return this.datas.length;
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
||||
}
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas)
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData()
|
||||
console.log(2)
|
||||
this.loadData();
|
||||
console.log(2);
|
||||
},
|
||||
async loadData() {
|
||||
|
||||
let _filert = {
|
||||
inv_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n]/) : null,
|
||||
inv_codes:
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
inv_std: this.filter.inv_std,
|
||||
so_code: this.filter.so_code
|
||||
}
|
||||
let resp = await getInventoryall(_filert)
|
||||
this.pageNo = 1
|
||||
this.datas = resp.data.data
|
||||
so_code: this.filter.so_code,
|
||||
};
|
||||
let resp = await getInventoryall(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = sortByKey(resp.data.data, "invcode1");
|
||||
},
|
||||
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize
|
||||
}
|
||||
}
|
||||
}
|
||||
this.pageSize = pageSize;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style >
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-row td {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-error-row td {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-old {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-new {
|
||||
color: #ff6600;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -43,7 +43,7 @@ module.exports = {
|
||||
.test(/ivuew.src.*?js$/)
|
||||
.use('bable')
|
||||
.loader('bable-loader')
|
||||
.end()``
|
||||
.end()
|
||||
// config.externals({
|
||||
// vue: 'vue',
|
||||
// vuex: 'vuex',
|
||||
@@ -61,7 +61,9 @@ module.exports = {
|
||||
target: 'http://localhost:61448', // 接口域名
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {}
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user