This commit is contained in:
杰 朱
2021-05-03 15:49:34 +08:00
parent a3d1e40197
commit 8562211679
10 changed files with 850 additions and 442 deletions

View File

@@ -121,7 +121,7 @@ namespace NX.ERP.U8.Pmc
{ {
string sql = $@" string sql = $@"
SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty, ma.InvCode invcode1, SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty, ma.InvCode invcode1,
c.cInvName cinvname1, c.cInvStd cinvstd1,LL.cComUnitName, CASE WHEN c.bPurchase = 1 AND c.cInvName cinvname1, c.cInvStd cinvstd1,LL.cComUnitName as cComUnitName1, CASE WHEN c.bPurchase = 1 AND
c.bProxyForeign = 1 THEN '委外' WHEN c.bPurchase = 1 THEN '外购' WHEN c.bself = 1 THEN '自制' ELSE '其它' END AS c.bProxyForeign = 1 THEN '委外' WHEN c.bPurchase = 1 THEN '外购' WHEN c.bself = 1 THEN '自制' ELSE '其它' END AS
std, ma.Qty qty1, ma.IssQty issqty, mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty, std, ma.Qty qty1, ma.IssQty issqty, mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty,
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, mas.wqty - isnull(cs.qty, 0) - ISNULL(prd.Rqty, 0) ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, mas.wqty - isnull(cs.qty, 0) - ISNULL(prd.Rqty, 0)
@@ -338,7 +338,7 @@ namespace NX.ERP.U8.Pmc
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.Inventoryall info1) public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.Inventoryall info1)
{ {
string sql = $@" string sql = $@"
select j.cSTName,b.cSOCode,b.dDate,a.iRowNo,f.cCusAbbName,a.cInvCode,a.cInvName,g.cInvStd,a.iQuantity,isnull( h.dDate,'') as fhdDate ,isnull(c.fqty,0)fqty,isnull(d.cqty,0)cqty select j.cSTName,b.cSOCode,b.dDate,a.iRowNo,f.cCusAbbName,a.cInvCode,a.cInvName,g.cInvStd,a.iQuantity, h.dDate as fhdDate ,isnull(c.fqty,0)fqty,isnull(d.cqty,0)cqty
,isnull(cs.qty,0)qty,isnull(momq.momqty,0)momqty ,isnull(cs.qty,0)qty,isnull(momq.momqty,0)momqty
from SO_SODetails a WITH (nolock) left join SO_SOMain b WITH (nolock) on a.ID=b.id from SO_SODetails a WITH (nolock) left join SO_SOMain b WITH (nolock) on a.ID=b.id
LEFT JOIN LEFT JOIN

2
NX.ERP.Webapp/dev.bat Normal file
View File

@@ -0,0 +1,2 @@
start cmd /min /k npm-dev.bat

View File

@@ -0,0 +1,2 @@
npm run dev

View File

@@ -1704,6 +1704,16 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true "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": { "cacache": {
"version": "13.0.1", "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", "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" "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": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
@@ -1746,6 +1803,16 @@
"minipass": "^3.1.1" "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": { "terser-webpack-plugin": {
"version": "2.3.8", "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", "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", "terser": "^4.6.12",
"webpack-sources": "^1.4.3" "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, "dev": true,
"optional": 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": { "bluebird": {
"version": "3.7.2", "version": "3.7.2",
"resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz",
@@ -5418,13 +5487,6 @@
"schema-utils": "^2.5.0" "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": { "filesize": {
"version": "3.6.1", "version": "3.6.1",
"resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz", "resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz",
@@ -5649,8 +5711,8 @@
}, },
"fsevents": { "fsevents": {
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
@@ -7723,13 +7785,6 @@
"thenify-all": "^1.0.0" "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": { "nanomatch": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", "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": { "vue-router": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz",
@@ -11573,14 +11547,10 @@
}, },
"fsevents": { "fsevents": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true, "dev": true,
"optional": true, "optional": true
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}, },
"glob-parent": { "glob-parent": {
"version": "3.1.0", "version": "3.1.0",
@@ -11888,14 +11858,10 @@
}, },
"fsevents": { "fsevents": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true, "dev": true,
"optional": true, "optional": true
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}, },
"glob-parent": { "glob-parent": {
"version": "3.1.0", "version": "3.1.0",

View File

@@ -2,7 +2,10 @@ import formatDate from 'dateformat'
import axios from 'axios' import axios from 'axios'
import XLSX from 'xlsx' import XLSX from 'xlsx'
export const dateFormat = (date) => { 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) => { export const dateFormatFull = (date) => {
@@ -70,6 +73,14 @@ export const gethours = (k) => {
return ar 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) => { export const pageingData = (data, pagesize, index) => {
if (!data) return [] if (!data) return []
let pageNo = 1 let pageNo = 1

View File

@@ -15,7 +15,14 @@
</Row> </Row>
</div> </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 <Page
style="margin-top: 20px" style="margin-top: 20px"
@@ -34,136 +41,231 @@
</template> </template>
<script> <script>
import { getInventorymom } from '@/api/pmc' import { getInventorymom } from "@/api/pmc";
import { pageingData, export_col_to_excel } from '@/libs/tools' import { pageingData, export_col_to_excel,sortByKey } from "@/libs/tools";
export default { export default {
data() { data() {
return { return {
PageSizeOpts: [10, 15, 20, 30], PageSizeOpts: [10, 15, 20, 30],
pageNo: 1, pageNo: 1,
strfilter: '', strfilter: "",
multiple: false, multiple: false,
pageSize: 15, pageSize: 15,
datas: [], datas: [],
filter: { filter: {
inv_codes: '', inv_codes: "",
inv_std: '', inv_std: "",
so_code: '' so_code: "",
}, },
columns: [ columns: [
{ {
title: '编号', type: "index",
align: 'center', title: "序号",
key: 'invcode1', width: 60,
width: '100' align: "center",
}, },
{ {
title: '名称', title: "生产订单号",
align: 'center', align: "center",
key: 'cinvname1', key: "mocode",
width: '120' className: "demo-table-info-new",
},
{
title: '规格',
align: 'center',
key: 'cinvstd1',
width: '250'
}, },
{ {
title: 'cqty', title: "订单行号",
align: 'center', align: "center",
key: 'cqty' key: "SortSeq",
className: "demo-table-info-new",
}, },
{ {
title: 'dqty', title: "产品编码",
align: 'center', align: "center",
key: 'dqty' key: "InvCode",
className: "demo-table-info-new",
}, },
{ {
title: 'issqty', title: "产品名称",
align: 'center', align: "center",
key: 'issqty' key: "cInvName",
className: "demo-table-info-new",
}, },
{ {
title: 'momqty', title: "产品规格",
align: 'center', align: "center",
key: 'momqty' key: "cInvStd",
className: "demo-table-info-new",
}, },
{ {
title: 'mqty', title: "产品单位",
align: 'center', align: "center",
key: 'mqty' key: "cComUnitName",
className: "demo-table-info-new",
}, },
{ {
title: 'q', title: "投产量",
align: 'center', align: "center",
key: 'q' key: "Qty",
className: "demo-table-info-new",
}, },
{ {
title: 'rqty', title: "未完成",
align: 'center', align: "center",
key: 'rqty' key: "QualifiedInQty",
className: "demo-table-info-new",
}, },
{ {
title: 'rqty1', title: "子件编码",
align: 'center', align: "center",
key: 'rqty1' key: "invcode1",
className: "demo-table-info-old",
}, },
{ {
title: 'rqty3', title: "子件名称",
align: 'center', align: "center",
key: 'rqty3' key: "cinvname1",
className: "demo-table-info-old",
}, },
{ {
title: 'std', title: "子件规格",
align: 'center', width: 200,
key: 'std' align: "center",
key: "cinvstd1",
className: "demo-table-info-old",
}, },
{ {
title: 'wqty', title: "子件单位",
align: 'center', width: 80,
key: 'wqty' 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: { computed: {
total() { total() {
return this.datas.length return this.datas.length;
}, },
pagedData() { pagedData() {
return pageingData(this.datas, this.pageSize, this.pageNo) return pageingData(this.datas, this.pageSize, this.pageNo);
} },
}, },
mounted() { mounted() {
this.loadData() this.loadData();
}, },
methods: { methods: {
handelExport() { handelExport() {
export_col_to_excel(this.columns, this.datas) export_col_to_excel(this.columns, this.datas);
}, },
handleClick() { handleClick() {
this.loadData() this.loadData();
}, },
async loadData() { async loadData() {
try { 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) let resp = await getInventorymom(_filetr);
this.pageNo = 1 this.pageNo = 1;
this.datas = resp.data.data this.datas = resp.data.data;
} catch (error) {} } catch (error) {}
}, },
handlePagechange(page) { handlePagechange(page) {
this.pageNo = page this.pageNo = page;
}, },
handlePageSize(pageSize) { handlePageSize(pageSize) {
this.pageSize = pageSize this.pageSize = pageSize;
} },
} },
} };
</script> </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> </style>

View File

@@ -11,18 +11,30 @@
<label>规格</label> <label>规格</label>
<Input v-model="filter.inv_std" /> <Input v-model="filter.inv_std" />
</Col> </Col>
<Col span="4"> <Col span="4">
<label>规格</label> <Button
<Input v-model="filter.so_code" /> size="large"
</Col> type="primary"
<Col span="4"> icon="ios-search"
<Button @click="handleClick">查询</Button> @click="handleClick"
<Button @click="handelExport">导出</Button> >查询</Button
>
<Button size="large" type="success" @click="handelExport"
>导出</Button
>
</Col> </Col>
</Row> </Row>
</div> </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 <Page
style="margin-top: 20px" style="margin-top: 20px"
@@ -41,140 +53,316 @@
</template> </template>
<script> <script>
import { getInventorymonth } from '@/api/pmc' import { getInventorymonth } from "@/api/pmc";
import { pageingData, export_col_to_excel } from '@/libs/tools' import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
export default { export default {
data() { data() {
return { return {
PageSizeOpts: [10, 15, 20, 30], PageSizeOpts: [10, 15, 20, 30],
pageNo: 1, pageNo: 1,
strfilter: '', strfilter: "",
multiple: false, multiple: false,
pageSize: 15, pageSize: 15,
datas: [], datas: [],
filter: { filter: {
inv_codes: '', inv_codes: "",
inv_std: '', inv_std: "",
so_code: '' so_code: "",
}, },
columns: [ columns: [
{ {
title: '编号', title: "存货编号",
align: 'center', align: "center",
key: 'invcode1', key: "cInvCode",
width: '100' width: "90",
className: "demo-table-info-new",
}, },
{ {
title: '名称', title: "存货名称",
align: 'center', align: "center",
key: 'cinvname1', key: "cInvName",
width: '120' width: "120",
}, },
{ {
title: '规格', title: "规格",
align: 'center', align: "center",
key: 'cinvstd1', key: "cInvStd",
width: '250' width: "220",
}, },
{ {
title: 'cqty', title: "单位",
align: 'center', width: 70,
key: 'cqty' align: "center",
key: "cComUnitName",
}, },
{ {
title: 'dqty', title: "属性",
align: 'center', width: 70,
key: 'dqty' align: "center",
key: "std",
}, },
{ {
title: 'issqty', title: "总需求(未领量)",
align: 'center', align: "center",
key: 'issqty' key: "wqty",
}, },
{ {
title: 'momqty', title: "现存量",
align: 'center', align: "center",
key: 'momqty' key: "cqty",
}, },
{ {
title: 'mqty', title: "已领(现场)",
align: 'center', align: "center",
key: 'mqty' key: "issqty",
}, },
{ {
title: 'q', title: "现存无废品",
align: 'center', align: "center",
key: 'q' key: "dqty",
}, },
{ {
title: 'rqty', title: "采购在途",
align: 'center', align: "center",
key: 'rqty' key: "rqty",
}, },
{ {
title: 'rqty1', title: "委外在途",
align: 'center', align: "center",
key: 'rqty1' key: "rqty1",
}, },
{ {
title: 'rqty3', title: "请购",
align: 'center', align: "center",
key: 'rqty3' key: "rqty3",
}, },
{ {
title: 'std', title: "在制",
align: 'center', align: "center",
key: 'std' key: "momqty",
}, },
{ {
title: 'wqty', title:
align: 'center', new Date().getFullYear() +
key: 'wqty' (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: { computed: {
total() { total() {
return this.datas.length return this.datas.length;
}, },
pagedData() { pagedData() {
return pageingData(this.datas, this.pageSize, this.pageNo) return pageingData(this.datas, this.pageSize, this.pageNo);
} },
}, },
mounted() { mounted() {
this.loadData() this.loadData();
}, },
methods: { methods: {
handelExport() { handelExport() {
export_col_to_excel(this.columns, this.datas) export_col_to_excel(this.columns, this.datas);
}, },
handleClick() { handleClick() {
this.loadData() this.loadData();
}, },
async loadData() { async loadData() {
try { try {
let _filert = { 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, inv_std: this.filter.inv_std,
so_code: this.filter.so_code so_code: this.filter.so_code,
} };
let resp = await getInventorymonth(_filert) let resp = await getInventorymonth(_filert);
this.pageNo = 1 this.pageNo = 1;
this.datas = resp.data.data this.datas = sortByKey(resp.data.data, "cInvCode");
} catch (error) {} } catch (error) {}
}, },
handlePagechange(page) { handlePagechange(page) {
this.pageNo = page this.pageNo = page;
}, },
handlePageSize(pageSize) { handlePageSize(pageSize) {
this.pageSize = pageSize this.pageSize = pageSize;
} },
} },
} };
</script> </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> </style>

View File

@@ -12,17 +12,32 @@
<Input v-model="filter.inv_std" /> <Input v-model="filter.inv_std" />
</Col> </Col>
<Col span="4"> <Col span="4">
<label>规格</label> <label>销售订单表</label>
<Input v-model="filter.so_code" /> <Input v-model="filter.so_code" />
</Col> </Col>
<Col span="4"> <Col span="4">
<Button @click="handleClick">查询</Button> <Button
<Button @click="handelExport">导出</Button> size="large"
type="primary"
icon="ios-search"
@click="handleClick"
>查询</Button
>
<Button size="large" type="success" @click="handelExport"
>导出</Button
>
</Col> </Col>
</Row> </Row>
</div> </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 <Page
style="margin-top: 20px" style="margin-top: 20px"
@@ -41,139 +56,199 @@
</template> </template>
<script> <script>
import { getInventorysocode } from '@/api/pmc' import { getInventorysocode } from "@/api/pmc";
import { pageingData, export_col_to_excel } from '@/libs/tools' import {
pageingData,
export_col_to_excel,
dateFormatFull,
dateFormat,
sortByKey,
} from "@/libs/tools";
export default { export default {
data() { data() {
return { return {
PageSizeOpts: [10, 15, 20, 30], PageSizeOpts: [10, 15, 20, 30],
pageNo: 1, pageNo: 1,
strfilter: '', strfilter: "",
multiple: false, multiple: false,
pageSize: 15, pageSize: 15,
datas: [], datas: [],
filter: { filter: {
inv_codes: '', inv_codes: "",
inv_std: '', inv_std: "",
so_code: '' so_code: "",
}, },
columns: [ columns: [
{ {
title: '编号', title: "销售类型",
align: 'center', align: "center",
key: 'invcode1', key: "cSTName",
width: '100' width: "120",
}, },
{ {
title: '名称', title: "销售编号",
align: 'center', align: "center",
key: 'cinvname1', key: "cSOCode",
width: '120' width: "150",
}, },
{ {
title: '规格', title: "订单日期",
align: 'center', align: "center",
key: 'cinvstd1', key: "dDate",
width: '250'
render: (h, params) => {
return <div> {dateFormat(params.row.dDate)} </div>;
},
}, },
{ {
title: 'cqty', title: "行号",
align: 'center', align: "center",
key: 'cqty' key: "iRowNo",
width: "80",
}, },
{ {
title: 'dqty', title: "客户名称",
align: 'center', align: "center",
key: 'dqty' key: "cCusAbbName",
}, },
{ {
title: 'issqty', title: "产品编码",
align: 'center', align: "center",
key: 'issqty' key: "cInvCode",
className: "demo-table-info-new",
}, },
{ {
title: 'momqty', title: "产品名称",
align: 'center', align: "center",
key: 'momqty' key: "cInvName",
}, },
{ {
title: 'mqty', title: "规格型号",
align: 'center', align: "center",
key: 'mqty' key: "cInvStd",
width: "220",
}, },
{ {
title: 'q', title: "订单数",
align: 'center', align: "center",
key: 'q' key: "iQuantity",
}, },
{ {
title: 'rqty', title: "发货时间",
align: 'center', align: "center",
key: 'rqty' key: "fhdDate",
render: (h, params) => {
return <div> {dateFormat(params.row.fhdDate)} </div>;
},
}, },
{ {
title: 'rqty1', title: "发货数量",
align: 'center', align: "center",
key: 'rqty1' key: "fqty",
}, },
{ {
title: 'rqty3', title: "出库数量",
align: 'center', align: "center",
key: 'rqty3' key: "cqty",
}, },
{ {
title: 'std', title: "现存量",
align: 'center', align: "center",
key: 'std' key: "qty",
}, },
{ {
title: 'wqty', title: "在制量",
align: 'center', align: "center",
key: 'wqty' key: "momqty",
} },
] ],
} };
}, },
computed: { computed: {
total() { total() {
return this.datas.length return this.datas.length;
}, },
pagedData() { pagedData() {
return pageingData(this.datas, this.pageSize, this.pageNo) return pageingData(this.datas, this.pageSize, this.pageNo);
}
}, },
},
mounted() { mounted() {
this.loadData() this.loadData();
}, },
methods: { methods: {
handelExport() { handelExport() {
export_col_to_excel(this.columns, this.datas) export_col_to_excel(this.columns, this.datas);
}, },
handleClick() { handleClick() {
this.loadData() this.loadData();
console.log(2) console.log(2);
}, },
async loadData() { async loadData() {
let _filert = { 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, inv_std: this.filter.inv_std,
so_code: this.filter.so_code so_code: this.filter.so_code,
} };
let resp = await getInventorysocode(_filert) let resp = await getInventorysocode(_filert);
this.pageNo = 1 this.pageNo = 1;
this.datas = resp.data.data this.datas =resp.data.data;
this.datas = sortByKey(resp.data.data, "cSOCode");
}, },
handlePagechange(page) { handlePagechange(page) {
this.pageNo = page this.pageNo = page;
}, },
handlePageSize(pageSize) { handlePageSize(pageSize) {
this.pageSize = pageSize this.pageSize = pageSize;
} },
} },
} };
</script> </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> </style>

View File

@@ -11,18 +11,30 @@
<label>规格</label> <label>规格</label>
<Input v-model="filter.inv_std" /> <Input v-model="filter.inv_std" />
</Col> </Col>
<Col span="4">
<label>规格</label> <Col span="8">
<Input v-model="filter.so_code" /> <Button
</Col> size="large"
<Col span="4"> type="primary"
<Button @click="handleClick">查询</Button> icon="ios-search"
<Button @click="handelExport">导出</Button> @click="handleClick"
>查询</Button
>
<Button size="large" type="success" @click="handelExport"
>导出</Button
>
</Col> </Col>
</Row> </Row>
</div> </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 <Page
style="margin-top: 20px" style="margin-top: 20px"
@@ -41,139 +53,187 @@
</template> </template>
<script> <script>
import { getInventoryall } from '@/api/pmc' import { getInventoryall } from "@/api/pmc";
import { pageingData, export_col_to_excel } from '@/libs/tools' import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
export default { export default {
data() { data() {
return { return {
PageSizeOpts: [10, 15, 20, 30], PageSizeOpts: [10, 15, 20, 30],
pageNo: 1, pageNo: 1,
strfilter: '', strfilter: "",
multiple: false, multiple: false,
pageSize: 15, pageSize: 15,
datas: [], datas: [],
filter: { filter: {
inv_codes: '', inv_codes: "",
inv_std: '', inv_std: "",
so_code: '' so_code: "",
}, },
columns: [ columns: [
{ {
title: '编号', type: "index",
align: 'center', title: "序号",
key: 'invcode1', width: 60,
width: '100' align: "center",
},
{
title: '名称',
align: 'center',
key: 'cinvname1',
width: '120'
}, },
{ {
title: '规格', title: "存货编码",
align: 'center', align: "center",
key: 'cinvstd1', key: "invcode1",
width: '250' className: "demo-table-info-new",
}, },
{ {
title: 'cqty', title: "存货名称",
align: 'center', align: "center",
key: 'cqty' key: "cinvname1",
className: "demo-table-info-old",
}, },
{ {
title: 'dqty', title: "规格型号",
align: 'center', width: 200,
key: 'dqty' align: "center",
key: "cinvstd1",
className: "demo-table-info-old",
}, },
{ {
title: 'issqty', title: "单位",
align: 'center', width: 80,
key: 'issqty' align: "center",
key: "c_com_unit_name",
className: "demo-table-info-old",
}, },
{ {
title: 'momqty', title: "属性",
align: 'center', align: "center",
key: 'momqty' key: "std",
className: "demo-table-info-old",
}, },
{ {
title: 'mqty', title: "总需求(未领量)",
align: 'center', align: "center",
key: 'mqty' key: "wqty",
}, },
{ {
title: 'q', title: "现存量",
align: 'center', align: "center",
key: 'q' key: "cqty",
}, },
{ {
title: 'rqty', title: "已领(现场)",
align: 'center', align: "center",
key: 'rqty' key: "issqty",
}, },
{ {
title: 'rqty1', title: "现存无废品",
align: 'center', align: "center",
key: 'rqty1' key: "dqty",
}, },
{ {
title: 'rqty3', title: "采购在途",
align: 'center', align: "center",
key: 'rqty3' key: "rqty",
}, },
{ {
title: 'std', title: "委外在途",
align: 'center', align: "center",
key: 'std' key: "rqty1",
}, },
{ {
title: 'wqty', title: "请购",
align: 'center', align: "center",
key: 'wqty' key: "rqty3",
} },
] {
} title: "在制",
align: "center",
key: "momqty",
},
],
};
}, },
computed: { computed: {
total() { total() {
return this.datas.length return this.datas.length;
}, },
pagedData() { pagedData() {
return pageingData(this.datas, this.pageSize, this.pageNo) return pageingData(this.datas, this.pageSize, this.pageNo);
} },
}, },
mounted() { mounted() {
this.loadData() this.loadData();
}, },
methods: { methods: {
handelExport() { handelExport() {
export_col_to_excel(this.columns, this.datas) export_col_to_excel(this.columns, this.datas);
}, },
handleClick() { handleClick() {
this.loadData() this.loadData();
console.log(2) console.log(2);
}, },
async loadData() { async loadData() {
let _filert = { 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, inv_std: this.filter.inv_std,
so_code: this.filter.so_code so_code: this.filter.so_code,
} };
let resp = await getInventoryall(_filert) let resp = await getInventoryall(_filert);
this.pageNo = 1 this.pageNo = 1;
this.datas = resp.data.data this.datas = sortByKey(resp.data.data, "invcode1");
}, },
handlePagechange(page) { handlePagechange(page) {
this.pageNo = page this.pageNo = page;
}, },
handlePageSize(pageSize) { handlePageSize(pageSize) {
this.pageSize = pageSize this.pageSize = pageSize;
} },
} },
} };
</script> </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> </style>

View File

@@ -43,7 +43,7 @@ module.exports = {
.test(/ivuew.src.*?js$/) .test(/ivuew.src.*?js$/)
.use('bable') .use('bable')
.loader('bable-loader') .loader('bable-loader')
.end()`` .end()
// config.externals({ // config.externals({
// vue: 'vue', // vue: 'vue',
// vuex: 'vuex', // vuex: 'vuex',
@@ -61,7 +61,9 @@ module.exports = {
target: 'http://localhost:61448', // 接口域名 target: 'http://localhost:61448', // 接口域名
changeOrigin: true, // 是否跨域 changeOrigin: true, // 是否跨域
pathRewrite: {} pathRewrite: {}
},
} }
} }
}
} }